Expand description
Generated by the following Solidity interface…
library BridgeUtils {
struct Message {
uint8 messageType;
uint8 version;
uint64 nonce;
uint8 chainID;
bytes payload;
}
}
interface EthSuiBridge {
error AddressEmptyCode(address target);
error AddressInsufficientBalance(address account);
error ERC1967InvalidImplementation(address implementation);
error ERC1967NonPayable();
error EnforcedPause();
error ExpectedPause();
error FailedInnerCall();
error InvalidInitialization();
error NotInitializing();
error ReentrancyGuardReentrantCall();
error SafeERC20FailedOperation(address token);
error UUPSUnauthorizedCallContext();
error UUPSUnsupportedProxiableUUID(bytes32 slot);
event ContractUpgraded(uint256 nonce, address proxy, address implementation);
event EmergencyOperation(uint64 nonce, bool paused);
event Initialized(uint64 version);
event Paused(address account);
event TokensClaimed(uint8 indexed sourceChainID, uint64 indexed nonce, uint8 indexed destinationChainID, uint8 tokenID, uint256 erc20AdjustedAmount, bytes senderAddress, address recipientAddress);
event TokensDeposited(uint8 indexed sourceChainID, uint64 indexed nonce, uint8 indexed destinationChainID, uint8 tokenID, uint64 suiAdjustedAmount, address senderAddress, bytes recipientAddress);
event TokensDepositedV2(uint8 indexed sourceChainID, uint64 indexed nonce, uint8 indexed destinationChainID, uint8 tokenID, uint64 suiAdjustedAmount, address senderAddress, bytes recipientAddress, uint256 timestampSeconds);
event Unpaused(address account);
event Upgraded(address indexed implementation);
function UPGRADE_INTERFACE_VERSION() external view returns (string memory);
function bridgeERC20(uint8 tokenID, uint256 amount, bytes memory recipientAddress, uint8 destinationChainID) external;
function bridgeERC20V2(uint8 tokenID, uint256 amount, bytes memory recipientAddress, uint8 destinationChainID) external;
function bridgeETH(bytes memory recipientAddress, uint8 destinationChainID) external payable;
function bridgeETHV2(bytes memory recipientAddress, uint8 destinationChainID) external payable;
function committee() external view returns (address);
function executeEmergencyOpWithSignatures(bytes[] memory signatures, BridgeUtils.Message memory message) external;
function initialize(address _committee, address _vault, address _limiter) external;
function isTransferProcessed(uint64 nonce) external view returns (bool isProcessed);
function limiter() external view returns (address);
function nonces(uint8 messageType) external view returns (uint64 nonce);
function paused() external view returns (bool);
function proxiableUUID() external view returns (bytes32);
function transferBridgedTokensWithSignatures(bytes[] memory signatures, BridgeUtils.Message memory message) external;
function transferBridgedTokensWithSignaturesV2(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 vault() external view returns (address);
}…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": "bridgeERC20",
"inputs": [
{
"name": "tokenID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "recipientAddress",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "destinationChainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "bridgeERC20V2",
"inputs": [
{
"name": "tokenID",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "recipientAddress",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "destinationChainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "bridgeETH",
"inputs": [
{
"name": "recipientAddress",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "destinationChainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "bridgeETHV2",
"inputs": [
{
"name": "recipientAddress",
"type": "bytes",
"internalType": "bytes"
},
{
"name": "destinationChainID",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "committee",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IBridgeCommittee"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "executeEmergencyOpWithSignatures",
"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": "initialize",
"inputs": [
{
"name": "_committee",
"type": "address",
"internalType": "address"
},
{
"name": "_vault",
"type": "address",
"internalType": "address"
},
{
"name": "_limiter",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "isTransferProcessed",
"inputs": [
{
"name": "nonce",
"type": "uint64",
"internalType": "uint64"
}
],
"outputs": [
{
"name": "isProcessed",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "limiter",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IBridgeLimiter"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "nonces",
"inputs": [
{
"name": "messageType",
"type": "uint8",
"internalType": "uint8"
}
],
"outputs": [
{
"name": "nonce",
"type": "uint64",
"internalType": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "paused",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "proxiableUUID",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "transferBridgedTokensWithSignatures",
"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": "transferBridgedTokensWithSignaturesV2",
"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": "vault",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IBridgeVault"
}
],
"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": "EmergencyOperation",
"inputs": [
{
"name": "nonce",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "paused",
"type": "bool",
"indexed": false,
"internalType": "bool"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Paused",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "TokensClaimed",
"inputs": [
{
"name": "sourceChainID",
"type": "uint8",
"indexed": true,
"internalType": "uint8"
},
{
"name": "nonce",
"type": "uint64",
"indexed": true,
"internalType": "uint64"
},
{
"name": "destinationChainID",
"type": "uint8",
"indexed": true,
"internalType": "uint8"
},
{
"name": "tokenID",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "erc20AdjustedAmount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
},
{
"name": "senderAddress",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
},
{
"name": "recipientAddress",
"type": "address",
"indexed": false,
"internalType": "address"
}
],
"anonymous": false
},
{
"type": "event",
"name": "TokensDeposited",
"inputs": [
{
"name": "sourceChainID",
"type": "uint8",
"indexed": true,
"internalType": "uint8"
},
{
"name": "nonce",
"type": "uint64",
"indexed": true,
"internalType": "uint64"
},
{
"name": "destinationChainID",
"type": "uint8",
"indexed": true,
"internalType": "uint8"
},
{
"name": "tokenID",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "suiAdjustedAmount",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "senderAddress",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "recipientAddress",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
},
{
"type": "event",
"name": "TokensDepositedV2",
"inputs": [
{
"name": "sourceChainID",
"type": "uint8",
"indexed": true,
"internalType": "uint8"
},
{
"name": "nonce",
"type": "uint64",
"indexed": true,
"internalType": "uint64"
},
{
"name": "destinationChainID",
"type": "uint8",
"indexed": true,
"internalType": "uint8"
},
{
"name": "tokenID",
"type": "uint8",
"indexed": false,
"internalType": "uint8"
},
{
"name": "suiAdjustedAmount",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "senderAddress",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "recipientAddress",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
},
{
"name": "timestampSeconds",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Unpaused",
"inputs": [
{
"name": "account",
"type": "address",
"indexed": false,
"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": "AddressInsufficientBalance",
"inputs": [
{
"name": "account",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967InvalidImplementation",
"inputs": [
{
"name": "implementation",
"type": "address",
"internalType": "address"
}
]
},
{
"type": "error",
"name": "ERC1967NonPayable",
"inputs": []
},
{
"type": "error",
"name": "EnforcedPause",
"inputs": []
},
{
"type": "error",
"name": "ExpectedPause",
"inputs": []
},
{
"type": "error",
"name": "FailedInnerCall",
"inputs": []
},
{
"type": "error",
"name": "InvalidInitialization",
"inputs": []
},
{
"type": "error",
"name": "NotInitializing",
"inputs": []
},
{
"type": "error",
"name": "ReentrancyGuardReentrantCall",
"inputs": []
},
{
"type": "error",
"name": "SafeERC20FailedOperation",
"inputs": [
{
"name": "token",
"type": "address",
"internalType": "address"
}
]
},
{
"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. - Address
Insufficient Balance - Custom error with signature
AddressInsufficientBalance(address)and selector0xcd786059. - 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. - Emergency
Operation - Event with signature
EmergencyOperation(uint64,bool)and selector0x0838fecaac9057733ed7f9bb6e8ecfacf0d9c68d2f9b06e84f8c7f6098814bfb. - Enforced
Pause - Custom error with signature
EnforcedPause()and selector0xd93c0665. - EthSui
Bridge Instance - A
EthSuiBridgeinstance. - Expected
Pause - Custom error with signature
ExpectedPause()and selector0x8dfc202b. - Failed
Inner Call - Custom error with signature
FailedInnerCall()and selector0x1425ea42. - Initialized
- Event with signature
Initialized(uint64)and selector0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. - Invalid
Initialization - Custom error with signature
InvalidInitialization()and selector0xf92ee8a9. - NotInitializing
- Custom error with signature
NotInitializing()and selector0xd7e6bcf8. - Paused
- Event with signature
Paused(address)and selector0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. - Reentrancy
Guard Reentrant Call - Custom error with signature
ReentrancyGuardReentrantCall()and selector0x3ee5aeb5. - SafeER
C20Failed Operation - Custom error with signature
SafeERC20FailedOperation(address)and selector0x5274afe7. - Tokens
Claimed - Event with signature
TokensClaimed(uint8,uint64,uint8,uint8,uint256,bytes,address)and selector0x933e8377dca7a8cf67d2bf865c4d8c1c45347815760900f9d2eb5655a06943af. - Tokens
Deposited - Event with signature
TokensDeposited(uint8,uint64,uint8,uint8,uint64,address,bytes)and selector0xa0f1d54820817ede8517e70a3d0a9197c015471c5360d2119b759f0359858ce6. - Tokens
Deposited V2 - Event with signature
TokensDepositedV2(uint8,uint64,uint8,uint8,uint64,address,bytes,uint256)and selector0x70ef4a8b6f5065985fc424842df9fc218ad4c4015e85bb4158770e34abbcd82c. - 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. - Unpaused
- Event with signature
Unpaused(address)and selector0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. - Upgraded
- Event with signature
Upgraded(address)and selector0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. - bridgeER
C20Call - Function with signature
bridgeERC20(uint8,uint256,bytes,uint8)and selector0x212afaff. - bridgeER
C20Return - Container type for the return parameters of the
bridgeERC20(uint8,uint256,bytes,uint8)function. - bridgeER
C20V2 Call - Function with signature
bridgeERC20V2(uint8,uint256,bytes,uint8)and selector0x0bdba58b. - bridgeER
C20V2 Return - Container type for the return parameters of the
bridgeERC20V2(uint8,uint256,bytes,uint8)function. - bridgeETH
Call - Function with signature
bridgeETH(bytes,uint8)and selector0x9449ebd2. - bridgeETH
Return - Container type for the return parameters of the
bridgeETH(bytes,uint8)function. - bridgeETH
V2Call - Function with signature
bridgeETHV2(bytes,uint8)and selector0xb4b7068c. - bridgeETH
V2Return - Container type for the return parameters of the
bridgeETHV2(bytes,uint8)function. - committee
Call - Function with signature
committee()and selector0xd864e740. - committee
Return - Container type for the return parameters of the
committee()function. - execute
Emergency OpWith Signatures Call - Function with signature
executeEmergencyOpWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))and selector0xa6f740f6. - execute
Emergency OpWith Signatures Return - Container type for the return parameters of the
executeEmergencyOpWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))function. - initialize
Call - Function with signature
initialize(address,address,address)and selector0xc0c53b8b. - initialize
Return - Container type for the return parameters of the
initialize(address,address,address)function. - isTransfer
Processed Call - Function with signature
isTransferProcessed(uint64)and selector0x5458ea9e. - isTransfer
Processed Return - Container type for the return parameters of the
isTransferProcessed(uint64)function. - limiter
Call - Function with signature
limiter()and selector0x74b87f67. - limiter
Return - Container type for the return parameters of the
limiter()function. - nonces
Call - Function with signature
nonces(uint8)and selector0x5035bda2. - nonces
Return - Container type for the return parameters of the
nonces(uint8)function. - paused
Call - Function with signature
paused()and selector0x5c975abb. - paused
Return - Container type for the return parameters of the
paused()function. - proxiableUUID
Call - Function with signature
proxiableUUID()and selector0x52d1902d. - proxiableUUID
Return - Container type for the return parameters of the
proxiableUUID()function. - transfer
Bridged Tokens With Signatures Call - Function with signature
transferBridgedTokensWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))and selector0xbeb0d55c. - transfer
Bridged Tokens With Signatures Return - Container type for the return parameters of the
transferBridgedTokensWithSignatures(bytes[],(uint8,uint8,uint64,uint8,bytes))function. - transfer
Bridged Tokens With Signatures V2Call - Function with signature
transferBridgedTokensWithSignaturesV2(bytes[],(uint8,uint8,uint64,uint8,bytes))and selector0x9c3ecefb. - transfer
Bridged Tokens With Signatures V2Return - Container type for the return parameters of the
transferBridgedTokensWithSignaturesV2(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. - vault
Call - Function with signature
vault()and selector0xfbfa77cf. - vault
Return - Container type for the return parameters of the
vault()function.
Enums§
- EthSui
Bridge Calls - Container for all the
EthSuiBridgefunction calls. - EthSui
Bridge Errors - Container for all the
EthSuiBridgecustom errors. - EthSui
Bridge Events - Container for all the
EthSuiBridgeevents.
Statics§
- BYTECODE
- The creation / init bytecode of the contract.
- DEPLOYED_
BYTECODE - The runtime bytecode of the contract, as deployed on the network.
Functions§
- deploy
- Deploys this contract using the given
providerand constructor arguments, if any. - deploy_
builder - Creates a
RawCallBuilderfor deploying this contract using the givenproviderand constructor arguments, if any. - new
- Creates a new wrapper around an on-chain
EthSuiBridgecontract instance.