SendUln302

0xc39161c743d0307eb9bcc9fef03eeb9dc4802de7

Verification
Verified
v0.8.22+commit.4fc1097e
Type
Contract
22,995 bytes
ABI entries
61
13 read · 10 write
License
none

Contract information

Address
0xc39161c743d0307eb9bcc9fef03eeb9dc4802de7
Chain
Robinhood Chain (4663)
Compiler
v0.8.22+commit.4fc1097e
Optimization
Enabled
Creation tx
0x2980bfbc13…4d5ed9edd2

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (13)

executorConfigs(address, uint32)uint32, address
fees(address)uint256
getAppUlnConfig(address, uint32)tuple
getConfig(uint32, address, uint32)bytes
getExecutorConfig(address, uint32)tuple
getUlnConfig(address, uint32)tuple
isSupportedEid(uint32)bool
messageLibType()uint8
owner()address
quote(tuple, bytes, bool)tuple
supportsInterface(bytes4)bool
treasury()address
version()uint64, uint8, uint8

Events (11)

DVNFeePaidDefaultExecutorConfigsSetDefaultUlnConfigsSetExecutorConfigSetExecutorFeePaidLzTokenFeeWithdrawnNativeFeeWithdrawnOwnershipTransferredTreasuryNativeFeeCapSetTreasurySetUlnConfigSet

ABI

