πŸͺCreate & execute a transaction on Moonbeam after bridging tokens (post-hook)

How to add a post-hook on Moonbeam parachainn to a route request after a cross-chain swap from an EVM chain using Squid SDK

Create a valid post-Hook object on the destination chain

postHook: {
            chainType: "evm",
            calls: [
              {
                chainType: "evm",
                callType: 2,
                target: bSwapAddress,
                value: "0", 
                callData: bdEncodedData,
                payload: {
                  tokenAddress: "0xAcc15dC74880C9944775448304B263D191c6077F", 
                  inputPos: 0,
                },
                estimatedGas: "150000",
              },
              {
                chainType: "evm",
                callType: 1,
                target: glmbAddress,
                value: "0",
                callData: approvalEncodedData,
                payload: {
                  tokenAddress: glmbAddress,
                  inputPos: 1,
                },
                estimatedGas: "150000",
              }
            ]
          }

Last updated