KonaOFT
0x5825b287c9769701091b74b925841a2b815c9514
Verification
Verified
v0.8.22+commit.4fc1097e
Type
Contract
15,328 bytes
ABI entries
98
34 read · 19 write
License
none
Contract information
- Address
- 0x5825b287c9769701091b74b925841a2b815c9514
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.22+commit.4fc1097e
- Optimization
- Enabled
- Creator
- 0x6F3C8C9D35…f620c299d2
- Creation tx
- 0xc9e0dbe29c…e86e74c6eb
Token
- Name
- Kona
- Symbol
- KONA
- Decimals
- 18
- Holders
- 16
- Market
- View token page →
Read contract (34)
SEND() → uint16
SEND_AND_CALL() → uint16
allowInitializePath(tuple) → bool
allowance(address, address) → uint256
approvalRequired() → bool
balanceOf(address) → uint256
combineOptions(uint32, uint16, bytes) → bytes
decimalConversionRate() → uint256
decimals() → uint8
endpoint() → address
enforcedOptions(uint32, uint16) → bytes
getAmountCanBeSent(uint32) → uint256, uint256
guardian() → address
isComposeMsgSender(tuple, bytes, address) → bool
isPeer(uint32, bytes32) → bool
msgInspector() → address
name() → string
nextNonce(uint32, bytes32) → uint64
oApp() → address
oAppVersion() → uint64, uint64
oftVersion() → bytes4, uint64
owner() → address
paused() → bool
peers(uint32) → bytes32
pendingOwner() → address
preCrime() → address
quoteOFT(tuple) → tuple, tuple[], tuple
quoteSend(tuple, bool) → tuple
rateLimits(uint32) → uint192, uint64, uint192, uint64
renounceOwnership()
sharedDecimals() → uint8
symbol() → string
token() → address
totalSupply() → uint256
Events (16)
ApprovalEnforcedOptionSetForeignTokenSweptGuardianSetMsgInspectorSetOFTReceivedOFTSentOwnershipTransferStartedOwnershipTransferredPausedPeerSetPreCrimeSetRateLimitsChangedRateLimitsResetTransferUnpaused
ABI
[
{
"inputs": [
{
"internalType": "address",
"name": "_lzEndpoint",
"type": "address"
},
{
"internalType": "address",
"name": "_delegate",
"type": "address"
},
{
"internalType": "address",
"name": "_owner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountSD",
"type": "uint256"
}
],
"name": "AmountSDOverflowed",
"type": "error"
},
{
"inputs": [],
"name": "CannotSweepSelf",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"inputs": [],
"name": "EnforcedPause",
"type": "error"
},
{
"inputs": [],
"name": "ExpectedPause",
"type": "error"
},
{
"inputs": [],
"name": "InvalidDelegate",
"type": "error"
},
{
"inputs": [],
"name": "InvalidEndpointCall",
"type": "error"
},
{
"inputs": [],
"name": "InvalidLocalDecimals",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "options",
"type": "bytes"
}
],
"name": "InvalidOptions",
"type": "error"
},
{
"inputs": [],
"name": "LzTokenUnavailable",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "eid",
"type": "uint32"
}
],
"name": "NoPeer",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "msgValue",
"type": "uint256"
}
],
"name": "NotEnoughNative",
"type": "error"
},
{
"inputs": [],
"name": "NotGuardianOrOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "addr",
"type": "address"
}
],
"name": "OnlyEndpoint",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "eid",
"type": "uint32"
},
{
"internalType": "bytes32",
"name": "sender",
"type": "bytes32"
}
],
"name": "OnlyPeer",
"type": "error"
},
{
"inputs": [],
"name": "OnlySelf",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"inputs": [],
"name": "RateLimitExceeded",
"type": "error"
},
{
"inputs": [],
"name": "RenounceDisabled",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
}
],
"name": "SafeERC20FailedOperation",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes",
"name": "result",
"type": "bytes"
}
],
"name": "SimulationResult",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amountLD",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minAmountLD",
"type": "uint256"
}
],
"name": "SlippageExceeded",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint32",
"name": "eid",
"type": "uint32"
},
{
"internalType": "uint16",
"name": "msgType",
"type": "uint16"
},
{
"internalType": "bytes",
"name": "options",
"type": "bytes"
}
],
"indexed": false,
"internalType": "struct EnforcedOptionParam[]",
"name": "_enforcedOptions",
"type": "tuple[]"
}
],
"name": "EnforcedOptionSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "ForeignTokenSwept",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "guardian",
"type": "address"
}
],
"name": "GuardianSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "inspector",
"type": "address"
}
],
"name": "MsgInspectorSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "guid",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "srcEid",
"type": "uint32"
},
{
"indexed": true,
"internalType": "address",
"name": "toAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountReceivedLD",
"type": "uint256"
}
],
"name": "OFTReceived",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "bytes32",
"name": "guid",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
},
{
"indexed": true,
"internalType": "address",
"name": "fromAddress",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountSentLD",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amountReceivedLD",
"type": "uint256"
}
],
"name": "OFTSent",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferStarted",
"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": "address",
"name": "account",
"type": "address"
}
],
"name": "Paused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint32",
"name": "eid",
"type": "uint32"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "peer",
"type": "bytes32"
}
],
"name": "PeerSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "preCrimeAddress",
"type": "address"
}
],
"name": "PreCrimeSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
},
{
"internalType": "uint192",
"name": "limit",
"type": "uint192"
},
{
"internalType": "uint64",
"name": "window",
"type": "uint64"
}
],
"indexed": false,
"internalType": "struct RateLimiter.RateLimitConfig[]",
"name": "rateLimitConfigs",
"type": "tuple[]"
}
],
"name": "RateLimitsChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint32[]",
"name": "eids",
"type": "uint32[]"
}
],
"name": "RateLimitsReset",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "Unpaused",
"type": "event"
},
{
"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": [],
"name": "acceptOwnership",
"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"
}
],
"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": [
{
"internalType": "uint32",
"name": "_dstEid",
"type": "uint32"
}
],
"name": "getAmountCanBeSent",
"outputs": [
{
"internalType": "uint256",
"name": "currentAmountInFlight",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amountCanBeSent",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "guardian",
"outputs": [
{
"internalType": "address",
"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": [
{
"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": [],
"name": "pause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "paused",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"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": "pendingOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"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": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
}
],
"name": "rateLimits",
"outputs": [
{
"internalType": "uint192",
"name": "amountInFlight",
"type": "uint192"
},
{
"internalType": "uint64",
"name": "lastUpdated",
"type": "uint64"
},
{
"internalType": "uint192",
"name": "limit",
"type": "uint192"
},
{
"internalType": "uint64",
"name": "window",
"type": "uint64"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"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"
},
{
"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": "_guardian",
"type": "address"
}
],
"name": "setGuardian",
"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": [
{
"components": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
},
{
"internalType": "uint192",
"name": "limit",
"type": "uint192"
},
{
"internalType": "uint64",
"name": "window",
"type": "uint64"
}
],
"internalType": "struct RateLimiter.RateLimitConfig[]",
"name": "_configs",
"type": "tuple[]"
}
],
"name": "setRateLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "sharedDecimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_token",
"type": "address"
},
{
"internalType": "address",
"name": "_to",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "sweepForeignToken",
"outputs": [],
"stateMutability": "nonpayable",
"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"
},
{
"inputs": [],
"name": "unpause",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
/**
* KonaOFT — wrapped KONA on Robinhood Chain (docs/06). Mint-and-burn LayerZero V2 OFT:
* the ONLY mint path is _credit, executable only by the LZ endpoint on a DVN-verified
* message (the EVM mirror of the Solana `--only-oft-store true` posture). No admin mint.
*
* Same thin hardening set as KonaOFTAdapter (v5 vanilla discipline — modifiers and
* utility calls around super, zero reimplemented transfer logic):
* - Pausable both legs (guardian or owner pauses; only owner unpauses). Paused inbound
* reverts at lzReceive and is retryable after unpause.
* - Outbound rate limit via LayerZero's own RateLimiter (_outflow) per destination EID
* (both dsts: Abstract 30324/40313 and Solana 30168/40168).
* - Ownable2Step, renounceOwnership permanently disabled.
* - sweepForeignToken; this contract IS the token, so address(this) is never sweepable
* (mistaken self-transfers of KONA are recoverable-by-no-one by design — same class
* as burning).
*
* Parent-redirect NOTE (G1, verified on installed oft-evm@4.0.1): unlike the lockbox
* OFTAdapter, the mint-path OFT._credit DOES redirect bytes32(0) recipients to 0xdead
* (`if (_to == address(0x0)) _to = address(0xdead)`), so malformed-recipient messages
* mint-and-burn instead of revert-and-strand. Pinned by unit test.
*/
import { OFT } from "@layerzerolabs/oft-evm/contracts/OFT.sol";
import { RateLimiter } from "@layerzerolabs/oapp-evm/contracts/oapp/utils/RateLimiter.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol";
import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract KonaOFT is OFT, RateLimiter, Pausable, Ownable2Step {
using SafeERC20 for IERC20;
/// @notice Pause-only role alongside owner (fast incident response). address(0) = disabled
/// (deferred at launch per the 2026-07-07 descope directive, same as the adapter).
address public guardian;
event GuardianSet(address indexed guardian);
event ForeignTokenSwept(address indexed token, address indexed to, uint256 amount);
error CannotSweepSelf();
error NotGuardianOrOwner();
error RenounceDisabled();
/// @param _lzEndpoint Robinhood LZ V2 endpoint — resolved from LZ metadata (G2)
/// @param _delegate endpoint delegate — the Safe FROM GENESIS (L-03 pattern)
/// @param _owner initial owner — deployer for setup, then Ownable2Step to Safe.
/// Blocking assertions (deploy script) before deployer key retirement.
constructor(
address _lzEndpoint,
address _delegate,
address _owner
) OFT("Kona", "KONA", _lzEndpoint, _delegate) Ownable(_owner) {}
// --------------------------------------------------------------- admin
modifier onlyGuardianOrOwner() {
if (msg.sender != guardian && msg.sender != owner()) revert NotGuardianOrOwner();
_;
}
function pause() external onlyGuardianOrOwner {
_pause();
}
/// @notice Owner (Safe) only. Permanent-pause residual disclosed (docs/05 §3).
function unpause() external onlyOwner {
_unpause();
}
function setGuardian(address _guardian) external onlyOwner {
guardian = _guardian;
emit GuardianSet(_guardian);
}
/// @notice Outbound per-EID limits — RateLimitConfig{dstEid, limit, window} per installed API.
function setRateLimits(RateLimitConfig[] calldata _configs) external onlyOwner {
_setRateLimits(_configs);
}
/// @notice Sweep tokens sent by mistake. This contract IS the wrapped KONA token —
/// sweeping address(this) would let the admin move user-owned wrapped supply,
/// so it is disabled. (KONA accidentally transferred TO this contract is
/// unrecoverable, equivalent to a burn.)
function sweepForeignToken(address _token, address _to, uint256 _amount) external onlyOwner {
if (_token == address(this)) revert CannotSweepSelf();
IERC20(_token).safeTransfer(_to, _amount);
emit ForeignTokenSwept(_token, _to, _amount);
}
// ------------------------------------------------------------ OFT hooks
/// @dev Outbound: pause-gate + LZ rate limiter, then stock burn. No reimplementation.
function _debit(
address _from,
uint256 _amountLD,
uint256 _minAmountLD,
uint32 _dstEid
) internal override whenNotPaused returns (uint256 amountSentLD, uint256 amountReceivedLD) {
_outflow(_dstEid, _amountLD);
return super._debit(_from, _amountLD, _minAmountLD, _dstEid);
}
/// @dev Inbound: pause-gate only, then 100% stock mint (parent redirects bytes32(0)
/// recipients to 0xdead — verified on the pinned oft-evm version 4.0.1, pinned
/// by test). Paused messages revert and remain retryable.
function _credit(
address _to,
uint256 _amountLD,
uint32 _srcEid
) internal override whenNotPaused returns (uint256 amountReceivedLD) {
return super._credit(_to, _amountLD, _srcEid);
}
// ---------------------------------------------- Ownable2Step resolution
function transferOwnership(address newOwner) public override(Ownable, Ownable2Step) onlyOwner {
Ownable2Step.transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal override(Ownable, Ownable2Step) {
Ownable2Step._transferOwnership(newOwner);
}
/// @notice Renounce permanently disabled — a fail-closed OFT with no owner can never
/// unpause; renouncing is indistinguishable from bricking the leg.
function renounceOwnership() public view override onlyOwner {
revert RenounceDisabled();
}
}
Chain explorer4656msChain node78ms