Skip to main content
Mayan Forwarder serves as the entry point for interacting with our set of smart contracts, providing a unified interface to all three cross-chain swap methods: WH Swap, MCTP, and Swift. The Forwarder maintains a whitelist of protocol addresses that user can interact with to ensure safetey of user in case of receiving a comporomised quote from API. The Forwarder smart contract is deployed on the following EVM networks with address: 0x337685fdaB40D39bd02028545a4FfA7D287cC3E2
  • Ethereum
  • Arbitrum
  • Base
  • Optimism
  • Avalanche
  • Polygon
  • BSC
  • Unichain
  • Linea

Swap From EVM

To initiate a swap with an ERC20 token as input token you should first approve the required allowance to the forwarder contract or alternatively pass permit object to the contract.
Once you approved the spending amount, you can get the complete transaction payload by using getSwapFromEvmTxPayload from SDK and then pass it to the Forwarder contract. If you need to build the payload manually and use Mayan Forwarder, you should choose the right method based on your input token:
  • forwardERC20: Your input token is ERC20
  • swapAndForwardERC20: Similar to forwardERC20 but you also need a swap in source chain before the actual bridging.
  • forwardEth: Your input token is the native token of chain
  • swapAndForwardEth: Similar to forwardEth but you need a swap before the actual bridging.