[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_endpoint",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "_treasuryGasLimit",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "_treasuryGasForFeeCap",
        "type": "uint256"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [],
    "name": "DVN_InvalidDVNIdx",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cursor",
        "type": "uint256"
      }
    ],
    "name": "DVN_InvalidDVNOptions",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_MessageLib_CannotWithdrawAltToken",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "requested",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "available",
        "type": "uint256"
      }
    ],
    "name": "LZ_MessageLib_InvalidAmount",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_MessageLib_InvalidExecutor",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "actual",
        "type": "uint256"
      },
      {
        "internalType": "uint256",
        "name": "max",
        "type": "uint256"
      }
    ],
    "name": "LZ_MessageLib_InvalidMessageSize",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_MessageLib_NotTreasury",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_MessageLib_OnlyEndpoint",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_MessageLib_TransferFailed",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_MessageLib_ZeroMessageSize",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_AtLeastOneDVN",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint32",
        "name": "configType",
        "type": "uint32"
      }
    ],
    "name": "LZ_ULN_InvalidConfigType",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_InvalidConfirmations",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_InvalidLegacyType1Option",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_InvalidLegacyType2Option",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_InvalidOptionalDVNCount",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_InvalidOptionalDVNThreshold",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_InvalidRequiredDVNCount",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint8",
        "name": "workerId",
        "type": "uint8"
      }
    ],
    "name": "LZ_ULN_InvalidWorkerId",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "cursor",
        "type": "uint256"
      }
    ],
    "name": "LZ_ULN_InvalidWorkerOptions",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "LZ_ULN_Unsorted",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }
    ],
    "name": "LZ_ULN_UnsupportedEid",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "uint16",
        "name": "optionType",
        "type": "uint16"
      }
    ],
    "name": "LZ_ULN_UnsupportedOptionType",
    "type": "error"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "_value",
        "type": "uint256"
      }
    ],
    "name": "Transfer_NativeFailed",
    "type": "error"
  },
  {
    "inputs": [],
    "name": "Transfer_ToAddressIsZero",
    "type": "error"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "requiredDVNs",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "address[]",
        "name": "optionalDVNs",
        "type": "address[]"
      },
      {
        "indexed": false,
        "internalType": "uint256[]",
        "name": "fees",
        "type": "uint256[]"
      }
    ],
    "name": "DVNFeePaid",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "eid",
            "type": "uint32"
          },
          {
            "components": [
              {
                "internalType": "uint32",
                "name": "maxMessageSize",
                "type": "uint32"
              },
              {
                "internalType": "address",
                "name": "executor",
                "type": "address"
              }
            ],
            "internalType": "struct ExecutorConfig",
            "name": "config",
            "type": "tuple"
          }
        ],
        "indexed": false,
        "internalType": "struct SetDefaultExecutorConfigParam[]",
        "name": "params",
        "type": "tuple[]"
      }
    ],
    "name": "DefaultExecutorConfigsSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "eid",
            "type": "uint32"
          },
          {
            "components": [
              {
                "internalType": "uint64",
                "name": "confirmations",
                "type": "uint64"
              },
              {
                "internalType": "uint8",
                "name": "requiredDVNCount",
                "type": "uint8"
              },
              {
                "internalType": "uint8",
                "name": "optionalDVNCount",
                "type": "uint8"
              },
              {
                "internalType": "uint8",
                "name": "optionalDVNThreshold",
                "type": "uint8"
              },
              {
                "internalType": "address[]",
                "name": "requiredDVNs",
                "type": "address[]"
              },
              {
                "internalType": "address[]",
                "name": "optionalDVNs",
                "type": "address[]"
              }
            ],
            "internalType": "struct UlnConfig",
            "name": "config",
            "type": "tuple"
          }
        ],
        "indexed": false,
        "internalType": "struct SetDefaultUlnConfigParam[]",
        "name": "params",
        "type": "tuple[]"
      }
    ],
    "name": "DefaultUlnConfigsSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "oapp",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      },
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "maxMessageSize",
            "type": "uint32"
          },
          {
            "internalType": "address",
            "name": "executor",
            "type": "address"
          }
        ],
        "indexed": false,
        "internalType": "struct ExecutorConfig",
        "name": "config",
        "type": "tuple"
      }
    ],
    "name": "ExecutorConfigSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "executor",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "fee",
        "type": "uint256"
      }
    ],
    "name": "ExecutorFeePaid",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "lzToken",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "receiver",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "LzTokenFeeWithdrawn",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "worker",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "address",
        "name": "receiver",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "amount",
        "type": "uint256"
      }
    ],
    "name": "NativeFeeWithdrawn",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "previousOwner",
        "type": "address"
      },
      {
        "indexed": true,
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "OwnershipTransferred",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "uint256",
        "name": "newTreasuryNativeFeeCap",
        "type": "uint256"
      }
    ],
    "name": "TreasuryNativeFeeCapSet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "treasury",
        "type": "address"
      }
    ],
    "name": "TreasurySet",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": false,
        "internalType": "address",
        "name": "oapp",
        "type": "address"
      },
      {
        "indexed": false,
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      },
      {
        "components": [
          {
            "internalType": "uint64",
            "name": "confirmations",
            "type": "uint64"
          },
          {
            "internalType": "uint8",
            "name": "requiredDVNCount",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "optionalDVNCount",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "optionalDVNThreshold",
            "type": "uint8"
          },
          {
            "internalType": "address[]",
            "name": "requiredDVNs",
            "type": "address[]"
          },
          {
            "internalType": "address[]",
            "name": "optionalDVNs",
            "type": "address[]"
          }
        ],
        "indexed": false,
        "internalType": "struct UlnConfig",
        "name": "config",
        "type": "tuple"
      }
    ],
    "name": "UlnConfigSet",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "oapp",
        "type": "address"
      },
      {
        "internalType": "uint32",
        "name": "eid",
        "type": "uint32"
      }
    ],
    "name": "executorConfigs",
    "outputs": [
      {
        "internalType": "uint32",
        "name": "maxMessageSize",
        "type": "uint32"
      },
      {
        "internalType": "address",
        "name": "executor",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "worker",
        "type": "address"
      }
    ],
    "name": "fees",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      },
      {
        "internalType": "uint32",
        "name": "_remoteEid",
        "type": "uint32"
      }
    ],
    "name": "getAppUlnConfig",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint64",
            "name": "confirmations",
            "type": "uint64"
          },
          {
            "internalType": "uint8",
            "name": "requiredDVNCount",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "optionalDVNCount",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "optionalDVNThreshold",
            "type": "uint8"
          },
          {
            "internalType": "address[]",
            "name": "requiredDVNs",
            "type": "address[]"
          },
          {
            "internalType": "address[]",
            "name": "optionalDVNs",
            "type": "address[]"
          }
        ],
        "internalType": "struct UlnConfig",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      },
      {
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      },
      {
        "internalType": "uint32",
        "name": "_configType",
        "type": "uint32"
      }
    ],
    "name": "getConfig",
    "outputs": [
      {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      },
      {
        "internalType": "uint32",
        "name": "_remoteEid",
        "type": "uint32"
      }
    ],
    "name": "getExecutorConfig",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "maxMessageSize",
            "type": "uint32"
          },
          {
            "internalType": "address",
            "name": "executor",
            "type": "address"
          }
        ],
        "internalType": "struct ExecutorConfig",
        "name": "rtnConfig",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_oapp",
        "type": "address"
      },
      {
        "internalType": "uint32",
        "name": "_remoteEid",
        "type": "uint32"
      }
    ],
    "name": "getUlnConfig",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint64",
            "name": "confirmations",
            "type": "uint64"
          },
          {
            "internalType": "uint8",
            "name": "requiredDVNCount",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "optionalDVNCount",
            "type": "uint8"
          },
          {
            "internalType": "uint8",
            "name": "optionalDVNThreshold",
            "type": "uint8"
          },
          {
            "internalType": "address[]",
            "name": "requiredDVNs",
            "type": "address[]"
          },
          {
            "internalType": "address[]",
            "name": "optionalDVNs",
            "type": "address[]"
          }
        ],
        "internalType": "struct UlnConfig",
        "name": "rtnConfig",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint32",
        "name": "_eid",
        "type": "uint32"
      }
    ],
    "name": "isSupportedEid",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "messageLibType",
    "outputs": [
      {
        "internalType": "enum MessageLibType",
        "name": "",
        "type": "uint8"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "owner",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint64",
            "name": "nonce",
            "type": "uint64"
          },
          {
            "internalType": "uint32",
            "name": "srcEid",
            "type": "uint32"
          },
          {
            "internalType": "address",
            "name": "sender",
            "type": "address"
          },
          {
            "internalType": "uint32",
            "name": "dstEid",
            "type": "uint32"
          },
          {
            "internalType": "bytes32",
            "name": "receiver",
            "type": "bytes32"
          },
          {
            "internalType": "bytes32",
            "name": "guid",
            "type": "bytes32"
          },
          {
            "internalType": "bytes",
            "name": "message",
            "type": "bytes"
          }
        ],
        "internalType": "struct Packet",
        "name": "_packet",
        "type": "tuple"
      },
      {
        "internalType": "bytes",
        "name": "_options",
        "type": "bytes"
      },
      {
        "internalType": "bool",
        "name": "_payInLzToken",
        "type": "bool"
      }
    ],
    "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": [],
    "name": "renounceOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint64",
            "name": "nonce",
            "type": "uint64"
          },
          {
            "internalType": "uint32",
            "name": "srcEid",
            "type": "uint32"
          },
          {
            "internalType": "address",
            "name": "sender",
            "type": "address"
          },
          {
            "internalType": "uint32",
            "name": "dstEid",
            "type": "uint32"
          },
          {
            "internalType": "bytes32",
            "name": "receiver",
            "type": "bytes32"
          },
          {
            "internalType": "bytes32",
            "name": "guid",
            "type": "bytes32"
          },
          {
            "internalType": "bytes",
            "name": "message",
            "type": "bytes"
          }
        ],
        "internalType": "struct Packet",
        "name": "_packet",
        "type": "tuple"
      },
      {
        "internalType": "bytes",
        "name": "_options",
        "type": "bytes"
      },
      {
        "internalType": "bool",
        "name": "_payInLzToken",
        "type": "bool"
      }
    ],
    "name": "send",
    "outputs": [
      {
        "components": [
          {
            "internalType": "uint256",
            "name": "nativeFee",
            "type": "uint256"
          },
          {
            "internalType": "uint256",
            "name": "lzTokenFee",
            "type": "uint256"
          }
        ],
        "internalType": "struct MessagingFee",
        "name": "",
        "type": "tuple"
      },
      {
        "internalType": "bytes",
        "name": "",
        "type": "bytes"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_oapp",
        "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": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "eid",
            "type": "uint32"
          },
          {
            "components": [
              {
                "internalType": "uint32",
                "name": "maxMessageSize",
                "type": "uint32"
              },
              {
                "internalType": "address",
                "name": "executor",
                "type": "address"
              }
            ],
            "internalType": "struct ExecutorConfig",
            "name": "config",
            "type": "tuple"
          }
        ],
        "internalType": "struct SetDefaultExecutorConfigParam[]",
        "name": "_params",
        "type": "tuple[]"
      }
    ],
    "name": "setDefaultExecutorConfigs",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "components": [
          {
            "internalType": "uint32",
            "name": "eid",
            "type": "uint32"
          },
          {
            "components": [
              {
                "internalType": "uint64",
                "name": "confirmations",
                "type": "uint64"
              },
              {
                "internalType": "uint8",
                "name": "requiredDVNCount",
                "type": "uint8"
              },
              {
                "internalType": "uint8",
                "name": "optionalDVNCount",
                "type": "uint8"
              },
              {
                "internalType": "uint8",
                "name": "optionalDVNThreshold",
                "type": "uint8"
              },
              {
                "internalType": "address[]",
                "name": "requiredDVNs",
                "type": "address[]"
              },
              {
                "internalType": "address[]",
                "name": "optionalDVNs",
                "type": "address[]"
              }
            ],
            "internalType": "struct UlnConfig",
            "name": "config",
            "type": "tuple"
          }
        ],
        "internalType": "struct SetDefaultUlnConfigParam[]",
        "name": "_params",
        "type": "tuple[]"
      }
    ],
    "name": "setDefaultUlnConfigs",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_treasury",
        "type": "address"
      }
    ],
    "name": "setTreasury",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "_newTreasuryNativeFeeCap",
        "type": "uint256"
      }
    ],
    "name": "setTreasuryNativeFeeCap",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes4",
        "name": "_interfaceId",
        "type": "bytes4"
      }
    ],
    "name": "supportsInterface",
    "outputs": [
      {
        "internalType": "bool",
        "name": "",
        "type": "bool"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "newOwner",
        "type": "address"
      }
    ],
    "name": "transferOwnership",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "treasury",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "version",
    "outputs": [
      {
        "internalType": "uint64",
        "name": "major",
        "type": "uint64"
      },
      {
        "internalType": "uint8",
        "name": "minor",
        "type": "uint8"
      },
      {
        "internalType": "uint8",
        "name": "endpointVersion",
        "type": "uint8"
      }
    ],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "_amount",
        "type": "uint256"
      }
    ],
    "name": "withdrawFee",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "_lzToken",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "_to",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "_amount",
        "type": "uint256"
      }
    ],
    "name": "withdrawLzTokenFee",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "stateMutability": "payable",
    "type": "receive"
  }
]

