Expand description
Generated by the following Solidity interface…
library BridgeUtils {
struct Message {
uint8 messageType;
uint8 version;
uint64 nonce;
uint8 chainID;
bytes payload;
}
}
interface EthBridgeLimiter {
error AddressEmptyCode(address target);
error ERC1967InvalidImplementation(address implementation);
error ERC1967NonPayable();
error FailedInnerCall();
error InvalidInitialization();
error NotInitializing();
error OwnableInvalidOwner(address owner);
error OwnableUnauthorizedAccount(address account);
error ReentrancyGuardReentrantCall();
error UUPSUnauthorizedCallContext();
error UUPSUnsupportedProxiableUUID(bytes32 slot);
event ContractUpgraded(uint256 nonce, address proxy, address implementation);
event HourlyTransferAmountUpdated(uint32 hourUpdated, uint256 amount);
event Initialized(uint64 version);
event LimitUpdated(uint8 sourceChainID, uint64 newLimit);
event LimitUpdatedV2(uint64 nonce, uint8 sourceChainID, uint64 newLimit);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event Upgraded(address indexed implementation);
function UPGRADE_INTERFACE_VERSION() external view returns (string memory);
function calculateAmountInUSD(uint8 tokenID, uint256 amount) external view returns (uint256);
function calculateWindowAmount(uint8 chainID) external view returns (uint256 total);
function chainHourlyTransferAmount(uint256 chainHourTimestamp) external view returns (uint256 totalAmountBridged);
function chainLimits(uint8 chainID) external view returns (uint64 totalLimit);
function committee() external view returns (address);
function currentHour() external view returns (uint32);
function getChainHourTimestampKey(uint8 chainID, uint32 hourTimestamp) external pure returns (uint256);
function initialize(address _committee, uint8[] memory chainIDs, uint64[] memory _totalLimits) external;
function nonces(uint8 messageType) external view returns (uint64 nonce);
function oldestChainTimestamp(uint8 chainID) external view returns (uint32 oldestHourTimestamp);
function owner() external view returns (address);
function proxiableUUID() external view returns (bytes32);
function recordBridgeTransfers(uint8 chainID, uint8 tokenID, uint256 amount) external;
function renounceOwnership() external;
function transferOwnership(address newOwner) external;
function updateLimitWithSignatures(bytes[] memory signatures, BridgeUtils.Message memory message) external;
function upgradeToAndCall(address newImplementation, bytes memory data) external payable;
function upgradeWithSignatures(bytes[] memory signatures, BridgeUtils.Message memory message) external;
function willAmountExceedLimit(uint8 chainID, uint8 tokenID, uint256 amount) external view returns (bool);
function willUSDAmountExceedLimit(uint8 chainID, uint256 amount) external view returns (bool);
}…which was generated by the following JSON ABI:
[
{
"type": "function",
"name": "UPGRADE_INTERFACE_VERSION",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "calculateAmountInUSD",
"inputs": [
{
"name": "tokenID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "calculateWindowAmount",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [
{
"name": "total",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "chainHourlyTransferAmount",
"inputs": [
{
"name": "chainHourTimestamp",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "totalAmountBridged",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "chainLimits",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [
{
"name": "totalLimit",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "committee",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IBridgeCommittee"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "currentHour",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint32",
"internalType": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "getChainHourTimestampKey",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "hourTimestamp",
"type": "uint32",
"internalType": "uint32"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "pure"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_committee",
"type": "address",
"internalType": "address"
},
{
"name": "chainIDs",
"type": "uint8[]",
"internalType": "uint8[]"
},
{
"name": "_totalLimits",
"type": "uint64[]",
"internalType": "uint64[]"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "nonces",
"inputs": [
{
"name": "messageType",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [
{
"name": "nonce",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "oldestChainTimestamp",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [
{
"name": "oldestHourTimestamp",
"type": "uint32",
"internalType": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "proxiableUUID",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "recordBridgeTransfers",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "tokenID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "updateLimitWithSignatures",
"inputs": [
{
"name": "signatures",
"type": "bytes[]",
"internalType": "bytes[]"
},
{
"name": "message",
"type": "tuple",
"internalType": "struct BridgeUtils.Message",
"components": [
{
"name": "messageType",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "version",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "nonce",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "payload",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "upgradeToAndCall",
"inputs": [
{
"name": "newImplementation",
"type": "address",
"internalType": "address"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "upgradeWithSignatures",
"inputs": [
{
"name": "signatures",
"type": "bytes[]",
"internalType": "bytes[]"
},
{
"name": "message",
"type": "tuple",
"internalType": "struct BridgeUtils.Message",
"components": [
{
"name": "messageType",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "version",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "nonce",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "payload",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "willAmountExceedLimit",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "tokenID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "willUSDAmountExceedLimit",
"inputs": [
{
"name": "chainID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "ContractUpgraded",
"inputs": [
{
"name": "nonce",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "proxy",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "implementation",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "HourlyTransferAmountUpdated",
"inputs": [
{
"name": "hourUpdated",
"type": "uint32",
"indexed": false,
"internalType": "uint32"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "LimitUpdated",
"inputs": [
{
"name": "sourceChainID",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "newLimit",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "LimitUpdatedV2",
"inputs": [
{
"name": "nonce",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "sourceChainID",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "newLimit",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "previousOwner",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newOwner",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Upgraded",
"inputs": [
{
"name": "implementation",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "error",
"name": "AddressEmptyCode",
"inputs": [
{
"name": "target",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967InvalidImplementation",
"inputs": [
{
"name": "implementation",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967NonPayable",
"inputs": []
},
{
"type": "error",
"name": "FailedInnerCall",
"inputs": []
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "OwnableInvalidOwner",
"inputs": [
{
"name": "owner",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "OwnableUnauthorizedAccount",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ReentrancyGuardReentrantCall",
"inputs": []
},
{
"type": "error",
"name": "UUPSUnauthorizedCallContext",
"inputs": []
},
{
"type": "error",
"name": "UUPSUnsupportedProxiableUUID",
"inputs": [
{
"name": "slot",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
]Structs§
- Address
Empty Code - Custom error with signature
AddressEmptyCode(address)and selector0x9996b315. - Contract
Upgraded - Event with signature
ContractUpgraded(uint256,address,address)and selector0xdc69b57038334451ee12fd1742228917cea7f40dbd33cda5162e7e5754acee1c. - ERC1967
Invalid Implementation - Custom error with signature
ERC1967InvalidImplementation(address)and selector0x4c9c8ce3. - ERC1967
NonPayable - Custom error with signature
ERC1967NonPayable()and selector0xb398979f. - EthBridge
Limiter Instance - A
EthBridgeLimiterinstance. - Failed
Inner Call - Custom error with signature
FailedInnerCall()and selector0x1425ea42. - Hourly
Transfer Amount Updated - Event with signature
HourlyTransferAmountUpdated(uint32,uint256)and selector0x1c67469b467f869771dcc2fb28419e0225fff93861a184775e7af2fd916eef55. - Initialized
- Event with signature
Initialized(uint64)and selector0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. - Invalid
Initialization - Custom error with signature
InvalidInitialization()and selector0xf92ee8a9. - Limit
Updated - Event with signature
LimitUpdated(uint8,uint64)and selector0x2266d5ea4551f9e8a7c1ffe1c87131985d16d31b1ca809656328b4e19ec2b0f8. - Limit
Updated V2 - Event with signature
LimitUpdatedV2(uint64,uint8,uint64)and selector0x253425292723148e4239ef77c5a481d0351c3440eaee94112b541e71a3754599. - NotInitializing
- Custom error with signature
NotInitializing()and selector0xd7e6bcf8. - Ownable
Invalid Owner - Custom error with signature
OwnableInvalidOwner(address)and selector0x1e4fbdf7. - Ownable
Unauthorized Account - Custom error with signature
OwnableUnauthorizedAccount(address)and selector0x118cdaa7. - Ownership
Transferred - Event with signature
OwnershipTransferred(address,address)and selector0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. - Reentrancy
Guard Reentrant Call - Custom error with signature
ReentrancyGuardReentrantCall()and selector0x3ee5aeb5. - UPGRADE_
INTERFACE_ VERSION Call - Function with signature
UPGRADE_INTERFACE_VERSION()and selector0xad3cb1cc. - UPGRADE_
INTERFACE_ VERSION Return - Container type for the return parameters of the
UPGRADE_INTERFACE_VERSION()function. - UUPS
Unauthorized Call Context - Custom error with signature
UUPSUnauthorizedCallContext()and selector0xe07c8dba. - UUPS
Unsupported ProxiableUUID - Custom error with signature
UUPSUnsupportedProxiableUUID(bytes32)and selector0xaa1d49a4. - Upgraded
- Event with signature
Upgraded(address)and selector0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. - calculate
Amount InUSD Call - Function with signature
calculateAmountInUSD(uint8,uint256)and selector0xe6b04b9f. - calculate
Amount InUSD Return - Container type for the return parameters of the
calculateAmountInUSD(uint8,uint256)function. - calculate
Window Amount Call - Function with signature
calculateWindowAmount(uint8)and selector0xc6b478dd. - calculate
Window Amount Return - Container type for the return parameters of the
calculateWindowAmount(uint8)function. - chain
Hourly Transfer Amount Call - Function with signature
chainHourlyTransferAmount(uint256)and selector0x9056e153. - chain
Hourly Transfer Amount Return - Container type for the return parameters of the
chainHourlyTransferAmount(uint256)function. - chain
Limits Call - Function with signature
chainLimits(uint8)and selector0x2c4535af. - chain
Limits Return - Container type for the return parameters of the
chainLimits(uint8)function. - committee
Call - Function with signature
committee()and selector0xd864e740. - committee
Return - Container type for the return parameters of the
committee()function. - current
Hour Call - Function with signature
currentHour()and selector0x020e185d. - current
Hour Return - Container type for the return parameters of the
currentHour()function. - getChain
Hour Timestamp KeyCall - Function with signature
getChainHourTimestampKey(uint8,uint32)and selector0x085714c5. - getChain
Hour Timestamp KeyReturn - Container type for the return parameters of the
getChainHourTimestampKey(uint8,uint32)function. - initialize
Call - Function with signature
initialize(address,uint8[],uint64[])and selector0x43a5f2bc. - initialize
Return - Container type for the return parameters of the
initialize(address,uint8[],uint64[])function. - nonces
Call - Function with signature
nonces(uint8)and selector0x5035bda2. - nonces
Return - Container type for the return parameters of the
nonces(uint8)function. - oldest
Chain Timestamp Call - Function with signature
oldestChainTimestamp(uint8)and selector0x795334ad. - oldest
Chain Timestamp Return - Container type for the return parameters of the
oldestChainTimestamp(uint8)function. - owner
Call - Function with signature
owner()and selector0x8da5cb5b. - owner
Return - Container type for the return parameters of the
owner()function. - proxiableUUID
Call - Function with signature
proxiableUUID()and selector0x52d1902d. - proxiableUUID
Return - Container type for the return parameters of the
proxiableUUID()function. - record
Bridge Transfers Call - Function with signature
recordBridgeTransfers(uint8,uint8,uint256)and selector0x9373d391. - record
Bridge Transfers Return - Container type for the return parameters of the
recordBridgeTransfers(uint8,uint8,uint256)function. - renounce
Ownership Call - Function with signature
renounceOwnership()and selector0x715018a6. - renounce
Ownership Return - Container type for the return parameters of the
renounceOwnership()function. - transfer
Ownership Call - Function with signature
transferOwnership(address)and selector0xf2fde38b. - transfer
Ownership Return - Container type for the return parameters of the
transferOwnership(address)function. - update
Limit With Signatures Call - Function with signature
updateLimitWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))and selector0x97c39b13. - update
Limit With Signatures Return - Container type for the return parameters of the
updateLimitWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))function. - upgrade
ToAnd Call Call - Function with signature
upgradeToAndCall(address,bytes)and selector0x4f1ef286. - upgrade
ToAnd Call Return - Container type for the return parameters of the
upgradeToAndCall(address,bytes)function. - upgrade
With Signatures Call - Function with signature
upgradeWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))and selector0xfa72a6d0. - upgrade
With Signatures Return - Container type for the return parameters of the
upgradeWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))function. - will
Amount Exceed Limit Call - Function with signature
willAmountExceedLimit(uint8,uint8,uint256)and selector0xf7857a19. - will
Amount Exceed Limit Return - Container type for the return parameters of the
willAmountExceedLimit(uint8,uint8,uint256)function. - willUSD
Amount Exceed Limit Call - Function with signature
willUSDAmountExceedLimit(uint8,uint256)and selector0x4f46cba7. - willUSD
Amount Exceed Limit Return - Container type for the return parameters of the
willUSDAmountExceedLimit(uint8,uint256)function.
Enums§
- EthBridge
Limiter Calls - Container for all the
EthBridgeLimiterfunction calls. - EthBridge
Limiter Errors - Container for all the
EthBridgeLimitercustom errors. - EthBridge
Limiter Events - Container for all the
EthBridgeLimiterevents.
Functions§
- new
- Creates a new wrapper around an on-chain
EthBridgeLimitercontract instance.