All proxy functions must follow the signature
function name(bytes calldata tacHeader, bytes calldata arguments)
.
The arguments
parameter contains your custom ABI-encoded data.Basic Encoding Patterns
Simple Parameters
You typically define a struct that represents the arguments your proxy function expects:Advanced Encoding Patterns
Complex Example with Nested Structures
For structs containing other structs:Complex Example with Dynamic Arrays
For structs containing arrays:TAC SDK Integration
When using the tac-sdk to create messages for bridging, you must provide:- target: the address of your Proxy contract
- method_name: the complete function signature, e.g.
"myProxyFunction(bytes,bytes)"
- arguments: the ABI-encoded arguments (second parameter in your proxy function)
- gasLimit (optional): the parameter that will be passed to the TAC side. The executor must allocate at least
gasLimit
gas for executing the transaction on the TAC side. If this parameter is not specified, it will be calculated using thesimulateEVMMessage
method (preferred)
Decoding in Proxy Functions
Your proxy functions decode the arguments usingabi.decode()
: