Vector nodes have the ability to run meta-transactions. Since nodes can be on different chains through a router, it is possible to run meta-transactions cross-chain.
Meta-transactions are enabled by a Withdraw Helper contract. This contract needs to be deployed on the chain that the meta transaction will be deployed on.
Once a withdraw commitment is created in channel, the funds are no longer retrievable within the channel. This means the withdraw call onchain MUST work and not revert. Any external calls must be handled and the funds can be refunded to a fallback address if something does not work as expected.
The Withdraw Helper must implement the following interface.
NOTE: This example needs to be updated to try-catch external function calls!
Here is an example contract that calls Uniswap functions: https://github.com/connext/vector-withdraw-helpers/blob/main/contracts/UniswapWithdrawHelper/UniswapWithdrawHelper.sol
The withdraw function (API Reference) of the Vector node has optional parameters for callTo and callData. If these parameters are provided, the execute function is called on the contract specified in the callTo address.
Here is an example dapp that is using the UniswapWithdrawHelper: https://github.com/makoto/off-l1/blob/master/packages/react-app/src/connext.ts#L315