StakedUSDeOFT
0x211cc4dd073734da055fbf44a2b4667d5e5fe5d2
Verification
Verified
v0.8.26+commit.8a97fa7a
Type
Contract
12,227 bytes
ABI entries
97
35 read · 19 write
License
none
Contract information
- Address
- 0x211cc4dd073734da055fbf44a2b4667d5e5fe5d2
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.26+commit.8a97fa7a
- Optimization
- Enabled
- Creator
- 0xAa439FB33e…4c4139f3dc
- Creation tx
- 0x00d7605b13…ff44afb1e8
Token
- Name
- Staked USDe
- Symbol
- sUSDe
- Decimals
- 18
- Holders
- 2
- Market
- View token page →
Read contract (35)
SEND() → uint16
SEND_AND_CALL() → uint16
allowInitializePath(tuple) → bool
allowance(address, address) → uint256
approvalRequired() → bool
balanceOf(address) → uint256
blackList(address) → bool
blackLister() → address
combineOptions(uint32, uint16, bytes) → bytes
composeMsgSender() → address
decimalConversionRate() → uint256
decimals() → uint8
endpoint() → address
enforcedOptions(uint32, uint16) → bytes
getAmountCanBeSent(uint32) → uint256, uint256
isPeer(uint32, bytes32) → bool
msgInspector() → address
name() → string
nextNonce(uint32, bytes32) → uint64
oApp() → address
oAppVersion() → uint64, uint64
oftVersion() → bytes4, uint64
owner() → address
peers(uint32) → bytes32
pendingOwner() → address
preCrime() → address
quoteOFT(tuple) → tuple, tuple[], tuple
quoteSend(tuple, bool) → tuple
rateLimiter() → address
rateLimits(uint32) → uint256, uint256, uint256, uint256
renounceOwnership()
sharedDecimals() → uint8
symbol() → string
token() → address
totalSupply() → uint256
Events (15)
ApprovalBlackListUpdatedBlackListerSetEnforcedOptionSetMsgInspectorSetOFTReceivedOFTSentOwnershipTransferStartedOwnershipTransferredPeerSetPreCrimeSetRateLimiterSetRateLimitsChangedRedistributeFundsTransfer
ABI
[
{
"inputs": [
{
"components": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "window",
"type": "uint256"
}
],
"internalType": "struct RateLimiter.RateLimitConfig[]",
"name": "_rateLimitConfigs",
"type": "tuple[]"
},
{
"internalType": "string",
"name": "_name",
"type": "string"
},
{
"internalType": "string",
"name": "_symbol",
"type": "string"
},
{
"internalType": "address",
"name": "_lzEndpoint",
"type": "address"
},
{
"internalType": "address",
"name": "_delegate",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "user",
"type": "address"
}
],
"name": "BlackListed",
"type": "error"
},
{
"inputs": [],
"name": "CantRenounceOwnership",
"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": "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": [],
"name": "NotBlackListed",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "msgValue",
"type": "uint256"
}
],
"name": "NotEnoughNative",
"type": "error"
},
{
"inputs": [],
"name": "OnlyBlackLister",
"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": "OnlyRateLimiter",
"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": [
{
"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": [
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "bool",
"name": "isBlackListed",
"type": "bool"
}
],
"name": "BlackListUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "blackLister",
"type": "address"
}
],
"name": "BlackListerSet",
"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": 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": "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": [
{
"indexed": true,
"internalType": "address",
"name": "rateLimiter",
"type": "address"
}
],
"name": "RateLimiterSet",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"components": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "window",
"type": "uint256"
}
],
"indexed": false,
"internalType": "struct RateLimiter.RateLimitConfig[]",
"name": "rateLimitConfigs",
"type": "tuple[]"
}
],
"name": "RateLimitsChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "user",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "RedistributeFunds",
"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"
},
{
"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": "address",
"name": "",
"type": "address"
}
],
"name": "blackList",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "blackLister",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"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": "composeMsgSender",
"outputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"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": [
{
"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": "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": [],
"name": "rateLimiter",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
}
],
"name": "rateLimits",
"outputs": [
{
"internalType": "uint256",
"name": "amountInFlight",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lastUpdated",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "window",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "_from",
"type": "address"
},
{
"internalType": "uint256",
"name": "_amount",
"type": "uint256"
}
],
"name": "redistributeBlackListedFunds",
"outputs": [],
"stateMutability": "nonpayable",
"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": "_blackLister",
"type": "address"
}
],
"name": "setBlackLister",
"outputs": [],
"stateMutability": "nonpayable",
"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": [
{
"internalType": "address",
"name": "_rateLimiter",
"type": "address"
}
],
"name": "setRateLimiter",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"components": [
{
"internalType": "uint32",
"name": "dstEid",
"type": "uint32"
},
{
"internalType": "uint256",
"name": "limit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "window",
"type": "uint256"
}
],
"internalType": "struct RateLimiter.RateLimitConfig[]",
"name": "_rateLimitConfigs",
"type": "tuple[]"
}
],
"name": "setRateLimits",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "sharedDecimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "pure",
"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": [
{
"internalType": "address",
"name": "_user",
"type": "address"
},
{
"internalType": "bool",
"name": "_isBlackListed",
"type": "bool"
}
],
"name": "updateBlackList",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]Source code
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.22;
import {USDeOFT} from "../usde/USDeOFT.sol";
/**
* @title StakedUSDeOFT
*/
contract StakedUSDeOFT is USDeOFT {
// Address of the entity authorized to manage the blacklist
address public blackLister;
// Mapping to track blacklisted users
mapping(address => bool) public blackList;
// Events emitted on changes to the blacklist or fund redistribution
event BlackListerSet(address indexed blackLister);
event BlackListUpdated(address indexed user, bool isBlackListed);
event RedistributeFunds(address indexed user, uint256 amount);
// Errors to be thrown in case of restricted actions
error BlackListed(address user);
error NotBlackListed();
error OnlyBlackLister();
/**
* @dev Constructor to initialize the StakedUSDeOFT contract.
* @param _rateLimitConfigs An array of RateLimitConfig structures defining the rate limits.
* @param _name The name of the token.
* @param _symbol The symbol of the token.
* @param _lzEndpoint Address of the LZ endpoint.
* @param _delegate Address of the delegate.
*/
constructor(
RateLimitConfig[] memory _rateLimitConfigs,
string memory _name,
string memory _symbol,
address _lzEndpoint,
address _delegate
) USDeOFT(_rateLimitConfigs, _name, _symbol, _lzEndpoint, _delegate) {}
/**
* @dev Sets the address authorized to manage the blacklist. Only callable by the owner.
* @param _blackLister Address of the entity authorized to manage the blacklist.
*/
function setBlackLister(address _blackLister) external onlyOwner {
blackLister = _blackLister;
emit BlackListerSet(_blackLister);
}
/**
* @dev Updates the blacklist status of a user.
* @param _user The user identifier to update.
* @param _isBlackListed Boolean indicating whether the user should be blacklisted or not.
*/
function updateBlackList(address _user, bool _isBlackListed) external {
if (msg.sender != blackLister && msg.sender != owner()) revert OnlyBlackLister();
blackList[_user] = _isBlackListed;
emit BlackListUpdated(_user, _isBlackListed);
}
/**
* @dev Credits tokens to the recipient while checking if the recipient is blacklisted.
* If blacklisted, redistributes the funds to the contract owner.
* @param _to The address of the recipient.
* @param _amountLD The amount of tokens to credit.
* @param _srcEid The source endpoint identifier.
* @return amountReceivedLD The actual amount of tokens received.
*/
function _credit(address _to, uint256 _amountLD, uint32 _srcEid)
internal
virtual
override
returns (uint256 amountReceivedLD)
{
// If the recipient is blacklisted, emit an event, redistribute funds, and credit the owner
if (blackList[_to]) {
emit RedistributeFunds(_to, _amountLD);
return super._credit(owner(), _amountLD, _srcEid);
} else {
return super._credit(_to, _amountLD, _srcEid);
}
}
/**
* @dev Checks the blacklist for both sender and recipient before updating balances for a local movement.
* @param _from The address from which tokens are transferred.
* @param _to The address to which tokens are transferred.
* @param _amount The amount of tokens to transfer.
*/
function _update(address _from, address _to, uint256 _amount) internal override {
if (blackList[_from]) revert BlackListed(_from);
if (blackList[_to]) revert BlackListed(_to);
super._update(_from, _to, _amount);
}
/**
* @dev Redistributes funds from a blacklisted address to the contract owner. Only callable by the owner.
* @param _from The address from which funds will be redistributed.
* @param _amount The amount of funds to redistribute.
*/
function redistributeBlackListedFunds(address _from, uint256 _amount) external onlyOwner {
// @dev Only allow redistribution if the address is blacklisted
if (!blackList[_from]) revert NotBlackListed();
// @dev Temporarily remove from the blacklist, transfer funds, and restore to the blacklist
blackList[_from] = false;
_transfer(_from, owner(), _amount);
blackList[_from] = true;
emit RedistributeFunds(_from, _amount);
}
}
Chain explorer1972msChain node87ms