IStargateReceiver.sol
A contract that implements sgReceive() can perform powerful logic on the receiving chain.
This interface should be implemented by contracts that receive a swap():
This is a very powerful feature of Stargate, because with it you can perform additional logic upon receiving tokens on the destination chain!
As an example of something the LayerZero team built using IStargateReceiver
, we used an AMM to swapExactTokensForTokens() using the Stargate swap()'ed USDC into native token on the destination chain.
Last updated