Source code

// SPDX-License-Identifier: LZBL-1.2

pragma solidity ^0.8.20;

import { Packet } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ISendLib.sol";
import { SetConfigParam } from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/IMessageLibManager.sol";

import { ExecutorConfig } from "../../SendLibBase.sol";
import { SendLibBaseE2, WorkerOptions } from "../../SendLibBaseE2.sol";
import { UlnConfig } from "../UlnBase.sol";
import { SendUlnBase } from "../SendUlnBase.sol";

/// @dev This is a gluing contract. It simply parses the requests and forward to the super.impl() accordingly.
/// @dev In this case, it combines the logic of SendUlnBase and SendLibBaseE2
contract SendUln302 is SendUlnBase, SendLibBaseE2 {
    uint32 internal constant CONFIG_TYPE_EXECUTOR = 1;
    uint32 internal constant CONFIG_TYPE_ULN = 2;

    error LZ_ULN_InvalidConfigType(uint32 configType);

    constructor(
        address _endpoint,
        uint256 _treasuryGasLimit,
        uint256 _treasuryGasForFeeCap
    ) SendLibBaseE2(_endpoint, _treasuryGasLimit, _treasuryGasForFeeCap) {}

    // ============================ OnlyEndpoint ===================================

    // on the send side the user can config both the executor and the ULN
    function setConfig(address _oapp, SetConfigParam[] calldata _params) external override onlyEndpoint {
        for (uint256 i = 0; i < _params.length; i++) {
            SetConfigParam calldata param = _params[i];
            _assertSupportedEid(param.eid);
            if (param.configType == CONFIG_TYPE_EXECUTOR) {
                _setExecutorConfig(param.eid, _oapp, abi.decode(param.config, (ExecutorConfig)));
            } else if (param.configType == CONFIG_TYPE_ULN) {
                _setUlnConfig(param.eid, _oapp, abi.decode(param.config, (UlnConfig)));
            } else {
                revert LZ_ULN_InvalidConfigType(param.configType);
            }
        }
    }

    // ============================ View ===================================

    function getConfig(uint32 _eid, address _oapp, uint32 _configType) external view override returns (bytes memory) {
        if (_configType == CONFIG_TYPE_EXECUTOR) {
            return abi.encode(getExecutorConfig(_oapp, _eid));
        } else if (_configType == CONFIG_TYPE_ULN) {
            return abi.encode(getUlnConfig(_oapp, _eid));
        } else {
            revert LZ_ULN_InvalidConfigType(_configType);
        }
    }

    function version() external pure override returns (uint64 major, uint8 minor, uint8 endpointVersion) {
        return (3, 0, 2);
    }

    function isSupportedEid(uint32 _eid) external view override returns (bool) {
        return _isSupportedEid(_eid);
    }

    // ============================ Internal ===================================

    function _quoteVerifier(
        address _sender,
        uint32 _dstEid,
        WorkerOptions[] memory _options
    ) internal view override returns (uint256) {
        return _quoteDVNs(_sender, _dstEid, _options);
    }

    function _payVerifier(
        Packet calldata _packet,
        WorkerOptions[] memory _options
    ) internal override returns (uint256 otherWorkerFees, bytes memory encodedPacket) {
        (otherWorkerFees, encodedPacket) = _payDVNs(fees, _packet, _options);
    }

    function _splitOptions(
        bytes calldata _options
    ) internal pure override returns (bytes memory, WorkerOptions[] memory) {
        return _splitUlnOptions(_options);
    }
}
Chain explorer1703msChain node129ms