Expand description
Generated by the following Solidity interface…
interface Gateway {
type Command is uint8;
type GmpStatus is uint8;
struct Batch {
uint8 version;
uint64 batchId;
GatewayOp[] ops;
}
struct GasPrice {
uint64 mantissa;
int16 exponent;
}
struct GatewayOp {
Command command;
bytes params;
}
struct GmpMessage {
bytes32 source;
uint16 srcNetwork;
address dest;
uint16 destNetwork;
uint64 gasLimit;
uint64 nonce;
bytes data;
}
struct Route {
uint16 networkId;
bytes32 gateway;
uint64 maxGasLimit;
uint64 msgGas;
uint64 msgByteGas;
uint64 gasPriceMantissa;
int16 gasPriceExponent;
uint64 msgFee;
}
struct Signature {
uint256 xCoord;
uint256 e;
uint256 s;
}
struct TssKey {
uint256 xCoord;
uint8 yParity;
uint16 numSessions;
}
error AddressEmptyCode(address target);
error ERC1967InvalidImplementation(address implementation);
error ERC1967NonPayable();
error FailedCall();
error InvalidInitialization();
error NotInitializing();
error OwnableInvalidOwner(address owner);
error OwnableUnauthorizedAccount(address account);
error UUPSUnauthorizedCallContext();
error UUPSUnsupportedProxiableUUID(bytes32 slot);
event BatchExecuted(uint64 batch);
event GmpCreated(bytes32 indexed id, bytes32 indexed source, address indexed destinationAddress, uint16 destinationNetwork, uint64 gasLimit, uint64 nonce, bytes data);
event GmpExecuted(bytes32 indexed id, bytes32 indexed source, address indexed dest, GmpStatus status, bytes32 result);
event Initialized(uint64 version);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event RouteUpdated(uint16 indexed networkId, bytes32 gateway, uint64 maxGasLimit, uint64 msgGas, uint64 msgByteGas, uint64 gasPriceMantissa, int16 gasPriceExponent, uint64 msgFee);
event ShardRegistered(TssKey key);
event ShardRevoked(TssKey key);
event Upgraded(address indexed implementation);
constructor();
receive() external payable;
function UPGRADE_INTERFACE_VERSION() external view returns (string memory);
function _include_gmp_message(GmpMessage memory) external;
function admin() external view returns (address);
function estimateMessageCost(uint16 network, uint256 messageSize, uint64 gasLimit) external view returns (uint256);
function execute(Signature memory signature, Batch memory batch) external;
function initialize(uint16 _networkId) external;
function messages(bytes32) external view returns (GmpStatus);
function networkId() external view returns (uint16);
function nonces(address) external view returns (uint64);
function owner() external view returns (address);
function proxiableUUID() external view returns (bytes32);
function renounceOwnership() external;
function routes() external view returns (Route[] memory);
function setAdmin(address newAdmin) external payable;
function setPrices(GasPrice[] memory prices) external;
function setRoute(Route memory info) external;
function setShards(TssKey[] memory register, TssKey[] memory revoke) external;
function shards() external view returns (TssKey[] memory);
function submitMessage(address destinationAddress, uint16 network, uint64 gasLimit, bytes memory data) external payable returns (bytes32);
function transferOwnership(address newOwner) external;
function upgradeToAndCall(address newImplementation, bytes memory data) external payable;
function withdraw(uint256 amount, address recipient, bytes memory data) external returns (bytes memory output);
}
…which was generated by the following JSON ABI:
[
{
"type": "constructor",
"inputs": [],
"stateMutability": "nonpayable"
},
{
"type": "receive",
"stateMutability": "payable"
},
{
"type": "function",
"name": "UPGRADE_INTERFACE_VERSION",
"inputs": [],
"outputs": [
{
"name": "",
"type": "string",
"internalType": "string"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "_include_gmp_message",
"inputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct GmpMessage",
"components": [
{
"name": "source",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "srcNetwork",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "dest",
"type": "address",
"internalType": "address"
},
{
"name": "destNetwork",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "gasLimit",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "nonce",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "admin",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "estimateMessageCost",
"inputs": [
{
"name": "network",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "messageSize",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "gasLimit",
"type": "uint64",
"internalType": "uint64"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "execute",
"inputs": [
{
"name": "signature",
"type": "tuple",
"internalType": "struct Signature",
"components": [
{
"name": "xCoord",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "e",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "s",
"type": "uint256",
"internalType": "uint256"
}
]
},
{
"name": "batch",
"type": "tuple",
"internalType": "struct Batch",
"components": [
{
"name": "version",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "batchId",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "ops",
"type": "tuple[]",
"internalType": "struct GatewayOp[]",
"components": [
{
"name": "command",
"type": "uint8",
"internalType": "enum Command"
},
{
"name": "params",
"type": "bytes",
"internalType": "bytes"
}
]
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "initialize",
"inputs": [
{
"name": "_networkId",
"type": "uint16",
"internalType": "uint16"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "messages",
"inputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "uint8",
"internalType": "enum GmpStatus"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "networkId",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint16",
"internalType": "uint16"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "nonces",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint64",
"internalType": "uint64"
}
],
"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": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "routes",
"inputs": [],
"outputs": [
{
"name": "",
"type": "tuple[]",
"internalType": "struct Route[]",
"components": [
{
"name": "networkId",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "gateway",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "maxGasLimit",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "msgGas",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "msgByteGas",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "gasPriceMantissa",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "gasPriceExponent",
"type": "int16",
"internalType": "int16"
},
{
"name": "msgFee",
"type": "uint64",
"internalType": "uint64"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "setAdmin",
"inputs": [
{
"name": "newAdmin",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "setPrices",
"inputs": [
{
"name": "prices",
"type": "tuple[]",
"internalType": "struct GasPrice[]",
"components": [
{
"name": "mantissa",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "exponent",
"type": "int16",
"internalType": "int16"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setRoute",
"inputs": [
{
"name": "info",
"type": "tuple",
"internalType": "struct Route",
"components": [
{
"name": "networkId",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "gateway",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "maxGasLimit",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "msgGas",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "msgByteGas",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "gasPriceMantissa",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "gasPriceExponent",
"type": "int16",
"internalType": "int16"
},
{
"name": "msgFee",
"type": "uint64",
"internalType": "uint64"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setShards",
"inputs": [
{
"name": "register",
"type": "tuple[]",
"internalType": "struct TssKey[]",
"components": [
{
"name": "xCoord",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "yParity",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "numSessions",
"type": "uint16",
"internalType": "uint16"
}
]
},
{
"name": "revoke",
"type": "tuple[]",
"internalType": "struct TssKey[]",
"components": [
{
"name": "xCoord",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "yParity",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "numSessions",
"type": "uint16",
"internalType": "uint16"
}
]
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "shards",
"inputs": [],
"outputs": [
{
"name": "",
"type": "tuple[]",
"internalType": "struct TssKey[]",
"components": [
{
"name": "xCoord",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "yParity",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "numSessions",
"type": "uint16",
"internalType": "uint16"
}
]
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "submitMessage",
"inputs": [
{
"name": "destinationAddress",
"type": "address",
"internalType": "address"
},
{
"name": "network",
"type": "uint16",
"internalType": "uint16"
},
{
"name": "gasLimit",
"type": "uint64",
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "payable"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "newOwner",
"type": "address",
"internalType": "address"
}
],
"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": "withdraw",
"inputs": [
{
"name": "amount",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "recipient",
"type": "address",
"internalType": "address"
},
{
"name": "data",
"type": "bytes",
"internalType": "bytes"
}
],
"outputs": [
{
"name": "output",
"type": "bytes",
"internalType": "bytes"
}
],
"stateMutability": "nonpayable"
},
{
"type": "event",
"name": "BatchExecuted",
"inputs": [
{
"name": "batch",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "GmpCreated",
"inputs": [
{
"name": "id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "source",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "destinationAddress",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "destinationNetwork",
"type": "uint16",
"indexed": false,
"internalType": "uint16"
},
{
"name": "gasLimit",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "nonce",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "data",
"type": "bytes",
"indexed": false,
"internalType": "bytes"
}
],
"anonymous": false
},
{
"type": "event",
"name": "GmpExecuted",
"inputs": [
{
"name": "id",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "source",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "dest",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "status",
"type": "uint8",
"indexed": false,
"internalType": "enum GmpStatus"
},
{
"name": "result",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"type": "event",
"name": "Initialized",
"inputs": [
{
"name": "version",
"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": "RouteUpdated",
"inputs": [
{
"name": "networkId",
"type": "uint16",
"indexed": true,
"internalType": "uint16"
},
{
"name": "gateway",
"type": "bytes32",
"indexed": false,
"internalType": "bytes32"
},
{
"name": "maxGasLimit",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "msgGas",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "msgByteGas",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "gasPriceMantissa",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
},
{
"name": "gasPriceExponent",
"type": "int16",
"indexed": false,
"internalType": "int16"
},
{
"name": "msgFee",
"type": "uint64",
"indexed": false,
"internalType": "uint64"
}
],
"anonymous": false
},
{
"type": "event",
"name": "ShardRegistered",
"inputs": [
{
"name": "key",
"type": "tuple",
"indexed": false,
"internalType": "struct TssKey",
"components": [
{
"name": "xCoord",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "yParity",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "numSessions",
"type": "uint16",
"internalType": "uint16"
}
]
}
],
"anonymous": false
},
{
"type": "event",
"name": "ShardRevoked",
"inputs": [
{
"name": "key",
"type": "tuple",
"indexed": false,
"internalType": "struct TssKey",
"components": [
{
"name": "xCoord",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "yParity",
"type": "uint8",
"internalType": "uint8"
},
{
"name": "numSessions",
"type": "uint16",
"internalType": "uint16"
}
]
}
],
"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": "FailedCall",
"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": "UUPSUnauthorizedCallContext",
"inputs": []
},
{
"type": "error",
"name": "UUPSUnsupportedProxiableUUID",
"inputs": [
{
"name": "slot",
"type": "bytes32",
"internalType": "bytes32"
}
]
}
]
Structs§
- Custom error with signature
AddressEmptyCode(address)
and selector0x9996b315
. - Event with signature
BatchExecuted(uint64)
and selector0xabf674ad38485902b8f2dd7c11b445d763effd3ad3abbf0c29aba8b89a88af9a
. - Custom error with signature
ERC1967InvalidImplementation(address)
and selector0x4c9c8ce3
. - Custom error with signature
ERC1967NonPayable()
and selector0xb398979f
. - Custom error with signature
FailedCall()
and selector0xd6bda275
. - Event with signature
GmpCreated(bytes32,bytes32,address,uint16,uint64,uint64,bytes)
and selector0x8b5f4ec3f39d792507ffaa6f70e4d729703e49d4d2e00bdbae32e1aae3783673
. - Event with signature
GmpExecuted(bytes32,bytes32,address,uint8,bytes32)
and selector0x5a2ed6cb95f9b76491faa9a7256da4fe110923506378201635ea3d9ae550d6d5
. - Event with signature
Initialized(uint64)
and selector0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2
. - Custom error with signature
InvalidInitialization()
and selector0xf92ee8a9
. - Custom error with signature
NotInitializing()
and selector0xd7e6bcf8
. - Custom error with signature
OwnableInvalidOwner(address)
and selector0x1e4fbdf7
. - Custom error with signature
OwnableUnauthorizedAccount(address)
and selector0x118cdaa7
. - Event with signature
OwnershipTransferred(address,address)
and selector0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0
. - Event with signature
RouteUpdated(uint16,bytes32,uint64,uint64,uint64,uint64,int16,uint64)
and selector0x748b691d6b5a4953fa5cc55fcfe0239aa5dcb51d611caf3e0e77ed5ee67f4d07
. - Event with signature
ShardRegistered((uint256,uint8,uint16))
and selector0x0187aef9827447e5e7304d7482e4c08cdacda5a056054c37995b89f4041b8aec
. - Event with signature
ShardRevoked((uint256,uint8,uint16))
and selector0xdc3456daae354842fc02bfcfe82f219da82871f094c7cf2f61fa0a6072456735
. - Function with signature
UPGRADE_INTERFACE_VERSION()
and selector0xad3cb1cc
. - Container type for the return parameters of the
UPGRADE_INTERFACE_VERSION()
function. - Custom error with signature
UUPSUnauthorizedCallContext()
and selector0xe07c8dba
. - Custom error with signature
UUPSUnsupportedProxiableUUID(bytes32)
and selector0xaa1d49a4
. - Event with signature
Upgraded(address)
and selector0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b
. - Function with signature
_include_gmp_message((bytes32,uint16,address,uint16,uint64,uint64,bytes))
and selector0xe36b9106
. - Container type for the return parameters of the
_include_gmp_message((bytes32,uint16,address,uint16,uint64,uint64,bytes))
function. - Function with signature
admin()
and selector0xf851a440
. - Container type for the return parameters of the
admin()
function. - Constructor`.
- Function with signature
estimateMessageCost(uint16,uint256,uint64)
and selector0xd1bef186
. - Container type for the return parameters of the
estimateMessageCost(uint16,uint256,uint64)
function. - Function with signature
execute((uint256,uint256,uint256),(uint8,uint64,(uint8,bytes)[]))
and selector0x9f05ce22
. - Container type for the return parameters of the
execute((uint256,uint256,uint256),(uint8,uint64,(uint8,bytes)[]))
function. - Function with signature
initialize(uint16)
and selector0x13750946
. - Container type for the return parameters of the
initialize(uint16)
function. - Function with signature
messages(bytes32)
and selector0x2bbd59ca
. - Container type for the return parameters of the
messages(bytes32)
function. - Function with signature
networkId()
and selector0x9025e64c
. - Container type for the return parameters of the
networkId()
function. - Function with signature
nonces(address)
and selector0x7ecebe00
. - Container type for the return parameters of the
nonces(address)
function. - Function with signature
owner()
and selector0x8da5cb5b
. - Container type for the return parameters of the
owner()
function. - Function with signature
proxiableUUID()
and selector0x52d1902d
. - Container type for the return parameters of the
proxiableUUID()
function. - Function with signature
renounceOwnership()
and selector0x715018a6
. - Container type for the return parameters of the
renounceOwnership()
function. - Function with signature
routes()
and selector0xb1ffd471
. - Container type for the return parameters of the
routes()
function. - Function with signature
setAdmin(address)
and selector0x704b6c02
. - Container type for the return parameters of the
setAdmin(address)
function. - Function with signature
setPrices((uint64,int16)[])
and selector0xd0c37dd9
. - Container type for the return parameters of the
setPrices((uint64,int16)[])
function. - Function with signature
setRoute((uint16,bytes32,uint64,uint64,uint64,uint64,int16,uint64))
and selector0x08c6e1a7
. - Container type for the return parameters of the
setRoute((uint16,bytes32,uint64,uint64,uint64,uint64,int16,uint64))
function. - Function with signature
setShards((uint256,uint8,uint16)[],(uint256,uint8,uint16)[])
and selector0xf5d500eb
. - Container type for the return parameters of the
setShards((uint256,uint8,uint16)[],(uint256,uint8,uint16)[])
function. - Function with signature
shards()
and selector0x6d53ae1e
. - Container type for the return parameters of the
shards()
function. - Function with signature
submitMessage(address,uint16,uint64,bytes)
and selector0xd83a5d49
. - Container type for the return parameters of the
submitMessage(address,uint16,uint64,bytes)
function. - Function with signature
transferOwnership(address)
and selector0xf2fde38b
. - Container type for the return parameters of the
transferOwnership(address)
function. - Function with signature
upgradeToAndCall(address,bytes)
and selector0x4f1ef286
. - Container type for the return parameters of the
upgradeToAndCall(address,bytes)
function. - Function with signature
withdraw(uint256,address,bytes)
and selector0x62b2b5f0
. - Container type for the return parameters of the
withdraw(uint256,address,bytes)
function.
Enums§
- Container for all the
Gateway
function calls. - Container for all the
Gateway
custom errors. - Container for all the
Gateway
events.
Statics§
- The creation / init bytecode of the contract.
- The runtime bytecode of the contract, as deployed on the network.