> ## Documentation Index
> Fetch the complete documentation index at: https://docs.layerzero.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrating Stargate Transfers

> Overview of Integrating Stargate Transfers on LayerZero V2. Learn the architecture, features, and how to get started building. LayerZero enables secure...

export const InteractiveContract = ({contractName, functionName, abi: abiProp, description = null, showDeployments = true, disableChainSelection = true}) => {
  const {useState, useEffect, useRef, useMemo} = React;
  const EMBEDDED_ABIS = {
    EndpointV2: [{
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_srcEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_sender",
        "type": "bytes32"
      }, {
        "internalType": "uint64",
        "name": "_nonce",
        "type": "uint64"
      }, {
        "internalType": "bytes32",
        "name": "_payloadHash",
        "type": "bytes32"
      }],
      "name": "burn",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }],
      "name": "clear",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_from",
        "type": "address"
      }, {
        "internalType": "address",
        "name": "_to",
        "type": "address"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "uint16",
        "name": "_index",
        "type": "uint16"
      }],
      "name": "composeQueue",
      "outputs": [{
        "internalType": "bytes32",
        "name": "messageHash",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "defaultReceiveLibrary",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "defaultReceiveLibraryTimeout",
      "outputs": [{
        "internalType": "address",
        "name": "lib",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "expiry",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "defaultSendLibrary",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "oapp",
        "type": "address"
      }],
      "name": "delegates",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "eid",
      "outputs": [{
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "uint32",
        "name": "_configType",
        "type": "uint32"
      }],
      "name": "getConfig",
      "outputs": [{
        "internalType": "bytes",
        "name": "config",
        "type": "bytes"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "getReceiveLibrary",
      "outputs": [{
        "internalType": "address",
        "name": "lib",
        "type": "address"
      }, {
        "internalType": "bool",
        "name": "isDefault",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "getRegisteredLibraries",
      "outputs": [{
        "internalType": "address[]",
        "name": "",
        "type": "address[]"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "getSendContext",
      "outputs": [{
        "internalType": "uint32",
        "name": "dstEid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "sender",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "getSendLibrary",
      "outputs": [{
        "internalType": "address",
        "name": "lib",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_srcEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_sender",
        "type": "bytes32"
      }],
      "name": "inboundNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_srcEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_sender",
        "type": "bytes32"
      }, {
        "internalType": "uint64",
        "name": "_nonce",
        "type": "uint64"
      }],
      "name": "inboundPayloadHash",
      "outputs": [{
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }],
      "name": "initializable",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "isDefaultSendLibrary",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }],
      "name": "isRegisteredLibrary",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "isSendingMessage",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "isSupportedEid",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }],
      "name": "isValidReceiveLibrary",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_srcEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_sender",
        "type": "bytes32"
      }],
      "name": "lazyInboundNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_from",
        "type": "address"
      }, {
        "internalType": "address",
        "name": "_to",
        "type": "address"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "uint16",
        "name": "_index",
        "type": "uint16"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzCompose",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceive",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [],
      "name": "lzToken",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "nativeToken",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_dstEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_receiver",
        "type": "bytes32"
      }],
      "name": "nextGuid",
      "outputs": [{
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_srcEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_sender",
        "type": "bytes32"
      }, {
        "internalType": "uint64",
        "name": "_nonce",
        "type": "uint64"
      }, {
        "internalType": "bytes32",
        "name": "_payloadHash",
        "type": "bytes32"
      }],
      "name": "nilify",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_dstEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_receiver",
        "type": "bytes32"
      }],
      "name": "outboundNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "receiver",
          "type": "bytes32"
        }, {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "options",
          "type": "bytes"
        }, {
          "internalType": "bool",
          "name": "payInLzToken",
          "type": "bool"
        }],
        "internalType": "struct MessagingParams",
        "name": "_params",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }],
      "name": "quote",
      "outputs": [{
        "components": [{
          "internalType": "uint256",
          "name": "nativeFee",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "lzTokenFee",
          "type": "uint256"
        }],
        "internalType": "struct MessagingFee",
        "name": "",
        "type": "tuple"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }],
      "name": "receiveLibraryTimeout",
      "outputs": [{
        "internalType": "address",
        "name": "lib",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "expiry",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }],
      "name": "registerLibrary",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "receiver",
          "type": "bytes32"
        }, {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "options",
          "type": "bytes"
        }, {
          "internalType": "bool",
          "name": "payInLzToken",
          "type": "bool"
        }],
        "internalType": "struct MessagingParams",
        "name": "_params",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_refundAddress",
        "type": "address"
      }],
      "name": "send",
      "outputs": [{
        "components": [{
          "internalType": "bytes32",
          "name": "guid",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }, {
          "components": [{
            "internalType": "uint256",
            "name": "nativeFee",
            "type": "uint256"
          }, {
            "internalType": "uint256",
            "name": "lzTokenFee",
            "type": "uint256"
          }],
          "internalType": "struct MessagingFee",
          "name": "fee",
          "type": "tuple"
        }],
        "internalType": "struct MessagingReceipt",
        "name": "",
        "type": "tuple"
      }],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_to",
        "type": "address"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "uint16",
        "name": "_index",
        "type": "uint16"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }],
      "name": "sendCompose",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }, {
        "components": [{
          "internalType": "uint32",
          "name": "eid",
          "type": "uint32"
        }, {
          "internalType": "uint32",
          "name": "configType",
          "type": "uint32"
        }, {
          "internalType": "bytes",
          "name": "config",
          "type": "bytes"
        }],
        "internalType": "struct SetConfigParam[]",
        "name": "_params",
        "type": "tuple[]"
      }],
      "name": "setConfig",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_newLib",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "_gracePeriod",
        "type": "uint256"
      }],
      "name": "setDefaultReceiveLibrary",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "_expiry",
        "type": "uint256"
      }],
      "name": "setDefaultReceiveLibraryTimeout",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_newLib",
        "type": "address"
      }],
      "name": "setDefaultSendLibrary",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_delegate",
        "type": "address"
      }],
      "name": "setDelegate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_lzToken",
        "type": "address"
      }],
      "name": "setLzToken",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_newLib",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "_gracePeriod",
        "type": "uint256"
      }],
      "name": "setReceiveLibrary",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_lib",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "_expiry",
        "type": "uint256"
      }],
      "name": "setReceiveLibraryTimeout",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_newLib",
        "type": "address"
      }],
      "name": "setSendLibrary",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      }, {
        "internalType": "uint32",
        "name": "_srcEid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_sender",
        "type": "bytes32"
      }, {
        "internalType": "uint64",
        "name": "_nonce",
        "type": "uint64"
      }],
      "name": "skip",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }],
      "name": "verifiable",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_receiver",
        "type": "address"
      }, {
        "internalType": "bytes32",
        "name": "_payloadHash",
        "type": "bytes32"
      }],
      "name": "verify",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }],
    OApp: [{
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "origin",
        "type": "tuple"
      }],
      "name": "allowInitializePath",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "endpoint",
      "outputs": [{
        "internalType": "contract ILayerZeroEndpointV2",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "",
        "type": "tuple"
      }, {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }],
      "name": "isComposeMsgSender",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_executor",
        "type": "address"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceive",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }],
      "name": "nextNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "nonce",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oAppVersion",
      "outputs": [{
        "internalType": "uint64",
        "name": "senderVersion",
        "type": "uint64"
      }, {
        "internalType": "uint64",
        "name": "receiverVersion",
        "type": "uint64"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [],
      "name": "owner",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }],
      "name": "peers",
      "outputs": [{
        "internalType": "bytes32",
        "name": "peer",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_delegate",
        "type": "address"
      }],
      "name": "setDelegate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_peer",
        "type": "bytes32"
      }],
      "name": "setPeer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }],
    OAppRead: [{
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "origin",
        "type": "tuple"
      }],
      "name": "allowInitializePath",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "endpoint",
      "outputs": [{
        "internalType": "contract ILayerZeroEndpointV2",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "",
        "type": "tuple"
      }, {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }],
      "name": "isComposeMsgSender",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_executor",
        "type": "address"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceive",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }],
      "name": "nextNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "nonce",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oAppVersion",
      "outputs": [{
        "internalType": "uint64",
        "name": "senderVersion",
        "type": "uint64"
      }, {
        "internalType": "uint64",
        "name": "receiverVersion",
        "type": "uint64"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [],
      "name": "owner",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }],
      "name": "peers",
      "outputs": [{
        "internalType": "bytes32",
        "name": "peer",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_delegate",
        "type": "address"
      }],
      "name": "setDelegate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_peer",
        "type": "bytes32"
      }],
      "name": "setPeer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_channelId",
        "type": "uint32"
      }, {
        "internalType": "bool",
        "name": "_active",
        "type": "bool"
      }],
      "name": "setReadChannel",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }],
    OFT: [{
      "inputs": [],
      "name": "SEND",
      "outputs": [{
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "SEND_AND_CALL",
      "outputs": [{
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "origin",
        "type": "tuple"
      }],
      "name": "allowInitializePath",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "owner",
        "type": "address"
      }, {
        "internalType": "address",
        "name": "spender",
        "type": "address"
      }],
      "name": "allowance",
      "outputs": [{
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "approvalRequired",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "spender",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }],
      "name": "approve",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "account",
        "type": "address"
      }],
      "name": "balanceOf",
      "outputs": [{
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "uint16",
        "name": "_msgType",
        "type": "uint16"
      }, {
        "internalType": "bytes",
        "name": "_extraOptions",
        "type": "bytes"
      }],
      "name": "combineOptions",
      "outputs": [{
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "decimalConversionRate",
      "outputs": [{
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "decimals",
      "outputs": [{
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "endpoint",
      "outputs": [{
        "internalType": "contract ILayerZeroEndpointV2",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }, {
        "internalType": "uint16",
        "name": "msgType",
        "type": "uint16"
      }],
      "name": "enforcedOptions",
      "outputs": [{
        "internalType": "bytes",
        "name": "enforcedOption",
        "type": "bytes"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "",
        "type": "tuple"
      }, {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }],
      "name": "isComposeMsgSender",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_peer",
        "type": "bytes32"
      }],
      "name": "isPeer",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_executor",
        "type": "address"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceive",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "components": [{
            "internalType": "uint32",
            "name": "srcEid",
            "type": "uint32"
          }, {
            "internalType": "bytes32",
            "name": "sender",
            "type": "bytes32"
          }, {
            "internalType": "uint64",
            "name": "nonce",
            "type": "uint64"
          }],
          "internalType": "struct Origin",
          "name": "origin",
          "type": "tuple"
        }, {
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        }, {
          "internalType": "bytes32",
          "name": "guid",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }, {
          "internalType": "address",
          "name": "executor",
          "type": "address"
        }, {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "extraData",
          "type": "bytes"
        }],
        "internalType": "struct InboundPacket[]",
        "name": "_packets",
        "type": "tuple[]"
      }],
      "name": "lzReceiveAndRevert",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_executor",
        "type": "address"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceiveSimulate",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [],
      "name": "msgInspector",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "name",
      "outputs": [{
        "internalType": "string",
        "name": "",
        "type": "string"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }],
      "name": "nextNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "nonce",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oApp",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oAppVersion",
      "outputs": [{
        "internalType": "uint64",
        "name": "senderVersion",
        "type": "uint64"
      }, {
        "internalType": "uint64",
        "name": "receiverVersion",
        "type": "uint64"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oftVersion",
      "outputs": [{
        "internalType": "bytes4",
        "name": "interfaceId",
        "type": "bytes4"
      }, {
        "internalType": "uint64",
        "name": "version",
        "type": "uint64"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [],
      "name": "owner",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }],
      "name": "peers",
      "outputs": [{
        "internalType": "bytes32",
        "name": "peer",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "preCrime",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "to",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "amountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "bytes",
          "name": "extraOptions",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "composeMsg",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "oftCmd",
          "type": "bytes"
        }],
        "internalType": "struct SendParam",
        "name": "_sendParam",
        "type": "tuple"
      }],
      "name": "quoteOFT",
      "outputs": [{
        "components": [{
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "maxAmountLD",
          "type": "uint256"
        }],
        "internalType": "struct OFTLimit",
        "name": "oftLimit",
        "type": "tuple"
      }, {
        "components": [{
          "internalType": "int256",
          "name": "feeAmountLD",
          "type": "int256"
        }, {
          "internalType": "string",
          "name": "description",
          "type": "string"
        }],
        "internalType": "struct OFTFeeDetail[]",
        "name": "oftFeeDetails",
        "type": "tuple[]"
      }, {
        "components": [{
          "internalType": "uint256",
          "name": "amountSentLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "amountReceivedLD",
          "type": "uint256"
        }],
        "internalType": "struct OFTReceipt",
        "name": "oftReceipt",
        "type": "tuple"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "to",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "amountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "bytes",
          "name": "extraOptions",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "composeMsg",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "oftCmd",
          "type": "bytes"
        }],
        "internalType": "struct SendParam",
        "name": "_sendParam",
        "type": "tuple"
      }, {
        "internalType": "bool",
        "name": "_payInLzToken",
        "type": "bool"
      }],
      "name": "quoteSend",
      "outputs": [{
        "components": [{
          "internalType": "uint256",
          "name": "nativeFee",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "lzTokenFee",
          "type": "uint256"
        }],
        "internalType": "struct MessagingFee",
        "name": "msgFee",
        "type": "tuple"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "to",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "amountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "bytes",
          "name": "extraOptions",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "composeMsg",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "oftCmd",
          "type": "bytes"
        }],
        "internalType": "struct SendParam",
        "name": "_sendParam",
        "type": "tuple"
      }, {
        "components": [{
          "internalType": "uint256",
          "name": "nativeFee",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "lzTokenFee",
          "type": "uint256"
        }],
        "internalType": "struct MessagingFee",
        "name": "_fee",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_refundAddress",
        "type": "address"
      }],
      "name": "send",
      "outputs": [{
        "components": [{
          "internalType": "bytes32",
          "name": "guid",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }, {
          "components": [{
            "internalType": "uint256",
            "name": "nativeFee",
            "type": "uint256"
          }, {
            "internalType": "uint256",
            "name": "lzTokenFee",
            "type": "uint256"
          }],
          "internalType": "struct MessagingFee",
          "name": "fee",
          "type": "tuple"
        }],
        "internalType": "struct MessagingReceipt",
        "name": "msgReceipt",
        "type": "tuple"
      }, {
        "components": [{
          "internalType": "uint256",
          "name": "amountSentLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "amountReceivedLD",
          "type": "uint256"
        }],
        "internalType": "struct OFTReceipt",
        "name": "oftReceipt",
        "type": "tuple"
      }],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_delegate",
        "type": "address"
      }],
      "name": "setDelegate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "eid",
          "type": "uint32"
        }, {
          "internalType": "uint16",
          "name": "msgType",
          "type": "uint16"
        }, {
          "internalType": "bytes",
          "name": "options",
          "type": "bytes"
        }],
        "internalType": "struct EnforcedOptionParam[]",
        "name": "_enforcedOptions",
        "type": "tuple[]"
      }],
      "name": "setEnforcedOptions",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_msgInspector",
        "type": "address"
      }],
      "name": "setMsgInspector",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_peer",
        "type": "bytes32"
      }],
      "name": "setPeer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_preCrime",
        "type": "address"
      }],
      "name": "setPreCrime",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [],
      "name": "sharedDecimals",
      "outputs": [{
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "symbol",
      "outputs": [{
        "internalType": "string",
        "name": "",
        "type": "string"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "token",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "totalSupply",
      "outputs": [{
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "to",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }],
      "name": "transfer",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "from",
        "type": "address"
      }, {
        "internalType": "address",
        "name": "to",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }],
      "name": "transferFrom",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }],
    OFTAdapter: [{
      "inputs": [],
      "name": "SEND",
      "outputs": [{
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "SEND_AND_CALL",
      "outputs": [{
        "internalType": "uint16",
        "name": "",
        "type": "uint16"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "origin",
        "type": "tuple"
      }],
      "name": "allowInitializePath",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "approvalRequired",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "uint16",
        "name": "_msgType",
        "type": "uint16"
      }, {
        "internalType": "bytes",
        "name": "_extraOptions",
        "type": "bytes"
      }],
      "name": "combineOptions",
      "outputs": [{
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "decimalConversionRate",
      "outputs": [{
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "endpoint",
      "outputs": [{
        "internalType": "contract ILayerZeroEndpointV2",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }, {
        "internalType": "uint16",
        "name": "msgType",
        "type": "uint16"
      }],
      "name": "enforcedOptions",
      "outputs": [{
        "internalType": "bytes",
        "name": "enforcedOption",
        "type": "bytes"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "",
        "type": "tuple"
      }, {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }],
      "name": "isComposeMsgSender",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_peer",
        "type": "bytes32"
      }],
      "name": "isPeer",
      "outputs": [{
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_executor",
        "type": "address"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceive",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "components": [{
            "internalType": "uint32",
            "name": "srcEid",
            "type": "uint32"
          }, {
            "internalType": "bytes32",
            "name": "sender",
            "type": "bytes32"
          }, {
            "internalType": "uint64",
            "name": "nonce",
            "type": "uint64"
          }],
          "internalType": "struct Origin",
          "name": "origin",
          "type": "tuple"
        }, {
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "address",
          "name": "receiver",
          "type": "address"
        }, {
          "internalType": "bytes32",
          "name": "guid",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }, {
          "internalType": "address",
          "name": "executor",
          "type": "address"
        }, {
          "internalType": "bytes",
          "name": "message",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "extraData",
          "type": "bytes"
        }],
        "internalType": "struct InboundPacket[]",
        "name": "_packets",
        "type": "tuple[]"
      }],
      "name": "lzReceiveAndRevert",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "srcEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "sender",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }],
        "internalType": "struct Origin",
        "name": "_origin",
        "type": "tuple"
      }, {
        "internalType": "bytes32",
        "name": "_guid",
        "type": "bytes32"
      }, {
        "internalType": "bytes",
        "name": "_message",
        "type": "bytes"
      }, {
        "internalType": "address",
        "name": "_executor",
        "type": "address"
      }, {
        "internalType": "bytes",
        "name": "_extraData",
        "type": "bytes"
      }],
      "name": "lzReceiveSimulate",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [],
      "name": "msgInspector",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "",
        "type": "bytes32"
      }],
      "name": "nextNonce",
      "outputs": [{
        "internalType": "uint64",
        "name": "nonce",
        "type": "uint64"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oApp",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oAppVersion",
      "outputs": [{
        "internalType": "uint64",
        "name": "senderVersion",
        "type": "uint64"
      }, {
        "internalType": "uint64",
        "name": "receiverVersion",
        "type": "uint64"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [],
      "name": "oftVersion",
      "outputs": [{
        "internalType": "bytes4",
        "name": "interfaceId",
        "type": "bytes4"
      }, {
        "internalType": "uint64",
        "name": "version",
        "type": "uint64"
      }],
      "stateMutability": "pure",
      "type": "function"
    }, {
      "inputs": [],
      "name": "owner",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }],
      "name": "peers",
      "outputs": [{
        "internalType": "bytes32",
        "name": "peer",
        "type": "bytes32"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "preCrime",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "to",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "amountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "bytes",
          "name": "extraOptions",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "composeMsg",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "oftCmd",
          "type": "bytes"
        }],
        "internalType": "struct SendParam",
        "name": "_sendParam",
        "type": "tuple"
      }],
      "name": "quoteOFT",
      "outputs": [{
        "components": [{
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "maxAmountLD",
          "type": "uint256"
        }],
        "internalType": "struct OFTLimit",
        "name": "oftLimit",
        "type": "tuple"
      }, {
        "components": [{
          "internalType": "int256",
          "name": "feeAmountLD",
          "type": "int256"
        }, {
          "internalType": "string",
          "name": "description",
          "type": "string"
        }],
        "internalType": "struct OFTFeeDetail[]",
        "name": "oftFeeDetails",
        "type": "tuple[]"
      }, {
        "components": [{
          "internalType": "uint256",
          "name": "amountSentLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "amountReceivedLD",
          "type": "uint256"
        }],
        "internalType": "struct OFTReceipt",
        "name": "oftReceipt",
        "type": "tuple"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "to",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "amountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "bytes",
          "name": "extraOptions",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "composeMsg",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "oftCmd",
          "type": "bytes"
        }],
        "internalType": "struct SendParam",
        "name": "_sendParam",
        "type": "tuple"
      }, {
        "internalType": "bool",
        "name": "_payInLzToken",
        "type": "bool"
      }],
      "name": "quoteSend",
      "outputs": [{
        "components": [{
          "internalType": "uint256",
          "name": "nativeFee",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "lzTokenFee",
          "type": "uint256"
        }],
        "internalType": "struct MessagingFee",
        "name": "msgFee",
        "type": "tuple"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "dstEid",
          "type": "uint32"
        }, {
          "internalType": "bytes32",
          "name": "to",
          "type": "bytes32"
        }, {
          "internalType": "uint256",
          "name": "amountLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "minAmountLD",
          "type": "uint256"
        }, {
          "internalType": "bytes",
          "name": "extraOptions",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "composeMsg",
          "type": "bytes"
        }, {
          "internalType": "bytes",
          "name": "oftCmd",
          "type": "bytes"
        }],
        "internalType": "struct SendParam",
        "name": "_sendParam",
        "type": "tuple"
      }, {
        "components": [{
          "internalType": "uint256",
          "name": "nativeFee",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "lzTokenFee",
          "type": "uint256"
        }],
        "internalType": "struct MessagingFee",
        "name": "_fee",
        "type": "tuple"
      }, {
        "internalType": "address",
        "name": "_refundAddress",
        "type": "address"
      }],
      "name": "send",
      "outputs": [{
        "components": [{
          "internalType": "bytes32",
          "name": "guid",
          "type": "bytes32"
        }, {
          "internalType": "uint64",
          "name": "nonce",
          "type": "uint64"
        }, {
          "components": [{
            "internalType": "uint256",
            "name": "nativeFee",
            "type": "uint256"
          }, {
            "internalType": "uint256",
            "name": "lzTokenFee",
            "type": "uint256"
          }],
          "internalType": "struct MessagingFee",
          "name": "fee",
          "type": "tuple"
        }],
        "internalType": "struct MessagingReceipt",
        "name": "msgReceipt",
        "type": "tuple"
      }, {
        "components": [{
          "internalType": "uint256",
          "name": "amountSentLD",
          "type": "uint256"
        }, {
          "internalType": "uint256",
          "name": "amountReceivedLD",
          "type": "uint256"
        }],
        "internalType": "struct OFTReceipt",
        "name": "oftReceipt",
        "type": "tuple"
      }],
      "stateMutability": "payable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_delegate",
        "type": "address"
      }],
      "name": "setDelegate",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "components": [{
          "internalType": "uint32",
          "name": "eid",
          "type": "uint32"
        }, {
          "internalType": "uint16",
          "name": "msgType",
          "type": "uint16"
        }, {
          "internalType": "bytes",
          "name": "options",
          "type": "bytes"
        }],
        "internalType": "struct EnforcedOptionParam[]",
        "name": "_enforcedOptions",
        "type": "tuple[]"
      }],
      "name": "setEnforcedOptions",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_msgInspector",
        "type": "address"
      }],
      "name": "setMsgInspector",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }, {
        "internalType": "bytes32",
        "name": "_peer",
        "type": "bytes32"
      }],
      "name": "setPeer",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "_preCrime",
        "type": "address"
      }],
      "name": "setPreCrime",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }, {
      "inputs": [],
      "name": "sharedDecimals",
      "outputs": [{
        "internalType": "uint8",
        "name": "",
        "type": "uint8"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [],
      "name": "token",
      "outputs": [{
        "internalType": "address",
        "name": "",
        "type": "address"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    }],
    Executor: [{
      "inputs": [{
        "internalType": "uint32",
        "name": "_dstEid",
        "type": "uint32"
      }, {
        "internalType": "address",
        "name": "_sender",
        "type": "address"
      }, {
        "internalType": "uint256",
        "name": "_calldataSize",
        "type": "uint256"
      }, {
        "internalType": "bytes",
        "name": "_options",
        "type": "bytes"
      }],
      "name": "getFee",
      "outputs": [{
        "internalType": "uint256",
        "name": "fee",
        "type": "uint256"
      }],
      "stateMutability": "view",
      "type": "function"
    }, {
      "inputs": [{
        "internalType": "uint32",
        "name": "_dstEid",
        "type": "uint32"
      }],
      "name": "dstConfig",
      "outputs": [{
        "components": [{
          "internalType": "uint64",
          "name": "baseGas",
          "type": "uint64"
        }, {
          "internalType": "uint16",
          "name": "multiplierBps",
          "type": "uint16"
        }, {
          "internalType": "uint128",
          "name": "floorMarginUSD",
          "type": "uint128"
        }, {
          "internalType": "uint128",
          "name": "nativeCap",
          "type": "uint128"
        }],
        "internalType": "struct IExecutor.DstConfig",
        "name": "",
        "type": "tuple"
      }],
      "stateMutability": "view",
      "type": "function"
    }]
  };
  const EMBEDDED_CHAINS = [{
    chainId: 1,
    name: 'Ethereum',
    chainKey: 'ethereum',
    rpc: 'https://eth.llamarpc.com',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 56,
    name: 'BNB Chain',
    chainKey: 'bsc',
    rpc: 'https://bsc-dataseed.binance.org',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 137,
    name: 'Polygon',
    chainKey: 'polygon',
    rpc: 'https://polygon-rpc.com',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 42161,
    name: 'Arbitrum One',
    chainKey: 'arbitrum',
    rpc: 'https://arb1.arbitrum.io/rpc',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 10,
    name: 'Optimism',
    chainKey: 'optimism',
    rpc: 'https://mainnet.optimism.io',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 8453,
    name: 'Base',
    chainKey: 'base',
    rpc: 'https://mainnet.base.org',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 43114,
    name: 'Avalanche',
    chainKey: 'avalanche',
    rpc: 'https://api.avax.network/ext/bc/C/rpc',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 250,
    name: 'Fantom',
    chainKey: 'fantom',
    rpc: 'https://rpc.ftm.tools',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 324,
    name: 'zkSync Era',
    chainKey: 'zksync',
    rpc: 'https://mainnet.era.zksync.io',
    endpointV2: '0xd07C30aF3Ff30D96BDc9c6044958230Eb797DDBF'
  }, {
    chainId: 59144,
    name: 'Linea',
    chainKey: 'linea',
    rpc: 'https://rpc.linea.build',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 5000,
    name: 'Mantle',
    chainKey: 'mantle',
    rpc: 'https://rpc.mantle.xyz',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 534352,
    name: 'Scroll',
    chainKey: 'scroll',
    rpc: 'https://rpc.scroll.io',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 1101,
    name: 'Polygon zkEVM',
    chainKey: 'polygon-zkevm',
    rpc: 'https://zkevm-rpc.com',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 81457,
    name: 'Blast',
    chainKey: 'blast',
    rpc: 'https://rpc.blast.io',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }, {
    chainId: 34443,
    name: 'Mode',
    chainKey: 'mode',
    rpc: 'https://mainnet.mode.network',
    endpointV2: '0x1a44076050125825900e736c501f859c50fE728c'
  }];
  const contractDeployments = {
    OApp: [{
      chainId: 1,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 10,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 56,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 137,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 8453,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 42161,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 43114,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }],
    OAppRead: [],
    OFT: [{
      chainId: 1,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 10,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 56,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 137,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 8453,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 42161,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }, {
      chainId: 43114,
      address: '0x6985884c4392d348587b19cb9eaaf157f13271cd',
      name: 'ZRO Token'
    }],
    OFTAdapter: [],
    EndpointV2: [{
      chainId: 1,
      address: '0x1a44076050125825900e736c501f859c50fE728c',
      name: 'Endpoint V2'
    }, {
      chainId: 56,
      address: '0x1a44076050125825900e736c501f859c50fE728c',
      name: 'Endpoint V2'
    }, {
      chainId: 42161,
      address: '0x1a44076050125825900e736c501f859c50fE728c',
      name: 'Endpoint V2'
    }, {
      chainId: 10,
      address: '0x1a44076050125825900e736c501f859c50fE728c',
      name: 'Endpoint V2'
    }, {
      chainId: 137,
      address: '0x1a44076050125825900e736c501f859c50fE728c',
      name: 'Endpoint V2'
    }, {
      chainId: 8453,
      address: '0x1a44076050125825900e736c501f859c50fE728c',
      name: 'Endpoint V2'
    }],
    Executor: [{
      chainId: 1,
      address: '0x173272739Bd7Aa6e4e214714048a9fE699453059',
      name: 'LZ Executor'
    }, {
      chainId: 56,
      address: '0x173272739Bd7Aa6e4e214714048a9fE699453059',
      name: 'LZ Executor'
    }, {
      chainId: 42161,
      address: '0x173272739Bd7Aa6e4e214714048a9fE699453059',
      name: 'LZ Executor'
    }, {
      chainId: 10,
      address: '0x173272739Bd7Aa6e4e214714048a9fE699453059',
      name: 'LZ Executor'
    }, {
      chainId: 137,
      address: '0x173272739Bd7Aa6e4e214714048a9fE699453059',
      name: 'LZ Executor'
    }, {
      chainId: 8453,
      address: '0x173272739Bd7Aa6e4e214714048a9fE699453059',
      name: 'LZ Executor'
    }]
  };
  const getPlaceholderForType = type => {
    if (type.includes('address')) return '0x...';
    if (type.includes('uint')) return '0';
    if (type.includes('int')) return '0';
    if (type.includes('bool')) return 'true or false';
    if (type.includes('bytes32')) return '0x... (32 bytes)';
    if (type.includes('bytes')) return '0x...';
    if (type.includes('string')) return 'text';
    return 'value';
  };
  const [isDark, setIsDark] = useState(true);
  const [selectedChain, setSelectedChain] = useState(disableChainSelection ? null : 1);
  const [contract, setContract] = useState(null);
  const [inputs, setInputs] = useState({});
  const [result, setResult] = useState(null);
  const [loading, setLoading] = useState(false);
  const [error, setError] = useState(null);
  const [walletConnected, setWalletConnected] = useState(false);
  const [isExpanded, setIsExpanded] = useState(false);
  const [isChainDropdownOpen, setIsChainDropdownOpen] = useState(false);
  const [chainSearchTerm, setChainSearchTerm] = useState('');
  const [customAddress, setCustomAddress] = useState('');
  const [isTruncated, setIsTruncated] = useState(false);
  const [ethersLib, setEthersLib] = useState(null);
  const [isLoadingData, setIsLoadingData] = useState(false);
  const [iconErrors, setIconErrors] = useState({});
  const [loadedAbi, setLoadedAbi] = useState(null);
  const [signer, setSigner] = useState(null);
  const abi = abiProp || loadedAbi;
  const chainDropdownRef = useRef(null);
  const codeRef = useRef(null);
  useEffect(() => {
    if (typeof window === 'undefined') return;
    const checkTheme = () => setIsDark(document.documentElement.classList.contains('dark'));
    checkTheme();
    const observer = new MutationObserver(checkTheme);
    observer.observe(document.documentElement, {
      attributes: true,
      attributeFilter: ['class']
    });
    return () => observer.disconnect();
  }, []);
  useEffect(() => {
    if (typeof window === 'undefined') return;
    if (window.ethers) {
      setEthersLib(window.ethers);
      return;
    }
    const script = document.createElement('script');
    script.src = 'https://cdnjs.cloudflare.com/ajax/libs/ethers/5.7.2/ethers.umd.min.js';
    script.async = true;
    script.onload = () => {
      if (window.ethers) {
        setEthersLib(window.ethers);
      }
    };
    document.head.appendChild(script);
  }, []);
  useEffect(() => {
    if (abiProp) return;
    const embeddedAbi = EMBEDDED_ABIS[contractName];
    if (embeddedAbi) {
      setLoadedAbi(embeddedAbi);
    } else {
      setError('No ABI available for ' + contractName);
    }
  }, [contractName, abiProp]);
  const availableChains = useMemo(() => {
    if (disableChainSelection) return [];
    return EMBEDDED_CHAINS.slice().sort((a, b) => a.name.localeCompare(b.name));
  }, [disableChainSelection]);
  const currentChain = availableChains.find(chain => chain.chainId === selectedChain);
  const chainDisplayName = currentChain?.name || 'Select Chain';
  const chainKey = currentChain?.chainKey || 'default';
  const functionAbi = abi?.find(item => item.type === 'function' && item.name === functionName);
  const getDeploymentAddress = () => {
    if (contractName === 'EndpointV2') {
      const chain = EMBEDDED_CHAINS.find(c => c.chainId === selectedChain);
      return chain?.endpointV2;
    }
    const deployments = contractDeployments[contractName] || [];
    const dep = deployments.find(d => d.chainId === selectedChain);
    return dep?.address;
  };
  const defaultDeploymentAddress = getDeploymentAddress();
  const deploymentAddress = defaultDeploymentAddress || customAddress;
  useEffect(() => {
    if (availableChains.length > 0 && !currentChain) {
      setSelectedChain(availableChains[0].chainId);
    }
  }, [availableChains, currentChain]);
  useEffect(() => {
    if (defaultDeploymentAddress) setCustomAddress('');
  }, [selectedChain, defaultDeploymentAddress]);
  useEffect(() => {
    const checkTruncation = () => {
      if (codeRef.current) {
        setIsTruncated(codeRef.current.scrollWidth > codeRef.current.clientWidth);
      }
    };
    checkTruncation();
    const timeout = setTimeout(checkTruncation, 100);
    return () => clearTimeout(timeout);
  }, [functionAbi, isExpanded]);
  const isReadOnly = functionAbi && (functionAbi.stateMutability === 'view' || functionAbi.stateMutability === 'pure');
  const NetworkIcon = ({chainKey, size = 20}) => {
    const hasError = iconErrors['network-' + chainKey];
    const iconUrl = hasError ? 'https://icons-ckg.pages.dev/lz-scan/networks/default.svg' : 'https://icons-ckg.pages.dev/lz-scan/networks/' + chainKey + '.svg';
    return <span style={{
      display: 'inline-block',
      width: size,
      height: size,
      flexShrink: 0,
      backgroundImage: 'url(' + iconUrl + ')',
      backgroundSize: 'contain',
      backgroundRepeat: 'no-repeat',
      backgroundPosition: 'center',
      borderRadius: 4
    }} className={isDark ? '' : 'invert brightness-110 contrast-100'} />;
  };
  const connectWallet = async () => {
    if (!ethersLib) {
      setError('Ethers library not loaded yet');
      return;
    }
    try {
      if (!window.ethereum) {
        setError('Please install MetaMask or another Web3 wallet');
        return;
      }
      const accounts = await window.ethereum.request({
        method: 'eth_requestAccounts'
      });
      if (accounts.length > 0) {
        try {
          await window.ethereum.request({
            method: 'wallet_switchEthereumChain',
            params: [{
              chainId: '0x' + selectedChain.toString(16)
            }]
          });
        } catch (switchError) {
          if (switchError.code === 4902 && currentChain) {
            const chainRpcData = chainlistRPCs.find(c => c.chainId === selectedChain);
            await window.ethereum.request({
              method: 'wallet_addEthereumChain',
              params: [{
                chainId: '0x' + selectedChain.toString(16),
                chainName: currentChain.name,
                rpcUrls: [currentChain.rpc],
                nativeCurrency: chainRpcData?.nativeCurrency,
                blockExplorerUrls: chainRpcData?.explorers?.map(e => e.url) || []
              }]
            });
          }
        }
        const web3Provider = new ethersLib.providers.Web3Provider(window.ethereum);
        const web3Signer = web3Provider.getSigner();
        setSigner(web3Signer);
        setWalletConnected(true);
        setError(null);
      }
    } catch (err) {
      setError(err.message);
    }
  };
  useEffect(() => {
    if (!ethersLib || !deploymentAddress || !currentChain || !currentChain.rpc || !abi) return;
    try {
      if (signer) {
        const contractInstance = new ethersLib.Contract(deploymentAddress, abi, signer);
        setContract(contractInstance);
      } else if (isReadOnly) {
        const readProvider = new ethersLib.providers.JsonRpcProvider(currentChain.rpc);
        const contractInstance = new ethersLib.Contract(deploymentAddress, abi, readProvider);
        setContract(contractInstance);
      }
    } catch (err) {
      console.error('Error initializing contract:', err);
    }
  }, [ethersLib, signer, deploymentAddress, abi, currentChain, isReadOnly]);
  useEffect(() => {
    const handleClickOutside = event => {
      if (chainDropdownRef.current && !chainDropdownRef.current.contains(event.target)) {
        setIsChainDropdownOpen(false);
        setChainSearchTerm('');
      }
    };
    if (isChainDropdownOpen) {
      document.addEventListener('mousedown', handleClickOutside);
    }
    return () => document.removeEventListener('mousedown', handleClickOutside);
  }, [isChainDropdownOpen]);
  const handleInputChange = (paramPath, value) => {
    setInputs(prev => ({
      ...prev,
      [paramPath]: value
    }));
  };
  const parseValue = (value, type) => {
    const val = (value || '').trim();
    if (type.endsWith('[]')) {
      if (!val || val === '[]') return [];
      try {
        return JSON.parse(val);
      } catch {
        return val.split(',').map(v => parseValue(v.trim(), type.slice(0, -2)));
      }
    }
    if (type === 'bool') {
      return val.toLowerCase() === 'true' || val === '1';
    }
    if (type.startsWith('uint') || type.startsWith('int')) {
      return val || '0';
    }
    if (type === 'address') {
      return val || '0x0000000000000000000000000000000000000000';
    }
    if (type === 'bytes32') {
      return val || '0x0000000000000000000000000000000000000000000000000000000000000000';
    }
    if (type.match(/^bytes\d+$/)) {
      const size = parseInt(type.slice(5));
      return val || '0x' + ('00').repeat(size);
    }
    if (type === 'bytes') {
      return val || '0x';
    }
    return val;
  };
  const prepareArguments = () => {
    const args = [];
    functionAbi.inputs.forEach((input, index) => {
      if (input.type.startsWith('tuple')) {
        const tupleValues = [];
        if (input.components) {
          input.components.forEach((component, compIndex) => {
            const path = (input.name || index) + '.' + (component.name || compIndex);
            tupleValues.push(parseValue(inputs[path], component.type));
          });
        }
        args.push(tupleValues);
      } else {
        const path = input.name || index.toString();
        args.push(parseValue(inputs[path], input.type));
      }
    });
    return args;
  };
  const executeFunction = async () => {
    if (!functionAbi) return;
    if (!isReadOnly && !walletConnected) {
      setError('Please connect your wallet to send transactions');
      return;
    }
    if (!contract) {
      setError('Contract not initialized. Please check the network connection.');
      return;
    }
    setLoading(true);
    setError(null);
    setResult(null);
    try {
      const args = prepareArguments();
      let tx;
      if (isReadOnly) {
        tx = await contract[functionName](...args);
        setResult({
          type: 'read',
          data: tx,
          formatted: formatResult(tx)
        });
      } else {
        tx = await contract[functionName](...args);
        setResult({
          type: 'write',
          hash: tx.hash,
          status: 'pending'
        });
        const receipt = await tx.wait();
        setResult({
          type: 'write',
          hash: tx.hash,
          status: 'confirmed',
          blockNumber: receipt.blockNumber
        });
      }
    } catch (err) {
      setError(err.message);
    } finally {
      setLoading(false);
    }
  };
  const formatResult = data => {
    if (data === null || data === undefined) return 'null';
    if (typeof data === 'object' && data._isBigNumber) return data.toString();
    if (Array.isArray(data)) return data.map(formatResult);
    if (typeof data === 'object') {
      const result = {};
      Object.keys(data).forEach(key => {
        if (isNaN(parseInt(key))) result[key] = formatResult(data[key]);
      });
      return result;
    }
    return data;
  };
  const renderOutputType = (output, depth = 0) => {
    if (output.type.startsWith('tuple') && output.components) {
      return <div key={output.name || 'tuple-' + depth} style={{
        marginLeft: depth * 16
      }}>
          <span className={isDark ? 'text-purple-400' : 'text-purple-600'}>
            {output.name && output.name + ': '}{'struct {'}
          </span>
          {output.components.map((comp, idx) => renderOutputType(comp, depth + 1))}
          <div style={{
        marginLeft: depth * 16
      }}>
            <span className={isDark ? 'text-purple-400' : 'text-purple-600'}>{'}'}</span>
            {output.type.endsWith('[]') && <span className={isDark ? 'text-zinc-400' : 'text-zinc-500'}>[]</span>}
          </div>
        </div>;
    }
    return <div key={output.name || 'field-' + depth} style={{
      marginLeft: depth * 16
    }}>
        {output.name && <span className={isDark ? 'text-zinc-300' : 'text-zinc-600'}>{output.name}: </span>}
        <span style={{
      color: isDark ? '#f1df38' : '#e36209'
    }}>{output.type}</span>
      </div>;
  };
  if (typeof window === 'undefined') {
    return <div className="p-4 text-center text-zinc-500">Loading...</div>;
  }
  if (error && !abi) {
    return <div className="p-4 rounded-lg border border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 mb-4">
        <div className="font-medium mb-1">Error loading {contractName}</div>
        <div className="text-sm">{error}</div>
      </div>;
  }
  if (isLoadingData) {
    return <div className="p-4 rounded-lg border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 mb-4">
        <div className="text-center text-zinc-500">Loading chain data...</div>
      </div>;
  }
  if (!abi) {
    return <div className="p-4 rounded-lg border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 mb-4">
        <div className="text-center text-zinc-500">Loading {contractName} ABI...</div>
      </div>;
  }
  if (!functionAbi) {
    return <div className="p-4 rounded-lg border border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 mb-4">
        Function {functionName} not found in {contractName} ABI
      </div>;
  }
  const renderInputFields = () => {
    const fields = [];
    functionAbi.inputs.forEach((input, index) => {
      if (input.type.startsWith('tuple') && input.components) {
        fields.push(<div key={'tuple-' + index} className="mb-4">
            <div className={'text-xs font-semibold uppercase tracking-wide mb-2 ' + (isDark ? 'text-purple-400' : 'text-purple-600')}>
              {input.name || 'Param ' + index} (tuple)
            </div>
            <div className={'pl-4 border-l-2 ' + (isDark ? 'border-purple-500/30' : 'border-purple-300')}>
              {input.components.map((component, compIndex) => {
          const path = (input.name || index) + '.' + (component.name || compIndex);
          return <div key={path} className="mb-3">
                    <label className={'flex items-center gap-2 text-sm mb-1 ' + (isDark ? 'text-zinc-300' : 'text-zinc-700')}>
                      {component.name || 'field' + compIndex}
                      <span className={'text-xs ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>({component.type})</span>
                    </label>
                    <input type="text" placeholder={getPlaceholderForType(component.type)} value={inputs[path] || ''} onChange={e => handleInputChange(path, e.target.value)} className={'w-full px-3 py-2 rounded-lg border text-sm font-mono focus:outline-none focus:ring-1 focus:ring-blue-500 ' + (isDark ? 'bg-zinc-800 border-zinc-700 text-white placeholder-zinc-500' : 'bg-white border-zinc-300 text-zinc-900 placeholder-zinc-400')} />
                  </div>;
        })}
            </div>
          </div>);
      } else {
        const path = input.name || index.toString();
        fields.push(<div key={path} className="mb-3">
            <label className={'flex items-center gap-2 text-sm mb-1 ' + (isDark ? 'text-zinc-300' : 'text-zinc-700')}>
              {input.name || 'param' + index}
              <span className={'text-xs ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>({input.type})</span>
            </label>
            <input type="text" placeholder={getPlaceholderForType(input.type)} value={inputs[path] || ''} onChange={e => handleInputChange(path, e.target.value)} className={'w-full px-3 py-2 rounded-lg border text-sm font-mono focus:outline-none focus:ring-1 focus:ring-blue-500 ' + (isDark ? 'bg-zinc-800 border-zinc-700 text-white placeholder-zinc-500' : 'bg-white border-zinc-300 text-zinc-900 placeholder-zinc-400')} />
          </div>);
      }
    });
    return fields;
  };
  return <div className="rounded-xl border border-zinc-200 dark:border-zinc-700 bg-white dark:bg-zinc-900 overflow-hidden mb-4">
      {}
      <div className={'flex items-center justify-between p-3 cursor-pointer transition-colors ' + (isDark ? 'bg-zinc-800 hover:bg-zinc-700' : 'bg-zinc-100 hover:bg-zinc-200')} onClick={() => setIsExpanded(!isExpanded)}>
        <div className="flex items-center gap-3 flex-1 min-w-0">
          <span className="px-2 py-1 rounded text-xs font-semibold text-white" style={{
    backgroundColor: isReadOnly ? '#6366f1' : '#22c55e'
  }}>
            {isReadOnly ? 'CALL' : 'SEND'}
          </span>
          <code ref={codeRef} className={'text-sm truncate ' + (isDark ? 'text-zinc-200' : 'text-zinc-800')} title={functionName + '(' + functionAbi.inputs.map(i => i.name + ': ' + i.type).join(', ') + ')'}>
            <span style={{
    color: '#6cadf5'
  }}>{functionName}</span>
            <span className={isDark ? 'text-zinc-500' : 'text-zinc-400'}>(</span>
            {functionAbi.inputs.map((input, idx) => <span key={idx}>
                <span className={isDark ? 'text-zinc-300' : 'text-zinc-600'}>{input.name}</span>
                <span className={isDark ? 'text-zinc-500' : 'text-zinc-400'}>: </span>
                <span style={{
    color: isDark ? '#f1df38' : '#e36209'
  }}>{input.type}</span>
                {idx < functionAbi.inputs.length - 1 && <span className={isDark ? 'text-zinc-500' : 'text-zinc-400'}>, </span>}
              </span>)}
            <span className={isDark ? 'text-zinc-500' : 'text-zinc-400'}>)</span>
          </code>
        </div>
        <div className={'transition-transform ' + (isExpanded ? 'rotate-180' : '')} style={{
    color: isDark ? '#71717a' : '#a1a1aa'
  }}>
          <svg viewBox="0 0 24 24" fill="none" width="20" height="20">
            <path d="M6 9L12 15L18 9" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
          </svg>
        </div>
      </div>

      {}
      {isExpanded && <div className="p-4">
          {description && <div className={'text-sm mb-4 pb-4 border-b ' + (isDark ? 'text-zinc-400 border-zinc-800' : 'text-zinc-600 border-zinc-200')}>
              {description}
            </div>}

          {}
          <div className="mb-4">
            <label className={'text-xs font-semibold uppercase tracking-wide mb-2 block ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>CHAIN</label>
            <div ref={chainDropdownRef} className="relative">
              <div onClick={() => setIsChainDropdownOpen(!isChainDropdownOpen)} className={'flex items-center justify-between px-3 py-2 rounded-lg border cursor-pointer ' + (isDark ? 'bg-zinc-800 border-zinc-700 hover:border-zinc-600' : 'bg-white border-zinc-300 hover:border-zinc-400')}>
                <div className="flex items-center gap-2">
                  {currentChain && <NetworkIcon chainKey={chainKey} size={20} />}
                  <span className={isDark ? 'text-white' : 'text-zinc-900'}>{chainDisplayName}</span>
                </div>
                <svg width="10" height="6" viewBox="0 0 10 6" fill="none" className={isDark ? 'text-zinc-400' : 'text-zinc-500'}>
                  <path d="M1 1L5 5L9 1" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" />
                </svg>
              </div>

              {isChainDropdownOpen && <div className="absolute z-50 w-full mt-1 rounded-lg border shadow-lg" style={{
    backgroundColor: isDark ? '#27272a' : '#ffffff',
    borderColor: isDark ? '#3f3f46' : '#d4d4d8'
  }}>
                  <input type="text" placeholder="Search chains..." value={chainSearchTerm} onChange={e => setChainSearchTerm(e.target.value)} onClick={e => e.stopPropagation()} autoFocus className={'w-full px-3 py-2 text-sm border-b focus:outline-none ' + (isDark ? 'bg-transparent border-zinc-700 text-white placeholder-zinc-500' : 'bg-transparent border-zinc-200 text-zinc-900 placeholder-zinc-400')} />
                  <div style={{
    maxHeight: '240px',
    overflowY: 'auto',
    backgroundColor: isDark ? '#27272a' : '#ffffff'
  }}>
                    {availableChains.length === 0 ? <div className={'px-3 py-4 text-sm text-center ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>
                        No chains available
                      </div> : availableChains.filter(chain => chain.name.toLowerCase().includes(chainSearchTerm.toLowerCase())).map(chain => <div key={chain.chainId} onClick={() => {
    setSelectedChain(chain.chainId);
    setIsChainDropdownOpen(false);
    setChainSearchTerm('');
  }} className={'flex items-center gap-2 px-3 py-2 cursor-pointer ' + (selectedChain === chain.chainId ? isDark ? 'bg-blue-600/20 text-blue-400' : 'bg-blue-50 text-blue-600' : isDark ? 'hover:bg-zinc-700 text-white' : 'hover:bg-zinc-100 text-zinc-900')}>
                            <NetworkIcon chainKey={chain.chainKey} size={16} />
                            <span className="text-sm">{chain.name}</span>
                          </div>)}
                  </div>
                </div>}
            </div>
          </div>

          {}
          {showDeployments && <div className="mb-4">
              <label className={'text-xs font-semibold uppercase tracking-wide mb-2 block ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>
                {defaultDeploymentAddress ? 'CONTRACT' : 'CONTRACT ADDRESS'}
              </label>
              {defaultDeploymentAddress ? <div className={'px-3 py-2 rounded-lg text-sm font-mono ' + (isDark ? 'bg-zinc-800 text-zinc-300' : 'bg-zinc-100 text-zinc-700')}>
                  {defaultDeploymentAddress}
                </div> : <>
                  <input type="text" placeholder="0x..." value={customAddress} onChange={e => setCustomAddress(e.target.value)} className={'w-full px-3 py-2 rounded-lg border text-sm font-mono focus:outline-none focus:ring-1 focus:ring-blue-500 ' + (isDark ? 'bg-zinc-800 border-zinc-700 text-white placeholder-zinc-500' : 'bg-white border-zinc-300 text-zinc-900 placeholder-zinc-400')} />
                  <div className={'text-xs mt-1 ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>
                    Enter your {contractName} contract address
                  </div>
                </>}
            </div>}

          {}
          {functionAbi.inputs.length > 0 && <div className="mb-4">
              <div className={'text-xs font-semibold uppercase tracking-wide mb-3 ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>PARAMETERS</div>
              {renderInputFields()}
            </div>}

          {}
          {functionAbi.outputs && functionAbi.outputs.length > 0 && <div className="mb-4">
              <div className={'text-xs font-semibold uppercase tracking-wide mb-2 ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>RETURNS</div>
              <div className={'p-3 rounded-lg text-sm font-mono ' + (isDark ? 'bg-zinc-800' : 'bg-zinc-100')}>
                {functionAbi.outputs.map((output, idx) => renderOutputType(output, 0))}
              </div>
            </div>}

          {}
          <div className="mb-4">
            {!walletConnected && !isReadOnly ? <button onClick={connectWallet} className="w-full px-4 py-2 rounded-lg font-medium text-sm bg-blue-600 hover:bg-blue-700 text-white transition-colors">
                Connect Wallet
              </button> : <button onClick={executeFunction} disabled={loading || !deploymentAddress} className="w-full px-4 py-2 rounded-lg font-medium text-sm transition-colors text-white disabled:opacity-50 disabled:cursor-not-allowed" style={{
    backgroundColor: loading || !deploymentAddress ? '#52525b' : '#6cadf5'
  }}>
                {loading ? 'Processing...' : isReadOnly ? 'Send Request' : 'Send Transaction'}
              </button>}
          </div>

          {}
          {error && <div className={'p-3 rounded-lg text-sm mb-4 ' + (isDark ? 'bg-red-900/20 text-red-400' : 'bg-red-50 text-red-600')}>
              {error}
            </div>}

          {}
          {result && <div className="mb-4">
              <div className={'text-xs font-semibold uppercase tracking-wide mb-2 ' + (isDark ? 'text-zinc-500' : 'text-zinc-400')}>RESPONSE</div>
              <div className={'p-3 rounded-lg text-sm font-mono overflow-auto ' + (isDark ? 'bg-zinc-800' : 'bg-zinc-100')}>
                {result.type === 'read' ? <pre style={{
    margin: 0,
    whiteSpace: 'pre-wrap',
    color: isDark ? '#9EFC7E' : '#166534'
  }}>
                    {JSON.stringify(result.formatted, null, 2)}
                  </pre> : <div className={isDark ? 'text-zinc-300' : 'text-zinc-700'}>
                    <div>Tx: {result.hash}</div>
                    <div>Status: <span className={result.status === 'confirmed' ? 'text-green-500' : 'text-yellow-500'}>{result.status}</span></div>
                    {result.blockNumber && <div>Block: {result.blockNumber}</div>}
                  </div>}
              </div>
            </div>}

          {}
          {!deploymentAddress && <div className={'p-3 rounded-lg text-sm ' + (isDark ? 'bg-yellow-900/20 text-yellow-400' : 'bg-yellow-50 text-yellow-700')}>
              No deployment found for {contractName} on {chainDisplayName}
            </div>}
        </div>}
    </div>;
};

Stargate protocol contracts (StargatePool and StargateOFT) implement the standard **IOFT interface** for [Omnichain Fungible Tokens (OFTs)](../oft/quickstart), making crosschain transfers straightforward with just two methods: `quoteSend()` and `send()`.

For architecture and concepts, see [Stargate Finance](/v2/concepts/applications/stargate-finance).

<Tip>
  ### Stargate Asset Deployments

  View all available Stargate pools and OFT deployments across chains on the [**OFT Ecosystem & Stargate Assets**](/v2/deployments/oft-ecosystem-stargate-assets) page. Find contract addresses, supported chains, and asset types for seamless integration.
</Tip>

## The IOFT Interface

All Stargate pool and HydraOFT contracts implement the same interface:

```solidity wrap theme={null}
interface IStargate is IOFT {
    // Get underlying token address
    function token() external view returns (address);

    // Check if approval is required before sending
    function approvalRequired() external view returns (bool);

    // Quote the crosschain transfer fee
    function quoteSend(
        SendParam calldata _sendParam,
        bool _payInLzToken
    ) external view returns (MessagingFee memory);

    // Send tokens crosschain
    function send(
        SendParam calldata _sendParam,
        MessagingFee calldata _fee,
        address _refundAddress
    ) external payable returns (MessagingReceipt memory, OFTReceipt memory);
}
```

**Helper Methods**:

* `token()`: Returns the underlying ERC20 token address (or `address(0)` for native assets like ETH)
* `approvalRequired()`: Returns `true` if you need to approve tokens before sending, `false` for mint/burn or native assets

These methods allow you to write generic code that works with any Stargate asset (USDC pools, ETH pools, Hydra OFTs) without hardcoding token addresses or approval logic.

### Interactive Interface Methods

#### quoteSend() - Get Transfer Fees

<InteractiveContract contractName="OFT" functionName="quoteSend" description="Provides a quote for the send() operation. Returns the LayerZero messaging fees required to transfer Stargate assets crosschain." />

#### quoteOFT() - Get Detailed Transfer Quote

<InteractiveContract contractName="OFT" functionName="quoteOFT" description="Provides comprehensive quote including transfer limits, fee breakdowns, and expected receive amounts. Useful for checking Stargate credit availability and slippage." />

#### send() - Transfer Tokens

<InteractiveContract contractName="OFT" functionName="send" description="Executes the crosschain Stargate transfer. Locks/burns tokens on source and unlocks/mints on destination via LayerZero messaging." />

### SendParam Structure

The key parameters for Stargate transfers is identical to OFT transfers:

```solidity wrap theme={null}
struct SendParam {
    uint32 dstEid;          // Destination endpoint ID
    bytes32 to;             // Recipient address
    uint256 amountLD;       // Amount to send (local decimals)
    uint256 minAmountLD;    // Minimum amount (slippage protection)
    bytes extraOptions;     // Execution options for LayerZero
    bytes composeMsg;       // For composability (Taxi mode only)
    bytes oftCmd;           // "" for Taxi, bytes(1) for Bus
}
```

## How send() Works

When you call `send()` on a Stargate contract, it triggers a chain of calls through LayerZero's infrastructure:

**Call Flow**:

1. **Stargate Contract** → Debits tokens (lock or burn depending on contract type)
2. **LayerZero Endpoint** → Routes the message to the configured MessageLib
3. **Message Library (SendUln302)** → Requests quotes from DVNs and Executor
4. **Workers (DVNs + Executor)** → Provide fee quotes for verification and execution
5. **Fee Aggregation** → Returns total `nativeFee` from all workers

This multi-step process is why `quoteSend()` exists - it aggregates fees from all components in the security stack.

<Tip>
  ### Quote Freshness

  Call `quoteSend()` as close as possible to `send()` execution. Fee quotes can become stale due to:

  * Changing gas prices on source/destination chains
  * Price feed updates for crosschain gas estimation
  * DVN fee adjustments

  In production, quote and send in the same transaction or block to ensure accurate fees.
</Tip>

## Transfer Modes

Stargate supports two transfer modes with different characteristics:

### Taxi Mode (Immediate)

**Use when**: You need immediate transfer or composability

**Set**: `oftCmd: ""`

**Supports**: Composability via `composeMsg` to trigger actions on destination

```solidity wrap theme={null}
SendParam memory sendParam = SendParam({
    dstEid: dstEid,
    to: bytes32(uint256(uint160(recipient))),
    amountLD: amount,
    minAmountLD: amount * 995 / 1000,  // 0.5% slippage
    extraOptions: "",                   // Or compose options
    composeMsg: "",                     // Or encoded compose message
    oftCmd: ""                          // Empty for Taxi mode
});
```

### Bus Mode (Batched)

**Use when**: You want gas savings and don't need composability

**Set**: `oftCmd: new bytes(1)`

**Does NOT support**: Composability - no `lzCompose()` will be triggered

```solidity wrap theme={null}
SendParam memory sendParam = SendParam({
    dstEid: dstEid,
    to: bytes32(uint256(uint160(recipient))),
    amountLD: amount,
    minAmountLD: amount * 995 / 1000,
    extraOptions: new bytes(0),
    composeMsg: new bytes(0),
    oftCmd: new bytes(1)                // bytes(1) for Bus mode
});
```

<Warning>
  ### Composability Requirement

  Composable strategies (e.g., [Omnichain Vaults](../ovault/overview)) **require Taxi mode**. Bus mode will not trigger `lzCompose()` calls.
</Warning>

## Basic Transfer Example

**Note**: These examples assume you're using existing Stargate contracts (pre-configured by the Stargate team). If deploying your own OFT, you must complete the configuration steps first - see [OFT Quickstart - Deployment and Wiring](/v2/developers/evm/oft/quickstart#deployment-and-wiring).

Since Stargate implements IOFT, sending tokens works exactly like any OFT - the only Stargate-specific aspect is the `oftCmd` field for Taxi vs Bus mode:

```solidity wrap theme={null}
// Taxi Mode (immediate, supports composability)
SendParam memory sendParam = SendParam({
    dstEid: dstEid,
    to: bytes32(uint256(uint160(recipient))),
    amountLD: amount,
    minAmountLD: amount * 995 / 1000,
    extraOptions: "",
    composeMsg: "",
    oftCmd: ""  // Empty for Taxi mode
});

// Bus Mode (batched, no composability)
SendParam memory sendParam = SendParam({
    dstEid: dstEid,
    to: bytes32(uint256(uint160(recipient))),
    amountLD: amount,
    minAmountLD: amount * 995 / 1000,
    extraOptions: new bytes(0),
    composeMsg: new bytes(0),
    oftCmd: new bytes(1)  // bytes(1) for Bus mode
});

// Then call: IOFT(stargateAddress).send(sendParam, fee, refundAddress)
```

**For complete send implementation**: See [OFT Quickstart - Send Tokens](/v2/developers/evm/oft/quickstart#send-tokens) for detailed examples using CLI, Foundry scripts, or Hardhat tasks.

## Composability

Taxi mode supports composability - triggering additional actions on the destination chain after Stargate assets arrive.

**Key Points**:

* Set `composeMsg` to your encoded data
* Set `to` address to your composer contract
* Add `addExecutorLzComposeOption()` for composer gas
* Your composer receives via `lzCompose()` and decodes with `OFTComposeMsgCodec`

```solidity wrap theme={null}
// Quick example: Send USDC with compose
bytes memory composeMsg = abi.encode(finalRecipient, action, params);
bytes memory extraOptions = OptionsBuilder.newOptions()
    .addExecutorLzComposeOption(0, 200_000, 0);

SendParam memory sendParam = SendParam({
    to: bytes32(uint256(uint160(composerAddress))),  // Your composer
    composeMsg: composeMsg,                          // Your data
    extraOptions: extraOptions,                      // Compose gas
    oftCmd: ""  // Must use Taxi mode
    // ... other fields
});
```

**For complete composability implementation**:

* [OFT Quickstart - Composer](/v2/developers/evm/oft/quickstart#send-tokens--call-composer) - Full examples and code
* [Composer Overview](/v2/developers/evm/composer/overview) - Deep dive on horizontal composability
* [Composer Pattern](/v2/concepts/applications/composer-standard) - Architecture and concepts

## Finding Stargate Contracts

### Method 1: Deployed Contracts Page

1. Visit [Deployed Contracts](/v2/deployments/deployed-contracts)
2. Search for your chain or asset (e.g., "USDC", "Ethereum")
3. Stargate contracts appear at the top of each chain's list
4. Copy the address you need

### Method 2: Stargate API

```typescript wrap theme={null}
// Mainnet
const response = await fetch('https://mainnet.stargate-api.com/v1/metadata?version=v2');
const data = await response.json();

// Find USDC on Ethereum
const asset = data.data.v2.find((a) => a.chainKey === 'ethereum' && a.token.symbol === 'USDC');

console.log('StargatePool USDC:', asset.address);
```

## Next Steps

**Learn More**:

* [Stargate Finance Concepts](/v2/concepts/applications/stargate-finance) - Architecture and how it works
* [OFT Standard](/v2/concepts/applications/oft-standard) - Understanding IOFT interface
* [Stargate Protocol Docs](https://docs.stargate.finance) - Full protocol reference

**Build**:

* [OVault Overview](/v2/developers/evm/ovault/overview) - Build omnichain vaults with Stargate assets
* [Composer Overview](/v2/developers/evm/composer/overview) - Advanced composability patterns

**Get Help**:

* [LayerZero Discord](https://discord.com/invite/ktbvm8Nkcr) - Technical support
* [Stargate Discord](https://discord.com/invite/eG5TgNpUE7) - Stargate-specific questions
