diff --git a/contracts/README.md b/contracts/README.md index 376a5b92e2..711e676af9 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -9,6 +9,13 @@ NPM (tested with 8.19.3) ## Installing +First you'll need to install ethereum locally + +```shell +brew tap ethereum/ethereum +brew install ethereum +``` + Running the following command will pull all of the relevant dependencies for node and solidity. ```shell diff --git a/contracts/exported/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json b/contracts/exported/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json new file mode 100644 index 0000000000..ff44118b50 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol/OwnableUpgradeable.json @@ -0,0 +1,99 @@ +[ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "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" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json b/contracts/exported/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json new file mode 100644 index 0000000000..1ad5facb82 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol/Initializable.json @@ -0,0 +1,25 @@ +[ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + } +] diff --git a/contracts/exported/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json b/contracts/exported/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json new file mode 100644 index 0000000000..1ad5facb82 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol/ContextUpgradeable.json @@ -0,0 +1,25 @@ +[ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json b/contracts/exported/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json new file mode 100644 index 0000000000..5756029d99 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/access/AccessControl.sol/AccessControl.json @@ -0,0 +1,227 @@ +[ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json b/contracts/exported/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json new file mode 100644 index 0000000000..eb8c7b2a0b --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/access/IAccessControl.sol/IAccessControl.json @@ -0,0 +1,195 @@ +[ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/access/Ownable.sol/Ownable.json b/contracts/exported/@openzeppelin/contracts/access/Ownable.sol/Ownable.json new file mode 100644 index 0000000000..d281aea31b --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/access/Ownable.sol/Ownable.json @@ -0,0 +1,76 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json b/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json new file mode 100644 index 0000000000..f2d2b1dcac --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.json @@ -0,0 +1,104 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC1155InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC1155InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "idsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "valuesLength", + "type": "uint256" + } + ], + "name": "ERC1155InvalidArrayLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC1155InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC1155InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC1155InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC1155MissingApprovalForAll", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json b/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json new file mode 100644 index 0000000000..d2e35dd438 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.json @@ -0,0 +1,88 @@ +[ + { + "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" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json b/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json new file mode 100644 index 0000000000..719d8f9c21 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.json @@ -0,0 +1,105 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/proxy/utils/Initializable.sol/Initializable.json b/contracts/exported/@openzeppelin/contracts/proxy/utils/Initializable.sol/Initializable.json new file mode 100644 index 0000000000..1ad5facb82 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/proxy/utils/Initializable.sol/Initializable.json @@ -0,0 +1,25 @@ +[ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json b/contracts/exported/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json new file mode 100644 index 0000000000..048513c1de --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/token/ERC20/ERC20.sol/ERC20.json @@ -0,0 +1,310 @@ +[ + { + "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" + }, + { + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "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": [ + { + "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": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json b/contracts/exported/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json new file mode 100644 index 0000000000..018d966280 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/token/ERC20/IERC20.sol/IERC20.json @@ -0,0 +1,185 @@ +[ + { + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "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": [ + { + "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": [], + "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" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json b/contracts/exported/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json new file mode 100644 index 0000000000..5b642374c8 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json @@ -0,0 +1,224 @@ +[ + { + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "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": [ + { + "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": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json b/contracts/exported/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json new file mode 100644 index 0000000000..5e41277850 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol/IERC20Permit.json @@ -0,0 +1,77 @@ +[ + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.bin b/contracts/exported/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.bin new file mode 100644 index 0000000000..43c25558a8 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220a053799183996b12f2e950ef2eec3337f0d158e561631c0d8396f46bdbdbb24164736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json b/contracts/exported/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json new file mode 100644 index 0000000000..ef894403d6 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol/SafeERC20.json @@ -0,0 +1,34 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "currentAllowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestedDecrease", + "type": "uint256" + } + ], + "name": "SafeERC20FailedDecreaseAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/Address.sol/Address.bin b/contracts/exported/@openzeppelin/contracts/utils/Address.sol/Address.bin new file mode 100644 index 0000000000..c44de83b80 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/Address.sol/Address.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212205543785f00a1ad0ccec3edf301adba99ad1508e5063367a1bf5828ee7e8bfd4464736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/utils/Address.sol/Address.json b/contracts/exported/@openzeppelin/contracts/utils/Address.sol/Address.json new file mode 100644 index 0000000000..e1a1ad8553 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/Address.sol/Address.json @@ -0,0 +1,29 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/Strings.sol/Strings.bin b/contracts/exported/@openzeppelin/contracts/utils/Strings.sol/Strings.bin new file mode 100644 index 0000000000..ca51902a95 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/Strings.sol/Strings.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212204c14ed779ba5121e803c74d38b342784e50c8a2524f56414382ea5e0cb692b4064736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/utils/Strings.sol/Strings.json b/contracts/exported/@openzeppelin/contracts/utils/Strings.sol/Strings.json new file mode 100644 index 0000000000..4793f6ae6a --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/Strings.sol/Strings.json @@ -0,0 +1,18 @@ +[ + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "StringsInsufficientHexLength", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.bin b/contracts/exported/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.bin new file mode 100644 index 0000000000..1b81943d44 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201dcfa8de1a91951bbee126e9a19cf666d995aa22e57c5d7fd381e1e681d9157064736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json b/contracts/exported/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json new file mode 100644 index 0000000000..618c81ce0f --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/cryptography/ECDSA.sol/ECDSA.json @@ -0,0 +1,29 @@ +[ + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.bin b/contracts/exported/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.bin new file mode 100644 index 0000000000..37c748c19b --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220b33e594f2c1a0316504d4bef0deef084cf65757f4be5c116c7ceb3e6ab03528b64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.json b/contracts/exported/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.json new file mode 100644 index 0000000000..6cf45c6430 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/cryptography/MerkleProof.sol/MerkleProof.json @@ -0,0 +1,7 @@ +[ + { + "inputs": [], + "name": "MerkleProofInvalidMultiproof", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol/MessageHashUtils.bin b/contracts/exported/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol/MessageHashUtils.bin new file mode 100644 index 0000000000..cf62e141e2 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol/MessageHashUtils.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220661a66f013aa3adeac8862c872c37a93564d0a4c7d8e078d62517ef4e53ace9764736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json b/contracts/exported/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json new file mode 100644 index 0000000000..53fa000718 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/introspection/ERC165.sol/ERC165.json @@ -0,0 +1,21 @@ +[ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json b/contracts/exported/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json new file mode 100644 index 0000000000..53fa000718 --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/introspection/IERC165.sol/IERC165.json @@ -0,0 +1,21 @@ +[ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/math/Math.sol/Math.bin b/contracts/exported/@openzeppelin/contracts/utils/math/Math.sol/Math.bin new file mode 100644 index 0000000000..1c0279386b --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/math/Math.sol/Math.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220eab814cfea946e022b97d24a219db99dc611af91d817f34a73287c7c8f7c44b064736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/@openzeppelin/contracts/utils/math/Math.sol/Math.json b/contracts/exported/@openzeppelin/contracts/utils/math/Math.sol/Math.json new file mode 100644 index 0000000000..e75de3c86f --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/math/Math.sol/Math.json @@ -0,0 +1,7 @@ +[ + { + "inputs": [], + "name": "MathOverflowedMulDiv", + "type": "error" + } +] diff --git a/contracts/exported/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.bin b/contracts/exported/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.bin new file mode 100644 index 0000000000..b420d6c46b --- /dev/null +++ b/contracts/exported/@openzeppelin/contracts/utils/math/SignedMath.sol/SignedMath.bin @@ -0,0 +1 @@ +60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220ee16814fbc2917902afb8d274c3a31f9348d19a5c6bb7a0462bc965d2a94ab3e64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/bridge/IBridge.sol/IBridge.json b/contracts/exported/src/bridge/IBridge.sol/IBridge.json new file mode 100644 index 0000000000..2d3c54d3c5 --- /dev/null +++ b/contracts/exported/src/bridge/IBridge.sol/IBridge.json @@ -0,0 +1,61 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "receiveAssets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "sendERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "sendNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } +] diff --git a/contracts/exported/src/bridge/ITokenFactory.sol/ITokenFactory.json b/contracts/exported/src/bridge/ITokenFactory.sol/ITokenFactory.json new file mode 100644 index 0000000000..aaeb96d768 --- /dev/null +++ b/contracts/exported/src/bridge/ITokenFactory.sol/ITokenFactory.json @@ -0,0 +1,25 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "crossChainAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "onCreateTokenCommand", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/bridge/L1/IObscuroBridgeAdmin.sol/IObscuroBridgeAdmin.json b/contracts/exported/src/bridge/L1/IObscuroBridgeAdmin.sol/IObscuroBridgeAdmin.json new file mode 100644 index 0000000000..e557c140f8 --- /dev/null +++ b/contracts/exported/src/bridge/L1/IObscuroBridgeAdmin.sol/IObscuroBridgeAdmin.json @@ -0,0 +1,51 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "removeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "bridge", + "type": "address" + } + ], + "name": "setRemoteBridge", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "whitelistToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/bridge/L1/ObscuroBridge.sol/ObscuroBridge.bin b/contracts/exported/src/bridge/L1/ObscuroBridge.sol/ObscuroBridge.bin new file mode 100644 index 0000000000..a231d9a171 --- /dev/null +++ b/contracts/exported/src/bridge/L1/ObscuroBridge.sol/ObscuroBridge.bin @@ -0,0 +1 @@ +60806040526001805463ffffffff60a01b1916905534801561002057600080fd5b50611944806100306000396000f3fe6080604052600436106101445760003560e01c806375b238fc116100c0578063a217fddf11610074578063c4d66de811610059578063c4d66de8146103b4578063d547741f146103d4578063e4c3ebc7146103f457600080fd5b8063a217fddf1461037f578063a381c8e21461039457600080fd5b806383bece4d116100a557806383bece4d146102f957806391d148541461031957806393b374421461035f57600080fd5b806375b238fc146102a557806375cb2672146102d957600080fd5b80632f2ff15d11610117578063498d82ab116100fc578063498d82ab146102315780635d872970146102515780635fa7b5841461028557600080fd5b80632f2ff15d146101f157806336568abe1461021157600080fd5b806301ffc9a71461014957806316ce81491461017e5780631888d712146101a0578063248a9ca3146101b3575b600080fd5b34801561015557600080fd5b5061016961016436600461154f565b610428565b60405190151581526020015b60405180910390f35b34801561018a57600080fd5b5061019e61019936600461158e565b610491565b005b61019e6101ae36600461158e565b6104eb565b3480156101bf57600080fd5b506101e36101ce3660046115ab565b60009081526002602052604090206001015490565b604051908152602001610175565b3480156101fd57600080fd5b5061019e61020c3660046115c4565b610624565b34801561021d57600080fd5b5061019e61022c3660046115c4565b61064f565b34801561023d57600080fd5b5061019e61024c36600461163d565b6106a0565b34801561025d57600080fd5b506101e37f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a81565b34801561029157600080fd5b5061019e6102a036600461158e565b610765565b3480156102b157600080fd5b506101e37fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b3480156102e557600080fd5b5061019e6102f436600461158e565b6107b9565b34801561030557600080fd5b5061019e6103143660046116c0565b610894565b34801561032557600080fd5b506101696103343660046115c4565b60009182526002602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561036b57600080fd5b5061019e61037a36600461158e565b610ab0565b34801561038b57600080fd5b506101e3600081565b3480156103a057600080fd5b5061019e6103af3660046116c0565b610b04565b3480156103c057600080fd5b5061019e6103cf36600461158e565b610cb1565b3480156103e057600080fd5b5061019e6103ef3660046115c4565b610e45565b34801561040057600080fd5b506101e37fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad211057881565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061048b57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756104bb81610e6a565b506003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600034116105405760405162461bcd60e51b815260206004820152600f60248201527f456d707479207472616e736665722e000000000000000000000000000000000060448201526064015b60405180910390fd5b604080518082018252348082526001600160a01b03848116602093840190815284519384019290925290518116828401528251808303840181526060909201909252600354909161059891168260025b600080610e77565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b15801561060757600080fd5b505af115801561061b573d6000803e3d6000fd5b50505050505050565b60008281526002602052604090206001015461063f81610e6a565b6106498383610f83565b50505050565b6001600160a01b0381163314610691576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61069b8282611031565b505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756106ca81610e6a565b6106f47f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a87610f83565b50600063458ffd6360e01b878787878760405160240161071895949392919061172b565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915260035490915061061b906001600160a01b0316826001610590565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561078f81610e6a565b61069b7f9f225881f6e7ac8a885b63aa2269cbce78dd6a669864ccd2cd2517a8e709d73a83611031565b6107c16110b8565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604080517fa1a227fa000000000000000000000000000000000000000000000000000000008152905163a1a227fa916004808201926020929091908290030181865afa158015610840573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610864919061176d565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6003546000546001600160a01b039182169116331461091b5760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e67657221000000000000000000000000000000006064820152608401610537565b806001600160a01b031661092d611121565b6001600160a01b0316146109a95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e646572210000000000000000000000000000006064820152608401610537565b6001600160a01b03841660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16156109f9576109f484848461119e565b610649565b6001600160a01b03841660009081527f13ad2d85210d477fe1a6e25654c8250308cf29b050a4bf0b039d70467486712c602052604090205460ff1615610a42576109f4826111a9565b60405162461bcd60e51b815260206004820152602560248201527f417474656d7074696e6720746f20776974686472617720756e6b6e6f776e206160448201527f737365742e0000000000000000000000000000000000000000000000000000006064820152608401610537565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610ada81610e6a565b61069b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177583610f83565b60008211610b545760405162461bcd60e51b815260206004820152601a60248201527f417474656d7074696e6720656d707479207472616e736665722e0000000000006044820152606401610537565b6001600160a01b03831660009081527f32ef73018533fa188e9e42b313c0a4048c6052342b662fb7510c0d1abcea3413602052604090205460ff16610c275760405162461bcd60e51b815260206004820152604e60248201527f54686973206164647265737320686173206e6f74206265656e20676976656e2060448201527f61207479706520616e64206973207468757320636f6e73696465726564206e6f60648201527f742077686974656c69737465642e000000000000000000000000000000000000608482015260a401610537565b610c338333308561124b565b604080516001600160a01b038581166024830152604482018590528381166064808401919091528351808403909101815260849092019092526020810180516001600160e01b03167f83bece4d0000000000000000000000000000000000000000000000000000000017905260035490916106499116826000610590565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015610cfc5750825b905060008267ffffffffffffffff166001148015610d195750303b155b905081158015610d27575080155b15610d5e576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff191660011785558315610d9257845468ff00000000000000001916680100000000000000001785555b610d9b866107b9565b610dc57fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533610f83565b50610df17fd2fb17ceaa388942529b17e0006ffc4d559f040dd4f2157b8070f17ad21105786000610f83565b508315610e3d57845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b600082815260026020526040902060010154610e6081610e6a565b6106498383611031565b610e7481336112b2565b50565b60006040518060600160405280876001600160a01b0316815260200186815260200184815250604051602001610ead91906117da565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff16906014610f008361181f565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b8152600401610f409493929190611869565b6020604051808303816000875af1158015610f5f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b91906118a6565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff166110295760008381526002602090815260408083206001600160a01b03861684529091529020805460ff19166001179055610fe13390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161048b565b50600061048b565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff16156110295760008381526002602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161048b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1661111f576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611175573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611199919061176d565b905090565b61069b838284611320565b6040516000906001600160a01b038316908281818181865af19150503d80600081146111f1576040519150601f19603f3d011682016040523d82523d6000602084013e6111f6565b606091505b50509050806112475760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610537565b5050565b6040516001600160a01b0384811660248301528381166044830152606482018390526106499186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050611351565b60008281526002602090815260408083206001600160a01b038516845290915290205460ff16611247576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b038216600482015260248101839052604401610537565b6040516001600160a01b0383811660248301526044820183905261069b91859182169063a9059cbb90606401611280565b60006113666001600160a01b038416836113cd565b9050805160001415801561138b57508080602001905181019061138991906118d0565b155b1561069b576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610537565b60606113db838360006113e2565b9392505050565b606081471015611420576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610537565b600080856001600160a01b0316848660405161143c91906118f2565b60006040518083038185875af1925050503d8060008114611479576040519150601f19603f3d011682016040523d82523d6000602084013e61147e565b606091505b509150915061148e868383611498565b9695505050505050565b6060826114ad576114a88261150d565b6113db565b81511580156114c457506001600160a01b0384163b155b15611506576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610537565b50806113db565b80511561151d5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006020828403121561156157600080fd5b81356001600160e01b0319811681146113db57600080fd5b6001600160a01b0381168114610e7457600080fd5b6000602082840312156115a057600080fd5b81356113db81611579565b6000602082840312156115bd57600080fd5b5035919050565b600080604083850312156115d757600080fd5b8235915060208301356115e981611579565b809150509250929050565b60008083601f84011261160657600080fd5b50813567ffffffffffffffff81111561161e57600080fd5b60208301915083602082850101111561163657600080fd5b9250929050565b60008060008060006060868803121561165557600080fd5b853561166081611579565b9450602086013567ffffffffffffffff8082111561167d57600080fd5b61168989838a016115f4565b909650945060408801359150808211156116a257600080fd5b506116af888289016115f4565b969995985093965092949392505050565b6000806000606084860312156116d557600080fd5b83356116e081611579565b92506020840135915060408401356116f781611579565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6001600160a01b038616815260606020820152600061174e606083018688611702565b8281036040840152611761818587611702565b98975050505050505050565b60006020828403121561177f57600080fd5b81516113db81611579565b60005b838110156117a557818101518382015260200161178d565b50506000910152565b600081518084526117c681602086016020860161178a565b601f01601f19169290920160200192915050565b602081526001600160a01b038251166020820152600060208301516060604084015261180960808401826117ae565b9050604084015160608401528091505092915050565b600063ffffffff80831681810361185f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff80871683528086166020840152506080604083015261189260808301856117ae565b905060ff8316606083015295945050505050565b6000602082840312156118b857600080fd5b815167ffffffffffffffff811681146113db57600080fd5b6000602082840312156118e257600080fd5b815180151581146113db57600080fd5b6000825161190481846020870161178a565b919091019291505056fea26469706673582212209080b4341dacf82f9a993515a09081c2f61eed4e485d15f5fba6af9c0305b82c64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/bridge/L1/ObscuroBridge.sol/ObscuroBridge.json b/contracts/exported/src/bridge/L1/ObscuroBridge.sol/ObscuroBridge.json new file mode 100644 index 0000000000..6ae91f2b2f --- /dev/null +++ b/contracts/exported/src/bridge/L1/ObscuroBridge.sol/ObscuroBridge.json @@ -0,0 +1,474 @@ +[ + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + } + ], + "name": "AddressEmptyCode", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "AddressInsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "FailedInnerCall", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ERC20_TOKEN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NATIVE_TOKEN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messengerAddress", + "type": "address" + } + ], + "name": "configure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "promoteToAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "receiveAssets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + } + ], + "name": "removeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "sendERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "sendNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "bridge", + "type": "address" + } + ], + "name": "setRemoteBridge", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "whitelistToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/bridge/L2/EthereumBridge.sol/EthereumBridge.bin b/contracts/exported/src/bridge/L2/EthereumBridge.sol/EthereumBridge.bin new file mode 100644 index 0000000000..bfdc6ecd43 --- /dev/null +++ b/contracts/exported/src/bridge/L2/EthereumBridge.sol/EthereumBridge.bin @@ -0,0 +1 @@ +60806040526001805463ffffffff60a01b1916905534801561002057600080fd5b50612688806100306000396000f3fe608060405260043610620000c65760003560e01c806383bece4d11620000735780639e405b7111620000555780639e405b7114620002dc578063a381c8e21462000316578063d5c6b504146200033b576200013f565b806383bece4d14620002675780639813c7b2146200028c576200013f565b8063458ffd6311620000a9578063458ffd6314620001f8578063485cc955146200021d57806375cb26721462000242576200013f565b80628d48e314620001885780631888d71214620001df576200013f565b366200013f5760405162461bcd60e51b815260206004820152602360248201527f436f6e747261637420646f6573206e6f7420737570706f72742072656365697660448201527f652829000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60405162461bcd60e51b815260206004820152601d60248201527f66616c6c6261636b2829206d6574686f6420756e737570706f72746564000000604482015260640162000136565b3480156200019557600080fd5b50620001c2620001a736600462000f86565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b620001f6620001f036600462000f86565b62000375565b005b3480156200020557600080fd5b50620001f66200021736600462000ff9565b6200052e565b3480156200022a57600080fd5b50620001f66200023c36600462001085565b62000741565b3480156200024f57600080fd5b50620001f66200026136600462000f86565b620008ae565b3480156200027457600080fd5b50620001f662000286366004620010c3565b6200098e565b3480156200029957600080fd5b50620002cb620002ab36600462000f86565b6001600160a01b0390811660009081526002602052604090205416151590565b6040519015158152602001620001d6565b348015620002e957600080fd5b50620001c2620002fb36600462000f86565b6003602052600090815260409020546001600160a01b031681565b3480156200032357600080fd5b50620001f662000335366004620010c3565b62000bd1565b3480156200034857600080fd5b50620001c26200035a36600462000f86565b6002602052600090815260409020546001600160a01b031681565b60003411620003c75760405162461bcd60e51b815260206004820152600d60248201527f4e6f7468696e672073656e742e00000000000000000000000000000000000000604482015260640162000136565b600080805260036020527f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff546040516001600160a01b03918216602482015234604482015290831660648201526383bece4d60e01b9060840160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152600554909150620004a0906001600160a01b03168260005b60008062000d60565b6001546001600160a01b03166040517f346633fb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152346024830181905292169163346633fb916044016000604051808303818588803b1580156200051057600080fd5b505af115801562000525573d6000803e3d6000fd5b50505050505050565b6005546000546001600160a01b0391821691163314620005b75760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e6765722100000000000000000000000000000000606482015260840162000136565b806001600160a01b0316620005cb62000e75565b6001600160a01b031614620006495760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e64657221000000000000000000000000000000606482015260840162000136565b6000858585856040516200065d9062000f5f565b6200066c949392919062001133565b604051809103906000f08015801562000689573d6000803e3d6000fd5b506001600160a01b038082166000818152600260209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081168617909155600383528184208054968f169682168717905594835260049091529081902080549093169091179091555190915081907f30c05779f384e0ae9d43bbf7ec4417f28bdc53d02a35551b6eb270a9c4c71dca906200072f908a9084908b908b908b908b9062001169565b60405180910390a15050505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156200078d5750825b905060008267ffffffffffffffff166001148015620007ab5750303b155b905081158015620007ba575080155b15620007f2576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200082757845468ff00000000000000001916680100000000000000001785555b6200083287620008ae565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03881617905583156200052557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a150505050505050565b620008b862000ef5565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038316908117909155604080517fa1a227fa000000000000000000000000000000000000000000000000000000008152905163a1a227fa916004808201926020929091908290030181865afa15801562000938573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200095e9190620011ba565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905550565b6005546000546001600160a01b039182169116331462000a175760405162461bcd60e51b815260206004820152603060248201527f436f6e74726163742063616c6c6572206973206e6f742074686520726567697360448201527f7465726564206d657373656e6765722100000000000000000000000000000000606482015260840162000136565b806001600160a01b031662000a2b62000e75565b6001600160a01b03161462000aa95760405162461bcd60e51b815260206004820152603160248201527f43726f737320636861696e206d65737361676520636f6d696e672066726f6d2060448201527f696e636f72726563742073656e64657221000000000000000000000000000000606482015260840162000136565b6001600160a01b0380851660009081526004602090815260408083205484168084526002909252909120549091168062000b4c5760405162461bcd60e51b815260206004820152602b60248201527f526563656976696e672061737365747320666f7220756e6b6e6f776e2077726160448201527f7070656420746f6b656e21000000000000000000000000000000000000000000606482015260840162000136565b6040517f979005ad0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820187905282169063979005ad90604401600060405180830381600087803b15801562000bb057600080fd5b505af115801562000bc5573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b038084166000908152600260205260409020541662000c3a5760405162461bcd60e51b815260206004820152601560248201527f4e6f206d617070696e6720666f7220746f6b656e2e0000000000000000000000604482015260640162000136565b6001600160a01b03838116600090815260026020526040908190205490517f1dd319cb000000000000000000000000000000000000000000000000000000008152336004820152602481018590529116908190631dd319cb90604401600060405180830381600087803b15801562000cb157600080fd5b505af115801562000cc6573d6000803e3d6000fd5b505050506001600160a01b03848116600090815260036020908152604080832054815190851660248201526044810188905286851660648083019190915282518083039091018152608490910190915290810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166383bece4d60e01b179052600554909262000d5992911690839062000497565b5050505050565b60006040518060600160405280876001600160a01b031681526020018681526020018481525060405160200162000d98919062001222565b60408051808303601f19018152919052600180549192506001600160a01b0382169163b1454caa917401000000000000000000000000000000000000000090910463ffffffff1690601462000ded8362001269565b91906101000a81548163ffffffff021916908363ffffffff1602179055508684866040518563ffffffff1660e01b815260040162000e2f9493929190620012b4565b6020604051808303816000875af115801562000e4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005259190620012f3565b60008060009054906101000a90046001600160a01b03166001600160a01b03166363012de56040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000eca573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000ef09190620011ba565b905090565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000f5d576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611333806200132083390190565b6001600160a01b038116811462000f8357600080fd5b50565b60006020828403121562000f9957600080fd5b813562000fa68162000f6d565b9392505050565b60008083601f84011262000fc057600080fd5b50813567ffffffffffffffff81111562000fd957600080fd5b60208301915083602082850101111562000ff257600080fd5b9250929050565b6000806000806000606086880312156200101257600080fd5b85356200101f8162000f6d565b9450602086013567ffffffffffffffff808211156200103d57600080fd5b6200104b89838a0162000fad565b909650945060408801359150808211156200106557600080fd5b50620010748882890162000fad565b969995985093965092949392505050565b600080604083850312156200109957600080fd5b8235620010a68162000f6d565b91506020830135620010b88162000f6d565b809150509250929050565b600080600060608486031215620010d957600080fd5b8335620010e68162000f6d565b9250602084013591506040840135620010ff8162000f6d565b809150509250925092565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000620011496040830186886200110a565b82810360208401526200115e8185876200110a565b979650505050505050565b60006001600160a01b03808916835280881660208401525060806040830152620011986080830186886200110a565b8281036060840152620011ad8185876200110a565b9998505050505050505050565b600060208284031215620011cd57600080fd5b815162000fa68162000f6d565b6000815180845260005b818110156200120257602081850181015186830182015201620011e4565b506000602082860101526020601f19601f83011685010191505092915050565b602081526001600160a01b0382511660208201526000602083015160606040840152620012536080840182620011da565b9050604084015160608401528091505092915050565b600063ffffffff808316818103620012aa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b600063ffffffff808716835280861660208401525060806040830152620012df6080830185620011da565b905060ff8316606083015295945050505050565b6000602082840312156200130657600080fd5b815167ffffffffffffffff8116811462000fa657600080fdfe6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162001333380380620013338339810160408190526200005a9162000233565b8181818160036200006c83826200032c565b5060046200007b82826200032c565b5050505050620000b27fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000bb60201b60201c565b505050620003f8565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff16620001645760008381526007602090815260408083206001600160a01b03861684529091529020805460ff191660011790556200011b3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000168565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019657600080fd5b81516001600160401b0380821115620001b357620001b36200016e565b604051601f8301601f19908116603f01168101908282118183101715620001de57620001de6200016e565b81604052838152602092508683858801011115620001fb57600080fd5b600091505b838210156200021f578582018301518183018401529082019062000200565b600093810190920192909252949350505050565b600080604083850312156200024757600080fd5b82516001600160401b03808211156200025f57600080fd5b6200026d8683870162000184565b935060208501519150808211156200028457600080fd5b50620002938582860162000184565b9150509250929050565b600181811c90821680620002b257607f821691505b602082108103620002d357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200032757600081815260208120601f850160051c81016020861015620003025750805b601f850160051c820191505b8181101562000323578281556001016200030e565b5050505b505050565b81516001600160401b038111156200034857620003486200016e565b62000360816200035984546200029d565b84620002d9565b602080601f8311600181146200039857600084156200037f5750858301515b600019600386901b1c1916600185901b17855562000323565b600085815260208120601f198616915b82811015620003c957888601518255948401946001909101908401620003a8565b5085821015620003e85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610f2b80620004086000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806336568abe116100cd578063979005ad11610081578063a9059cbb11610066578063a9059cbb146102ce578063d547741f146102e1578063dd62ed3e146102f457600080fd5b8063979005ad146102b3578063a217fddf146102c657600080fd5b806375b238fc116100b257806375b238fc1461024b57806391d148541461027257806395d89b41146102ab57600080fd5b806336568abe1461022557806370a082311461023857600080fd5b80631dd319cb11610124578063248a9ca311610109578063248a9ca3146101e05780632f2ff15d14610203578063313ce5671461021657600080fd5b80631dd319cb146101b857806323b872dd146101cd57600080fd5b806301ffc9a71461015657806306fdde031461017e578063095ea7b31461019357806318160ddd146101a6575b600080fd5b610169610164366004610cf7565b610307565b60405190151581526020015b60405180910390f35b6101866103a0565b6040516101759190610d40565b6101696101a1366004610daa565b610432565b6002545b604051908152602001610175565b6101cb6101c6366004610daa565b61044a565b005b6101696101db366004610dd4565b6104e0565b6101aa6101ee366004610e10565b60009081526007602052604090206001015490565b6101cb610211366004610e29565b610504565b60405160128152602001610175565b6101cb610233366004610e29565b61052f565b6101aa610246366004610e55565b61057b565b6101aa7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b610169610280366004610e29565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610186610621565b6101cb6102c1366004610daa565b610630565b6101aa600081565b6101696102dc366004610daa565b610664565b6101cb6102ef366004610e29565b610672565b6101aa610302366004610e70565b610697565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061039a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103af90610e9a565b80601f01602080910402602001604051908101604052809291908181526020018280546103db90610e9a565b80156104285780601f106103fd57610100808354040283529160200191610428565b820191906000526020600020905b81548152906001019060200180831161040b57829003601f168201915b5050505050905090565b6000336104408185856107a8565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610474816107b5565b8161047e8461057b565b10156104d15760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6104db83836107c2565b505050565b6000336104ee8582856107fc565b6104f9858585610875565b506001949350505050565b60008281526007602052604090206001015461051f816107b5565b61052983836108d4565b50505050565b6001600160a01b0381163314610571576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104db8282610982565b60006001600160a01b03821632036105ab576001600160a01b03821660009081526020819052604090205461039a565b6001600160a01b03821633036105d9576001600160a01b03821660009081526020819052604090205461039a565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064016104c8565b6060600480546103af90610e9a565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561065a816107b5565b6104db8383610a09565b600033610440818585610875565b60008281526007602052604090206001015461068d816107b5565b6105298383610982565b6000326001600160a01b03841614806106b85750326001600160a01b038316145b156106eb576001600160a01b038084166000908152600160209081526040808320938616835292905220545b905061039a565b336001600160a01b038416148061070a5750336001600160a01b038316145b1561073a576001600160a01b038084166000908152600160209081526040808320938616835292905220546106e4565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104c8565b6104db8383836001610a3f565b6107bf8133610b46565b50565b6001600160a01b0382166107ec57604051634b637e8f60e11b8152600060048201526024016104c8565b6107f882600083610bb4565b5050565b60006108088484610697565b905060001981146105295781811015610866576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016104c8565b61052984848484036000610a3f565b6001600160a01b03831661089f57604051634b637e8f60e11b8152600060048201526024016104c8565b6001600160a01b0382166108c95760405163ec442f0560e01b8152600060048201526024016104c8565b6104db838383610bb4565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff1661097a5760008381526007602090815260408083206001600160a01b03861684529091529020805460ff191660011790556109323390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161039a565b50600061039a565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff161561097a5760008381526007602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161039a565b6001600160a01b038216610a335760405163ec442f0560e01b8152600060048201526024016104c8565b6107f860008383610bb4565b6001600160a01b038416610a82576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016104c8565b6001600160a01b038316610ac5576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016104c8565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561052957826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610b3891815260200190565b60405180910390a350505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166107f8576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602481018390526044016104c8565b6001600160a01b038316610bdf578060026000828254610bd49190610ed4565b90915550610c6a9050565b6001600160a01b03831660009081526020819052604090205481811015610c4b576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260248101829052604481018390526064016104c8565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610c8657600280548290039055610ca5565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610cea91815260200190565b60405180910390a3505050565b600060208284031215610d0957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d3957600080fd5b9392505050565b600060208083528351808285015260005b81811015610d6d57858101830151858201604001528201610d51565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610da557600080fd5b919050565b60008060408385031215610dbd57600080fd5b610dc683610d8e565b946020939093013593505050565b600080600060608486031215610de957600080fd5b610df284610d8e565b9250610e0060208501610d8e565b9150604084013590509250925092565b600060208284031215610e2257600080fd5b5035919050565b60008060408385031215610e3c57600080fd5b82359150610e4c60208401610d8e565b90509250929050565b600060208284031215610e6757600080fd5b610d3982610d8e565b60008060408385031215610e8357600080fd5b610e8c83610d8e565b9150610e4c60208401610d8e565b600181811c90821680610eae57607f821691505b602082108103610ece57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561039a57634e487b7160e01b600052601160045260246000fdfea2646970667358221220a307e2ee117bcf3e53b622ffac095c2f1cd8a70831fd4167f3b371f2b637356664736f6c63430008140033a264697066735822122014e2c66e129c64615da0c8d508539d1a9709d33649bb7765643655cadc16896b64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/bridge/L2/EthereumBridge.sol/EthereumBridge.json b/contracts/exported/src/bridge/L2/EthereumBridge.sol/EthereumBridge.json new file mode 100644 index 0000000000..9d3789b5ed --- /dev/null +++ b/contracts/exported/src/bridge/L2/EthereumBridge.sol/EthereumBridge.json @@ -0,0 +1,253 @@ +[ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "remoteAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "localAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "CreatedWrappedToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messengerAddress", + "type": "address" + } + ], + "name": "configure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "wrappedToken", + "type": "address" + } + ], + "name": "hasTokenMapping", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messenger", + "type": "address" + }, + { + "internalType": "address", + "name": "remoteBridge", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "localToRemoteToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "crossChainAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "name": "onCreateTokenCommand", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "receiveAssets", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "remoteToLocalToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "asset", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "sendERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "sendNative", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "wrappedTokens", + "outputs": [ + { + "internalType": "contract WrappedERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/contracts/exported/src/common/ConstantSupplyERC20.sol/ConstantSupplyERC20.bin b/contracts/exported/src/common/ConstantSupplyERC20.sol/ConstantSupplyERC20.bin new file mode 100644 index 0000000000..53068d8fa7 --- /dev/null +++ b/contracts/exported/src/common/ConstantSupplyERC20.sol/ConstantSupplyERC20.bin @@ -0,0 +1 @@ +60806040523480156200001157600080fd5b5060405162000c7738038062000c778339810160408190526200003491620002ab565b82826003620000448382620003ad565b506004620000538282620003ad565b5050506200006833826200007160201b60201c565b505050620004a1565b6001600160a01b038216620000a15760405163ec442f0560e01b8152600060048201526024015b60405180910390fd5b620000af60008383620000b3565b5050565b6001600160a01b038316620000e2578060026000828254620000d6919062000479565b90915550620001569050565b6001600160a01b03831660009081526020819052604090205481811015620001375760405163391434e360e21b81526001600160a01b0385166004820152602481018290526044810183905260640162000098565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216620001745760028054829003905562000193565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001d991815260200190565b60405180910390a3505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200020e57600080fd5b81516001600160401b03808211156200022b576200022b620001e6565b604051601f8301601f19908116603f01168101908282118183101715620002565762000256620001e6565b816040528381526020925086838588010111156200027357600080fd5b600091505b8382101562000297578582018301518183018401529082019062000278565b600093810190920192909252949350505050565b600080600060608486031215620002c157600080fd5b83516001600160401b0380821115620002d957600080fd5b620002e787838801620001fc565b94506020860151915080821115620002fe57600080fd5b506200030d86828701620001fc565b925050604084015190509250925092565b600181811c908216806200033357607f821691505b6020821081036200035457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003a857600081815260208120601f850160051c81016020861015620003835750805b601f850160051c820191505b81811015620003a4578281556001016200038f565b5050505b505050565b81516001600160401b03811115620003c957620003c9620001e6565b620003e181620003da84546200031e565b846200035a565b602080601f831160018114620004195760008415620004005750858301515b600019600386901b1c1916600185901b178555620003a4565b600085815260208120601f198616915b828110156200044a5788860151825594840194600190910190840162000429565b5085821015620004695787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808201808211156200049b57634e487b7160e01b600052601160045260246000fd5b92915050565b6107c680620004b16000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063313ce5671161007657806395d89b411161005b57806395d89b4114610146578063a9059cbb1461014e578063dd62ed3e1461016157600080fd5b8063313ce5671461010e57806370a082311461011d57600080fd5b806306fdde03146100a8578063095ea7b3146100c657806318160ddd146100e957806323b872dd146100fb575b600080fd5b6100b061019a565b6040516100bd9190610610565b60405180910390f35b6100d96100d436600461067a565b61022c565b60405190151581526020016100bd565b6002545b6040519081526020016100bd565b6100d96101093660046106a4565b610246565b604051601281526020016100bd565b6100ed61012b3660046106e0565b6001600160a01b031660009081526020819052604090205490565b6100b061026a565b6100d961015c36600461067a565b610279565b6100ed61016f366004610702565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101a990610735565b80601f01602080910402602001604051908101604052809291908181526020018280546101d590610735565b80156102225780601f106101f757610100808354040283529160200191610222565b820191906000526020600020905b81548152906001019060200180831161020557829003601f168201915b5050505050905090565b60003361023a818585610287565b60019150505b92915050565b600033610254858285610299565b61025f858585610335565b506001949350505050565b6060600480546101a990610735565b60003361023a818585610335565b61029483838360016103c6565b505050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461032f5781811015610320576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064015b60405180910390fd5b61032f848484840360006103c6565b50505050565b6001600160a01b038316610378576040517f96c6fd1e00000000000000000000000000000000000000000000000000000000815260006004820152602401610317565b6001600160a01b0382166103bb576040517fec442f0500000000000000000000000000000000000000000000000000000000815260006004820152602401610317565b6102948383836104cd565b6001600160a01b038416610409576040517fe602df0500000000000000000000000000000000000000000000000000000000815260006004820152602401610317565b6001600160a01b03831661044c576040517f94280d6200000000000000000000000000000000000000000000000000000000815260006004820152602401610317565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561032f57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516104bf91815260200190565b60405180910390a350505050565b6001600160a01b0383166104f85780600260008282546104ed919061076f565b909155506105839050565b6001600160a01b03831660009081526020819052604090205481811015610564576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610317565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661059f576002805482900390556105be565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161060391815260200190565b60405180910390a3505050565b600060208083528351808285015260005b8181101561063d57858101830151858201604001528201610621565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461067557600080fd5b919050565b6000806040838503121561068d57600080fd5b6106968361065e565b946020939093013593505050565b6000806000606084860312156106b957600080fd5b6106c28461065e565b92506106d06020850161065e565b9150604084013590509250925092565b6000602082840312156106f257600080fd5b6106fb8261065e565b9392505050565b6000806040838503121561071557600080fd5b61071e8361065e565b915061072c6020840161065e565b90509250929050565b600181811c9082168061074957607f821691505b60208210810361076957634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561024057634e487b7160e01b600052601160045260246000fdfea2646970667358221220dfee8b2508201459d014b985ef570589fb9fe2647a943251cbfaf253dc423e2764736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/common/ConstantSupplyERC20.sol/ConstantSupplyERC20.json b/contracts/exported/src/common/ConstantSupplyERC20.sol/ConstantSupplyERC20.json new file mode 100644 index 0000000000..596be87254 --- /dev/null +++ b/contracts/exported/src/common/ConstantSupplyERC20.sol/ConstantSupplyERC20.json @@ -0,0 +1,331 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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" + }, + { + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "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": [ + { + "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": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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" + } +] diff --git a/contracts/exported/src/common/ObsERC20.sol/ObsERC20.bin b/contracts/exported/src/common/ObsERC20.sol/ObsERC20.bin new file mode 100644 index 0000000000..5939280c1b --- /dev/null +++ b/contracts/exported/src/common/ObsERC20.sol/ObsERC20.bin @@ -0,0 +1 @@ +6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162000c4738038062000c478339810160408190526200005a9162000149565b818160036200006a838262000242565b50600462000079828262000242565b50505050506200030e565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620000ac57600080fd5b81516001600160401b0380821115620000c957620000c962000084565b604051601f8301601f19908116603f01168101908282118183101715620000f457620000f462000084565b816040528381526020925086838588010111156200011157600080fd5b600091505b8382101562000135578582018301518183018401529082019062000116565b600093810190920192909252949350505050565b600080604083850312156200015d57600080fd5b82516001600160401b03808211156200017557600080fd5b62000183868387016200009a565b935060208501519150808211156200019a57600080fd5b50620001a9858286016200009a565b9150509250929050565b600181811c90821680620001c857607f821691505b602082108103620001e957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023d57600081815260208120601f850160051c81016020861015620002185750805b601f850160051c820191505b81811015620002395782815560010162000224565b5050505b505050565b81516001600160401b038111156200025e576200025e62000084565b62000276816200026f8454620001b3565b84620001ef565b602080601f831160018114620002ae5760008415620002955750858301515b600019600386901b1c1916600185901b17855562000239565b600085815260208120601f198616915b82811015620002df57888601518255948401946001909101908401620002be565b5085821015620002fe5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610929806200031e6000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063313ce5671161007657806395d89b411161005b57806395d89b4114610130578063a9059cbb14610138578063dd62ed3e1461014b57600080fd5b8063313ce5671461010e57806370a082311461011d57600080fd5b806306fdde03146100a8578063095ea7b3146100c657806318160ddd146100e957806323b872dd146100fb575b600080fd5b6100b061015e565b6040516100bd9190610773565b60405180910390f35b6100d96100d43660046107dd565b6101f0565b60405190151581526020016100bd565b6002545b6040519081526020016100bd565b6100d9610109366004610807565b61020a565b604051601281526020016100bd565b6100ed61012b366004610843565b61022e565b6100b06102d9565b6100d96101463660046107dd565b6102e8565b6100ed610159366004610865565b6102f6565b60606003805461016d90610898565b80601f016020809104026020016040519081016040528092919081815260200182805461019990610898565b80156101e65780601f106101bb576101008083540402835291602001916101e6565b820191906000526020600020905b8154815290600101906020018083116101c957829003601f168201915b5050505050905090565b6000336101fe818585610407565b60019150505b92915050565b600033610218858285610419565b610223858585610498565b506001949350505050565b60006001600160a01b038216320361025e576001600160a01b038216600090815260208190526040902054610204565b6001600160a01b038216330361028c576001600160a01b038216600090815260208190526040902054610204565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064015b60405180910390fd5b60606004805461016d90610898565b6000336101fe818585610498565b6000326001600160a01b03841614806103175750326001600160a01b038316145b1561034a576001600160a01b038084166000908152600160209081526040808320938616835292905220545b9050610204565b336001600160a01b03841614806103695750336001600160a01b038316145b15610399576001600160a01b03808416600090815260016020908152604080832093861683529290522054610343565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016102d0565b6104148383836001610529565b505050565b600061042584846102f6565b905060001981146104925781811015610483576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016102d0565b61049284848484036000610529565b50505050565b6001600160a01b0383166104db576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016102d0565b6001600160a01b03821661051e576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016102d0565b610414838383610630565b6001600160a01b03841661056c576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016102d0565b6001600160a01b0383166105af576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016102d0565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561049257826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161062291815260200190565b60405180910390a350505050565b6001600160a01b03831661065b57806002600082825461065091906108d2565b909155506106e69050565b6001600160a01b038316600090815260208190526040902054818110156106c7576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260248101829052604481018390526064016102d0565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661070257600280548290039055610721565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161076691815260200190565b60405180910390a3505050565b600060208083528351808285015260005b818110156107a057858101830151858201604001528201610784565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107d857600080fd5b919050565b600080604083850312156107f057600080fd5b6107f9836107c1565b946020939093013593505050565b60008060006060848603121561081c57600080fd5b610825846107c1565b9250610833602085016107c1565b9150604084013590509250925092565b60006020828403121561085557600080fd5b61085e826107c1565b9392505050565b6000806040838503121561087857600080fd5b610881836107c1565b915061088f602084016107c1565b90509250929050565b600181811c908216806108ac57607f821691505b6020821081036108cc57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561020457634e487b7160e01b600052601160045260246000fdfea2646970667358221220747492c6ad6919950d95fb045569a252ef4e67afdd9357bceeee7893599576cd64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/common/ObsERC20.sol/ObsERC20.json b/contracts/exported/src/common/ObsERC20.sol/ObsERC20.json new file mode 100644 index 0000000000..fad2326176 --- /dev/null +++ b/contracts/exported/src/common/ObsERC20.sol/ObsERC20.json @@ -0,0 +1,326 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "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" + }, + { + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "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": [ + { + "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": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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" + } +] diff --git a/contracts/exported/src/common/WrappedERC20.sol/WrappedERC20.bin b/contracts/exported/src/common/WrappedERC20.sol/WrappedERC20.bin new file mode 100644 index 0000000000..6e39122655 --- /dev/null +++ b/contracts/exported/src/common/WrappedERC20.sol/WrappedERC20.bin @@ -0,0 +1 @@ +6080604052600580546001600160a01b03191673deb34a740eca1ec42c8b8204cbec0ba34fdd27f31790553480156200003757600080fd5b5060405162001333380380620013338339810160408190526200005a9162000233565b8181818160036200006c83826200032c565b5060046200007b82826200032c565b5050505050620000b27fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177533620000bb60201b60201c565b505050620003f8565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff16620001645760008381526007602090815260408083206001600160a01b03861684529091529020805460ff191660011790556200011b3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600162000168565b5060005b92915050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019657600080fd5b81516001600160401b0380821115620001b357620001b36200016e565b604051601f8301601f19908116603f01168101908282118183101715620001de57620001de6200016e565b81604052838152602092508683858801011115620001fb57600080fd5b600091505b838210156200021f578582018301518183018401529082019062000200565b600093810190920192909252949350505050565b600080604083850312156200024757600080fd5b82516001600160401b03808211156200025f57600080fd5b6200026d8683870162000184565b935060208501519150808211156200028457600080fd5b50620002938582860162000184565b9150509250929050565b600181811c90821680620002b257607f821691505b602082108103620002d357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200032757600081815260208120601f850160051c81016020861015620003025750805b601f850160051c820191505b8181101562000323578281556001016200030e565b5050505b505050565b81516001600160401b038111156200034857620003486200016e565b62000360816200035984546200029d565b84620002d9565b602080601f8311600181146200039857600084156200037f5750858301515b600019600386901b1c1916600185901b17855562000323565b600085815260208120601f198616915b82811015620003c957888601518255948401946001909101908401620003a8565b5085821015620003e85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b610f2b80620004086000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c806336568abe116100cd578063979005ad11610081578063a9059cbb11610066578063a9059cbb146102ce578063d547741f146102e1578063dd62ed3e146102f457600080fd5b8063979005ad146102b3578063a217fddf146102c657600080fd5b806375b238fc116100b257806375b238fc1461024b57806391d148541461027257806395d89b41146102ab57600080fd5b806336568abe1461022557806370a082311461023857600080fd5b80631dd319cb11610124578063248a9ca311610109578063248a9ca3146101e05780632f2ff15d14610203578063313ce5671461021657600080fd5b80631dd319cb146101b857806323b872dd146101cd57600080fd5b806301ffc9a71461015657806306fdde031461017e578063095ea7b31461019357806318160ddd146101a6575b600080fd5b610169610164366004610cf7565b610307565b60405190151581526020015b60405180910390f35b6101866103a0565b6040516101759190610d40565b6101696101a1366004610daa565b610432565b6002545b604051908152602001610175565b6101cb6101c6366004610daa565b61044a565b005b6101696101db366004610dd4565b6104e0565b6101aa6101ee366004610e10565b60009081526007602052604090206001015490565b6101cb610211366004610e29565b610504565b60405160128152602001610175565b6101cb610233366004610e29565b61052f565b6101aa610246366004610e55565b61057b565b6101aa7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b610169610280366004610e29565b60009182526007602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610186610621565b6101cb6102c1366004610daa565b610630565b6101aa600081565b6101696102dc366004610daa565b610664565b6101cb6102ef366004610e29565b610672565b6101aa610302366004610e70565b610697565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061039a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6060600380546103af90610e9a565b80601f01602080910402602001604051908101604052809291908181526020018280546103db90610e9a565b80156104285780601f106103fd57610100808354040283529160200191610428565b820191906000526020600020905b81548152906001019060200180831161040b57829003601f168201915b5050505050905090565b6000336104408185856107a8565b5060019392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610474816107b5565b8161047e8461057b565b10156104d15760405162461bcd60e51b815260206004820152601560248201527f496e73756666696369656e742062616c616e63652e000000000000000000000060448201526064015b60405180910390fd5b6104db83836107c2565b505050565b6000336104ee8582856107fc565b6104f9858585610875565b506001949350505050565b60008281526007602052604090206001015461051f816107b5565b61052983836108d4565b50505050565b6001600160a01b0381163314610571576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104db8282610982565b60006001600160a01b03821632036105ab576001600160a01b03821660009081526020819052604090205461039a565b6001600160a01b03821633036105d9576001600160a01b03821660009081526020819052604090205461039a565b60405162461bcd60e51b815260206004820152601f60248201527f4e6f7420616c6c6f77656420746f2072656164207468652062616c616e63650060448201526064016104c8565b6060600480546103af90610e9a565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561065a816107b5565b6104db8383610a09565b600033610440818585610875565b60008281526007602052604090206001015461068d816107b5565b6105298383610982565b6000326001600160a01b03841614806106b85750326001600160a01b038316145b156106eb576001600160a01b038084166000908152600160209081526040808320938616835292905220545b905061039a565b336001600160a01b038416148061070a5750336001600160a01b038316145b1561073a576001600160a01b038084166000908152600160209081526040808320938616835292905220546106e4565b60405162461bcd60e51b815260206004820152602160248201527f4e6f7420616c6c6f77656420746f20726561642074686520616c6c6f77616e6360448201527f650000000000000000000000000000000000000000000000000000000000000060648201526084016104c8565b6104db8383836001610a3f565b6107bf8133610b46565b50565b6001600160a01b0382166107ec57604051634b637e8f60e11b8152600060048201526024016104c8565b6107f882600083610bb4565b5050565b60006108088484610697565b905060001981146105295781811015610866576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016104c8565b61052984848484036000610a3f565b6001600160a01b03831661089f57604051634b637e8f60e11b8152600060048201526024016104c8565b6001600160a01b0382166108c95760405163ec442f0560e01b8152600060048201526024016104c8565b6104db838383610bb4565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff1661097a5760008381526007602090815260408083206001600160a01b03861684529091529020805460ff191660011790556109323390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161039a565b50600061039a565b60008281526007602090815260408083206001600160a01b038516845290915281205460ff161561097a5760008381526007602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161039a565b6001600160a01b038216610a335760405163ec442f0560e01b8152600060048201526024016104c8565b6107f860008383610bb4565b6001600160a01b038416610a82576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016104c8565b6001600160a01b038316610ac5576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016104c8565b6001600160a01b038085166000908152600160209081526040808320938716835292905220829055801561052957826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610b3891815260200190565b60405180910390a350505050565b60008281526007602090815260408083206001600160a01b038516845290915290205460ff166107f8576040517fe2517d3f0000000000000000000000000000000000000000000000000000000081526001600160a01b0382166004820152602481018390526044016104c8565b6001600160a01b038316610bdf578060026000828254610bd49190610ed4565b90915550610c6a9050565b6001600160a01b03831660009081526020819052604090205481811015610c4b576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260248101829052604481018390526064016104c8565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b038216610c8657600280548290039055610ca5565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610cea91815260200190565b60405180910390a3505050565b600060208284031215610d0957600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610d3957600080fd5b9392505050565b600060208083528351808285015260005b81811015610d6d57858101830151858201604001528201610d51565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610da557600080fd5b919050565b60008060408385031215610dbd57600080fd5b610dc683610d8e565b946020939093013593505050565b600080600060608486031215610de957600080fd5b610df284610d8e565b9250610e0060208501610d8e565b9150604084013590509250925092565b600060208284031215610e2257600080fd5b5035919050565b60008060408385031215610e3c57600080fd5b82359150610e4c60208401610d8e565b90509250929050565b600060208284031215610e6757600080fd5b610d3982610d8e565b60008060408385031215610e8357600080fd5b610e8c83610d8e565b9150610e4c60208401610d8e565b600181811c90821680610eae57607f821691505b602082108103610ece57634e487b7160e01b600052602260045260246000fd5b50919050565b8082018082111561039a57634e487b7160e01b600052601160045260246000fdfea2646970667358221220a307e2ee117bcf3e53b622ffac095c2f1cd8a70831fd4167f3b371f2b637356664736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/common/WrappedERC20.sol/WrappedERC20.json b/contracts/exported/src/common/WrappedERC20.sol/WrappedERC20.json new file mode 100644 index 0000000000..d2bee51ce7 --- /dev/null +++ b/contracts/exported/src/common/WrappedERC20.sol/WrappedERC20.json @@ -0,0 +1,600 @@ +[ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AccessControlBadConfirmation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "neededRole", + "type": "bytes32" + } + ], + "name": "AccessControlUnauthorizedAccount", + "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" + }, + { + "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": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "previousAdminRole", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "newAdminRole", + "type": "bytes32" + } + ], + "name": "RoleAdminChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "RoleRevoked", + "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": "ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": [ + { + "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": "giver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "burnFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "hasRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "issueFor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "callerConfirmation", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "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" + } +] diff --git a/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin b/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin new file mode 100644 index 0000000000..217f1416d3 --- /dev/null +++ b/contracts/exported/src/management/ManagementContract.sol/ManagementContract.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6143a580620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c80638129fc1c1162000119578063a25eb31c11620000af578063db5d91b1116200007a578063db5d91b114620004f1578063e34fbfc81462000520578063e874eb201462000535578063f2fde38b146200054957600080fd5b8063a25eb31c146200049b578063a4ab2faa14620004b2578063a52f433c14620004c9578063d4fab88714620004da57600080fd5b806387059edb11620000f057806387059edb14620004195780638da5cb5b146200043057806398077e861462000461578063a1a227fa146200048757600080fd5b80638129fc1c14620003c25780638236a7ba14620003cc5780638415482614620003f357600080fd5b806347665738116200019b5780636a30d26c11620001665780636a30d26c146200037e5780636b9707d61462000397578063715018a614620003ae5780637281099614620003b857600080fd5b80634766573814620003125780635371a2161462000329578063568699c8146200034057806368e10383146200036757600080fd5b80632f0cb9e311620001dc5780632f0cb9e314620002525780633e60a22f146200028957806343348b2f14620002d9578063440c953b146200030857600080fd5b80620ddd27146200020557806303e72e481462000222578063073b6ef3146200023b575b600080fd5b6200020f600e5481565b6040519081526020015b60405180910390f35b620002396200023336600462001ebc565b62000560565b005b620002396200024c36600462002007565b62000673565b6200027862000263366004620020a4565b600c6020526000908152604090205460ff1681565b604051901515815260200162000219565b620002c06200029a366004620020be565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b03909116815260200162000219565b62000278620002ea366004620020ff565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023962000323366004620020ff565b62000906565b620002396200033a36600462002124565b620009d6565b6200035762000351366004620020a4565b62000bdf565b6040516200021992919062002247565b620002396200037836600462002262565b62000c38565b6200038862000d2f565b604051620002199190620022ec565b62000239620003a8366004620020ff565b62000e12565b6200023962000ed8565b6200023962000ef0565b6200023962000f74565b620003e3620003dd366004620020a4565b62001158565b6040516200021992919062002352565b6200027862000404366004620020a4565b600d6020526000908152604090205460ff1681565b620003e36200042a366004620020a4565b62001248565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002c0565b6200047862000472366004620020a4565b620012c2565b6040516200021991906200236f565b600a54620002c0906001600160a01b031681565b62000239620004ac36600462002384565b62001377565b62000278620004c3366004620023fc565b620014e4565b600454610100900460ff1662000278565b62000239620004eb36600462002435565b62001575565b6200027862000502366004620020ff565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023962000531366004620024e0565b5050565b600b54620002c0906001600160a01b031681565b620002396200055a366004620020ff565b62001708565b6200056a62001765565b60006001600160a01b031660038360405162000587919062002526565b908152604051908190036020019020546001600160a01b031603620005e657600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005e48382620025d3565b505b80600383604051620005f9919062002526565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb590620006679084908490620026a0565b60405180910390a15050565b6000828152600860205260409020548114620006d65760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420666f726b494400000000000000000000000000000000000060448201526064015b60405180910390fd5b60006200074889898989604051602001620006f59493929190620026cd565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017dc92505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007b55760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b600e8990556000805b8751811015620008e157600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007f457620007f462002749565b602002602001015162000807906200275f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152426024820152604401600060405180830381600087803b1580156200085f57600080fd5b505af115801562000874573d6000803e3d6000fd5b50505050818882815181106200088e576200088e62002749565b6020026020010151620008a1906200275f565b6040805160208101939093528201526060016040516020818303038152906040528051906020012091508080620008d8906200279a565b915050620007be565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b6200091062001765565b6001600160a01b03811660009081526020819052604090205460ff166200097a5760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000a2790879087908790879060040162002816565b60006040518083038186803b15801562000a4057600080fd5b505afa15801562000a55573d6000803e3d6000fd5b5050505060008460405160200162000a6e91906200287e565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000ae85760405162461bcd60e51b815260206004820152601860248201527f7769746864726177616c20616c7265616479207370656e7400000000000000006044820152606401620006cd565b6001600c60008760405160200162000b0191906200287e565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000b5c91908901908901620020ff565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528801356024820152604401600060405180830381600087803b15801562000bbf57600080fd5b505af115801562000bd4573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000c0b8562001248565b915091508162000c215760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000cb35760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b60048054600160ff1991821681179092556001600160a01b038716600081815260208181526040808320805486168717905585825291829020805490941690941790925590519081527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000e0957838290600052602060002001805462000d759062002544565b80601f016020809104026020016040519081016040528092919081815260200182805462000da39062002544565b801562000df45780601f1062000dc85761010080835404028352916020019162000df4565b820191906000526020600020905b81548152906001019060200180831162000dd657829003601f168201915b50505050508152602001906001019062000d53565b50505050905090565b62000e1c62001765565b6001600160a01b03811660009081526001602052604090205460ff1662000e865760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b479101620009cb565b62000ee262001765565b62000eee60006200180c565b565b62000efa62001765565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b15801562000f5957600080fd5b505af115801562000f6e573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000fc05750825b905060008267ffffffffffffffff16600114801562000fde5750303b155b90508115801562000fed575080155b1562001025576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200105a57845468ff00000000000000001916680100000000000000001785555b62001065336200188a565b600060055560016009556040516200107d9062001dd0565b604051809103906000f0801580156200109a573d6000803e3d6000fd5b50600b805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b0393909316928317909155600a8054909116821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a183156200115157845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200162000d20565b5050505050565b604080516060808201835260008083526020808401839052838501829052858252600681528482208551938401909552845483526001850180549295869493909284019190620011a89062002544565b80601f0160208091040260200160405190810160405280929190818152602001828054620011d69062002544565b8015620012275780601f10620011fb5761010080835404028352916020019162001227565b820191906000526020600020905b8154815290600101906020018083116200120957829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b60408051606080820183526000808352602083019190915291810182905260008381526007602052604081205490819003620012ad57505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b620012b88162001158565b9250925050915091565b60028181548110620012d357600080fd5b906000526020600020016000915090508054620012f09062002544565b80601f01602080910402602001604051908101604052809291908181526020018280546200131e9062002544565b80156200136f5780601f1062001343576101008083540402835291602001916200136f565b820191906000526020600020905b8154815290600101906020018083116200135157829003601f168201915b505050505081565b6000620013c983356200138e60208601866200288e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017dc92505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620014365760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b03811660009081526001602052604090205460ff16620014a05760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b620014ab836200189f565b604051833581527fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a589060200160405180910390a1505050565b600080805b83518110156200155c578184828151811062001509576200150962002749565b60200260200101516200151c906200275f565b604080516020810193909352820152606001604051602081830303815290604052805190602001209150808062001553906200279a565b915050620014e9565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620016065760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b8115620016dd5760006200163f8787866040516020016200162a93929190620028d8565b60405160208183030381529060405262001954565b905060006200164f8287620017dc565b9050876001600160a01b0316816001600160a01b031614620016da5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401620006cd565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b6200171262001765565b6001600160a01b03811662001757576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401620006cd565b62001762816200180c565b50565b33620017987f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000eee576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401620006cd565b600080600080620017ee868662001993565b925092509250620018008282620019e4565b50909150505b92915050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200189462001afa565b620017628162001b62565b803560009081526006602052604090208190620018bd828262002920565b50506009546000908152600760205260409020813590819055620018e360014362002a30565b40604051602001620018ff929190918252602082015260400190565b60408051601f19818403018152918152815160209283012060098054600090815260089094529183205580549162001937836200279a565b919050555060055481604001351115620017625760400135600555565b600062001962825162001b6c565b826040516020016200197692919062002a46565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620019d15760208401516040850151606086015160001a620019c28882858562001c13565b955095509550505050620019dd565b50508151600091506002905b9250925092565b6000826003811115620019fb57620019fb62002aa5565b0362001a05575050565b600182600381111562001a1c5762001a1c62002aa5565b0362001a54576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111562001a6b5762001a6b62002aa5565b0362001aa7576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b600382600381111562001abe5762001abe62002aa5565b0362000531576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000eee576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171262001afa565b6060600062001b7b8362001ce7565b600101905060008167ffffffffffffffff81111562001b9e5762001b9e62001dde565b6040519080825280601f01601f19166020018201604052801562001bc9576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001bd357509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562001c50575060009150600390508262001cdd565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562001ca5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001cd35750600092506001915082905062001cdd565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001d31577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001d5e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001d7d57662386f26fc10000830492506010015b6305f5e100831062001d96576305f5e100830492506008015b612710831062001dab57612710830492506004015b6064831062001dbe576064830492506002015b600a8310620018065760010192915050565b6118b48062002abc83390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001e205762001e2062001dde565b604052919050565b600082601f83011262001e3a57600080fd5b813567ffffffffffffffff81111562001e575762001e5762001dde565b62001e6c601f8201601f191660200162001df4565b81815284602083860101111562001e8257600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160a01b038116811462001eb757600080fd5b919050565b6000806040838503121562001ed057600080fd5b823567ffffffffffffffff81111562001ee857600080fd5b62001ef68582860162001e28565b92505062001f076020840162001e9f565b90509250929050565b600082601f83011262001f2257600080fd5b8135602067ffffffffffffffff8083111562001f425762001f4262001dde565b8260051b62001f5383820162001df4565b938452858101830193838101908886111562001f6e57600080fd5b84880192505b8583101562001faf5782358481111562001f8e5760008081fd5b62001f9e8a87838c010162001e28565b835250918401919084019062001f74565b98975050505050505050565b60008083601f84011262001fce57600080fd5b50813567ffffffffffffffff81111562001fe757600080fd5b6020830191508360208285010111156200200057600080fd5b9250929050565b60008060008060008060008060e0898b0312156200202457600080fd5b883597506020890135965060408901359550606089013567ffffffffffffffff808211156200205257600080fd5b620020608c838d0162001f10565b965060808b01359150808211156200207757600080fd5b50620020868b828c0162001fbb565b999c989b5096999598969760a08701359660c0013595509350505050565b600060208284031215620020b757600080fd5b5035919050565b600060208284031215620020d157600080fd5b813567ffffffffffffffff811115620020e957600080fd5b620020f78482850162001e28565b949350505050565b6000602082840312156200211257600080fd5b6200211d8262001e9f565b9392505050565b60008060008084860360c08112156200213c57600080fd5b60808112156200214b57600080fd5b50849350608085013567ffffffffffffffff808211156200216b57600080fd5b818701915087601f8301126200218057600080fd5b8135818111156200219057600080fd5b8860208260051b8501011115620021a657600080fd5b95986020929092019750949560a00135945092505050565b60005b83811015620021db578181015183820152602001620021c1565b50506000910152565b60008151808452620021fe816020860160208601620021be565b601f01601f19169290920160200192915050565b805182526000602082015160606020850152620022336060850182620021e4565b604093840151949093019390935250919050565b828152604060208201526000620020f7604083018462002212565b6000806000806000606086880312156200227b57600080fd5b620022868662001e9f565b9450602086013567ffffffffffffffff80821115620022a457600080fd5b620022b289838a0162001fbb565b90965094506040880135915080821115620022cc57600080fd5b50620022db8882890162001fbb565b969995985093965092949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156200234557603f1988860301845262002332858351620021e4565b9450928501929085019060010162002313565b5092979650505050505050565b8215158152604060208201526000620020f7604083018462002212565b6020815260006200211d6020830184620021e4565b600080604083850312156200239857600080fd5b823567ffffffffffffffff80821115620023b157600080fd5b9084019060608287031215620023c657600080fd5b90925060208401359080821115620023dd57600080fd5b50830160208186031215620023f157600080fd5b809150509250929050565b6000602082840312156200240f57600080fd5b813567ffffffffffffffff8111156200242757600080fd5b620020f78482850162001f10565b600080600080600060a086880312156200244e57600080fd5b620024598662001e9f565b9450620024696020870162001e9f565b9350604086013567ffffffffffffffff808211156200248757600080fd5b6200249589838a0162001e28565b94506060880135915080821115620024ac57600080fd5b50620024bb8882890162001e28565b92505060808601358015158114620024d257600080fd5b809150509295509295909350565b60008060208385031215620024f457600080fd5b823567ffffffffffffffff8111156200250c57600080fd5b6200251a8582860162001fbb565b90969095509350505050565b600082516200253a818460208701620021be565b9190910192915050565b600181811c908216806200255957607f821691505b6020821081036200257a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620025ce57600081815260208120601f850160051c81016020861015620025a95750805b601f850160051c820191505b81811015620025ca57828155600101620025b5565b5050505b505050565b815167ffffffffffffffff811115620025f057620025f062001dde565b620026088162002601845462002544565b8462002580565b602080601f831160018114620026405760008415620026275750858301515b600019600386901b1c1916600185901b178555620025ca565b600085815260208120601f198616915b82811015620026715788860151825594840194600190910190840162002650565b5085821015620026905787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000620026b56040830185620021e4565b90506001600160a01b03831660208301529392505050565b600060808201868352602086818501528560408501526080606085015281855180845260a08601915060a08160051b870101935082870160005b828110156200273957609f1988870301845262002726868351620021e4565b9550928401929084019060010162002707565b50939a9950505050505050505050565b634e487b7160e01b600052603260045260246000fd5b805160208083015191908110156200257a5760001960209190910360031b1b16919050565b634e487b7160e01b600052601160045260246000fd5b600060018201620027af57620027af62002784565b5060010190565b6001600160a01b0380620027ca8362001e9f565b16835280620027dc6020840162001e9f565b1660208401525060408101356040830152606081013567ffffffffffffffff81168082146200280a57600080fd5b80606085015250505050565b620028228186620027b6565b60c060808201528260c082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8411156200285f57600080fd5b8360051b808660e085013760a0830193909352500160e0019392505050565b60808101620018068284620027b6565b6000808335601e19843603018112620028a657600080fd5b83018035915067ffffffffffffffff821115620028c257600080fd5b6020019150368190038213156200200057600080fd5b60006bffffffffffffffffffffffff19808660601b168352808560601b16601484015250825162002911816028850160208701620021be565b91909101602801949350505050565b813581556001808201602080850135601e198636030181126200294257600080fd5b8501803567ffffffffffffffff8111156200295c57600080fd5b80360383830113156200296e57600080fd5b62002986816200297f865462002544565b8662002580565b6000601f821160018114620029bf5760008315620029a657508382018501355b600019600385901b1c1916600184901b17865562002a1b565b600086815260209020601f19841690835b82811015620029f157868501880135825593870193908901908701620029d0565b508482101562002a115760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b8181038181111562001806576200180662002784565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835162002a8081601a850160208801620021be565b83519083019062002a9981601a840160208801620021be565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61180f806100a56000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f1461030e578063b6aed0cb1461032e578063e138a8d21461034e578063f2fde38b1461036e57610155565b80639730886d1461029557806399a3ad21146102b5578063b1454caa146102d557610155565b8063346633fb116100bb578063346633fb1461022557806336d2da9014610238578063715018a6146102585780638da5cb5b1461026d57610155565b80630fcfbd11146101a25780630fe9188e146101d557806333a88c72146101f557610155565b36610155576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b3480156101ae57600080fd5b506101c26101bd366004610f78565b61038e565b6040519081526020015b60405180910390f35b3480156101e157600080fd5b506101536101f0366004610fad565b610428565b34801561020157600080fd5b50610215610210366004610f78565b61049e565b60405190151581526020016101cc565b610153610233366004610fdb565b6104f1565b34801561024457600080fd5b50610153610253366004611007565b6105d4565b34801561026457600080fd5b50610153610683565b34801561027957600080fd5b506000546040516001600160a01b0390911681526020016101cc565b3480156102a157600080fd5b506101536102b0366004611024565b610697565b3480156102c157600080fd5b506101536102d0366004610fdb565b6107e9565b3480156102e157600080fd5b506102f56102f036600461109a565b610899565b60405167ffffffffffffffff90911681526020016101cc565b34801561031a57600080fd5b50610153610329366004611193565b6108f2565b34801561033a57600080fd5b506101536103493660046111f5565b610af4565b34801561035a57600080fd5b50610153610369366004611217565b610b90565b34801561037a57600080fd5b50610153610389366004611007565b610d70565b600080826040516020016103a291906112c6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806104215760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d69747465646044820152601760f91b6064820152608401610199565b9392505050565b610430610dc7565b600081815260046020526040812054900361048d5760405162461bcd60e51b815260206004820152601a60248201527f537461746520726f6f7420646f6573206e6f742065786973742e0000000000006044820152606401610199565b600090815260046020526040812055565b600080826040516020016104b291906112c6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104e95750428111155b949350505050565b60003411801561050057508034145b6105725760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610199565b600061057d33610e0d565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6105dc610dc7565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b505090508061067f5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b5050565b61068b610dc7565b6106956000610e6b565b565b61069f610dc7565b60006106ab82426113c7565b90506000836040516020016106c091906112c6565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561075b5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610199565b600081815260016020908152604082208490556002919061077e90870187611007565b6001600160a01b0316815260208101919091526040016000908120906107aa60808701606088016113da565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107e182826115a8565b505050505050565b6107f1610dc7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461083e576040519150601f19603f3d011682016040523d82523d6000602084013e610843565b606091505b50509050806108945760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b505050565b60006108a433610e0d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516108e197969594939291906116c2565b60405180910390a195945050505050565b60008181526004602052604081205490036109625760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b6000818152600460205260409020544210156109ca5760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b6000846040516020016109dd9190611722565b60408051601f198184030181528282528051602091820120908301829052600160608401527f760000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610a7b84848484604051602001610a6091815260200190565b60405160208183030381529060405280519060200120610ec8565b610aed5760405162461bcd60e51b815260206004820152603360248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7560448201527f65207472616e73666572206d6573736167652e000000000000000000000000006064820152608401610199565b5050505050565b610afc610dc7565b60008281526004602052604090205415610b7e5760405162461bcd60e51b815260206004820152602560248201527f526f6f7420616c726561647920616464656420746f20746865206d657373616760448201527f65206275730000000000000000000000000000000000000000000000000000006064820152608401610199565b60009182526004602052604090912055565b6000818152600460205260408120549003610c005760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b600081815260046020526040902054421015610c685760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b600084604051602001610c7b91906112c6565b60408051601f198184030181528282528051602091820120908301829052600160608401527f6d0000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610cfe84848484604051602001610a6091815260200190565b610aed5760405162461bcd60e51b815260206004820152603060248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7360448201527f7320636861696e206d6573736167652e000000000000000000000000000000006064820152608401610199565b610d78610dc7565b6001600160a01b038116610dbb576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610199565b610dc481610e6b565b50565b6000546001600160a01b03163314610695576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610199565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610e408385611782565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ed6868685610ee0565b1495945050505050565b600081815b84811015610f2357610f0f82878784818110610f0357610f036117aa565b90506020020135610f2c565b915080610f1b816117c0565b915050610ee5565b50949350505050565b6000818310610f48576000828152602084905260409020610f57565b60008381526020839052604090205b90505b92915050565b600060c08284031215610f7257600080fd5b50919050565b600060208284031215610f8a57600080fd5b813567ffffffffffffffff811115610fa157600080fd5b6104e984828501610f60565b600060208284031215610fbf57600080fd5b5035919050565b6001600160a01b0381168114610dc457600080fd5b60008060408385031215610fee57600080fd5b8235610ff981610fc6565b946020939093013593505050565b60006020828403121561101957600080fd5b813561042181610fc6565b6000806040838503121561103757600080fd5b823567ffffffffffffffff81111561104e57600080fd5b61105a85828601610f60565b95602094909401359450505050565b63ffffffff81168114610dc457600080fd5b60ff81168114610dc457600080fd5b80356110958161107b565b919050565b6000806000806000608086880312156110b257600080fd5b85356110bd81611069565b945060208601356110cd81611069565b9350604086013567ffffffffffffffff808211156110ea57600080fd5b818801915088601f8301126110fe57600080fd5b81358181111561110d57600080fd5b89602082850101111561111f57600080fd5b60208301955080945050505060608601356111398161107b565b809150509295509295909350565b60008083601f84011261115957600080fd5b50813567ffffffffffffffff81111561117157600080fd5b6020830191508360208260051b850101111561118c57600080fd5b9250929050565b60008060008084860360c08112156111aa57600080fd5b60808112156111b857600080fd5b50849350608085013567ffffffffffffffff8111156111d657600080fd5b6111e287828801611147565b9598909750949560a00135949350505050565b6000806040838503121561120857600080fd5b50508035926020909101359150565b6000806000806060858703121561122d57600080fd5b843567ffffffffffffffff8082111561124557600080fd5b61125188838901610f60565b9550602087013591508082111561126757600080fd5b5061127487828801611147565b9598909750949560400135949350505050565b67ffffffffffffffff81168114610dc457600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600082356112d781610fc6565b6001600160a01b03811660208401525060208301356112f581611287565b67ffffffffffffffff80821660408501526040850135915061131682611069565b63ffffffff80831660608601526060860135925061133383611069565b80831660808601525060808501359150601e1985360301821261135557600080fd5b602091850191820191358181111561136c57600080fd5b80360383131561137b57600080fd5b60c060a086015261139060e08601828561129d565b925050506113a060a0850161108a565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f5a57610f5a6113b1565b6000602082840312156113ec57600080fd5b813561042181611069565b60008135610f5a81611069565b6000808335601e1984360301811261141b57600080fd5b83018035915067ffffffffffffffff82111561143657600080fd5b60200191503681900382131561118c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061147557607f821691505b602082108103610f7257634e487b7160e01b600052602260045260246000fd5b601f82111561089457600081815260208120601f850160051c810160208610156114bc5750805b601f850160051c820191505b818110156107e1578281556001016114c8565b67ffffffffffffffff8311156114f3576114f361144b565b611507836115018354611461565b83611495565b6000601f84116001811461153b57600085156115235750838201355b600019600387901b1c1916600186901b178355610aed565b600083815260209020601f19861690835b8281101561156c578685013582556020948501946001909201910161154c565b50868210156115895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135610f5a8161107b565b81356115b381610fc6565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356115eb81611287565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061164983611069565b921760e09190911b909116178155611681611666606084016113f7565b6001830163ffffffff821663ffffffff198254161781555050565b61168e6080830183611404565b61169c8183600286016114db565b505061067f6116ad60a0840161159b565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261170b60c08301858761129d565b905060ff831660a083015298975050505050505050565b60808101823561173181610fc6565b6001600160a01b03908116835260208401359061174d82610fc6565b16602083015260408381013590830152606083013561176b81611287565b67ffffffffffffffff811660608401525092915050565b67ffffffffffffffff8181168382160190808211156117a3576117a36113b1565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016117d2576117d26113b1565b506001019056fea264697066735822122078bebc469f5cbd8c097a1657385a1d8552a3feee7913c0a4f7f5badba2928b8764736f6c63430008140033a2646970667358221220f3ae2aa4aad47c4fdc0fe04e3097ee0ac3d734edd36d93fad6ce36e3ba96c70464736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/management/ManagementContract.sol/ManagementContract.json b/contracts/exported/src/management/ManagementContract.sol/ManagementContract.json new file mode 100644 index 0000000000..ec53ed9ee6 --- /dev/null +++ b/contracts/exported/src/management/ManagementContract.sol/ManagementContract.json @@ -0,0 +1,825 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ECDSAInvalidSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "ImportantContractAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "messageBusAddress", + "type": "address" + } + ], + "name": "LogManagementContractCreated", + "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": "bytes32", + "name": "rollupHash", + "type": "bytes32" + } + ], + "name": "RollupAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "enclaveID", + "type": "address" + } + ], + "name": "SequencerEnclaveGranted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "enclaveID", + "type": "address" + } + ], + "name": "SequencerEnclaveRevoked", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "Hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "Signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "LastSequenceNumber", + "type": "uint256" + } + ], + "internalType": "struct Structs.MetaRollup", + "name": "r", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage[]", + "name": "messages", + "type": "tuple[]" + } + ], + "internalType": "struct Structs.HeaderCrossChainData", + "name": "", + "type": "tuple" + } + ], + "name": "AddRollup", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "Attested", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "internalType": "struct Structs.ValueTransferMessage", + "name": "_msg", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "ExtractNativeValue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "GetImportantContractKeys", + "outputs": [ + { + "internalType": "string[]", + "name": "", + "type": "string[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "rollupHash", + "type": "bytes32" + } + ], + "name": "GetRollupByHash", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "Hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "Signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "LastSequenceNumber", + "type": "uint256" + } + ], + "internalType": "struct Structs.MetaRollup", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "GetRollupByNumber", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "Hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "Signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "LastSequenceNumber", + "type": "uint256" + } + ], + "internalType": "struct Structs.MetaRollup", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "number", + "type": "uint256" + } + ], + "name": "GetUniqueForkID", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "Hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "Signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "LastSequenceNumber", + "type": "uint256" + } + ], + "internalType": "struct Structs.MetaRollup", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "GrantSequencerEnclave", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_enclaveID", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_initSecret", + "type": "bytes" + }, + { + "internalType": "string", + "name": "_genesisAttestation", + "type": "string" + } + ], + "name": "InitializeNetworkSecret", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "IsSequencerEnclave", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "IsWithdrawalAvailable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "requestReport", + "type": "string" + } + ], + "name": "RequestNetworkSecret", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "attesterID", + "type": "address" + }, + { + "internalType": "address", + "name": "requesterID", + "type": "address" + }, + { + "internalType": "bytes", + "name": "attesterSig", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "responseSecret", + "type": "bytes" + }, + { + "internalType": "bool", + "name": "verifyAttester", + "type": "bool" + } + ], + "name": "RespondNetworkSecret", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "RetrieveAllBridgeFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + } + ], + "name": "RevokeSequencerEnclave", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "SetImportantContractAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_lastBatchHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "blockNum", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "crossChainHashes", + "type": "bytes[]" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "rollupNumber", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "forkID", + "type": "bytes32" + } + ], + "name": "addCrossChainMessagesRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "name": "importantContractAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "importantContractKeys", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "crossChainHashes", + "type": "bytes[]" + } + ], + "name": "isBundleAvailable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "isBundleSaved", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "isWithdrawalSpent", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastBatchHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastBatchSeqNo", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "merkleMessageBus", + "outputs": [ + { + "internalType": "contract IMerkleTreeMessageBus", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageBus", + "outputs": [ + { + "internalType": "contract IMessageBus", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/messaging/IMerkleTreeMessageBus.sol/IMerkleTreeMessageBus.json b/contracts/exported/src/messaging/IMerkleTreeMessageBus.sol/IMerkleTreeMessageBus.json new file mode 100644 index 0000000000..2d376b0752 --- /dev/null +++ b/contracts/exported/src/messaging/IMerkleTreeMessageBus.sol/IMerkleTreeMessageBus.json @@ -0,0 +1,133 @@ +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "activationTime", + "type": "uint256" + } + ], + "name": "addStateRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + } + ], + "name": "disableStateRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "message", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "verifyMessageInclusion", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "internalType": "struct Structs.ValueTransferMessage", + "name": "message", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "verifyValueTransferInclusion", + "outputs": [], + "stateMutability": "view", + "type": "function" + } +] diff --git a/contracts/exported/src/messaging/IMessageBus.sol/IMessageBus.json b/contracts/exported/src/messaging/IMessageBus.sol/IMessageBus.json new file mode 100644 index 0000000000..9053d4d193 --- /dev/null +++ b/contracts/exported/src/messaging/IMessageBus.sol/IMessageBus.json @@ -0,0 +1,311 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "name": "LogMessagePublished", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "name": "ValueTransfer", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + } + ], + "name": "getMessageTimeOfFinality", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "name": "publishMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "receiveValueFromL2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "retrieveAllFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendValueToL2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "finalAfterTimestamp", + "type": "uint256" + } + ], + "name": "storeCrossChainMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + } + ], + "name": "verifyMessageFinalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/contracts/exported/src/messaging/IValueBus.sol/IValueBus.json b/contracts/exported/src/messaging/IValueBus.sol/IValueBus.json new file mode 100644 index 0000000000..9053654bcf --- /dev/null +++ b/contracts/exported/src/messaging/IValueBus.sol/IValueBus.json @@ -0,0 +1,16 @@ +[ + { + "inputs": [], + "name": "retrieveValue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "sendValue", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin b/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin new file mode 100644 index 0000000000..2ccc8eac5c --- /dev/null +++ b/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61180f806100a56000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f1461030e578063b6aed0cb1461032e578063e138a8d21461034e578063f2fde38b1461036e57610155565b80639730886d1461029557806399a3ad21146102b5578063b1454caa146102d557610155565b8063346633fb116100bb578063346633fb1461022557806336d2da9014610238578063715018a6146102585780638da5cb5b1461026d57610155565b80630fcfbd11146101a25780630fe9188e146101d557806333a88c72146101f557610155565b36610155576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b3480156101ae57600080fd5b506101c26101bd366004610f78565b61038e565b6040519081526020015b60405180910390f35b3480156101e157600080fd5b506101536101f0366004610fad565b610428565b34801561020157600080fd5b50610215610210366004610f78565b61049e565b60405190151581526020016101cc565b610153610233366004610fdb565b6104f1565b34801561024457600080fd5b50610153610253366004611007565b6105d4565b34801561026457600080fd5b50610153610683565b34801561027957600080fd5b506000546040516001600160a01b0390911681526020016101cc565b3480156102a157600080fd5b506101536102b0366004611024565b610697565b3480156102c157600080fd5b506101536102d0366004610fdb565b6107e9565b3480156102e157600080fd5b506102f56102f036600461109a565b610899565b60405167ffffffffffffffff90911681526020016101cc565b34801561031a57600080fd5b50610153610329366004611193565b6108f2565b34801561033a57600080fd5b506101536103493660046111f5565b610af4565b34801561035a57600080fd5b50610153610369366004611217565b610b90565b34801561037a57600080fd5b50610153610389366004611007565b610d70565b600080826040516020016103a291906112c6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806104215760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d69747465646044820152601760f91b6064820152608401610199565b9392505050565b610430610dc7565b600081815260046020526040812054900361048d5760405162461bcd60e51b815260206004820152601a60248201527f537461746520726f6f7420646f6573206e6f742065786973742e0000000000006044820152606401610199565b600090815260046020526040812055565b600080826040516020016104b291906112c6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104e95750428111155b949350505050565b60003411801561050057508034145b6105725760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610199565b600061057d33610e0d565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6105dc610dc7565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b505090508061067f5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b5050565b61068b610dc7565b6106956000610e6b565b565b61069f610dc7565b60006106ab82426113c7565b90506000836040516020016106c091906112c6565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561075b5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610199565b600081815260016020908152604082208490556002919061077e90870187611007565b6001600160a01b0316815260208101919091526040016000908120906107aa60808701606088016113da565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107e182826115a8565b505050505050565b6107f1610dc7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461083e576040519150601f19603f3d011682016040523d82523d6000602084013e610843565b606091505b50509050806108945760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b505050565b60006108a433610e0d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516108e197969594939291906116c2565b60405180910390a195945050505050565b60008181526004602052604081205490036109625760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b6000818152600460205260409020544210156109ca5760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b6000846040516020016109dd9190611722565b60408051601f198184030181528282528051602091820120908301829052600160608401527f760000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610a7b84848484604051602001610a6091815260200190565b60405160208183030381529060405280519060200120610ec8565b610aed5760405162461bcd60e51b815260206004820152603360248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7560448201527f65207472616e73666572206d6573736167652e000000000000000000000000006064820152608401610199565b5050505050565b610afc610dc7565b60008281526004602052604090205415610b7e5760405162461bcd60e51b815260206004820152602560248201527f526f6f7420616c726561647920616464656420746f20746865206d657373616760448201527f65206275730000000000000000000000000000000000000000000000000000006064820152608401610199565b60009182526004602052604090912055565b6000818152600460205260408120549003610c005760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b600081815260046020526040902054421015610c685760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b600084604051602001610c7b91906112c6565b60408051601f198184030181528282528051602091820120908301829052600160608401527f6d0000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610cfe84848484604051602001610a6091815260200190565b610aed5760405162461bcd60e51b815260206004820152603060248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7360448201527f7320636861696e206d6573736167652e000000000000000000000000000000006064820152608401610199565b610d78610dc7565b6001600160a01b038116610dbb576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610199565b610dc481610e6b565b50565b6000546001600160a01b03163314610695576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610199565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610e408385611782565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ed6868685610ee0565b1495945050505050565b600081815b84811015610f2357610f0f82878784818110610f0357610f036117aa565b90506020020135610f2c565b915080610f1b816117c0565b915050610ee5565b50949350505050565b6000818310610f48576000828152602084905260409020610f57565b60008381526020839052604090205b90505b92915050565b600060c08284031215610f7257600080fd5b50919050565b600060208284031215610f8a57600080fd5b813567ffffffffffffffff811115610fa157600080fd5b6104e984828501610f60565b600060208284031215610fbf57600080fd5b5035919050565b6001600160a01b0381168114610dc457600080fd5b60008060408385031215610fee57600080fd5b8235610ff981610fc6565b946020939093013593505050565b60006020828403121561101957600080fd5b813561042181610fc6565b6000806040838503121561103757600080fd5b823567ffffffffffffffff81111561104e57600080fd5b61105a85828601610f60565b95602094909401359450505050565b63ffffffff81168114610dc457600080fd5b60ff81168114610dc457600080fd5b80356110958161107b565b919050565b6000806000806000608086880312156110b257600080fd5b85356110bd81611069565b945060208601356110cd81611069565b9350604086013567ffffffffffffffff808211156110ea57600080fd5b818801915088601f8301126110fe57600080fd5b81358181111561110d57600080fd5b89602082850101111561111f57600080fd5b60208301955080945050505060608601356111398161107b565b809150509295509295909350565b60008083601f84011261115957600080fd5b50813567ffffffffffffffff81111561117157600080fd5b6020830191508360208260051b850101111561118c57600080fd5b9250929050565b60008060008084860360c08112156111aa57600080fd5b60808112156111b857600080fd5b50849350608085013567ffffffffffffffff8111156111d657600080fd5b6111e287828801611147565b9598909750949560a00135949350505050565b6000806040838503121561120857600080fd5b50508035926020909101359150565b6000806000806060858703121561122d57600080fd5b843567ffffffffffffffff8082111561124557600080fd5b61125188838901610f60565b9550602087013591508082111561126757600080fd5b5061127487828801611147565b9598909750949560400135949350505050565b67ffffffffffffffff81168114610dc457600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600082356112d781610fc6565b6001600160a01b03811660208401525060208301356112f581611287565b67ffffffffffffffff80821660408501526040850135915061131682611069565b63ffffffff80831660608601526060860135925061133383611069565b80831660808601525060808501359150601e1985360301821261135557600080fd5b602091850191820191358181111561136c57600080fd5b80360383131561137b57600080fd5b60c060a086015261139060e08601828561129d565b925050506113a060a0850161108a565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f5a57610f5a6113b1565b6000602082840312156113ec57600080fd5b813561042181611069565b60008135610f5a81611069565b6000808335601e1984360301811261141b57600080fd5b83018035915067ffffffffffffffff82111561143657600080fd5b60200191503681900382131561118c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061147557607f821691505b602082108103610f7257634e487b7160e01b600052602260045260246000fd5b601f82111561089457600081815260208120601f850160051c810160208610156114bc5750805b601f850160051c820191505b818110156107e1578281556001016114c8565b67ffffffffffffffff8311156114f3576114f361144b565b611507836115018354611461565b83611495565b6000601f84116001811461153b57600085156115235750838201355b600019600387901b1c1916600186901b178355610aed565b600083815260209020601f19861690835b8281101561156c578685013582556020948501946001909201910161154c565b50868210156115895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135610f5a8161107b565b81356115b381610fc6565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356115eb81611287565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061164983611069565b921760e09190911b909116178155611681611666606084016113f7565b6001830163ffffffff821663ffffffff198254161781555050565b61168e6080830183611404565b61169c8183600286016114db565b505061067f6116ad60a0840161159b565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261170b60c08301858761129d565b905060ff831660a083015298975050505050505050565b60808101823561173181610fc6565b6001600160a01b03908116835260208401359061174d82610fc6565b16602083015260408381013590830152606083013561176b81611287565b67ffffffffffffffff811660608401525092915050565b67ffffffffffffffff8181168382160190808211156117a3576117a36113b1565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016117d2576117d26113b1565b506001019056fea264697066735822122078bebc469f5cbd8c097a1657385a1d8552a3feee7913c0a4f7f5badba2928b8764736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.json b/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.json new file mode 100644 index 0000000000..c23ddc2777 --- /dev/null +++ b/contracts/exported/src/messaging/MerkleTreeMessageBus.sol/MerkleTreeMessageBus.json @@ -0,0 +1,529 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "name": "LogMessagePublished", + "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": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "name": "ValueTransfer", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "activationTime", + "type": "uint256" + } + ], + "name": "addStateRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "stateRoot", + "type": "bytes32" + } + ], + "name": "disableStateRoot", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + } + ], + "name": "getMessageTimeOfFinality", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "name": "publishMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "receiveValueFromL2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "retrieveAllFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendValueToL2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "finalAfterTimestamp", + "type": "uint256" + } + ], + "name": "storeCrossChainMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + } + ], + "name": "verifyMessageFinalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "message", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "verifyMessageInclusion", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "internalType": "struct Structs.ValueTransferMessage", + "name": "message", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "verifyValueTransferInclusion", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/contracts/exported/src/messaging/MessageBus.sol/MessageBus.bin b/contracts/exported/src/messaging/MessageBus.sol/MessageBus.bin new file mode 100644 index 0000000000..b1a699012c --- /dev/null +++ b/contracts/exported/src/messaging/MessageBus.sol/MessageBus.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611019806100a56000396000f3fe6080604052600436106100b55760003560e01c80638da5cb5b1161006957806399a3ad211161004e57806399a3ad2114610269578063b1454caa14610289578063f2fde38b146102c257610129565b80638da5cb5b146102215780639730886d1461024957610129565b8063346633fb1161009a578063346633fb146101d957806336d2da90146101ec578063715018a61461020c57610129565b80630fcfbd111461017657806333a88c72146101a957610129565b36610129576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561011357600080fd5b505af1158015610127573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b34801561018257600080fd5b5061019661019136600461095c565b6102e2565b6040519081526020015b60405180910390f35b3480156101b557600080fd5b506101c96101c436600461095c565b610398565b60405190151581526020016101a0565b6101276101e73660046109a6565b6103eb565b3480156101f857600080fd5b506101276102073660046109d2565b6104ce565b34801561021857600080fd5b5061012761057d565b34801561022d57600080fd5b506000546040516001600160a01b0390911681526020016101a0565b34801561025557600080fd5b506101276102643660046109ef565b610591565b34801561027557600080fd5b506101276102843660046109a6565b6106e3565b34801561029557600080fd5b506102a96102a4366004610a65565b610793565b60405167ffffffffffffffff90911681526020016101a0565b3480156102ce57600080fd5b506101276102dd3660046109d2565b6107ec565b600080826040516020016102f69190610b51565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806103915760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d697474656460448201527f2e00000000000000000000000000000000000000000000000000000000000000606482015260840161016d565b9392505050565b600080826040516020016103ac9190610b51565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906103e35750428111155b949350505050565b6000341180156103fa57508034145b61046c5760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e6720457468657200000000000000000000000000000000606482015260840161016d565b600061047733610843565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6104d66108a1565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610523576040519150601f19603f3d011682016040523d82523d6000602084013e610528565b606091505b50509050806105795760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c7565000000000000000000000000604482015260640161016d565b5050565b6105856108a1565b61058f60006108e7565b565b6105996108a1565b60006105a58242610c52565b90506000836040516020016105ba9190610b51565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150156106555760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f2100000000000000000000000000000000000000000000000000000000000000606482015260840161016d565b6000818152600160209081526040822084905560029190610678908701876109d2565b6001600160a01b0316815260208101919091526040016000908120906106a46080870160608801610c6b565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016106db8282610e41565b505050505050565b6106eb6108a1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610738576040519150601f19603f3d011682016040523d82523d6000602084013e61073d565b606091505b505090508061078e5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c7565000000000000000000000000604482015260640161016d565b505050565b600061079e33610843565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516107db9796959493929190610f5b565b60405180910390a195945050505050565b6107f46108a1565b6001600160a01b038116610837576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526000600482015260240161016d565b610840816108e7565b50565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff1691600191906108768385610fbb565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b6000546001600160a01b0316331461058f576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161016d565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060c0828403121561095657600080fd5b50919050565b60006020828403121561096e57600080fd5b813567ffffffffffffffff81111561098557600080fd5b6103e384828501610944565b6001600160a01b038116811461084057600080fd5b600080604083850312156109b957600080fd5b82356109c481610991565b946020939093013593505050565b6000602082840312156109e457600080fd5b813561039181610991565b60008060408385031215610a0257600080fd5b823567ffffffffffffffff811115610a1957600080fd5b610a2585828601610944565b95602094909401359450505050565b63ffffffff8116811461084057600080fd5b60ff8116811461084057600080fd5b8035610a6081610a46565b919050565b600080600080600060808688031215610a7d57600080fd5b8535610a8881610a34565b94506020860135610a9881610a34565b9350604086013567ffffffffffffffff80821115610ab557600080fd5b818801915088601f830112610ac957600080fd5b813581811115610ad857600080fd5b896020828501011115610aea57600080fd5b6020830195508094505050506060860135610b0481610a46565b809150509295509295909350565b67ffffffffffffffff8116811461084057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260008235610b6281610991565b6001600160a01b0381166020840152506020830135610b8081610b12565b67ffffffffffffffff808216604085015260408501359150610ba182610a34565b63ffffffff808316606086015260608601359250610bbe83610a34565b80831660808601525060808501359150601e19853603018212610be057600080fd5b6020918501918201913581811115610bf757600080fd5b803603831315610c0657600080fd5b60c060a0860152610c1b60e086018285610b28565b92505050610c2b60a08501610a55565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610c6557610c65610c3c565b92915050565b600060208284031215610c7d57600080fd5b813561039181610a34565b60008135610c6581610a34565b6000808335601e19843603018112610cac57600080fd5b83018035915067ffffffffffffffff821115610cc757600080fd5b602001915036819003821315610cdc57600080fd5b9250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680610d0d57607f821691505b60208210810361095657634e487b7160e01b600052602260045260246000fd5b601f82111561078e57600081815260208120601f850160051c81016020861015610d545750805b601f850160051c820191505b818110156106db57828155600101610d60565b67ffffffffffffffff831115610d8b57610d8b610ce3565b610d9f83610d998354610cf9565b83610d2d565b6000601f841160018114610dd35760008515610dbb5750838201355b600019600387901b1c1916600186901b178355610e2d565b600083815260209020601f19861690835b82811015610e045786850135825560209485019460019092019101610de4565b5086821015610e215760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60008135610c6581610a46565b8135610e4c81610991565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff1982161783556020840135610e8481610b12565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff0000000000000000000000000000000000000000000000000000000081848285161717855560408601359250610ee283610a34565b921760e09190911b909116178155610f1a610eff60608401610c88565b6001830163ffffffff821663ffffffff198254161781555050565b610f276080830183610c95565b610f35818360028601610d73565b5050610579610f4660a08401610e34565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c06080830152610fa460c083018587610b28565b905060ff831660a083015298975050505050505050565b67ffffffffffffffff818116838216019080821115610fdc57610fdc610c3c565b509291505056fea2646970667358221220efbb193a17e94268ef3d54233f20a35c5964e4fe56738c397d9e8b45bcd3d99e64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/messaging/MessageBus.sol/MessageBus.json b/contracts/exported/src/messaging/MessageBus.sol/MessageBus.json new file mode 100644 index 0000000000..8dc127bbb2 --- /dev/null +++ b/contracts/exported/src/messaging/MessageBus.sol/MessageBus.json @@ -0,0 +1,398 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "name": "LogMessagePublished", + "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": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "name": "ValueTransfer", + "type": "event" + }, + { + "stateMutability": "payable", + "type": "fallback" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + } + ], + "name": "getMessageTimeOfFinality", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "name": "publishMessage", + "outputs": [ + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "receiveValueFromL2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "retrieveAllFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendValueToL2", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "finalAfterTimestamp", + "type": "uint256" + } + ], + "name": "storeCrossChainMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "crossChainMessage", + "type": "tuple" + } + ], + "name": "verifyMessageFinalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } +] diff --git a/contracts/exported/src/messaging/messenger/CrossChainEnabledObscuro.sol/CrossChainEnabledObscuro.json b/contracts/exported/src/messaging/messenger/CrossChainEnabledObscuro.sol/CrossChainEnabledObscuro.json new file mode 100644 index 0000000000..b3a80c510b --- /dev/null +++ b/contracts/exported/src/messaging/messenger/CrossChainEnabledObscuro.sol/CrossChainEnabledObscuro.json @@ -0,0 +1,38 @@ +[ + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messengerAddress", + "type": "address" + } + ], + "name": "configure", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/messaging/messenger/CrossChainMessenger.sol/CrossChainMessenger.bin b/contracts/exported/src/messaging/messenger/CrossChainMessenger.sol/CrossChainMessenger.bin new file mode 100644 index 0000000000..1d3982cd5c --- /dev/null +++ b/contracts/exported/src/messaging/messenger/CrossChainMessenger.sol/CrossChainMessenger.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50610db9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c80639b7cf1ee116100505780639b7cf1ee146100e0578063a1a227fa146100f3578063c4d66de81461010457600080fd5b80630671b22e146100775780635b76f28b1461008c57806363012de5146100b5575b600080fd5b61008a6100853660046107ab565b610117565b005b61009f61009a366004610867565b61021c565b6040516100ac919061093a565b60405180910390f35b6001546100c8906001600160a01b031681565b6040516001600160a01b0390911681526020016100ac565b61008a6100ee366004610954565b61029c565b6000546001600160a01b03166100c8565b61008a610112366004610991565b610392565b610123848484846104ed565b6101306020850185610991565b600180546001600160a01b0319166001600160a01b0392909216919091179055600061015f60808601866109ac565b81019061016c9190610a83565b905060008082600001516001600160a01b03165a84602001516040516101929190610b57565b60006040518083038160008787f1925050503d80600081146101d0576040519150601f19603f3d011682016040523d82523d6000602084013e6101d5565b606091505b509150915081610203578060405163a5fa8d2b60e01b81526004016101fa919061093a565b60405180910390fd5b5050600180546001600160a01b03191690555050505050565b60606040518060600160405280856001600160a01b0316815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920182905250938552505050602091820152604051610284929101610b73565b60405160208183030381529060405290509392505050565b6102a581610616565b6102b26020820182610991565b600180546001600160a01b0319166001600160a01b039290921691909117905560006102e160808301836109ac565b8101906102ee9190610a83565b905060008082600001516001600160a01b03165a84602001516040516103149190610b57565b60006040518083038160008787f1925050503d8060008114610352576040519150601f19603f3d011682016040523d82523d6000602084013e610357565b606091505b50915091508161037c578060405163a5fa8d2b60e01b81526004016101fa919061093a565b5050600180546001600160a01b03191690555050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156103dd5750825b905060008267ffffffffffffffff1660011480156103fa5750303b155b905081158015610408575080155b1561043f576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561047357845468ff00000000000000001916680100000000000000001785555b600080546001600160a01b0388166001600160a01b03199182161790915560018054909116905583156104e557845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b6000546040517fe138a8d20000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063e138a8d29061053c908790879087908790600401610ce2565b60006040518083038186803b15801561055457600080fd5b505afa158015610568573d6000803e3d6000fd5b5050505060008460405160200161057f9190610d4e565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156105f75760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e0000000000000060448201526064016101fa565b6000908152600260205260409020805460ff1916600117905550505050565b6000546040517f33a88c720000000000000000000000000000000000000000000000000000000081526001600160a01b03909116906333a88c729061065f908490600401610d4e565b602060405180830381865afa15801561067c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a09190610d61565b6106ec5760405162461bcd60e51b815260206004820152601f60248201527f4d657373616765206e6f7420666f756e64206f722066696e616c697a65642e0060448201526064016101fa565b6000816040516020016106ff9190610d4e565b60408051601f1981840301815291815281516020928301206000818152600290935291205490915060ff16156107775760405162461bcd60e51b815260206004820152601960248201527f4d65737361676520616c726561647920636f6e73756d65642e0000000000000060448201526064016101fa565b6000908152600260205260409020805460ff1916600117905550565b600060c082840312156107a557600080fd5b50919050565b600080600080606085870312156107c157600080fd5b843567ffffffffffffffff808211156107d957600080fd5b6107e588838901610793565b955060208701359150808211156107fb57600080fd5b818701915087601f83011261080f57600080fd5b81358181111561081e57600080fd5b8860208260051b850101111561083357600080fd5b95986020929092019750949560400135945092505050565b80356001600160a01b038116811461086257600080fd5b919050565b60008060006040848603121561087c57600080fd5b6108858461084b565b9250602084013567ffffffffffffffff808211156108a257600080fd5b818601915086601f8301126108b657600080fd5b8135818111156108c557600080fd5b8760208285010111156108d757600080fd5b6020830194508093505050509250925092565b60005b838110156109055781810151838201526020016108ed565b50506000910152565b600081518084526109268160208601602086016108ea565b601f01601f19169290920160200192915050565b60208152600061094d602083018461090e565b9392505050565b60006020828403121561096657600080fd5b813567ffffffffffffffff81111561097d57600080fd5b61098984828501610793565b949350505050565b6000602082840312156109a357600080fd5b61094d8261084b565b6000808335601e198436030181126109c357600080fd5b83018035915067ffffffffffffffff8211156109de57600080fd5b6020019150368190038213156109f357600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff81118282101715610a4c57610a4c6109fa565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610a7b57610a7b6109fa565b604052919050565b60006020808385031215610a9657600080fd5b823567ffffffffffffffff80821115610aae57600080fd5b9084019060608287031215610ac257600080fd5b610aca610a29565b610ad38361084b565b81528383013582811115610ae657600080fd5b8301601f81018813610af757600080fd5b803583811115610b0957610b096109fa565b610b1b601f8201601f19168701610a52565b93508084528886828401011115610b3157600080fd5b808683018786013760009084018601525092830152604090810135908201529392505050565b60008251610b698184602087016108ea565b9190910192915050565b602081526001600160a01b0382511660208201526000602083015160606040840152610ba2608084018261090e565b9050604084015160608401528091505092915050565b803563ffffffff8116811461086257600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b803560ff8116811461086257600080fd5b6001600160a01b03610c178261084b565b1682526000602082013567ffffffffffffffff808216808314610c3957600080fd5b6020860152610c4a60408501610bb8565b915063ffffffff808316604087015280610c6660608701610bb8565b1660608701525060808401359150601e19843603018212610c8657600080fd5b6020918401918201913581811115610c9d57600080fd5b803603831315610cac57600080fd5b60c06080870152610cc160c087018285610bcc565b92505050610cd160a08401610bf5565b60ff811660a0860152509392505050565b606081526000610cf56060830187610c06565b82810360208401528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115610d2d57600080fd5b8460051b808760208401376040939093019390935250016020019392505050565b60208152600061094d6020830184610c06565b600060208284031215610d7357600080fd5b8151801515811461094d57600080fdfea2646970667358221220bfa77a9cb7a9b7927e0c62d2b46c43cd4c752d413eaf17cc3755e9b3831915e564736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/messaging/messenger/CrossChainMessenger.sol/CrossChainMessenger.json b/contracts/exported/src/messaging/messenger/CrossChainMessenger.sol/CrossChainMessenger.json new file mode 100644 index 0000000000..521bf15675 --- /dev/null +++ b/contracts/exported/src/messaging/messenger/CrossChainMessenger.sol/CrossChainMessenger.json @@ -0,0 +1,199 @@ +[ + { + "inputs": [ + { + "internalType": "bytes", + "name": "error", + "type": "bytes" + } + ], + "name": "CallFailed", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "inputs": [], + "name": "crossChainSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + } + ], + "name": "encodeCall", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "messageBusAddr", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "messageBus", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "message", + "type": "tuple" + } + ], + "name": "relayMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "message", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "proof", + "type": "bytes32[]" + }, + { + "internalType": "bytes32", + "name": "root", + "type": "bytes32" + } + ], + "name": "relayMessageWithProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/messaging/messenger/ICrossChainMessenger.sol/ICrossChainMessenger.json b/contracts/exported/src/messaging/messenger/ICrossChainMessenger.sol/ICrossChainMessenger.json new file mode 100644 index 0000000000..3fa46fd73a --- /dev/null +++ b/contracts/exported/src/messaging/messenger/ICrossChainMessenger.sol/ICrossChainMessenger.json @@ -0,0 +1,73 @@ +[ + { + "inputs": [], + "name": "crossChainSender", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "messageBus", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint64", + "name": "sequence", + "type": "uint64" + }, + { + "internalType": "uint32", + "name": "nonce", + "type": "uint32" + }, + { + "internalType": "uint32", + "name": "topic", + "type": "uint32" + }, + { + "internalType": "bytes", + "name": "payload", + "type": "bytes" + }, + { + "internalType": "uint8", + "name": "consistencyLevel", + "type": "uint8" + } + ], + "internalType": "struct Structs.CrossChainMessage", + "name": "message", + "type": "tuple" + } + ], + "name": "relayMessage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/exported/src/testing/GasConsumerBalance.sol/GasConsumerBalance.bin b/contracts/exported/src/testing/GasConsumerBalance.sol/GasConsumerBalance.bin new file mode 100644 index 0000000000..c59594ad97 --- /dev/null +++ b/contracts/exported/src/testing/GasConsumerBalance.sol/GasConsumerBalance.bin @@ -0,0 +1 @@ +608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b3806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806373cc802a1461005157806383197ef01461009b5780638da5cb5b146100a3578063c1cfb99a14610099575b600080fd5b61009961005f36600461014d565b600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b005b6100996100d2565b6000546100b6906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6000546001600160a01b0316331461014a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f596f7520617265206e6f7420746865206f776e65720000000000000000000000604482015260640160405180910390fd5b30ff5b60006020828403121561015f57600080fd5b81356001600160a01b038116811461017657600080fd5b939250505056fea264697066735822122028e65924c674b360c7e0fc6c4d9fb70e74b16d18a3a462b15e37d5b51b9b929b64736f6c63430008140033 \ No newline at end of file diff --git a/contracts/exported/src/testing/GasConsumerBalance.sol/GasConsumerBalance.json b/contracts/exported/src/testing/GasConsumerBalance.sol/GasConsumerBalance.json new file mode 100644 index 0000000000..90567f0054 --- /dev/null +++ b/contracts/exported/src/testing/GasConsumerBalance.sol/GasConsumerBalance.json @@ -0,0 +1,47 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "destroy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "get_balance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + } + ], + "name": "resetOwner", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/contracts/generated/ManagementContract/ManagementContract.go b/contracts/generated/ManagementContract/ManagementContract.go index 3c44d39893..4fe5349e79 100644 --- a/contracts/generated/ManagementContract/ManagementContract.go +++ b/contracts/generated/ManagementContract/ManagementContract.go @@ -61,8 +61,8 @@ type StructsValueTransferMessage struct { // ManagementContractMetaData contains all meta data concerning the ManagementContract contract. var ManagementContractMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"ImportantContractAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"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\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"RollupAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveRevoked\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"internalType\":\"string\",\"name\":\"_rollupData\",\"type\":\"string\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"internalType\":\"structStructs.ValueTransferMessage\",\"name\":\"_msg\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"ExtractNativeValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetImportantContractKeys\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetRollupByNumber\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetUniqueForkID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"GrantSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclaveID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"IsSequencerEnclave\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"RevokeSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetImportantContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_lastBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"rollupNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"forkID\",\"type\":\"bytes32\"}],\"name\":\"addCrossChainMessagesRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"importantContractAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"importantContractKeys\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"}],\"name\":\"isBundleAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isBundleSaved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isWithdrawalSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleMessageBus\",\"outputs\":[{\"internalType\":\"contractIMerkleTreeMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6143c980620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c8063728109961162000119578063a1a227fa11620000af578063db5d91b1116200007a578063db5d91b114620004f1578063e34fbfc81462000520578063e874eb201462000535578063f2fde38b146200054957600080fd5b8063a1a227fa146200049e578063a4ab2faa14620004b2578063a52f433c14620004c9578063d4fab88714620004da57600080fd5b80638415482611620000f057806384154826146200040a57806387059edb14620004305780638da5cb5b146200044757806398077e86146200047857600080fd5b80637281099614620003cf5780638129fc1c14620003d95780638236a7ba14620003e357600080fd5b8063440c953b116200019b57806368e10383116200016657806368e10383146200037e5780636a30d26c14620003955780636b9707d614620003ae578063715018a614620003c557600080fd5b8063440c953b146200031f5780634766573814620003295780635371a2161462000340578063568699c8146200035757600080fd5b80632c77c81f11620001dc5780632c77c81f14620002525780632f0cb9e314620002695780633e60a22f14620002a057806343348b2f14620002f057600080fd5b80620ddd27146200020557806303e72e481462000222578063073b6ef3146200023b575b600080fd5b6200020f600e5481565b6040519081526020015b60405180910390f35b620002396200023336600462001eb5565b62000560565b005b620002396200024c36600462002000565b62000673565b62000239620002633660046200209d565b62000906565b6200028f6200027a36600462002140565b600c6020526000908152604090205460ff1681565b604051901515815260200162000219565b620002d7620002b13660046200215a565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b03909116815260200162000219565b6200028f620003013660046200219b565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b620002396200033a3660046200219b565b62000a76565b6200023962000351366004620021c0565b62000b46565b6200036e6200036836600462002140565b62000d4f565b60405162000219929190620022e3565b620002396200038f366004620022fe565b62000da8565b6200039f62000e95565b60405162000219919062002388565b62000239620003bf3660046200219b565b62000f78565b620002396200103e565b6200023962001056565b62000239620010da565b620003fa620003f436600462002140565b620012be565b60405162000219929190620023ee565b6200028f6200041b36600462002140565b600d6020526000908152604090205460ff1681565b620003fa6200044136600462002140565b620013ae565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002d7565b6200048f6200048936600462002140565b62001428565b6040516200021991906200240b565b600a54620002d7906001600160a01b031681565b6200028f620004c336600462002420565b620014dd565b600454610100900460ff166200028f565b62000239620004eb36600462002459565b6200156e565b6200028f620005023660046200219b565b6001600160a01b031660009081526001602052604090205460ff1690565b620002396200053136600462002504565b5050565b600b54620002d7906001600160a01b031681565b620002396200055a3660046200219b565b62001701565b6200056a6200175e565b60006001600160a01b03166003836040516200058791906200254a565b908152604051908190036020019020546001600160a01b031603620005e657600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005e48382620025f7565b505b80600383604051620005f991906200254a565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb590620006679084908490620026c4565b60405180910390a15050565b6000828152600860205260409020548114620006d65760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420666f726b494400000000000000000000000000000000000060448201526064015b60405180910390fd5b60006200074889898989604051602001620006f59493929190620026f1565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017d592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007b55760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b600e8990556000805b8751811015620008e157600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007f457620007f46200276d565b6020026020010151620008079062002783565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152426024820152604401600060405180830381600087803b1580156200085f57600080fd5b505af115801562000874573d6000803e3d6000fd5b50505050818882815181106200088e576200088e6200276d565b6020026020010151620008a19062002783565b6040805160208101939093528201526060016040516020818303038152906040528051906020012091508080620008d890620027be565b915050620007be565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b60006200095885356200091d6020880188620027da565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017d592505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620009c55760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b03811660009081526001602052604090205460ff1662000a2f5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b62000a3a8562001805565b604051853581527fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a58906020015b60405180910390a15050505050565b62000a806200175e565b6001600160a01b03811660009081526020819052604090205460ff1662000aea5760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000b9790879087908790879060040162002884565b60006040518083038186803b15801562000bb057600080fd5b505afa15801562000bc5573d6000803e3d6000fd5b5050505060008460405160200162000bde9190620028ec565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000c585760405162461bcd60e51b815260206004820152601860248201527f7769746864726177616c20616c7265616479207370656e7400000000000000006044820152606401620006cd565b6001600c60008760405160200162000c719190620028ec565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000ccc919089019089016200219b565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528801356024820152604401600060405180830381600087803b15801562000d2f57600080fd5b505af115801562000d44573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000d7b85620013ae565b915091508162000d915760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000e235760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b60048054600160ff1991821681179092556001600160a01b038716600081815260208181526040808320805486168717905585825291829020805490941690941790925590519081527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e760936910162000a67565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000f6f57838290600052602060002001805462000edb9062002568565b80601f016020809104026020016040519081016040528092919081815260200182805462000f099062002568565b801562000f5a5780601f1062000f2e5761010080835404028352916020019162000f5a565b820191906000526020600020905b81548152906001019060200180831162000f3c57829003601f168201915b50505050508152602001906001019062000eb9565b50505050905090565b62000f826200175e565b6001600160a01b03811660009081526001602052604090205460ff1662000fec5760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b47910162000b3b565b620010486200175e565b620010546000620018ba565b565b620010606200175e565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b158015620010bf57600080fd5b505af1158015620010d4573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff16600081158015620011265750825b905060008267ffffffffffffffff166001148015620011445750303b155b90508115801562001153575080155b156200118b576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff191660011785558315620011c057845468ff00000000000000001916680100000000000000001785555b620011cb3362001938565b60006005556001600955604051620011e39062001dc9565b604051809103906000f08015801562001200573d6000803e3d6000fd5b50600b805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b0393909316928317909155600a8054909116821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a18315620012b757845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200162000a67565b5050505050565b6040805160608082018352600080835260208084018390528385018290528582526006815284822085519384019095528454835260018501805492958694939092840191906200130e9062002568565b80601f01602080910402602001604051908101604052809291908181526020018280546200133c9062002568565b80156200138d5780601f1062001361576101008083540402835291602001916200138d565b820191906000526020600020905b8154815290600101906020018083116200136f57829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b604080516060808201835260008083526020830191909152918101829052600083815260076020526040812054908190036200141357505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b6200141e81620012be565b9250925050915091565b600281815481106200143957600080fd5b906000526020600020016000915090508054620014569062002568565b80601f0160208091040260200160405190810160405280929190818152602001828054620014849062002568565b8015620014d55780601f10620014a957610100808354040283529160200191620014d5565b820191906000526020600020905b815481529060010190602001808311620014b757829003601f168201915b505050505081565b600080805b83518110156200155557818482815181106200150257620015026200276d565b6020026020010151620015159062002783565b60408051602081019390935282015260600160405160208183030381529060405280519060200120915080806200154c90620027be565b915050620014e2565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620015ff5760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b8115620016d6576000620016388787866040516020016200162393929190620028fc565b6040516020818303038152906040526200194d565b90506000620016488287620017d5565b9050876001600160a01b0316816001600160a01b031614620016d35760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401620006cd565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b6200170b6200175e565b6001600160a01b03811662001750576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401620006cd565b6200175b81620018ba565b50565b33620017917f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462001054576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401620006cd565b600080600080620017e786866200198c565b925092509250620017f98282620019dd565b50909150505b92915050565b80356000908152600660205260409020819062001823828262002944565b505060095460009081526007602052604090208135908190556200184960014362002a54565b4060405160200162001865929190918252602082015260400190565b60408051601f1981840301815291815281516020928301206009805460009081526008909452918320558054916200189d83620027be565b9190505550600554816040013511156200175b5760400135600555565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200194262001af3565b6200175b8162001b5b565b60006200195b825162001b65565b826040516020016200196f92919062002a6a565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620019ca5760208401516040850151606086015160001a620019bb8882858562001c0c565b955095509550505050620019d6565b50508151600091506002905b9250925092565b6000826003811115620019f457620019f462002ac9565b03620019fe575050565b600182600381111562001a155762001a1562002ac9565b0362001a4d576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111562001a645762001a6462002ac9565b0362001aa0576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b600382600381111562001ab75762001ab762002ac9565b0362000531576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662001054576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200170b62001af3565b6060600062001b748362001ce0565b600101905060008167ffffffffffffffff81111562001b975762001b9762001dd7565b6040519080825280601f01601f19166020018201604052801562001bc2576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001bcc57509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562001c49575060009150600390508262001cd6565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562001c9e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001ccc5750600092506001915082905062001cd6565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001d2a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001d57576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001d7657662386f26fc10000830492506010015b6305f5e100831062001d8f576305f5e100830492506008015b612710831062001da457612710830492506004015b6064831062001db7576064830492506002015b600a8310620017ff5760010192915050565b6118b48062002ae083390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001e195762001e1962001dd7565b604052919050565b600082601f83011262001e3357600080fd5b813567ffffffffffffffff81111562001e505762001e5062001dd7565b62001e65601f8201601f191660200162001ded565b81815284602083860101111562001e7b57600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160a01b038116811462001eb057600080fd5b919050565b6000806040838503121562001ec957600080fd5b823567ffffffffffffffff81111562001ee157600080fd5b62001eef8582860162001e21565b92505062001f006020840162001e98565b90509250929050565b600082601f83011262001f1b57600080fd5b8135602067ffffffffffffffff8083111562001f3b5762001f3b62001dd7565b8260051b62001f4c83820162001ded565b938452858101830193838101908886111562001f6757600080fd5b84880192505b8583101562001fa85782358481111562001f875760008081fd5b62001f978a87838c010162001e21565b835250918401919084019062001f6d565b98975050505050505050565b60008083601f84011262001fc757600080fd5b50813567ffffffffffffffff81111562001fe057600080fd5b60208301915083602082850101111562001ff957600080fd5b9250929050565b60008060008060008060008060e0898b0312156200201d57600080fd5b883597506020890135965060408901359550606089013567ffffffffffffffff808211156200204b57600080fd5b620020598c838d0162001f09565b965060808b01359150808211156200207057600080fd5b506200207f8b828c0162001fb4565b999c989b5096999598969760a08701359660c0013595509350505050565b60008060008060608587031215620020b457600080fd5b843567ffffffffffffffff80821115620020cd57600080fd5b9086019060608289031215620020e257600080fd5b90945060208601359080821115620020f957600080fd5b620021078883890162001fb4565b909550935060408701359150808211156200212157600080fd5b508501602081880312156200213557600080fd5b939692955090935050565b6000602082840312156200215357600080fd5b5035919050565b6000602082840312156200216d57600080fd5b813567ffffffffffffffff8111156200218557600080fd5b620021938482850162001e21565b949350505050565b600060208284031215620021ae57600080fd5b620021b98262001e98565b9392505050565b60008060008084860360c0811215620021d857600080fd5b6080811215620021e757600080fd5b50849350608085013567ffffffffffffffff808211156200220757600080fd5b818701915087601f8301126200221c57600080fd5b8135818111156200222c57600080fd5b8860208260051b85010111156200224257600080fd5b95986020929092019750949560a00135945092505050565b60005b83811015620022775781810151838201526020016200225d565b50506000910152565b600081518084526200229a8160208601602086016200225a565b601f01601f19169290920160200192915050565b805182526000602082015160606020850152620022cf606085018262002280565b604093840151949093019390935250919050565b828152604060208201526000620021936040830184620022ae565b6000806000806000606086880312156200231757600080fd5b620023228662001e98565b9450602086013567ffffffffffffffff808211156200234057600080fd5b6200234e89838a0162001fb4565b909650945060408801359150808211156200236857600080fd5b50620023778882890162001fb4565b969995985093965092949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015620023e157603f19888603018452620023ce85835162002280565b94509285019290850190600101620023af565b5092979650505050505050565b8215158152604060208201526000620021936040830184620022ae565b602081526000620021b9602083018462002280565b6000602082840312156200243357600080fd5b813567ffffffffffffffff8111156200244b57600080fd5b620021938482850162001f09565b600080600080600060a086880312156200247257600080fd5b6200247d8662001e98565b94506200248d6020870162001e98565b9350604086013567ffffffffffffffff80821115620024ab57600080fd5b620024b989838a0162001e21565b94506060880135915080821115620024d057600080fd5b50620024df8882890162001e21565b92505060808601358015158114620024f657600080fd5b809150509295509295909350565b600080602083850312156200251857600080fd5b823567ffffffffffffffff8111156200253057600080fd5b6200253e8582860162001fb4565b90969095509350505050565b600082516200255e8184602087016200225a565b9190910192915050565b600181811c908216806200257d57607f821691505b6020821081036200259e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620025f257600081815260208120601f850160051c81016020861015620025cd5750805b601f850160051c820191505b81811015620025ee57828155600101620025d9565b5050505b505050565b815167ffffffffffffffff81111562002614576200261462001dd7565b6200262c8162002625845462002568565b84620025a4565b602080601f8311600181146200266457600084156200264b5750858301515b600019600386901b1c1916600185901b178555620025ee565b600085815260208120601f198616915b82811015620026955788860151825594840194600190910190840162002674565b5085821015620026b45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000620026d9604083018562002280565b90506001600160a01b03831660208301529392505050565b600060808201868352602086818501528560408501526080606085015281855180845260a08601915060a08160051b870101935082870160005b828110156200275d57609f198887030184526200274a86835162002280565b955092840192908401906001016200272b565b50939a9950505050505050505050565b634e487b7160e01b600052603260045260246000fd5b805160208083015191908110156200259e5760001960209190910360031b1b16919050565b634e487b7160e01b600052601160045260246000fd5b600060018201620027d357620027d3620027a8565b5060010190565b6000808335601e19843603018112620027f257600080fd5b83018035915067ffffffffffffffff8211156200280e57600080fd5b60200191503681900382131562001ff957600080fd5b6001600160a01b0380620028388362001e98565b168352806200284a6020840162001e98565b1660208401525060408101356040830152606081013567ffffffffffffffff81168082146200287857600080fd5b80606085015250505050565b62002890818662002824565b60c060808201528260c082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841115620028cd57600080fd5b8360051b808660e085013760a0830193909352500160e0019392505050565b60808101620017ff828462002824565b60006bffffffffffffffffffffffff19808660601b168352808560601b166014840152508251620029358160288501602087016200225a565b91909101602801949350505050565b813581556001808201602080850135601e198636030181126200296657600080fd5b8501803567ffffffffffffffff8111156200298057600080fd5b80360383830113156200299257600080fd5b620029aa81620029a3865462002568565b86620025a4565b6000601f821160018114620029e35760008315620029ca57508382018501355b600019600385901b1c1916600184901b17865562002a3f565b600086815260209020601f19841690835b8281101562002a1557868501880135825593870193908901908701620029f4565b508482101562002a355760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b81810381811115620017ff57620017ff620027a8565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835162002aa481601a8501602088016200225a565b83519083019062002abd81601a8401602088016200225a565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61180f806100a56000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f1461030e578063b6aed0cb1461032e578063e138a8d21461034e578063f2fde38b1461036e57610155565b80639730886d1461029557806399a3ad21146102b5578063b1454caa146102d557610155565b8063346633fb116100bb578063346633fb1461022557806336d2da9014610238578063715018a6146102585780638da5cb5b1461026d57610155565b80630fcfbd11146101a25780630fe9188e146101d557806333a88c72146101f557610155565b36610155576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b3480156101ae57600080fd5b506101c26101bd366004610f78565b61038e565b6040519081526020015b60405180910390f35b3480156101e157600080fd5b506101536101f0366004610fad565b610428565b34801561020157600080fd5b50610215610210366004610f78565b61049e565b60405190151581526020016101cc565b610153610233366004610fdb565b6104f1565b34801561024457600080fd5b50610153610253366004611007565b6105d4565b34801561026457600080fd5b50610153610683565b34801561027957600080fd5b506000546040516001600160a01b0390911681526020016101cc565b3480156102a157600080fd5b506101536102b0366004611024565b610697565b3480156102c157600080fd5b506101536102d0366004610fdb565b6107e9565b3480156102e157600080fd5b506102f56102f036600461109a565b610899565b60405167ffffffffffffffff90911681526020016101cc565b34801561031a57600080fd5b50610153610329366004611193565b6108f2565b34801561033a57600080fd5b506101536103493660046111f5565b610af4565b34801561035a57600080fd5b50610153610369366004611217565b610b90565b34801561037a57600080fd5b50610153610389366004611007565b610d70565b600080826040516020016103a291906112c6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806104215760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d69747465646044820152601760f91b6064820152608401610199565b9392505050565b610430610dc7565b600081815260046020526040812054900361048d5760405162461bcd60e51b815260206004820152601a60248201527f537461746520726f6f7420646f6573206e6f742065786973742e0000000000006044820152606401610199565b600090815260046020526040812055565b600080826040516020016104b291906112c6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104e95750428111155b949350505050565b60003411801561050057508034145b6105725760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610199565b600061057d33610e0d565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6105dc610dc7565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b505090508061067f5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b5050565b61068b610dc7565b6106956000610e6b565b565b61069f610dc7565b60006106ab82426113c7565b90506000836040516020016106c091906112c6565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561075b5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610199565b600081815260016020908152604082208490556002919061077e90870187611007565b6001600160a01b0316815260208101919091526040016000908120906107aa60808701606088016113da565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107e182826115a8565b505050505050565b6107f1610dc7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461083e576040519150601f19603f3d011682016040523d82523d6000602084013e610843565b606091505b50509050806108945760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b505050565b60006108a433610e0d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516108e197969594939291906116c2565b60405180910390a195945050505050565b60008181526004602052604081205490036109625760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b6000818152600460205260409020544210156109ca5760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b6000846040516020016109dd9190611722565b60408051601f198184030181528282528051602091820120908301829052600160608401527f760000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610a7b84848484604051602001610a6091815260200190565b60405160208183030381529060405280519060200120610ec8565b610aed5760405162461bcd60e51b815260206004820152603360248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7560448201527f65207472616e73666572206d6573736167652e000000000000000000000000006064820152608401610199565b5050505050565b610afc610dc7565b60008281526004602052604090205415610b7e5760405162461bcd60e51b815260206004820152602560248201527f526f6f7420616c726561647920616464656420746f20746865206d657373616760448201527f65206275730000000000000000000000000000000000000000000000000000006064820152608401610199565b60009182526004602052604090912055565b6000818152600460205260408120549003610c005760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b600081815260046020526040902054421015610c685760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b600084604051602001610c7b91906112c6565b60408051601f198184030181528282528051602091820120908301829052600160608401527f6d0000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610cfe84848484604051602001610a6091815260200190565b610aed5760405162461bcd60e51b815260206004820152603060248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7360448201527f7320636861696e206d6573736167652e000000000000000000000000000000006064820152608401610199565b610d78610dc7565b6001600160a01b038116610dbb576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610199565b610dc481610e6b565b50565b6000546001600160a01b03163314610695576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610199565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610e408385611782565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ed6868685610ee0565b1495945050505050565b600081815b84811015610f2357610f0f82878784818110610f0357610f036117aa565b90506020020135610f2c565b915080610f1b816117c0565b915050610ee5565b50949350505050565b6000818310610f48576000828152602084905260409020610f57565b60008381526020839052604090205b90505b92915050565b600060c08284031215610f7257600080fd5b50919050565b600060208284031215610f8a57600080fd5b813567ffffffffffffffff811115610fa157600080fd5b6104e984828501610f60565b600060208284031215610fbf57600080fd5b5035919050565b6001600160a01b0381168114610dc457600080fd5b60008060408385031215610fee57600080fd5b8235610ff981610fc6565b946020939093013593505050565b60006020828403121561101957600080fd5b813561042181610fc6565b6000806040838503121561103757600080fd5b823567ffffffffffffffff81111561104e57600080fd5b61105a85828601610f60565b95602094909401359450505050565b63ffffffff81168114610dc457600080fd5b60ff81168114610dc457600080fd5b80356110958161107b565b919050565b6000806000806000608086880312156110b257600080fd5b85356110bd81611069565b945060208601356110cd81611069565b9350604086013567ffffffffffffffff808211156110ea57600080fd5b818801915088601f8301126110fe57600080fd5b81358181111561110d57600080fd5b89602082850101111561111f57600080fd5b60208301955080945050505060608601356111398161107b565b809150509295509295909350565b60008083601f84011261115957600080fd5b50813567ffffffffffffffff81111561117157600080fd5b6020830191508360208260051b850101111561118c57600080fd5b9250929050565b60008060008084860360c08112156111aa57600080fd5b60808112156111b857600080fd5b50849350608085013567ffffffffffffffff8111156111d657600080fd5b6111e287828801611147565b9598909750949560a00135949350505050565b6000806040838503121561120857600080fd5b50508035926020909101359150565b6000806000806060858703121561122d57600080fd5b843567ffffffffffffffff8082111561124557600080fd5b61125188838901610f60565b9550602087013591508082111561126757600080fd5b5061127487828801611147565b9598909750949560400135949350505050565b67ffffffffffffffff81168114610dc457600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600082356112d781610fc6565b6001600160a01b03811660208401525060208301356112f581611287565b67ffffffffffffffff80821660408501526040850135915061131682611069565b63ffffffff80831660608601526060860135925061133383611069565b80831660808601525060808501359150601e1985360301821261135557600080fd5b602091850191820191358181111561136c57600080fd5b80360383131561137b57600080fd5b60c060a086015261139060e08601828561129d565b925050506113a060a0850161108a565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f5a57610f5a6113b1565b6000602082840312156113ec57600080fd5b813561042181611069565b60008135610f5a81611069565b6000808335601e1984360301811261141b57600080fd5b83018035915067ffffffffffffffff82111561143657600080fd5b60200191503681900382131561118c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061147557607f821691505b602082108103610f7257634e487b7160e01b600052602260045260246000fd5b601f82111561089457600081815260208120601f850160051c810160208610156114bc5750805b601f850160051c820191505b818110156107e1578281556001016114c8565b67ffffffffffffffff8311156114f3576114f361144b565b611507836115018354611461565b83611495565b6000601f84116001811461153b57600085156115235750838201355b600019600387901b1c1916600186901b178355610aed565b600083815260209020601f19861690835b8281101561156c578685013582556020948501946001909201910161154c565b50868210156115895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135610f5a8161107b565b81356115b381610fc6565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356115eb81611287565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061164983611069565b921760e09190911b909116178155611681611666606084016113f7565b6001830163ffffffff821663ffffffff198254161781555050565b61168e6080830183611404565b61169c8183600286016114db565b505061067f6116ad60a0840161159b565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261170b60c08301858761129d565b905060ff831660a083015298975050505050505050565b60808101823561173181610fc6565b6001600160a01b03908116835260208401359061174d82610fc6565b16602083015260408381013590830152606083013561176b81611287565b67ffffffffffffffff811660608401525092915050565b67ffffffffffffffff8181168382160190808211156117a3576117a36113b1565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016117d2576117d26113b1565b506001019056fea264697066735822122078bebc469f5cbd8c097a1657385a1d8552a3feee7913c0a4f7f5badba2928b8764736f6c63430008140033a26469706673582212208cd0e19ba187bd881a9d1e04b630f56d0a1568716b97f0a2bd79fc90ed4b3f3164736f6c63430008140033", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"ImportantContractAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"messageBusAddress\",\"type\":\"address\"}],\"name\":\"LogManagementContractCreated\",\"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\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"RollupAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"enclaveID\",\"type\":\"address\"}],\"name\":\"SequencerEnclaveRevoked\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"r\",\"type\":\"tuple\"},{\"components\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"},{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"topic\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint8\",\"name\":\"consistencyLevel\",\"type\":\"uint8\"}],\"internalType\":\"structStructs.CrossChainMessage[]\",\"name\":\"messages\",\"type\":\"tuple[]\"}],\"internalType\":\"structStructs.HeaderCrossChainData\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"AddRollup\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"Attested\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint64\",\"name\":\"sequence\",\"type\":\"uint64\"}],\"internalType\":\"structStructs.ValueTransferMessage\",\"name\":\"_msg\",\"type\":\"tuple\"},{\"internalType\":\"bytes32[]\",\"name\":\"proof\",\"type\":\"bytes32[]\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"name\":\"ExtractNativeValue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"GetImportantContractKeys\",\"outputs\":[{\"internalType\":\"string[]\",\"name\":\"\",\"type\":\"string[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"rollupHash\",\"type\":\"bytes32\"}],\"name\":\"GetRollupByHash\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetRollupByNumber\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"name\":\"GetUniqueForkID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"Hash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"Signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"LastSequenceNumber\",\"type\":\"uint256\"}],\"internalType\":\"structStructs.MetaRollup\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"GrantSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_enclaveID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_initSecret\",\"type\":\"bytes\"},{\"internalType\":\"string\",\"name\":\"_genesisAttestation\",\"type\":\"string\"}],\"name\":\"InitializeNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"IsSequencerEnclave\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"IsWithdrawalAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"requestReport\",\"type\":\"string\"}],\"name\":\"RequestNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"attesterID\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"requesterID\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"attesterSig\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"responseSecret\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"verifyAttester\",\"type\":\"bool\"}],\"name\":\"RespondNetworkSecret\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RetrieveAllBridgeFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"RevokeSequencerEnclave\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"key\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetImportantContractAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_lastBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"blockHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"blockNum\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"rollupNumber\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"forkID\",\"type\":\"bytes32\"}],\"name\":\"addCrossChainMessagesRoot\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"name\":\"importantContractAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"importantContractKeys\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"crossChainHashes\",\"type\":\"bytes[]\"}],\"name\":\"isBundleAvailable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isBundleSaved\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"name\":\"isWithdrawalSpent\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastBatchSeqNo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"merkleMessageBus\",\"outputs\":[{\"internalType\":\"contractIMerkleTreeMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messageBus\",\"outputs\":[{\"internalType\":\"contractIMessageBus\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5061001a3361001f565b610090565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6143a580620000a06000396000f3fe60806040523480156200001157600080fd5b5060043610620002005760003560e01c80638129fc1c1162000119578063a25eb31c11620000af578063db5d91b1116200007a578063db5d91b114620004f1578063e34fbfc81462000520578063e874eb201462000535578063f2fde38b146200054957600080fd5b8063a25eb31c146200049b578063a4ab2faa14620004b2578063a52f433c14620004c9578063d4fab88714620004da57600080fd5b806387059edb11620000f057806387059edb14620004195780638da5cb5b146200043057806398077e861462000461578063a1a227fa146200048757600080fd5b80638129fc1c14620003c25780638236a7ba14620003cc5780638415482614620003f357600080fd5b806347665738116200019b5780636a30d26c11620001665780636a30d26c146200037e5780636b9707d61462000397578063715018a614620003ae5780637281099614620003b857600080fd5b80634766573814620003125780635371a2161462000329578063568699c8146200034057806368e10383146200036757600080fd5b80632f0cb9e311620001dc5780632f0cb9e314620002525780633e60a22f146200028957806343348b2f14620002d9578063440c953b146200030857600080fd5b80620ddd27146200020557806303e72e481462000222578063073b6ef3146200023b575b600080fd5b6200020f600e5481565b6040519081526020015b60405180910390f35b620002396200023336600462001ebc565b62000560565b005b620002396200024c36600462002007565b62000673565b6200027862000263366004620020a4565b600c6020526000908152604090205460ff1681565b604051901515815260200162000219565b620002c06200029a366004620020be565b80516020818301810180516003825292820191909301209152546001600160a01b031681565b6040516001600160a01b03909116815260200162000219565b62000278620002ea366004620020ff565b6001600160a01b031660009081526020819052604090205460ff1690565b6200020f60055481565b6200023962000323366004620020ff565b62000906565b620002396200033a36600462002124565b620009d6565b6200035762000351366004620020a4565b62000bdf565b6040516200021992919062002247565b620002396200037836600462002262565b62000c38565b6200038862000d2f565b604051620002199190620022ec565b62000239620003a8366004620020ff565b62000e12565b6200023962000ed8565b6200023962000ef0565b6200023962000f74565b620003e3620003dd366004620020a4565b62001158565b6040516200021992919062002352565b6200027862000404366004620020a4565b600d6020526000908152604090205460ff1681565b620003e36200042a366004620020a4565b62001248565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b0316620002c0565b6200047862000472366004620020a4565b620012c2565b6040516200021991906200236f565b600a54620002c0906001600160a01b031681565b62000239620004ac36600462002384565b62001377565b62000278620004c3366004620023fc565b620014e4565b600454610100900460ff1662000278565b62000239620004eb36600462002435565b62001575565b6200027862000502366004620020ff565b6001600160a01b031660009081526001602052604090205460ff1690565b6200023962000531366004620024e0565b5050565b600b54620002c0906001600160a01b031681565b620002396200055a366004620020ff565b62001708565b6200056a62001765565b60006001600160a01b031660038360405162000587919062002526565b908152604051908190036020019020546001600160a01b031603620005e657600280546001810182556000919091527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01620005e48382620025d3565b505b80600383604051620005f9919062002526565b90815260405190819003602001812080546001600160a01b039390931673ffffffffffffffffffffffffffffffffffffffff19909316929092179091557f17b2f9f5748931099ffee882b5b64f4a560b5c55da9b4f4e396dae3bb9f98cb590620006679084908490620026a0565b60405180910390a15050565b6000828152600860205260409020548114620006d65760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420666f726b494400000000000000000000000000000000000060448201526064015b60405180910390fd5b60006200074889898989604051602001620006f59493929190620026cd565b6040516020818303038152906040528051906020012086868080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017dc92505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620007b55760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b600e8990556000805b8751811015620008e157600b5488516001600160a01b039091169063b6aed0cb908a9084908110620007f457620007f462002749565b602002602001015162000807906200275f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526004810191909152426024820152604401600060405180830381600087803b1580156200085f57600080fd5b505af115801562000874573d6000803e3d6000fd5b50505050818882815181106200088e576200088e62002749565b6020026020010151620008a1906200275f565b6040805160208101939093528201526060016040516020818303038152906040528051906020012091508080620008d8906200279a565b915050620007be565b506000908152600d60205260409020805460ff19166001179055505050505050505050565b6200091062001765565b6001600160a01b03811660009081526020819052604090205460ff166200097a5760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020818152604092839020805460ff191690921790915590519182527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a150565b600b546040517fb201246f0000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063b201246f9062000a2790879087908790879060040162002816565b60006040518083038186803b15801562000a4057600080fd5b505afa15801562000a55573d6000803e3d6000fd5b5050505060008460405160200162000a6e91906200287e565b60408051601f1981840301815291815281516020928301206000818152600c90935291205490915060ff161562000ae85760405162461bcd60e51b815260206004820152601860248201527f7769746864726177616c20616c7265616479207370656e7400000000000000006044820152606401620006cd565b6001600c60008760405160200162000b0191906200287e565b60408051808303601f190181529181528151602092830120835282820193909352908201600020805460ff191693151593909317909255600a546001600160a01b0316916399a3ad219162000b5c91908901908901620020ff565b604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301528801356024820152604401600060405180830381600087803b15801562000bbf57600080fd5b505af115801562000bd4573d6000803e3d6000fd5b505050505050505050565b60408051606080820183526000808352602083019190915291810182905260008062000c0b8562001248565b915091508162000c215760009590945092505050565b600094855260086020526040909420549492505050565b60045460ff161562000cb35760405162461bcd60e51b815260206004820152602260248201527f6e6574776f726b2073656372657420616c726561647920696e697469616c697a60448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b60048054600160ff1991821681179092556001600160a01b038716600081815260208181526040808320805486168717905585825291829020805490941690941790925590519081527ffe64c7181f0fc60e300dc02cca368cdfa94d7ca45902de3b9a9d80070e76093691015b60405180910390a15050505050565b60606002805480602002602001604051908101604052809291908181526020016000905b8282101562000e0957838290600052602060002001805462000d759062002544565b80601f016020809104026020016040519081016040528092919081815260200182805462000da39062002544565b801562000df45780601f1062000dc85761010080835404028352916020019162000df4565b820191906000526020600020905b81548152906001019060200180831162000dd657829003601f168201915b50505050508152602001906001019062000d53565b50505050905090565b62000e1c62001765565b6001600160a01b03811660009081526001602052604090205460ff1662000e865760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b6001600160a01b038116600081815260016020908152604091829020805460ff1916905590519182527f0f279980343c7ca542fde9fa5396555068efb5cd560d9cf9c191aa2911079b479101620009cb565b62000ee262001765565b62000eee60006200180c565b565b62000efa62001765565b600a546040517f36d2da900000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03909116906336d2da9090602401600060405180830381600087803b15801562000f5957600080fd5b505af115801562000f6e573d6000803e3d6000fd5b50505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff1660008115801562000fc05750825b905060008267ffffffffffffffff16600114801562000fde5750303b155b90508115801562000fed575080155b1562001025576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b845467ffffffffffffffff1916600117855583156200105a57845468ff00000000000000001916680100000000000000001785555b62001065336200188a565b600060055560016009556040516200107d9062001dd0565b604051809103906000f0801580156200109a573d6000803e3d6000fd5b50600b805473ffffffffffffffffffffffffffffffffffffffff199081166001600160a01b0393909316928317909155600a8054909116821790556040519081527fbd726cf82ac9c3260b1495107182e336e0654b25c10915648c0cc15b2bb72cbf9060200160405180910390a183156200115157845468ff000000000000000019168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200162000d20565b5050505050565b604080516060808201835260008083526020808401839052838501829052858252600681528482208551938401909552845483526001850180549295869493909284019190620011a89062002544565b80601f0160208091040260200160405190810160405280929190818152602001828054620011d69062002544565b8015620012275780601f10620011fb5761010080835404028352916020019162001227565b820191906000526020600020905b8154815290600101906020018083116200120957829003601f168201915b50505091835250506002919091015460209091015280519094149492505050565b60408051606080820183526000808352602083019190915291810182905260008381526007602052604081205490819003620012ad57505060408051606081018252600080825282516020818101855282825283015291810182905290939092509050565b620012b88162001158565b9250925050915091565b60028181548110620012d357600080fd5b906000526020600020016000915090508054620012f09062002544565b80601f01602080910402602001604051908101604052809291908181526020018280546200131e9062002544565b80156200136f5780601f1062001343576101008083540402835291602001916200136f565b820191906000526020600020905b8154815290600101906020018083116200135157829003601f168201915b505050505081565b6000620013c983356200138e60208601866200288e565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250620017dc92505050565b6001600160a01b03811660009081526020819052604090205490915060ff16620014365760405162461bcd60e51b815260206004820152601660248201527f656e636c6176654944206e6f74206174746573746564000000000000000000006044820152606401620006cd565b6001600160a01b03811660009081526001602052604090205460ff16620014a05760405162461bcd60e51b815260206004820152601960248201527f656e636c6176654944206e6f7420612073657175656e636572000000000000006044820152606401620006cd565b620014ab836200189f565b604051833581527fd6555bff8670bd3008dc064c30bb56d6ac7cb14ae801e36146fe4e7c6a504a589060200160405180910390a1505050565b600080805b83518110156200155c578184828151811062001509576200150962002749565b60200260200101516200151c906200275f565b604080516020810193909352820152606001604051602081830303815290604052805190602001209150808062001553906200279a565b915050620014e9565b506000908152600d602052604090205460ff1692915050565b6001600160a01b03851660009081526020819052604090205460ff1680620016065760405162461bcd60e51b815260206004820152602360248201527f726573706f6e64696e67206174746573746572206973206e6f7420617474657360448201527f74656400000000000000000000000000000000000000000000000000000000006064820152608401620006cd565b8115620016dd5760006200163f8787866040516020016200162a93929190620028d8565b60405160208183030381529060405262001954565b905060006200164f8287620017dc565b9050876001600160a01b0316816001600160a01b031614620016da5760405162461bcd60e51b815260206004820152602c60248201527f63616c63756c61746564206164647265737320616e642061747465737465724960448201527f4420646f6e74206d6174636800000000000000000000000000000000000000006064820152608401620006cd565b50505b5050506001600160a01b039091166000908152602081905260409020805460ff191660011790555050565b6200171262001765565b6001600160a01b03811662001757576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401620006cd565b62001762816200180c565b50565b33620017987f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6001600160a01b03161462000eee576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401620006cd565b600080600080620017ee868662001993565b925092509250620018008282620019e4565b50909150505b92915050565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300805473ffffffffffffffffffffffffffffffffffffffff1981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6200189462001afa565b620017628162001b62565b803560009081526006602052604090208190620018bd828262002920565b50506009546000908152600760205260409020813590819055620018e360014362002a30565b40604051602001620018ff929190918252602082015260400190565b60408051601f19818403018152918152815160209283012060098054600090815260089094529183205580549162001937836200279a565b919050555060055481604001351115620017625760400135600555565b600062001962825162001b6c565b826040516020016200197692919062002a46565b604051602081830303815290604052805190602001209050919050565b60008060008351604103620019d15760208401516040850151606086015160001a620019c28882858562001c13565b955095509550505050620019dd565b50508151600091506002905b9250925092565b6000826003811115620019fb57620019fb62002aa5565b0362001a05575050565b600182600381111562001a1c5762001a1c62002aa5565b0362001a54576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600282600381111562001a6b5762001a6b62002aa5565b0362001aa7576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b600382600381111562001abe5762001abe62002aa5565b0362000531576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401620006cd565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff1662000eee576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6200171262001afa565b6060600062001b7b8362001ce7565b600101905060008167ffffffffffffffff81111562001b9e5762001b9e62001dde565b6040519080825280601f01601f19166020018201604052801562001bc9576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508462001bd357509392505050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084111562001c50575060009150600390508262001cdd565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa15801562001ca5573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001cd35750600092506001915082905062001cdd565b9250600091508190505b9450945094915050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831062001d31577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831062001d5e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831062001d7d57662386f26fc10000830492506010015b6305f5e100831062001d96576305f5e100830492506008015b612710831062001dab57612710830492506004015b6064831062001dbe576064830492506002015b600a8310620018065760010192915050565b6118b48062002abc83390190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171562001e205762001e2062001dde565b604052919050565b600082601f83011262001e3a57600080fd5b813567ffffffffffffffff81111562001e575762001e5762001dde565b62001e6c601f8201601f191660200162001df4565b81815284602083860101111562001e8257600080fd5b816020850160208301376000918101602001919091529392505050565b80356001600160a01b038116811462001eb757600080fd5b919050565b6000806040838503121562001ed057600080fd5b823567ffffffffffffffff81111562001ee857600080fd5b62001ef68582860162001e28565b92505062001f076020840162001e9f565b90509250929050565b600082601f83011262001f2257600080fd5b8135602067ffffffffffffffff8083111562001f425762001f4262001dde565b8260051b62001f5383820162001df4565b938452858101830193838101908886111562001f6e57600080fd5b84880192505b8583101562001faf5782358481111562001f8e5760008081fd5b62001f9e8a87838c010162001e28565b835250918401919084019062001f74565b98975050505050505050565b60008083601f84011262001fce57600080fd5b50813567ffffffffffffffff81111562001fe757600080fd5b6020830191508360208285010111156200200057600080fd5b9250929050565b60008060008060008060008060e0898b0312156200202457600080fd5b883597506020890135965060408901359550606089013567ffffffffffffffff808211156200205257600080fd5b620020608c838d0162001f10565b965060808b01359150808211156200207757600080fd5b50620020868b828c0162001fbb565b999c989b5096999598969760a08701359660c0013595509350505050565b600060208284031215620020b757600080fd5b5035919050565b600060208284031215620020d157600080fd5b813567ffffffffffffffff811115620020e957600080fd5b620020f78482850162001e28565b949350505050565b6000602082840312156200211257600080fd5b6200211d8262001e9f565b9392505050565b60008060008084860360c08112156200213c57600080fd5b60808112156200214b57600080fd5b50849350608085013567ffffffffffffffff808211156200216b57600080fd5b818701915087601f8301126200218057600080fd5b8135818111156200219057600080fd5b8860208260051b8501011115620021a657600080fd5b95986020929092019750949560a00135945092505050565b60005b83811015620021db578181015183820152602001620021c1565b50506000910152565b60008151808452620021fe816020860160208601620021be565b601f01601f19169290920160200192915050565b805182526000602082015160606020850152620022336060850182620021e4565b604093840151949093019390935250919050565b828152604060208201526000620020f7604083018462002212565b6000806000806000606086880312156200227b57600080fd5b620022868662001e9f565b9450602086013567ffffffffffffffff80821115620022a457600080fd5b620022b289838a0162001fbb565b90965094506040880135915080821115620022cc57600080fd5b50620022db8882890162001fbb565b969995985093965092949392505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156200234557603f1988860301845262002332858351620021e4565b9450928501929085019060010162002313565b5092979650505050505050565b8215158152604060208201526000620020f7604083018462002212565b6020815260006200211d6020830184620021e4565b600080604083850312156200239857600080fd5b823567ffffffffffffffff80821115620023b157600080fd5b9084019060608287031215620023c657600080fd5b90925060208401359080821115620023dd57600080fd5b50830160208186031215620023f157600080fd5b809150509250929050565b6000602082840312156200240f57600080fd5b813567ffffffffffffffff8111156200242757600080fd5b620020f78482850162001f10565b600080600080600060a086880312156200244e57600080fd5b620024598662001e9f565b9450620024696020870162001e9f565b9350604086013567ffffffffffffffff808211156200248757600080fd5b6200249589838a0162001e28565b94506060880135915080821115620024ac57600080fd5b50620024bb8882890162001e28565b92505060808601358015158114620024d257600080fd5b809150509295509295909350565b60008060208385031215620024f457600080fd5b823567ffffffffffffffff8111156200250c57600080fd5b6200251a8582860162001fbb565b90969095509350505050565b600082516200253a818460208701620021be565b9190910192915050565b600181811c908216806200255957607f821691505b6020821081036200257a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620025ce57600081815260208120601f850160051c81016020861015620025a95750805b601f850160051c820191505b81811015620025ca57828155600101620025b5565b5050505b505050565b815167ffffffffffffffff811115620025f057620025f062001dde565b620026088162002601845462002544565b8462002580565b602080601f831160018114620026405760008415620026275750858301515b600019600386901b1c1916600185901b178555620025ca565b600085815260208120601f198616915b82811015620026715788860151825594840194600190910190840162002650565b5085821015620026905787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000620026b56040830185620021e4565b90506001600160a01b03831660208301529392505050565b600060808201868352602086818501528560408501526080606085015281855180845260a08601915060a08160051b870101935082870160005b828110156200273957609f1988870301845262002726868351620021e4565b9550928401929084019060010162002707565b50939a9950505050505050505050565b634e487b7160e01b600052603260045260246000fd5b805160208083015191908110156200257a5760001960209190910360031b1b16919050565b634e487b7160e01b600052601160045260246000fd5b600060018201620027af57620027af62002784565b5060010190565b6001600160a01b0380620027ca8362001e9f565b16835280620027dc6020840162001e9f565b1660208401525060408101356040830152606081013567ffffffffffffffff81168082146200280a57600080fd5b80606085015250505050565b620028228186620027b6565b60c060808201528260c082015260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8411156200285f57600080fd5b8360051b808660e085013760a0830193909352500160e0019392505050565b60808101620018068284620027b6565b6000808335601e19843603018112620028a657600080fd5b83018035915067ffffffffffffffff821115620028c257600080fd5b6020019150368190038213156200200057600080fd5b60006bffffffffffffffffffffffff19808660601b168352808560601b16601484015250825162002911816028850160208701620021be565b91909101602801949350505050565b813581556001808201602080850135601e198636030181126200294257600080fd5b8501803567ffffffffffffffff8111156200295c57600080fd5b80360383830113156200296e57600080fd5b62002986816200297f865462002544565b8662002580565b6000601f821160018114620029bf5760008315620029a657508382018501355b600019600385901b1c1916600184901b17865562002a1b565b600086815260209020601f19841690835b82811015620029f157868501880135825593870193908901908701620029d0565b508482101562002a115760001960f88660031b161c198785880101351681555b50508683881b0186555b50505050505050604082013560028201555050565b8181038181111562001806576200180662002784565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835162002a8081601a850160208801620021be565b83519083019062002a9981601a840160208801620021be565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fdfe608060405234801561001057600080fd5b50338061003757604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61004081610046565b50610096565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61180f806100a56000396000f3fe6080604052600436106100e15760003560e01c80639730886d1161007f578063b201246f11610059578063b201246f1461030e578063b6aed0cb1461032e578063e138a8d21461034e578063f2fde38b1461036e57610155565b80639730886d1461029557806399a3ad21146102b5578063b1454caa146102d557610155565b8063346633fb116100bb578063346633fb1461022557806336d2da9014610238578063715018a6146102585780638da5cb5b1461026d57610155565b80630fcfbd11146101a25780630fe9188e146101d557806333a88c72146101f557610155565b36610155576040517f346633fb0000000000000000000000000000000000000000000000000000000081523360048201523460248201819052309163346633fb91906044016000604051808303818588803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b005b60405162461bcd60e51b815260206004820152600b60248201527f756e737570706f7274656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b3480156101ae57600080fd5b506101c26101bd366004610f78565b61038e565b6040519081526020015b60405180910390f35b3480156101e157600080fd5b506101536101f0366004610fad565b610428565b34801561020157600080fd5b50610215610210366004610f78565b61049e565b60405190151581526020016101cc565b610153610233366004610fdb565b6104f1565b34801561024457600080fd5b50610153610253366004611007565b6105d4565b34801561026457600080fd5b50610153610683565b34801561027957600080fd5b506000546040516001600160a01b0390911681526020016101cc565b3480156102a157600080fd5b506101536102b0366004611024565b610697565b3480156102c157600080fd5b506101536102d0366004610fdb565b6107e9565b3480156102e157600080fd5b506102f56102f036600461109a565b610899565b60405167ffffffffffffffff90911681526020016101cc565b34801561031a57600080fd5b50610153610329366004611193565b6108f2565b34801561033a57600080fd5b506101536103493660046111f5565b610af4565b34801561035a57600080fd5b50610153610369366004611217565b610b90565b34801561037a57600080fd5b50610153610389366004611007565b610d70565b600080826040516020016103a291906112c6565b60408051601f19818403018152918152815160209283012060008181526001909352912054909150806104215760405162461bcd60e51b815260206004820152602160248201527f54686973206d65737361676520776173206e65766572207375626d69747465646044820152601760f91b6064820152608401610199565b9392505050565b610430610dc7565b600081815260046020526040812054900361048d5760405162461bcd60e51b815260206004820152601a60248201527f537461746520726f6f7420646f6573206e6f742065786973742e0000000000006044820152606401610199565b600090815260046020526040812055565b600080826040516020016104b291906112c6565b60408051601f1981840301815291815281516020928301206000818152600190935291205490915080158015906104e95750428111155b949350505050565b60003411801561050057508034145b6105725760405162461bcd60e51b815260206004820152603060248201527f417474656d7074696e6720746f2073656e642076616c756520776974686f757460448201527f2070726f766964696e67204574686572000000000000000000000000000000006064820152608401610199565b600061057d33610e0d565b6040805134815267ffffffffffffffff831660208201529192506001600160a01b0385169133917f50c536ac33a920f00755865b831d17bf4cff0b2e0345f65b16d52bfc004068b6910160405180910390a3505050565b6105dc610dc7565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610629576040519150601f19603f3d011682016040523d82523d6000602084013e61062e565b606091505b505090508061067f5760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b5050565b61068b610dc7565b6106956000610e6b565b565b61069f610dc7565b60006106ab82426113c7565b90506000836040516020016106c091906112c6565b60408051601f198184030181529181528151602092830120600081815260019093529120549091501561075b5760405162461bcd60e51b815260206004820152602160248201527f4d657373616765207375626d6974746564206d6f7265207468616e206f6e636560448201527f21000000000000000000000000000000000000000000000000000000000000006064820152608401610199565b600081815260016020908152604082208490556002919061077e90870187611007565b6001600160a01b0316815260208101919091526040016000908120906107aa60808701606088016113da565b63ffffffff168152602080820192909252604001600090812080546001810182559082529190208591600402016107e182826115a8565b505050505050565b6107f1610dc7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461083e576040519150601f19603f3d011682016040523d82523d6000602084013e610843565b606091505b50509050806108945760405162461bcd60e51b815260206004820152601460248201527f6661696c65642073656e64696e672076616c75650000000000000000000000006044820152606401610199565b505050565b60006108a433610e0d565b90507fb93c37389233beb85a3a726c3f15c2d15533ee74cb602f20f490dfffef775937338288888888886040516108e197969594939291906116c2565b60405180910390a195945050505050565b60008181526004602052604081205490036109625760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b6000818152600460205260409020544210156109ca5760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b6000846040516020016109dd9190611722565b60408051601f198184030181528282528051602091820120908301829052600160608401527f760000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610a7b84848484604051602001610a6091815260200190565b60405160208183030381529060405280519060200120610ec8565b610aed5760405162461bcd60e51b815260206004820152603360248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722076616c7560448201527f65207472616e73666572206d6573736167652e000000000000000000000000006064820152608401610199565b5050505050565b610afc610dc7565b60008281526004602052604090205415610b7e5760405162461bcd60e51b815260206004820152602560248201527f526f6f7420616c726561647920616464656420746f20746865206d657373616760448201527f65206275730000000000000000000000000000000000000000000000000000006064820152608401610199565b60009182526004602052604090912055565b6000818152600460205260408120549003610c005760405162461bcd60e51b815260206004820152602a60248201527f526f6f74206973206e6f74207075626c6973686564206f6e2074686973206d6560448201526939b9b0b3b290313ab99760b11b6064820152608401610199565b600081815260046020526040902054421015610c685760405162461bcd60e51b815260206004820152602160248201527f526f6f74206973206e6f7420636f6e736964657265642066696e616c207965746044820152601760f91b6064820152608401610199565b600084604051602001610c7b91906112c6565b60408051601f198184030181528282528051602091820120908301829052600160608401527f6d0000000000000000000000000000000000000000000000000000000000000060808401529082015260a001604051602081830303815290604052805190602001209050610cfe84848484604051602001610a6091815260200190565b610aed5760405162461bcd60e51b815260206004820152603060248201527f496e76616c696420696e636c7573696f6e2070726f6f6620666f722063726f7360448201527f7320636861696e206d6573736167652e000000000000000000000000000000006064820152608401610199565b610d78610dc7565b6001600160a01b038116610dbb576040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152602401610199565b610dc481610e6b565b50565b6000546001600160a01b03163314610695576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610199565b6001600160a01b0381166000908152600360205260408120805467ffffffffffffffff169160019190610e408385611782565b92506101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550919050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082610ed6868685610ee0565b1495945050505050565b600081815b84811015610f2357610f0f82878784818110610f0357610f036117aa565b90506020020135610f2c565b915080610f1b816117c0565b915050610ee5565b50949350505050565b6000818310610f48576000828152602084905260409020610f57565b60008381526020839052604090205b90505b92915050565b600060c08284031215610f7257600080fd5b50919050565b600060208284031215610f8a57600080fd5b813567ffffffffffffffff811115610fa157600080fd5b6104e984828501610f60565b600060208284031215610fbf57600080fd5b5035919050565b6001600160a01b0381168114610dc457600080fd5b60008060408385031215610fee57600080fd5b8235610ff981610fc6565b946020939093013593505050565b60006020828403121561101957600080fd5b813561042181610fc6565b6000806040838503121561103757600080fd5b823567ffffffffffffffff81111561104e57600080fd5b61105a85828601610f60565b95602094909401359450505050565b63ffffffff81168114610dc457600080fd5b60ff81168114610dc457600080fd5b80356110958161107b565b919050565b6000806000806000608086880312156110b257600080fd5b85356110bd81611069565b945060208601356110cd81611069565b9350604086013567ffffffffffffffff808211156110ea57600080fd5b818801915088601f8301126110fe57600080fd5b81358181111561110d57600080fd5b89602082850101111561111f57600080fd5b60208301955080945050505060608601356111398161107b565b809150509295509295909350565b60008083601f84011261115957600080fd5b50813567ffffffffffffffff81111561117157600080fd5b6020830191508360208260051b850101111561118c57600080fd5b9250929050565b60008060008084860360c08112156111aa57600080fd5b60808112156111b857600080fd5b50849350608085013567ffffffffffffffff8111156111d657600080fd5b6111e287828801611147565b9598909750949560a00135949350505050565b6000806040838503121561120857600080fd5b50508035926020909101359150565b6000806000806060858703121561122d57600080fd5b843567ffffffffffffffff8082111561124557600080fd5b61125188838901610f60565b9550602087013591508082111561126757600080fd5b5061127487828801611147565b9598909750949560400135949350505050565b67ffffffffffffffff81168114610dc457600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60208152600082356112d781610fc6565b6001600160a01b03811660208401525060208301356112f581611287565b67ffffffffffffffff80821660408501526040850135915061131682611069565b63ffffffff80831660608601526060860135925061133383611069565b80831660808601525060808501359150601e1985360301821261135557600080fd5b602091850191820191358181111561136c57600080fd5b80360383131561137b57600080fd5b60c060a086015261139060e08601828561129d565b925050506113a060a0850161108a565b60ff811660c0850152509392505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f5a57610f5a6113b1565b6000602082840312156113ec57600080fd5b813561042181611069565b60008135610f5a81611069565b6000808335601e1984360301811261141b57600080fd5b83018035915067ffffffffffffffff82111561143657600080fd5b60200191503681900382131561118c57600080fd5b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061147557607f821691505b602082108103610f7257634e487b7160e01b600052602260045260246000fd5b601f82111561089457600081815260208120601f850160051c810160208610156114bc5750805b601f850160051c820191505b818110156107e1578281556001016114c8565b67ffffffffffffffff8311156114f3576114f361144b565b611507836115018354611461565b83611495565b6000601f84116001811461153b57600085156115235750838201355b600019600387901b1c1916600186901b178355610aed565b600083815260209020601f19861690835b8281101561156c578685013582556020948501946001909201910161154c565b50868210156115895760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008135610f5a8161107b565b81356115b381610fc6565b6001600160a01b038116905081548173ffffffffffffffffffffffffffffffffffffffff19821617835560208401356115eb81611287565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b1690507fffffffff000000000000000000000000000000000000000000000000000000008184828516171785556040860135925061164983611069565b921760e09190911b909116178155611681611666606084016113f7565b6001830163ffffffff821663ffffffff198254161781555050565b61168e6080830183611404565b61169c8183600286016114db565b505061067f6116ad60a0840161159b565b6003830160ff821660ff198254161781555050565b6001600160a01b038816815267ffffffffffffffff87166020820152600063ffffffff808816604084015280871660608401525060c0608083015261170b60c08301858761129d565b905060ff831660a083015298975050505050505050565b60808101823561173181610fc6565b6001600160a01b03908116835260208401359061174d82610fc6565b16602083015260408381013590830152606083013561176b81611287565b67ffffffffffffffff811660608401525092915050565b67ffffffffffffffff8181168382160190808211156117a3576117a36113b1565b5092915050565b634e487b7160e01b600052603260045260246000fd5b6000600182016117d2576117d26113b1565b506001019056fea264697066735822122078bebc469f5cbd8c097a1657385a1d8552a3feee7913c0a4f7f5badba2928b8764736f6c63430008140033a2646970667358221220f3ae2aa4aad47c4fdc0fe04e3097ee0ac3d734edd36d93fad6ce36e3ba96c70464736f6c63430008140033", } // ManagementContractABI is the input ABI used to generate the binding from. @@ -762,25 +762,25 @@ func (_ManagementContract *ManagementContractCallerSession) Owner() (common.Addr return _ManagementContract.Contract.Owner(&_ManagementContract.CallOpts) } -// AddRollup is a paid mutator transaction binding the contract method 0x2c77c81f. +// AddRollup is a paid mutator transaction binding the contract method 0xa25eb31c. // -// Solidity: function AddRollup((bytes32,bytes,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) ) returns() -func (_ManagementContract *ManagementContractTransactor) AddRollup(opts *bind.TransactOpts, r StructsMetaRollup, _rollupData string, arg2 StructsHeaderCrossChainData) (*types.Transaction, error) { - return _ManagementContract.contract.Transact(opts, "AddRollup", r, _rollupData, arg2) +// Solidity: function AddRollup((bytes32,bytes,uint256) r, ((address,uint64,uint32,uint32,bytes,uint8)[]) ) returns() +func (_ManagementContract *ManagementContractTransactor) AddRollup(opts *bind.TransactOpts, r StructsMetaRollup, arg1 StructsHeaderCrossChainData) (*types.Transaction, error) { + return _ManagementContract.contract.Transact(opts, "AddRollup", r, arg1) } -// AddRollup is a paid mutator transaction binding the contract method 0x2c77c81f. +// AddRollup is a paid mutator transaction binding the contract method 0xa25eb31c. // -// Solidity: function AddRollup((bytes32,bytes,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) ) returns() -func (_ManagementContract *ManagementContractSession) AddRollup(r StructsMetaRollup, _rollupData string, arg2 StructsHeaderCrossChainData) (*types.Transaction, error) { - return _ManagementContract.Contract.AddRollup(&_ManagementContract.TransactOpts, r, _rollupData, arg2) +// Solidity: function AddRollup((bytes32,bytes,uint256) r, ((address,uint64,uint32,uint32,bytes,uint8)[]) ) returns() +func (_ManagementContract *ManagementContractSession) AddRollup(r StructsMetaRollup, arg1 StructsHeaderCrossChainData) (*types.Transaction, error) { + return _ManagementContract.Contract.AddRollup(&_ManagementContract.TransactOpts, r, arg1) } -// AddRollup is a paid mutator transaction binding the contract method 0x2c77c81f. +// AddRollup is a paid mutator transaction binding the contract method 0xa25eb31c. // -// Solidity: function AddRollup((bytes32,bytes,uint256) r, string _rollupData, ((address,uint64,uint32,uint32,bytes,uint8)[]) ) returns() -func (_ManagementContract *ManagementContractTransactorSession) AddRollup(r StructsMetaRollup, _rollupData string, arg2 StructsHeaderCrossChainData) (*types.Transaction, error) { - return _ManagementContract.Contract.AddRollup(&_ManagementContract.TransactOpts, r, _rollupData, arg2) +// Solidity: function AddRollup((bytes32,bytes,uint256) r, ((address,uint64,uint32,uint32,bytes,uint8)[]) ) returns() +func (_ManagementContract *ManagementContractTransactorSession) AddRollup(r StructsMetaRollup, arg1 StructsHeaderCrossChainData) (*types.Transaction, error) { + return _ManagementContract.Contract.AddRollup(&_ManagementContract.TransactOpts, r, arg1) } // ExtractNativeValue is a paid mutator transaction binding the contract method 0x5371a216. diff --git a/contracts/src/management/ManagementContract.sol b/contracts/src/management/ManagementContract.sol index 0c7a7df677..0981b85fe6 100644 --- a/contracts/src/management/ManagementContract.sol +++ b/contracts/src/management/ManagementContract.sol @@ -150,7 +150,7 @@ contract ManagementContract is Initializable, OwnableUpgradeable { } // solc-ignore-next-line unused-param - function AddRollup(Structs.MetaRollup calldata r, string calldata _rollupData, Structs.HeaderCrossChainData calldata) public { + function AddRollup(Structs.MetaRollup calldata r, Structs.HeaderCrossChainData calldata) public { address enclaveID = ECDSA.recover(r.Hash, r.Signature); // revert if the EnclaveID is not attested require(attested[enclaveID], "enclaveID not attested"); @@ -187,7 +187,7 @@ contract ManagementContract is Initializable, OwnableUpgradeable { bytes32 msgHash = keccak256(abi.encode(_msg)); require(isWithdrawalSpent[msgHash] == false, "withdrawal already spent"); isWithdrawalSpent[keccak256(abi.encode(_msg))] = true; - + messageBus.receiveValueFromL2(_msg.receiver, _msg.amount); } diff --git a/design/protodanksharding/protodanksharding_design.md b/design/protodanksharding/protodanksharding_design.md new file mode 100644 index 0000000000..bc050c14fb --- /dev/null +++ b/design/protodanksharding/protodanksharding_design.md @@ -0,0 +1,33 @@ +# Ten Proto-danksharding Design + +## Why? + +The overall aim of this is to reduce the price of publishing rollups to Ethereum and therefore the cost of transctions +to our end users. A typical ETH block can hold ~100kb data whereas blobs can carry up to 1Mb. The main benefit though is +that the blobs are stored for 30 in a sidecar so they do not compete for L1 gas. Full specification for EIP-4844 can be +found [here](https://eips.ethereum.org/EIPS/eip-4844). + +![protodanksharding diagram](./resources/blob_tx.png) + +## Requirements + +* Publish new rollups as new blob type to Ethereum +* Node must be able to catch up when outside of the 30 day window that blobs are stored for +* Blobs must be spread across multiple rollups up if they exceed the maximum blob size enforced by Ethereum + +## Modifications + +* Construct `BlobTx` instead of `LegacyTx` when building rollup TX +* Additional fields required: + * `BlobTxSidecar` - Contains the blobs, the commitments and proofs + * `BlobHashes` - represents a list of hash outputs including the `blob_kzgs` and `blobs` +* Remove encoded rollup from calldata + +* `RollupHeader` needs to store the blob data: + * `Blobs` - this is needed so we can construct the blobs based on size limits at the point of rollup production + * This will include `Commitement`, `BlobSize` and the `Data` + +* Update `PrepareTransactionToRetry` to return `BlobTx` with necessary fields. +* New functions to calculate the `KZGCommitment` and `KZGProof` from a blob +* Update the `g.maxRollupSize` to support up to 128kb blobs +* Update to enclave creation of rollup to check for blob size when adding batches `sequencer.CreateRollup` diff --git a/design/protodanksharding/resources/blob_tx.png b/design/protodanksharding/resources/blob_tx.png new file mode 100644 index 0000000000..9ff94063a7 Binary files /dev/null and b/design/protodanksharding/resources/blob_tx.png differ diff --git a/go.mod b/go.mod index 3a9695bc7e..27edaf36fc 100644 --- a/go.mod +++ b/go.mod @@ -51,6 +51,7 @@ require ( google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 gopkg.in/natefinch/lumberjack.v2 v2.2.1 + k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 ) require ( @@ -81,12 +82,16 @@ require ( github.com/crate-crypto/go-kzg-4844 v1.0.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/deepmap/oapi-codegen v1.6.0 // indirect github.com/distribution/reference v0.5.0 // indirect + github.com/dlclark/regexp2 v1.7.0 // indirect github.com/docker/distribution v2.8.3+incompatible // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/ethereum/c-kzg-4844 v1.0.0 // indirect github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 // indirect + github.com/ferranbt/fastssz v0.1.2 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect @@ -99,17 +104,23 @@ require ( github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.19.0 // indirect + github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.2.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/gorilla/mux v1.8.1 // indirect + github.com/graph-gophers/graphql-go v1.3.0 // indirect github.com/h2non/filetype v1.1.3 // indirect github.com/holiman/billy v0.0.0-20240216141850-2abb0c79d3c4 // indirect github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/huin/goupnp v1.3.0 // indirect + github.com/influxdata/influxdb-client-go/v2 v2.4.0 // indirect + github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c // indirect + github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/jackpal/go-nat-pmp v1.0.2 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/juju/errors v0.0.0-20181118221551-089d3ea4e4d5 // indirect @@ -120,6 +131,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/pointerstructure v1.2.1 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect @@ -131,7 +143,9 @@ require ( github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect @@ -160,8 +174,10 @@ require ( golang.org/x/net v0.25.0 // indirect golang.org/x/sys v0.21.0 // indirect golang.org/x/text v0.16.0 // indirect + golang.org/x/time v0.5.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect rsc.io/tmplfunc v0.0.3 // indirect diff --git a/go.sum b/go.sum index c7c325f5ad..90518c21b0 100644 --- a/go.sum +++ b/go.sum @@ -42,6 +42,9 @@ github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d/go.mod h1:8EPpV github.com/chenzhuoyu/iasm v0.9.0/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= github.com/chenzhuoyu/iasm v0.9.1 h1:tUHQJXo3NhBqw6s33wkGn9SP3bvrWLdlVIJ3hQBL7P0= github.com/chenzhuoyu/iasm v0.9.1/go.mod h1:Xjy2NpN3h7aUqeqM+woSuuvxmIe6+DDsiNLIrkAmYog= +github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= +github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= +github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= @@ -71,6 +74,7 @@ github.com/crate-crypto/go-ipa v0.0.0-20240223125850-b1e8a79f509c/go.mod h1:geZJ github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -81,12 +85,18 @@ github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5il github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/deepmap/oapi-codegen v1.6.0 h1:w/d1ntwh91XI0b/8ja7+u5SvA4IFfM0UNNLmiDR1gg0= +github.com/deepmap/oapi-codegen v1.6.0/go.mod h1:ryDa9AgbELGeB+YEXE1dR53yAjHwFvE9iAUlWl9Al3M= github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8= github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/dlclark/regexp2 v1.7.0 h1:7lJfhqlPssTb1WQx4yvTHN0uElPEv52sbaECrAQxjAo= +github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.3-0.20220224222438-c78f6963a1c0+incompatible h1:Ptj2To+ezU/mCBUKdYXBQ2r3/2EJojAlOZrsgprF+is= @@ -95,6 +105,11 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= +github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3 h1:+3HCtB74++ClLy8GgjUQYeC8R4ILzVcIe8+5edAJJnE= +github.com/dop251/goja v0.0.0-20230605162241-28ee0ee714f3/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= +github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= +github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= @@ -110,6 +125,8 @@ github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWX github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0 h1:KrE8I4reeVvf7C1tm8elRjj4BdscTYzz/WAbYyf/JI4= github.com/ethereum/go-verkle v0.1.1-0.20240306133620-7d920df305f0/go.mod h1:D9AJLVXSyZQXJQVk8oh1EwjISE+sJTn2duYIZC0dy3w= +github.com/ferranbt/fastssz v0.1.2 h1:Dky6dXlngF6Qjc+EfDipAkE83N5I5DE68bY6O0VLNPk= +github.com/ferranbt/fastssz v0.1.2/go.mod h1:X5UPrE2u1UJjxHA8X54u04SBwdAQjG2sFtWs39YxyWs= github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -122,14 +139,17 @@ github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uq github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 h1:f6D9Hr8xV8uYKlyuj8XIruxlh9WjVjdh1gIicAS7ays= github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/cors v1.7.0 h1:wZX2wuZ0o7rV2/1i7gb4Jn+gW7HBqaP91fizJkBUJOA= github.com/gin-contrib/cors v1.7.0/go.mod h1:cI+h6iOAyxKRtUtC6iF/Si1KSFvGm/gK+kshxlCi8ro= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-chi/chi/v5 v5.0.0/go.mod h1:BBug9lr0cqtdAhsu6R4AAdvufI0/XBzAQSsUqJpoZOs= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= github.com/go-jose/go-jose/v4 v4.0.2 h1:R3l3kkBds16bO7ZFAEEcofK0MkrAJt3jlJznWZG0nvk= @@ -143,6 +163,8 @@ github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -151,6 +173,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4= github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.8.1 h1:LedoTUt/eveggdHS9qUFC1EFSa8bU2+1pZjSRpvNJ1Y= github.com/go-sql-driver/mysql v1.8.1/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= @@ -180,6 +204,7 @@ github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6 github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -188,13 +213,18 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= +github.com/graph-gophers/graphql-go v1.3.0 h1:Eb9x/q6MFpCLz7jBCiP/WTxjSDrYLR1QY41SORZyNJ0= +github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/h2non/filetype v1.1.3 h1:FKkx9QbD7HR/zjK1Ia5XiBsq9zdLi5Kf3zGyFTAFkGg= github.com/h2non/filetype v1.1.3/go.mod h1:319b3zT68BvV+WRj7cwy856M2ehB3HqNOt6sy1HndBY= github.com/hashicorp/go-bexpr v0.1.14 h1:uKDeyuOhWhT1r5CiMTjdVY4Aoxdxs6EtwgTGnlosyp4= @@ -210,6 +240,13 @@ github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXei github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= +github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= +github.com/influxdata/influxdb-client-go/v2 v2.4.0 h1:HGBfZYStlx3Kqvsv1h2pJixbCl/jhnFtxpKFAv9Tu5k= +github.com/influxdata/influxdb-client-go/v2 v2.4.0/go.mod h1:vLNHdxTJkIf2mSLvGrpj8TCcISApPoXkaxP8g9uRlW8= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c h1:qSHzRbhzK8RdXOsAdfDgO49TtqC1oZ+acxPrkfTxcCs= +github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= +github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jolestar/go-commons-pool/v2 v2.1.2 h1:E+XGo58F23t7HtZiC/W6jzO2Ux2IccSH/yx4nD+J1CM= @@ -227,16 +264,24 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg= github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM= github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/labstack/echo/v4 v4.2.1/go.mod h1:AA49e0DZ8kk5jTOOCKNuPR6oTnBS0dYiM4FW1e6jwpg= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= @@ -244,18 +289,30 @@ github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjS github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lunixbochs/vtclean v0.0.0-20160125035106-4fbf7632a2c6/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/matryer/moq v0.0.0-20190312154309-6cfb0558e1bd/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ= github.com/mattn/go-colorable v0.0.6/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU= github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -292,11 +349,17 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= +github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQmzR3rNLYGGz4g/UgFcjb28p/viDM= +github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -310,9 +373,12 @@ github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57 github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= +github.com/prysmaticlabs/gohashtree v0.0.1-alpha.0.20220714111606-acbb2962fb48 h1:cSo6/vk8YpvkLbk9v3FO97cakNmUoxwi2KMP8hd5WIw= +github.com/prysmaticlabs/gohashtree v0.0.1-alpha.0.20220714111606-acbb2962fb48/go.mod h1:4pWaT30XoEx1j8KNJf3TV+E3mQkaufn7mf+jRNb/Fuk= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= @@ -336,6 +402,7 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= @@ -372,11 +439,14 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0= github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 h1:dizWJqTWjwyD8KGcMOwgrkqu1JIkofYgKkmDeNE7oAs= @@ -387,6 +457,9 @@ golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 h1:6R2FC06FonbXQ8pK11/PDFY6N6LWlf9KlzibaCapmqc= @@ -394,14 +467,19 @@ golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81/go.mod h1:CQ1k9gNrJ50XIzaKCR golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -409,24 +487,36 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -435,19 +525,29 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -467,8 +567,10 @@ google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGm google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20160105164936-4f90aeace3a2/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= @@ -486,6 +588,8 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5 h1:kmDqav+P+/5e1i9tFfHq1qcF3sOrDp+YEkVDAHu7Jwk= +k8s.io/utils v0.0.0-20230220204549-a5ecb0141aa5/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= diff --git a/go/common/enclave.go b/go/common/enclave.go index 348360d30c..4a13ae7c27 100644 --- a/go/common/enclave.go +++ b/go/common/enclave.go @@ -5,6 +5,8 @@ import ( "encoding/json" "math/big" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ethereum/go-ethereum/core/types" "github.com/ten-protocol/go-ten/go/common/errutil" @@ -62,7 +64,7 @@ type Enclave interface { // It is the responsibility of the host to gossip the returned rollup // For good functioning the caller should always submit blocks ordered by height // submitting a block before receiving ancestors of it, will result in it being ignored - SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*TxAndReceipt, isLatest bool) (*BlockSubmissionResponse, SystemError) + SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*TxAndReceipt, blobs []*kzg4844.Blob) (*BlockSubmissionResponse, SystemError) // SubmitTx - user transactions SubmitTx(ctx context.Context, tx EncryptedTx) (*responses.RawTx, SystemError) diff --git a/go/common/headers.go b/go/common/headers.go index 8bdf733b4b..5388aaac53 100644 --- a/go/common/headers.go +++ b/go/common/headers.go @@ -133,6 +133,13 @@ func (b *BatchHeader) UnmarshalJSON(data []byte) error { return nil } +// Blob is the EIP-4844 blob +type Blob struct { + Commitment common.Hash // The commitment hash of the blob + BlobSize uint64 // The size of the blob in bytes + Data []byte // The actual blob data +} + // RollupHeader is a public / plaintext struct that holds common properties of rollups. // All these fields are processed by the Management contract type RollupHeader struct { diff --git a/go/common/host/services.go b/go/common/host/services.go index 970ebf22f2..5afe450936 100644 --- a/go/common/host/services.go +++ b/go/common/host/services.go @@ -4,6 +4,8 @@ import ( "context" "math/big" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ten-protocol/go-ten/go/responses" "github.com/ten-protocol/go-ten/lib/gethfork/rpc" @@ -95,7 +97,7 @@ type L1BlockHandler interface { HandleBlock(block *types.Block) } -// L1Publisher provides an interface for the host to interact with Obscuro data (management contract etc.) on L1 +// L1Publisher provides an interface for the host to interact with Ten data (management contract etc.) on L1 type L1Publisher interface { // InitializeSecret will send a management contract transaction to initialize the network with the generated secret InitializeSecret(attestation *common.AttestationReport, encSecret common.EncryptedSharedEnclaveSecret) error @@ -103,6 +105,8 @@ type L1Publisher interface { RequestSecret(report *common.AttestationReport) (gethcommon.Hash, error) // ExtractObscuroRelevantTransactions will return all Obscuro relevant tx from an L1 block ExtractObscuroRelevantTransactions(block *types.Block) ([]*ethadapter.L1RespondSecretTx, []*ethadapter.L1RollupTx, []*ethadapter.L1SetImportantContractsTx) + // FIXME + ExtractTenTransactionsAndBlobs(block *types.Block) ([]*ethadapter.L1RespondSecretTx, []*ethadapter.L1RollupTx, []*kzg4844.Blob, []*ethadapter.L1SetImportantContractsTx) // PublishRollup will create and publish a rollup tx to the management contract - fire and forget we don't wait for receipt // todo (#1624) - With a single sequencer, it is problematic if rollup publication fails; handle this case better PublishRollup(producedRollup *common.ExtRollup) diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index 6fcfefa80b..540a9110d9 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.31.0 -// protoc v4.23.4 +// protoc-gen-go v1.32.0 +// protoc v4.25.3 // source: enclave.proto package generated @@ -1902,7 +1902,7 @@ type SubmitBlockRequest struct { EncodedBlock []byte `protobuf:"bytes,1,opt,name=encodedBlock,proto3" json:"encodedBlock,omitempty"` EncodedReceipts []byte `protobuf:"bytes,2,opt,name=encodedReceipts,proto3" json:"encodedReceipts,omitempty"` - IsLatest bool `protobuf:"varint,3,opt,name=isLatest,proto3" json:"isLatest,omitempty"` + EncodedBlobs []byte `protobuf:"bytes,3,opt,name=encodedBlobs,proto3" json:"encodedBlobs,omitempty"` } func (x *SubmitBlockRequest) Reset() { @@ -1951,11 +1951,11 @@ func (x *SubmitBlockRequest) GetEncodedReceipts() []byte { return nil } -func (x *SubmitBlockRequest) GetIsLatest() bool { +func (x *SubmitBlockRequest) GetEncodedBlobs() []byte { if x != nil { - return x.IsLatest + return x.EncodedBlobs } - return false + return nil } type SubmitBlockResponse struct { @@ -4538,30 +4538,52 @@ var file_enclave_proto_rawDesc = []byte{ 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x7e, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x65, - 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, - 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, - 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, - 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4c, - 0x61, 0x74, 0x65, 0x73, 0x74, 0x22, 0xb0, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, - 0x17, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, - 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0b, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x22, 0x84, 0x01, - 0x0a, 0x10, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, + 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, + 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, + 0x65, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x22, 0xb0, + 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x17, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0x33, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x54, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x54, 0x78, 0x22, 0x84, 0x01, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x6d, 0x69, + 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x42, 0x0a, + 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, + 0x78, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x22, 0x4f, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x22, 0x3a, 0x0a, 0x0e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x83, + 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, @@ -4569,476 +4591,455 @@ var file_enclave_proto_rawDesc = []byte{ 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x22, 0x42, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x73, - 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x22, 0x4f, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3a, 0x0a, 0x0e, 0x4f, 0x62, 0x73, - 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, - 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, - 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x46, 0x0a, 0x1a, 0x47, - 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, - 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x22, 0x8f, 0x01, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, - 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x0d, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, - 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, - 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, + 0x72, 0x72, 0x6f, 0x72, 0x22, 0x46, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8f, 0x01, 0x0a, + 0x1b, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, + 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x48, - 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, - 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3d, 0x0a, 0x11, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x12, - 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, - 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, - 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x22, 0x4a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x61, 0x73, 0x68, - 0x22, 0x5f, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, - 0x65, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x11, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x12, 0x55, 0x6e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x4f, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x0d, + 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, + 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, + 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x48, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, + 0x73, 0x22, 0x91, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, + 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, + 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3d, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, + 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, + 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3a, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, + 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x41, 0x0a, + 0x15, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, - 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, + 0x22, 0x8a, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, + 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x67, 0x0a, - 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0b, + 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x4a, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, + 0x6c, 0x75, 0x70, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, + 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5f, 0x0a, 0x0f, 0x47, 0x65, 0x74, + 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, + 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, + 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x65, + 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x12, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x55, 0x6e, 0x73, + 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3e, 0x0a, 0x12, 0x45, 0x73, + 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x13, 0x45, + 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, + 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3a, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, + 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, + 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, + 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, - 0x72, 0x67, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x14, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, - 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, - 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xae, 0x01, 0x0a, 0x1a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, - 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, - 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x17, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, - 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x31, 0x48, 0x65, - 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, - 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, - 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x53, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x54, 0x6f, 0x70, - 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x6e, 0x0a, 0x0b, - 0x45, 0x78, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x73, 0x67, 0x12, 0x31, 0x0a, 0x06, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, - 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, - 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xaa, 0x05, 0x0a, - 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, - 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, - 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, - 0x68, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x65, 0x71, - 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, - 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, - 0x69, 0x70, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x1c, 0x0a, - 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x47, - 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x47, - 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, - 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, - 0x44, 0x0a, 0x1d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x40, 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x48, 0x61, 0x73, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1b, 0x4c, 0x61, 0x74, 0x65, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x67, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, + 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, + 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x22, 0xc0, 0x01, 0x0a, + 0x14, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x50, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, + 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, + 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, + 0xae, 0x01, 0x0a, 0x1a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x56, + 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0x47, 0x0a, 0x17, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, + 0x61, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, 0x73, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x43, 0x72, + 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x6e, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x4d, 0x73, 0x67, 0x12, 0x31, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xaa, 0x05, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, + 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, + 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, + 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x12, + 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x52, 0x6f, + 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, + 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x53, 0x65, + 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x20, + 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x14, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x44, 0x0a, 0x1d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x10, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, - 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, - 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, - 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, - 0x72, 0x65, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x45, 0x78, - 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, - 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, - 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, - 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xdb, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, - 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, - 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2c, 0x0a, 0x11, - 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, - 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, - 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, - 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, - 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, - 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, - 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, - 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, - 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, - 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, - 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x41, 0x74, 0x74, 0x65, - 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, - 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, - 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0x84, 0x16, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, - 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, - 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, - 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, - 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x48, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, - 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, - 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, - 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, + 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x1d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, + 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x40, + 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x72, + 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x72, + 0x65, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, + 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, + 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, + 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x32, 0x0a, + 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x61, 0x6c, + 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x22, 0xdb, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, + 0x65, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, + 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, + 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, + 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, + 0xc9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, + 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, + 0x1e, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, + 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, + 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0x84, + 0x16, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, + 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, + 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, + 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, + 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x45, 0x6e, 0x63, + 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x54, + 0x78, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, + 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, + 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x4f, 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4f, + 0x62, 0x73, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x66, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, + 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, + 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x63, 0x65, 0x69, 0x70, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, - 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, - 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, - 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, + 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x20, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, + 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, + 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, + 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, + 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, + 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, + 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, - 0x53, 0x6c, 0x6f, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x53, 0x6c, 0x6f, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, - 0x65, 0x47, 0x61, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x45, 0x73, 0x74, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x47, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, - 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, - 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, - 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, - 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, - 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, - 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, + 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, + 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, + 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, + 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, + 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, + 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, - 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, - 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, - 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, - 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, - 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, + 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, + 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x16, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x12, 0x28, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x4c, 0x6f, + 0x67, 0x52, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, - 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, - 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x65, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, + 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, + 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, + 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, + 0x13, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, - 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, - 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, + 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index 4ed20ae996..4d80ff9600 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -255,9 +255,9 @@ message StartResponse { message SubmitBlockRequest { bytes encodedBlock = 1; bytes encodedReceipts = 2; - bool isLatest = 3; - + bytes encodedBlobs = 3; } + message SubmitBlockResponse { BlockSubmissionResponseMsg blockSubmissionResponse = 1; SystemError systemError = 2; diff --git a/go/common/rpc/generated/enclave_grpc.pb.go b/go/common/rpc/generated/enclave_grpc.pb.go index 748bced462..8f14166059 100644 --- a/go/common/rpc/generated/enclave_grpc.pb.go +++ b/go/common/rpc/generated/enclave_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 -// - protoc v4.23.4 +// - protoc v4.25.3 // source: enclave.proto package generated diff --git a/go/common/types.go b/go/common/types.go index ff2d1c5572..3f69447d4a 100644 --- a/go/common/types.go +++ b/go/common/types.go @@ -79,6 +79,7 @@ type ( EncodedRollup []byte EncodedBatchMsg []byte EncodedBatchRequest []byte + EncodedBlobHashes []byte EnclaveID = common.Address ) diff --git a/go/config/enclave_cli_flags.go b/go/config/enclave_cli_flags.go index d13fed0597..9d4dee3ebf 100644 --- a/go/config/enclave_cli_flags.go +++ b/go/config/enclave_cli_flags.go @@ -14,6 +14,7 @@ const ( NodeTypeFlag = "nodeType" L1ChainIDFlag = "l1ChainID" ObscuroChainIDFlag = "obscuroChainID" + L1BeaconUrlFlag = "l1BeaconUrl" WillAttestFlag = "willAttest" ValidateL1BlocksFlag = "validateL1Blocks" ManagementContractAddressFlag = "managementContractAddress" @@ -51,7 +52,7 @@ var EnclaveFlags = map[string]*flag.TenFlag{ MinGasPriceFlag: flag.NewInt64Flag(MinGasPriceFlag, 1, "The minimum gas price for mining a transaction"), MessageBusAddressFlag: flag.NewStringFlag(MessageBusAddressFlag, "", "The address of the L1 message bus contract owned by the management contract."), MaxBatchSizeFlag: flag.NewUint64Flag(MaxBatchSizeFlag, 1024*55, "The maximum size a batch is allowed to reach uncompressed"), - MaxRollupSizeFlag: flag.NewUint64Flag(MaxRollupSizeFlag, 1024*64, "The maximum size a rollup is allowed to reach"), + MaxRollupSizeFlag: flag.NewUint64Flag(MaxRollupSizeFlag, 1024*128, "The maximum size a rollup is allowed to reach"), L2BaseFeeFlag: flag.NewUint64Flag(L2BaseFeeFlag, params.InitialBaseFee, ""), L2CoinbaseFlag: flag.NewStringFlag(L2CoinbaseFlag, "0xd6C9230053f45F873Cb66D8A02439380a37A4fbF", ""), GasBatchExecutionLimit: flag.NewUint64Flag(GasBatchExecutionLimit, 3_000_000_000, "Max gas that can be executed in a single batch"), @@ -62,6 +63,7 @@ var EnclaveFlags = map[string]*flag.TenFlag{ ProfilerEnabledFlag: flag.NewBoolFlag(ProfilerEnabledFlag, false, "Runs a profiler instance (Defaults to false)"), DebugNamespaceEnabledFlag: flag.NewBoolFlag(DebugNamespaceEnabledFlag, false, "Whether the debug namespace is enabled"), GasLocalExecutionCapFlag: flag.NewUint64Flag(GasLocalExecutionCapFlag, 4_000_000_000, "Max gas usage when executing local transactions"), + L1BeaconUrlFlag: flag.NewStringFlag(L1BeaconUrlFlag, "127.0.0.1:12600", "The beacon chain gateway endpoint used in docker config"), } // enclaveRestrictedFlags are the flags that the enclave can receive ONLY over the Ego signed enclave.json diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index 1b7e331c39..b285f4448c 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -27,6 +27,8 @@ type EnclaveConfig struct { L1ChainID int64 // The ID of the Obscuro chain ObscuroChainID int64 + // The http url of the beacon chain to fetch rollup data + L1BeaconUrl string // Whether to produce a verified attestation report WillAttest bool // Whether to validate incoming L1 blocks @@ -64,6 +66,7 @@ type EnclaveConfig struct { // have configured as the maximum size a transaction can have. Note that this isn't // a protocol limit, but a miner imposed limit and it might be hard to find someone // to include a transaction if it goes above it + // TODO Update with blob description MaxRollupSize uint64 GasPaymentAddress gethcommon.Address @@ -194,6 +197,7 @@ func newConfig(flags map[string]*flag.TenFlag) (*EnclaveConfig, error) { cfg.GasPaymentAddress = gethcommon.HexToAddress(flags[L2CoinbaseFlag].String()) cfg.GasBatchExecutionLimit = flags[GasBatchExecutionLimit].Uint64() cfg.GasLocalExecutionCapFlag = flags[GasLocalExecutionCapFlag].Uint64() + cfg.L1BeaconUrl = flags[L1BeaconUrlFlag].String() return cfg, nil } diff --git a/go/config/host_config.go b/go/config/host_config.go index 428d4371da..8acf6e705e 100644 --- a/go/config/host_config.go +++ b/go/config/host_config.go @@ -65,6 +65,8 @@ type HostInputConfig struct { ProfilerEnabled bool // L1StartHash is the hash of the L1 block we can start streaming from for all Obscuro state (e.g. management contract deployment block) L1StartHash gethcommon.Hash + // The http url of the beacon chain to fetch rollup data + L1BeaconUrl string // MetricsEnabled defines whether the metrics are enabled or not MetricsEnabled bool @@ -144,6 +146,7 @@ func (p HostInputConfig) ToHostConfig() *HostConfig { CrossChainInterval: p.CrossChainInterval, IsInboundP2PDisabled: p.IsInboundP2PDisabled, MaxRollupSize: p.MaxRollupSize, + L1BeaconUrl: p.L1BeaconUrl, } } @@ -178,6 +181,8 @@ type HostConfig struct { L1BlockTime time.Duration // CrossChainInterval - The interval at which the host will check for new cross chain data to submit CrossChainInterval time.Duration + // The http url of the beacon chain to fetch rollup data + L1BeaconUrl string ///// // NODE CONFIG @@ -278,7 +283,8 @@ func DefaultHostParsedConfig() *HostInputConfig { RollupInterval: 5 * time.Second, L1BlockTime: 15 * time.Second, IsInboundP2PDisabled: false, - MaxRollupSize: 1024 * 64, + MaxRollupSize: 1024 * 128, CrossChainInterval: 6 * time.Second, + L1BeaconUrl: "127.0.0.1:12600", // default port for the beacon chain if not specified } } diff --git a/go/enclave/components/interfaces.go b/go/enclave/components/interfaces.go index 97d8a1a39b..801a8f91b9 100644 --- a/go/enclave/components/interfaces.go +++ b/go/enclave/components/interfaces.go @@ -8,6 +8,7 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/params" "github.com/ten-protocol/go-ten/go/common" "github.com/ten-protocol/go-ten/go/enclave/core" @@ -121,8 +122,7 @@ type RollupProducer interface { } type RollupConsumer interface { - // ProcessRollupsInBlock - extracts the rollup from the block's transactions - // and verifies its integrity, saving and processing any batches that have - // not been seen previously. - ProcessRollupsInBlock(ctx context.Context, b *common.BlockAndReceipts) error + // ProcessBlobsInBlock - extracts the blob hashes from the block's transactions and builds the blob hashes from the blobs, + // compares this with the hashes since in the block. + ProcessBlobsInBlock(ctx context.Context, b *common.BlockAndReceipts, blobs []*kzg4844.Blob) error } diff --git a/go/enclave/components/rollup_consumer.go b/go/enclave/components/rollup_consumer.go index 0a72e9294d..db51b893a2 100644 --- a/go/enclave/components/rollup_consumer.go +++ b/go/enclave/components/rollup_consumer.go @@ -4,16 +4,17 @@ import ( "context" "fmt" - "github.com/ten-protocol/go-ten/go/enclave/core" - - "github.com/ten-protocol/go-ten/go/enclave/storage" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ten-protocol/go-ten/go/common/measure" + "github.com/ten-protocol/go-ten/go/enclave/core" + "github.com/ten-protocol/go-ten/go/enclave/storage" + "github.com/ten-protocol/go-ten/go/ethadapter" gethlog "github.com/ethereum/go-ethereum/log" "github.com/ten-protocol/go-ten/go/common" "github.com/ten-protocol/go-ten/go/common/log" - "github.com/ten-protocol/go-ten/go/ethadapter" "github.com/ten-protocol/go-ten/go/ethadapter/mgmtcontractlib" ) @@ -47,16 +48,23 @@ func NewRollupConsumer( } } -func (rc *rollupConsumerImpl) ProcessRollupsInBlock(ctx context.Context, b *common.BlockAndReceipts) error { - defer core.LogMethodDuration(rc.logger, measure.NewStopwatch(), "Rollup consumer processed block", log.BlockHashKey, b.BlockHeader.Hash()) +// ProcessBlobsInBlock - FIXME +func (rc *rollupConsumerImpl) ProcessBlobsInBlock(ctx context.Context, b *common.BlockAndReceipts, blobs []*kzg4844.Blob) error { + defer core.LogMethodDuration(rc.logger, measure.NewStopwatch(), "Rollup consumer processed blobs", log.BlockHashKey, b.BlockHeader.Hash()) - rollups := rc.extractRollups(b) + rollups, err := rc.extractAndVerifyRollups(b, blobs) + if err != nil { + println("ERROR HERE: ", err.Error()) + rc.logger.Error("Failed to extract rollups from block", log.BlockHashKey, b.BlockHeader.Hash(), log.ErrKey, err) + return err + } if len(rollups) == 0 { return nil } - rollups, err := rc.getSignedRollup(rollups) + rollups, err = rc.getSignedRollup(rollups) if err != nil { + println("ERROR HERE 1") return err } @@ -68,11 +76,13 @@ func (rc *rollupConsumerImpl) ProcessRollupsInBlock(ctx context.Context, b *comm for _, rollup := range rollups { l1CompressionBlock, err := rc.storage.FetchBlock(ctx, rollup.Header.CompressionL1Head) if err != nil { + println("ERROR HERE 2") rc.logger.Warn("Can't process rollup because the l1 block used for compression is not available", "block_hash", rollup.Header.CompressionL1Head, log.RollupHashKey, rollup.Hash(), log.ErrKey, err) continue } canonicalBlockByHeight, err := rc.storage.FetchCanonicaBlockByHeight(ctx, l1CompressionBlock.Number) if err != nil { + println("ERROR HERE 3") return err } if canonicalBlockByHeight.Hash() != l1CompressionBlock.Hash() { @@ -82,6 +92,7 @@ func (rc *rollupConsumerImpl) ProcessRollupsInBlock(ctx context.Context, b *comm // read batch data from rollup, verify and store it internalHeader, err := rc.rollupCompression.ProcessExtRollup(ctx, rollup) if err != nil { + println("ERROR HERE 4") rc.logger.Error("Failed processing rollup", log.RollupHashKey, rollup.Hash(), log.ErrKey, err) // todo - issue challenge as a validator return err @@ -111,7 +122,7 @@ func (rc *rollupConsumerImpl) getSignedRollup(rollups []*common.ExtRollup) ([]*c // todo - when processing the rollup, instead of looking up batches one by one, compare the last sequence number from the db with the ones in the rollup // extractRollups - returns a list of the rollups published in this block -func (rc *rollupConsumerImpl) extractRollups(br *common.BlockAndReceipts) []*common.ExtRollup { +func (rc *rollupConsumerImpl) extractAndVerifyRollups(br *common.BlockAndReceipts, blobs []*kzg4844.Blob) ([]*common.ExtRollup, error) { rollups := make([]*common.ExtRollup, 0) b := br.BlockHeader @@ -122,19 +133,48 @@ func (rc *rollupConsumerImpl) extractRollups(br *common.BlockAndReceipts) []*com continue } - rolTx, ok := t.(*ethadapter.L1RollupTx) + rollupHashes, ok := t.(*ethadapter.L1RollupHashes) if !ok { continue } - r, err := common.DecodeRollup(rolTx.Rollup) + var blobHashes []gethcommon.Hash + var err error + if _, blobHashes, err = ethadapter.MakeSidecar(blobs); err != nil { + return nil, fmt.Errorf("could not create blob sidecar and blob hashes. Cause: %w", err) + } + + if err := verifyBlobHashes(rollupHashes, blobHashes); err != nil { + return nil, fmt.Errorf("failed to verify the rollup hashes with blobhashes. Cause: %w", err) + } + + r, err := ethadapter.ReconstructRollup(blobs) if err != nil { - rc.logger.Crit("could not decode rollup.", log.ErrKey, err) - return nil + return nil, fmt.Errorf("could not recreate rollup from blobs. Cause: %w", err) } rollups = append(rollups, r) rc.logger.Info("Extracted rollup from block", log.RollupHashKey, r.Hash(), log.BlockHashKey, b.Hash()) } - return rollups + return rollups, nil +} + +func verifyBlobHashes(rollupHashes *ethadapter.L1RollupHashes, blobHashes []gethcommon.Hash) error { + if len(rollupHashes.BlobHashes) != len(blobHashes) { + return fmt.Errorf("hash count mismatch: rollupHashes (%d) and blobHashes (%d)", len(rollupHashes.BlobHashes), len(blobHashes)) + } + + for i, hash := range rollupHashes.BlobHashes { + if hash != blobHashes[i] { + println("Are they indexed incorrectly?") + for _, h := range rollupHashes.BlobHashes { + for _, b := range blobHashes { + println("Blob hashes: ", b.Hex()) + } + println("Rollup Blob hashes: ", h.Hex()) + } + return fmt.Errorf("hash mismatch at index %d: rollupHash (%s) != blobHash (%s)", i, hash.Hex(), blobHashes[i].Hex()) + } + } + return nil } diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index f7d185987a..8f0db308b4 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -9,6 +9,8 @@ import ( "sync" "time" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ten-protocol/go-ten/go/common/compression" "github.com/ten-protocol/go-ten/go/common/measure" "github.com/ten-protocol/go-ten/go/enclave/evm/ethchainadapter" @@ -415,7 +417,7 @@ func (e *enclaveImpl) StreamL2Updates() (chan common.StreamL2UpdatesResponse, fu } // SubmitL1Block is used to update the enclave with an additional L1 block. -func (e *enclaveImpl) SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*common.TxAndReceipt, isLatest bool) (*common.BlockSubmissionResponse, common.SystemError) { +func (e *enclaveImpl) SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*common.TxAndReceipt, blobs []*kzg4844.Blob) (*common.BlockSubmissionResponse, common.SystemError) { if e.stopControl.IsStopping() { return nil, responses.ToInternalError(fmt.Errorf("requested SubmitL1Block with the enclave stopping")) } @@ -431,7 +433,7 @@ func (e *enclaveImpl) SubmitL1Block(ctx context.Context, blockHeader *types.Head return nil, e.rejectBlockErr(ctx, fmt.Errorf("could not submit L1 block. Cause: %w", err)) } - result, err := e.ingestL1Block(ctx, br) + result, err := e.ingestL1Block(ctx, br, blobs) if err != nil { return nil, e.rejectBlockErr(ctx, fmt.Errorf("could not submit L1 block. Cause: %w", err)) } @@ -449,7 +451,7 @@ func (e *enclaveImpl) SubmitL1Block(ctx context.Context, blockHeader *types.Head return bsr, nil } -func (e *enclaveImpl) ingestL1Block(ctx context.Context, br *common.BlockAndReceipts) (*components.BlockIngestionType, error) { +func (e *enclaveImpl) ingestL1Block(ctx context.Context, br *common.BlockAndReceipts, blobs []*kzg4844.Blob) (*components.BlockIngestionType, error) { e.logger.Info("Start ingesting block", log.BlockHashKey, br.BlockHeader.Hash()) ingestion, err := e.l1BlockProcessor.Process(ctx, br) if err != nil { @@ -462,7 +464,7 @@ func (e *enclaveImpl) ingestL1Block(ctx context.Context, br *common.BlockAndRece return nil, err } - err = e.rollupConsumer.ProcessRollupsInBlock(ctx, br) + err = e.rollupConsumer.ProcessBlobsInBlock(ctx, br, blobs) if err != nil && !errors.Is(err, components.ErrDuplicateRollup) { e.logger.Error("Encountered error while processing l1 block", log.ErrKey, err) // Unsure what to do here; block has been stored @@ -505,7 +507,6 @@ func (e *enclaveImpl) SubmitBatch(ctx context.Context, extBatch *common.ExtBatch if e.stopControl.IsStopping() { return responses.ToInternalError(fmt.Errorf("requested SubmitBatch with the enclave stopping")) } - defer core.LogMethodDuration(e.logger, measure.NewStopwatch(), "SubmitBatch call completed.", log.BatchHashKey, extBatch.Hash()) e.logger.Info("Received new p2p batch", log.BatchHeightKey, extBatch.Header.Number, log.BatchHashKey, extBatch.Hash(), "l1", extBatch.Header.L1Proof) diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index 15a5a9f352..f4028bda8e 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -342,7 +342,6 @@ func (s *sequencer) StoreExecutedBatch(ctx context.Context, batch *core.Batch, t } s.batchRegistry.OnBatchExecuted(batch.Header, txResults) - return nil } diff --git a/go/enclave/rpc/GetTransactionCount.go b/go/enclave/rpc/GetTransactionCount.go index 8ffb17ee67..a578812b4a 100644 --- a/go/enclave/rpc/GetTransactionCount.go +++ b/go/enclave/rpc/GetTransactionCount.go @@ -2,7 +2,6 @@ package rpc import ( "fmt" - gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ten-protocol/go-ten/go/common/gethencoding" @@ -21,7 +20,13 @@ func GetTransactionCountValidate(reqParams []any, builder *CallBuilder[uint64, s } address := gethcommon.HexToAddress(addressStr) - + //var seqNo uint64 + //seqNoInt := rpc.registry.HeadBatchSeq() + //if seqNoInt == nil { + // seqNo = uint64(0) + //} else { + // seqNo = seqNoInt.Uint64() + //} seqNo := rpc.registry.HeadBatchSeq().Uint64() if len(reqParams) == 2 { tag, err := gethencoding.ExtractBlockNumber(reqParams[1]) diff --git a/go/enclave/rpc_server.go b/go/enclave/rpc_server.go index 0ae63f8965..a8d6259ff6 100644 --- a/go/enclave/rpc_server.go +++ b/go/enclave/rpc_server.go @@ -8,6 +8,8 @@ import ( "math/big" "net" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" "github.com/ten-protocol/go-ten/go/common" @@ -129,7 +131,14 @@ func (s *RPCServer) SubmitL1Block(ctx context.Context, request *generated.Submit s.logger.Error("Error decoding receipts", log.ErrKey, err) return nil, err } - blockSubmissionResponse, err := s.enclave.SubmitL1Block(ctx, bl, receipts, request.IsLatest) + + blobs, err := s.decodeBlobs(request.EncodedBlobs) + if err != nil { + s.logger.Error("Error decoding blobs", log.ErrKey, err) + return nil, err + } + + blockSubmissionResponse, err := s.enclave.SubmitL1Block(ctx, bl, receipts, blobs) if err != nil { var rejErr *errutil.BlockRejectError isReject := errors.As(err, &rejErr) @@ -499,6 +508,15 @@ func (s *RPCServer) decodeReceipts(encodedReceipts []byte) ([]*common.TxAndRecei return receipts, nil } +func (s *RPCServer) decodeBlobs(encodedBlobs []byte) ([]*kzg4844.Blob, error) { + var blobs []*kzg4844.Blob + err := rlp.DecodeBytes(encodedBlobs, &blobs) + if err != nil { + return nil, fmt.Errorf("unable to decode blobs, bytes=%x, err=%w", encodedBlobs, err) + } + return blobs, nil +} + func toRPCError(err common.SystemError) *generated.SystemError { if err == nil { return nil diff --git a/go/enclave/storage/enclavedb/batch.go b/go/enclave/storage/enclavedb/batch.go index a3ed53c042..98ff89f139 100644 --- a/go/enclave/storage/enclavedb/batch.go +++ b/go/enclave/storage/enclavedb/batch.go @@ -24,6 +24,7 @@ const ( func WriteBatchHeader(ctx context.Context, dbtx *sql.Tx, batch *core.Batch, convertedHash gethcommon.Hash, blockId int64, isCanonical bool) error { header, err := rlp.EncodeToBytes(batch.Header) + if err != nil { return fmt.Errorf("could not encode batch header. Cause: %w", err) } diff --git a/go/ethadapter/beacon_client.go b/go/ethadapter/beacon_client.go new file mode 100644 index 0000000000..2083cc8d84 --- /dev/null +++ b/go/ethadapter/beacon_client.go @@ -0,0 +1,325 @@ +package ethadapter + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "path" + "strconv" + "strings" + "sync" + + gethcommon "github.com/ethereum/go-ethereum/common" + + "github.com/ethereum/go-ethereum/core/types" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/crypto/kzg4844" +) + +const ( + versionMethod = "eth/v1/node/version" + specMethod = "eth/v1/config/spec" + genesisMethod = "eth/v1/beacon/genesis" + sidecarsMethodPrefix = "eth/v1/beacon/blob_sidecars/" +) + +// L1BeaconClient is a high level golang client for the Beacon API. +type L1BeaconClient struct { + cl BeaconClient + pool *ClientPool[BlobSideCarsFetcher] + initLock sync.Mutex + timeToSlotFn TimeToSlotFn +} + +// BeaconClient is a thin wrapper over the Beacon APIs. +type BeaconClient interface { + NodeVersion(ctx context.Context) (string, error) + ConfigSpec(ctx context.Context) (APIConfigResponse, error) + BeaconGenesis(ctx context.Context) (APIGenesisResponse, error) + BeaconBlobSideCars(ctx context.Context, slot uint64) (APIGetBlobSidecarsResponse, error) +} + +// BlobSideCarsFetcher is a thin wrapper over the Beacon APIs. +type BlobSideCarsFetcher interface { + BeaconBlobSideCars(ctx context.Context, slot uint64) (APIGetBlobSidecarsResponse, error) +} + +// BeaconHTTPClient implements BeaconClient. It provides golang types over the basic Beacon API. +type BeaconHTTPClient struct { + client *http.Client + baseURL string +} + +func NewBeaconHTTPClient(client *http.Client, baseURL string) *BeaconHTTPClient { + return &BeaconHTTPClient{client: client, baseURL: baseURL} +} + +func (bc *BeaconHTTPClient) request(ctx context.Context, dest any, reqPath string, reqQuery url.Values) error { + base := bc.baseURL + if !strings.HasPrefix(base, "http://") && !strings.HasPrefix(base, "https://") { + base = "http://" + base + } + baseURL, err := url.Parse(base) + + if err != nil { + return fmt.Errorf("failed to parse base URL: %w", err) + } + + reqURL, err := baseURL.Parse(reqPath) + if err != nil { + return fmt.Errorf("failed to parse request path: %w", err) + } + + reqURL.RawQuery = reqQuery.Encode() + + headers := http.Header{} + headers.Add("Accept", "application/json") + + req, err := http.NewRequestWithContext(ctx, "GET", reqURL.String(), nil) + if err != nil { + return fmt.Errorf("failed to create HTTP request: %w", err) + } + req.Header = headers + + resp, err := bc.client.Do(req) + if err != nil { + return fmt.Errorf("http Get failed: %w", err) + } + defer resp.Body.Close() + + if resp.StatusCode == http.StatusNotFound { + errMsg, _ := io.ReadAll(resp.Body) + return fmt.Errorf("failed request with status %d: %s: %w", resp.StatusCode, string(errMsg), ethereum.NotFound) + } else if resp.StatusCode != http.StatusOK { + errMsg, _ := io.ReadAll(resp.Body) + return fmt.Errorf("failed request with status %d: %s", resp.StatusCode, string(errMsg)) + } + + err = json.NewDecoder(resp.Body).Decode(dest) + if err != nil { + return err + } + + return nil +} + +func (bc *BeaconHTTPClient) NodeVersion(ctx context.Context) (string, error) { + var resp APIVersionResponse + if err := bc.request(ctx, &resp, versionMethod, nil); err != nil { + return "", err + } + return resp.Data.Version, nil +} + +func (bc *BeaconHTTPClient) ConfigSpec(ctx context.Context) (APIConfigResponse, error) { + var configResp APIConfigResponse + if err := bc.request(ctx, &configResp, specMethod, nil); err != nil { + return APIConfigResponse{}, err + } + return configResp, nil +} + +func (bc *BeaconHTTPClient) BeaconGenesis(ctx context.Context) (APIGenesisResponse, error) { + var genesisResp APIGenesisResponse + if err := bc.request(ctx, &genesisResp, genesisMethod, nil); err != nil { + return APIGenesisResponse{}, err + } + return genesisResp, nil +} + +func (bc *BeaconHTTPClient) BeaconBlobSideCars(ctx context.Context, slot uint64) (APIGetBlobSidecarsResponse, error) { + reqPath := path.Join(sidecarsMethodPrefix, strconv.FormatUint(slot, 10)) + var reqQuery url.Values + var resp APIGetBlobSidecarsResponse + + err := bc.request(ctx, &resp, reqPath, reqQuery) + if err != nil { + return APIGetBlobSidecarsResponse{}, err + } + return resp, nil +} + +type ClientPool[T any] struct { + clients []T + index int +} + +func NewClientPool[T any](clients ...T) *ClientPool[T] { + return &ClientPool[T]{ + clients: clients, + index: 0, + } +} + +func (p *ClientPool[T]) Len() int { + return len(p.clients) +} + +func (p *ClientPool[T]) Get() T { + return p.clients[p.index] +} + +func (p *ClientPool[T]) MoveToNext() { + p.index += 1 + if p.index == len(p.clients) { + p.index = 0 + } +} + +// NewL1BeaconClient returns a client for making requests to an L1 consensus layer node. +// Fallbacks are optional clients that will be used for fetching blobs. L1BeaconClient will rotate between +// the `cl` and the fallbacks whenever a client runs into an error while fetching blobs. +func NewL1BeaconClient(cl BeaconClient, fallbacks ...BlobSideCarsFetcher) *L1BeaconClient { + cs := append([]BlobSideCarsFetcher{cl}, fallbacks...) + return &L1BeaconClient{ + cl: cl, + pool: NewClientPool[BlobSideCarsFetcher](cs...), + } +} + +type TimeToSlotFn func(timestamp uint64) (uint64, error) + +// GetTimeToSlotFn returns a function that converts a timestamp to a slot number. +func (cl *L1BeaconClient) GetTimeToSlotFn(ctx context.Context) (TimeToSlotFn, error) { + cl.initLock.Lock() + defer cl.initLock.Unlock() + if cl.timeToSlotFn != nil { + return cl.timeToSlotFn, nil + } + + genesis, err := cl.cl.BeaconGenesis(ctx) + if err != nil { + return nil, err + } + + config, err := cl.cl.ConfigSpec(ctx) + if err != nil { + return nil, err + } + + genesisTime := uint64(genesis.Data.GenesisTime) + secondsPerSlot := uint64(config.Data.SecondsPerSlot) + if secondsPerSlot == 0 { + return nil, fmt.Errorf("got bad value for seconds per slot: %v", config.Data.SecondsPerSlot) + } + cl.timeToSlotFn = func(timestamp uint64) (uint64, error) { + if timestamp < genesisTime { + return 0, fmt.Errorf("provided timestamp (%v) precedes genesis time (%v)", timestamp, genesisTime) + } + return (timestamp - genesisTime) / secondsPerSlot, nil + } + return cl.timeToSlotFn, nil +} + +func (cl *L1BeaconClient) fetchSidecars(ctx context.Context, slot uint64) (APIGetBlobSidecarsResponse, error) { + var errs []error + for i := 0; i < cl.pool.Len(); i++ { + f := cl.pool.Get() + resp, err := f.BeaconBlobSideCars(ctx, slot) + if err != nil { + cl.pool.MoveToNext() + errs = append(errs, err) + } else { + return resp, nil + } + } + return APIGetBlobSidecarsResponse{}, errors.Join(errs...) +} + +// GetBlobSidecars fetches blob sidecars that were confirmed in the specified +// L1 block with the given indexed hashes. +// Order of the returned sidecars is guaranteed to be that of the hashes. +// Blob data is not checked for validity. +func (cl *L1BeaconClient) GetBlobSidecars(ctx context.Context, b *types.Header, hashes []gethcommon.Hash) ([]*BlobSidecar, error) { + if len(hashes) == 0 { + return []*BlobSidecar{}, nil + } + slotFn, err := cl.GetTimeToSlotFn(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get time to slot function: %w", err) + } + slot, err := slotFn(b.Time) + if err != nil { + return nil, fmt.Errorf("error in converting b.Time to slot: %w", err) + } + + resp, err := cl.fetchSidecars(ctx, slot) + if err != nil { + return nil, fmt.Errorf("failed to fetch blob sidecars for slot %v block %v: %w", slot, b, err) + } + + sidecars := make([]*APIBlobSidecar, 0, len(hashes)) + // find the sidecars that match the provided versioned hashes + for _, h := range hashes { + for _, sidecar := range resp.Data { + versionedHash := KZGToVersionedHash(kzg4844.Commitment(sidecar.KZGCommitment)) + //println("Looking for versioned hash: ", h.Hex()) + //println("Sidecars with versioned hash: ", versionedHash.Hex()) + //println("") + if h == versionedHash { + sidecars = append(sidecars, sidecar) + break + } + } + } + + if len(hashes) != len(sidecars) { + return nil, fmt.Errorf("expected %v sidecars but got %v", len(hashes), len(sidecars)) + } + + blobSidecars := make([]*BlobSidecar, 0, len(hashes)) + for _, sidecar := range sidecars { + blobSidecars = append(blobSidecars, sidecar.BlobSidecar()) + } + + return blobSidecars, nil +} + +// FetchBlobs fetches blobs that were confirmed in the specified L1 block with the given indexed +// hashes. The order of the returned blobs will match the order of `hashes`. Confirms each +// blob's validity by checking its proof against the commitment, and confirming the commitment +// hashes to the expected value. Returns error if any blob is found invalid. +func (cl *L1BeaconClient) FetchBlobs(ctx context.Context, b *types.Header, hashes []gethcommon.Hash) ([]*kzg4844.Blob, error) { + blobSidecars, err := cl.GetBlobSidecars(ctx, b, hashes) + if err != nil { + return nil, fmt.Errorf("failed to get blob sidecars for Block Header %s: %w", b.Hash().Hex(), err) + } + return BlobsFromSidecars(blobSidecars, hashes) +} + +func BlobsFromSidecars(blobSidecars []*BlobSidecar, hashes []gethcommon.Hash) ([]*kzg4844.Blob, error) { + if len(blobSidecars) != len(hashes) { + return nil, fmt.Errorf("number of hashes and blobSidecars mismatch, %d != %d", len(hashes), len(blobSidecars)) + } + + out := make([]*kzg4844.Blob, len(hashes)) + + for i, hash := range hashes { + var matchedSidecar *BlobSidecar + for _, sidecar := range blobSidecars { + versionedHash := KZGToVersionedHash(kzg4844.Commitment(sidecar.KZGCommitment)) + if versionedHash == hash { + matchedSidecar = sidecar + break + } + } + + if matchedSidecar == nil { + return nil, fmt.Errorf("no matching BlobSidecar found for hash %s", hash.Hex()) + } + + // confirm blob data is valid by verifying its proof against the commitment + if err := VerifyBlobProof(&matchedSidecar.Blob, kzg4844.Commitment(matchedSidecar.KZGCommitment), kzg4844.Proof(matchedSidecar.KZGProof)); err != nil { + return nil, fmt.Errorf("blob for hash %s failed verification: %w", hash.Hex(), err) + } + + out[i] = &matchedSidecar.Blob + } + + return out, nil +} diff --git a/go/ethadapter/beacon_client_test.go b/go/ethadapter/beacon_client_test.go new file mode 100644 index 0000000000..610c62fe78 --- /dev/null +++ b/go/ethadapter/beacon_client_test.go @@ -0,0 +1,140 @@ +package ethadapter + +import ( + gethcommon "github.com/ethereum/go-ethereum/common" + "math/big" + "testing" + + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/stretchr/testify/require" + "github.com/ten-protocol/go-ten/go/common" +) + +//FIXME +//func TestBlobsFromSidecars(t *testing.T) { +// indices := []uint64{5, 7, 2} +// +// // blobs should be returned in order of their indices in the hashes array regardless +// // of the sidecar ordering +// hash0, sidecar0 := makeTestBlobSidecar(indices[0]) +// hash1, sidecar1 := makeTestBlobSidecar(indices[1]) +// hash2, sidecar2 := makeTestBlobSidecar(indices[2]) +// +// hashes := []gethcommon.Hash{hash0, hash1, hash2} +// +// // put the sidecars in scrambled order to confirm error +// sidecars := []*BlobSidecar{sidecar2, sidecar0, sidecar1} +// _, err := BlobsFromSidecars(sidecars, hashes) +// require.Error(t, err) +// +// // too few sidecars should error +// sidecars = []*BlobSidecar{sidecar0, sidecar1} +// _, err = BlobsFromSidecars(sidecars, hashes) +// require.Error(t, err) +// +// // correct order should work +// sidecars = []*BlobSidecar{sidecar0, sidecar1, sidecar2} +// blobs, err := BlobsFromSidecars(sidecars, hashes) +// require.NoError(t, err) +// // confirm order by checking first blob byte against expected index +// for i := range blobs { +// require.Equal(t, byte(indices[i]), blobs[i][0]) +// } +// +// // mangle a proof to make sure it's detected +// badProof := *sidecar0 +// badProof.KZGProof[11]++ +// sidecars[1] = &badProof +// _, err = BlobsFromSidecars(sidecars, hashes) +// require.Error(t, err) +// +// // mangle a commitment to make sure it's detected +// badCommitment := *sidecar0 +// badCommitment.KZGCommitment[13]++ +// sidecars[1] = &badCommitment +// _, err = BlobsFromSidecars(sidecars, hashes) +// require.Error(t, err) +// +// // mangle a hash to make sure it's detected +// sidecars[1] = sidecar0 +// hashes[2][17]++ +// _, err = BlobsFromSidecars(sidecars, hashes) +// require.Error(t, err) +//} + +func TestBlobsFromSidecars_EmptySidecarList(t *testing.T) { + var hashes []gethcommon.Hash + var sidecars []*BlobSidecar + blobs, err := BlobsFromSidecars(sidecars, hashes) + require.NoError(t, err) + require.Empty(t, blobs, "blobs should be empty when no sidecars are provided") +} + +func TestClientPoolSingle(t *testing.T) { + p := NewClientPool[int](1) + for i := 0; i < 10; i++ { + require.Equal(t, 1, p.Get()) + p.MoveToNext() + } +} + +func TestClientPoolSeveral(t *testing.T) { + p := NewClientPool[int](0, 1, 2, 3) + for i := 0; i < 25; i++ { + require.Equal(t, i%4, p.Get()) + p.MoveToNext() + } +} + +func TestBlobEncoding(t *testing.T) { + extRlp := createRollup(4444) + encRollup, err := common.EncodeRollup(&extRlp) + if err != nil { + t.Errorf("error encoding rollup") + } + + // Encode data into blobs + blobs, err := EncodeBlobs(encRollup) + if err != nil { + t.Errorf("error encoding blobs: %s", err) + } + + rollup, err := ReconstructRollup(blobs) + if err != nil { + t.Errorf("error reconstructing rollup: %s", err) + } + + if big.NewInt(int64(rollup.Header.LastBatchSeqNo)).Cmp(big.NewInt(4444)) != 0 { + t.Errorf("rollup was not decoded correctly") + } +} + +func makeTestBlobSidecar(index uint64) (gethcommon.Hash, *BlobSidecar) { + blob := kzg4844.Blob{} + // make first byte of test blob match its index so we can easily verify if is returned in the + // expected order + blob[0] = byte(index) + commit, _ := kzg4844.BlobToCommitment(&blob) + proof, _ := kzg4844.ComputeBlobProof(&blob, commit) + hash := KZGToVersionedHash(commit) + + sidecar := BlobSidecar{ + Index: Uint64String(index), + Blob: blob, + KZGCommitment: Bytes48(commit), + KZGProof: Bytes48(proof), + } + return hash, &sidecar +} + +func createRollup(lastBatch int64) common.ExtRollup { + header := common.RollupHeader{ + LastBatchSeqNo: uint64(lastBatch), + } + + rollup := common.ExtRollup{ + Header: &header, + } + + return rollup +} diff --git a/go/ethadapter/blob.go b/go/ethadapter/blob.go new file mode 100644 index 0000000000..1bbec08065 --- /dev/null +++ b/go/ethadapter/blob.go @@ -0,0 +1,136 @@ +package ethadapter + +import ( + "bytes" + "fmt" + + "github.com/ethereum/go-ethereum/core/types" + + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ethereum/go-ethereum/params" + "github.com/ethereum/go-ethereum/rlp" + "github.com/ten-protocol/go-ten/go/common" +) + +// The number of bits in a BLS scalar that aren't part of a whole byte. +const excessBlobBits = 6 // = math.floor(math.log2(BLS_MODULUS)) % 8 + +// MakeSidecar builds & returns the BlobTxSidecar and corresponding blob hashes from the raw blob +// data. +func MakeSidecar(blobs []*kzg4844.Blob) (*types.BlobTxSidecar, []gethcommon.Hash, error) { + sidecar := &types.BlobTxSidecar{} + var blobHashes []gethcommon.Hash + for i, blob := range blobs { + sidecar.Blobs = append(sidecar.Blobs, *blob) + commitment, err := kzg4844.BlobToCommitment(blob) + if err != nil { + return nil, nil, fmt.Errorf("cannot compute KZG commitment of blob %d in tx candidate: %w", i, err) + } + sidecar.Commitments = append(sidecar.Commitments, commitment) + proof, err := kzg4844.ComputeBlobProof(blob, commitment) + if err != nil { + return nil, nil, fmt.Errorf("cannot compute KZG proof for fast commitment verification of blob %d in tx candidate: %w", i, err) + } + sidecar.Proofs = append(sidecar.Proofs, proof) + //blobHash := KZGToVersionedHash(commitment) + //println("created blob hash at ", call, blobHash.Hex()) + blobHashes = append(blobHashes, KZGToVersionedHash(commitment)) + } + return sidecar, blobHashes, nil +} + +// EncodeBlobs takes converts bytes into blobs used for KZG commitment EIP-4844 +// transactions on Ethereum. +func EncodeBlobs(data []byte) ([]*kzg4844.Blob, error) { + data, err := rlp.EncodeToBytes(data) + if err != nil { + return nil, err + } + var blobs []*kzg4844.Blob + for len(data) > 0 { + var b kzg4844.Blob + data = fillBlobBytes(b[:], data) + data, err = fillBlobBits(b[:], data) + if err != nil { + return nil, err + } + blobs = append(blobs, &b) + } + return blobs, nil +} + +func fillBlobBytes(blob []byte, data []byte) []byte { + for fieldElement := 0; fieldElement < params.BlobTxFieldElementsPerBlob; fieldElement++ { + startIdx := fieldElement*32 + 1 + copy(blob[startIdx:startIdx+31], data) + if len(data) <= 31 { + return nil + } + data = data[31:] + } + return data +} + +func fillBlobBits(blob []byte, data []byte) ([]byte, error) { + var acc uint16 + accBits := 0 + for fieldElement := 0; fieldElement < params.BlobTxFieldElementsPerBlob; fieldElement++ { + if accBits < excessBlobBits && len(data) > 0 { + acc |= uint16(data[0]) << accBits + accBits += 8 + data = data[1:] + } + blob[fieldElement*32] = uint8(acc & ((1 << excessBlobBits) - 1)) + accBits -= excessBlobBits + if accBits < 0 { + // no more data + break + } + acc >>= excessBlobBits + } + if accBits > 0 { + return nil, fmt.Errorf("somehow ended up with %v spare accBits", accBits) + } + return data, nil +} + +// DecodeBlobs decodes blobs into the data encoded in them accounting for excess blob bits +func DecodeBlobs(blobs []*kzg4844.Blob) ([]byte, error) { + var rlpData []byte + for _, blob := range blobs { + for fieldIndex := 0; fieldIndex < params.BlobTxFieldElementsPerBlob; fieldIndex++ { + rlpData = append(rlpData, blob[fieldIndex*32+1:(fieldIndex+1)*32]...) + } + var acc uint16 + cumulativeBits := 0 + for fieldIndex := 0; fieldIndex < params.BlobTxFieldElementsPerBlob; fieldIndex++ { + acc |= uint16(blob[fieldIndex*32]) << cumulativeBits + cumulativeBits += excessBlobBits + if cumulativeBits >= 8 { + rlpData = append(rlpData, uint8(acc)) + acc >>= 8 + cumulativeBits -= 8 + } + } + if cumulativeBits != 0 { + return nil, fmt.Errorf("somehow ended up with %v spare cumulative bits", cumulativeBits) + } + } + var outputData []byte + err := rlp.Decode(bytes.NewReader(rlpData), &outputData) + return outputData, err +} + +// ReconstructRollup decodes and returns the ExtRollup in the blob +func ReconstructRollup(blobs []*kzg4844.Blob) (*common.ExtRollup, error) { + data, err := DecodeBlobs(blobs) + if err != nil { + fmt.Println("Error decoding rollup blob:", err) + } + var rollup common.ExtRollup + if err := rlp.DecodeBytes(data, &rollup); err != nil { + return nil, fmt.Errorf("could not decode rollup. Cause: %w", err) + } + return &rollup, nil +} diff --git a/go/ethadapter/blob_api.go b/go/ethadapter/blob_api.go new file mode 100644 index 0000000000..be0ea3dab7 --- /dev/null +++ b/go/ethadapter/blob_api.go @@ -0,0 +1,158 @@ +package ethadapter + +import ( + "crypto/sha256" + "fmt" + "reflect" + "strconv" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/ethereum/go-ethereum/crypto/kzg4844" +) + +type BlobSidecar struct { + Blob kzg4844.Blob `json:"blob"` + Index Uint64String `json:"index"` + KZGCommitment Bytes48 `json:"kzg_commitment"` + KZGProof Bytes48 `json:"kzg_proof"` +} + +type APIBlobSidecar struct { + Index Uint64String `json:"index"` + Blob kzg4844.Blob `json:"blob"` + KZGCommitment Bytes48 `json:"kzg_commitment"` + KZGProof Bytes48 `json:"kzg_proof"` + SignedBlockHeader SignedBeaconBlockHeader `json:"signed_block_header"` + // The inclusion-proof of the blob-sidecar into the beacon-block is ignored, + // since we verify blobs by their versioned hashes against the execution-layer block instead. +} + +func (sc *APIBlobSidecar) BlobSidecar() *BlobSidecar { + return &BlobSidecar{ + Blob: sc.Blob, + Index: sc.Index, + KZGCommitment: sc.KZGCommitment, + KZGProof: sc.KZGProof, + } +} + +type SignedBeaconBlockHeader struct { + Message BeaconBlockHeader `json:"message"` + // signature is ignored, since we verify blobs against EL versioned-hashes +} + +type BeaconBlockHeader struct { + Slot Uint64String `json:"slot"` + ProposerIndex Uint64String `json:"proposer_index"` + ParentRoot Bytes32 `json:"parent_root"` + StateRoot Bytes32 `json:"state_root"` + BodyRoot Bytes32 `json:"body_root"` +} + +type APIGetBlobSidecarsResponse struct { + Data []*APIBlobSidecar `json:"data"` +} + +type ReducedGenesisData struct { + GenesisTime Uint64String `json:"genesis_time"` +} + +type APIGenesisResponse struct { + Data ReducedGenesisData `json:"data"` +} + +type ReducedConfigData struct { + SecondsPerSlot Uint64String `json:"SECONDS_PER_SLOT"` +} + +type APIConfigResponse struct { + Data ReducedConfigData `json:"data"` +} + +type APIVersionResponse struct { + Data VersionInformation `json:"data"` +} + +type VersionInformation struct { + Version string `json:"version"` +} + +// Uint64String is a decimal string representation of an uint64, for usage in the Beacon API JSON encoding +type Uint64String uint64 + +func (v Uint64String) MarshalText() (out []byte, err error) { + out = strconv.AppendUint(out, uint64(v), 10) + return +} + +func (v *Uint64String) UnmarshalText(b []byte) error { + n, err := strconv.ParseUint(string(b), 0, 64) + if err != nil { + return err + } + *v = Uint64String(n) + return nil +} + +type Bytes48 [48]byte + +func (b *Bytes48) UnmarshalJSON(text []byte) error { + return hexutil.UnmarshalFixedJSON(reflect.TypeOf(b), text, b[:]) +} + +func (b *Bytes48) UnmarshalText(text []byte) error { + return hexutil.UnmarshalFixedText("Bytes32", text, b[:]) +} + +func (b Bytes48) MarshalText() ([]byte, error) { + return hexutil.Bytes(b[:]).MarshalText() +} + +func (b Bytes48) String() string { + return hexutil.Encode(b[:]) +} + +// TerminalString implements log.TerminalStringer, formatting a string for console +// output during logging. +func (b Bytes48) TerminalString() string { + return fmt.Sprintf("%x..%x", b[:3], b[45:]) +} + +type Bytes32 [32]byte + +func (b *Bytes32) UnmarshalJSON(text []byte) error { + return hexutil.UnmarshalFixedJSON(reflect.TypeOf(b), text, b[:]) +} + +func (b *Bytes32) UnmarshalText(text []byte) error { + return hexutil.UnmarshalFixedText("Bytes32", text, b[:]) +} + +func (b Bytes32) MarshalText() ([]byte, error) { + return hexutil.Bytes(b[:]).MarshalText() +} + +func (b Bytes32) String() string { + return hexutil.Encode(b[:]) +} + +// KZGToVersionedHash computes the "blob hash" (a.k.a. versioned-hash) of a blob-commitment, as used in a blob-tx. +// We implement it here because it is unfortunately not (currently) exposed by geth. +func KZGToVersionedHash(commitment kzg4844.Commitment) (out common.Hash) { + hasher := sha256.New() + return kzg4844.CalcBlobHashV1(hasher, &commitment) +} + +// VerifyBlobProof verifies that the given blob and proof corresponds to the given commitment, +// returning error if the verification fails. +func VerifyBlobProof(blob *kzg4844.Blob, commitment kzg4844.Commitment, proof kzg4844.Proof) error { + return kzg4844.VerifyBlobProof(blob, commitment, proof) +} + +func TimeToSlot(timestamp uint64, genesisTime uint64, secondsPerSlot uint64) (uint64, error) { + if timestamp < genesisTime { + return 0, fmt.Errorf("provided timestamp (%v) precedes genesis time (%v)", timestamp, genesisTime) + } + return (timestamp - genesisTime) / secondsPerSlot, nil +} diff --git a/go/ethadapter/geth_rpc_client.go b/go/ethadapter/geth_rpc_client.go index e9b51a9640..e8233c1646 100644 --- a/go/ethadapter/geth_rpc_client.go +++ b/go/ethadapter/geth_rpc_client.go @@ -8,6 +8,10 @@ import ( "math/big" "time" + "github.com/ethereum/go-ethereum/consensus/misc/eip4844" + "github.com/ethereum/go-ethereum/params" + "github.com/holiman/uint256" + "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi/bind" gethcommon "github.com/ethereum/go-ethereum/common" @@ -27,10 +31,14 @@ const ( connRetryMaxWait = 10 * time.Minute // after this duration, we will stop retrying to connect and return the failure connRetryInterval = 500 * time.Millisecond _maxRetryPriceIncreases = 5 - _retryPriceMultiplier = 1.2 + _retryPriceMultiplier = 2 // geth now wants 100% increase or for you to wait _defaultBlockCacheSize = 51 // enough for 50 request batch size and one for previous block + ) +// geth enforces a 1 gwei minimum for blob tx fee +var minBlobTxFee = big.NewInt(params.GWei) + // gethRPCClient implements the EthClient interface and allows connection to a real ethereum node type gethRPCClient struct { client *ethclient.Client // the underlying eth rpc client @@ -256,6 +264,17 @@ func (e *gethRPCClient) PrepareTransactionToSend(ctx context.Context, txData typ // PrepareTransactionToRetry takes a txData type and overrides the From, Gas and Gas Price field with current values // it bumps the price by a multiplier for retries. retryNumber is zero on first attempt (no multiplier on price) func (e *gethRPCClient) PrepareTransactionToRetry(ctx context.Context, txData types.TxData, from gethcommon.Address, nonce uint64, retryNumber int) (types.TxData, error) { + switch tx := txData.(type) { + case *types.LegacyTx: + return e.prepareLegacyTxToRetry(ctx, tx, from, nonce, retryNumber) + case *types.BlobTx: + return e.prepareBlobTxToRetry(ctx, tx, from, nonce, retryNumber) + default: + return nil, fmt.Errorf("unsupported transaction type: %T", tx) + } +} + +func (e *gethRPCClient) prepareLegacyTxToRetry(ctx context.Context, txData types.TxData, from gethcommon.Address, nonce uint64, retryNumber int) (types.TxData, error) { unEstimatedTx := types.NewTx(txData) gasPrice, err := e.EthClient().SuggestGasPrice(ctx) if err != nil { @@ -293,6 +312,67 @@ func (e *gethRPCClient) PrepareTransactionToRetry(ctx context.Context, txData ty }, nil } +// PrepareBlobTransactionToRetry takes a txData type and overrides the From, Gas and Gas Price field with current values +// it bumps the price by a multiplier for retries. retryNumber is zero on first attempt (no multiplier on price) +func (e *gethRPCClient) prepareBlobTxToRetry(ctx context.Context, txData types.TxData, from gethcommon.Address, nonce uint64, retryNumber int) (types.TxData, error) { + unEstimatedTx := types.NewTx(txData) + to := unEstimatedTx.To() + value := unEstimatedTx.Value() + data := unEstimatedTx.Data() + gasPrice, err := e.EthClient().SuggestGasTipCap(ctx) + if err != nil { + return nil, fmt.Errorf("could not suggest gas price - %w", err) + } + + // TODO move all this into common function + // it should never happen but to avoid any risk of repeated price increases we cap the possible retry price bumps to 5 + retryFloat := math.Min(_maxRetryPriceIncreases, float64(retryNumber)) + // we apply a 20% gas price increase for each retry (retrying with similar price gets rejected by mempool) + // Retry '0' is the first attempt, gives multiplier of 1.0 + multiplier := math.Pow(_retryPriceMultiplier, retryFloat) + + gasPriceFloat := new(big.Float).SetInt(gasPrice) + retryPriceFloat := big.NewFloat(0).Mul(gasPriceFloat, big.NewFloat(multiplier)) + // prices aren't big enough for float error to matter + retryPrice, _ := retryPriceFloat.Int(nil) + + gasLimit, err := e.EthClient().EstimateGas(ctx, ethereum.CallMsg{ + From: from, + To: to, + Value: value, + Data: data, + }) + if err != nil { + return nil, fmt.Errorf("could not estimate gas - %w", err) + } + + // The base blob fee is calculated from the parent header + head, err := e.EthClient().HeaderByNumber(ctx, nil) + if err != nil { + return nil, fmt.Errorf("failed to fetch the suggested base fee: %w", err) + } else if head.BaseFee == nil { + return nil, fmt.Errorf("txmgr does not support pre-london blocks that do not have a base fee") + } + var blobBaseFee *big.Int + if head.ExcessBlobGas != nil { + blobBaseFee = eip4844.CalcBlobFee(*head.ExcessBlobGas) + } + blobFeeCap := calcBlobFeeCap(blobBaseFee, retryNumber) + + return &types.BlobTx{ + Nonce: nonce, + GasTipCap: uint256.MustFromBig(retryPrice), // aka maxPriorityFeePerGas + GasFeeCap: uint256.MustFromBig(retryPrice), // aka. maxFeePerGas + Gas: gasLimit, + To: *unEstimatedTx.To(), + Value: uint256.MustFromBig(value), + Data: unEstimatedTx.Data(), + BlobFeeCap: uint256.MustFromBig(blobFeeCap), + BlobHashes: unEstimatedTx.BlobHashes(), + Sidecar: unEstimatedTx.BlobTxSidecar(), + }, nil +} + // ReconnectIfClosed closes the existing client connection and creates a new connection to the same address:port func (e *gethRPCClient) ReconnectIfClosed() error { if e.Alive() { @@ -333,3 +413,23 @@ func connect(rpcURL string, connectionTimeout time.Duration) (*ethclient.Client, return c, err } + +// calcBlobFeeCap computes a suggested blob fee cap that is twice the current header's blob base fee +// value, with a minimum value of minBlobTxFee. It also doubles the blob fee cap based on the retry number. +func calcBlobFeeCap(blobBaseFee *big.Int, retryNumber int) *big.Int { + // Base calculation: twice the current blob base fee + blobFeeCap := new(big.Int).Mul(blobBaseFee, big.NewInt(2)) + + // Ensure the blob fee cap is at least the minimum value + if blobFeeCap.Cmp(minBlobTxFee) < 0 { + blobFeeCap.Set(minBlobTxFee) + } + + // Double the blob fee cap for each retry attempt + if retryNumber > 0 { + multiplier := new(big.Int).Exp(big.NewInt(2), big.NewInt(int64(retryNumber)), nil) + blobFeeCap.Mul(blobFeeCap, multiplier) + } + + return blobFeeCap +} diff --git a/go/ethadapter/http/http.go b/go/ethadapter/http/http.go new file mode 100644 index 0000000000..56c5f39975 --- /dev/null +++ b/go/ethadapter/http/http.go @@ -0,0 +1,93 @@ +package http + +import ( + "context" + "errors" + "fmt" + "net/http" + "net/url" + "time" + + "github.com/ethereum/go-ethereum/log" +) + +const ( + DefaultTimeoutSeconds = 30 +) + +var _ HTTP = (*BasicHTTPClient)(nil) + +type HTTP interface { + Get(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) +} + +type BasicHTTPClient struct { + endpoint string + header http.Header // optional header to use in every request + + log log.Logger + client *http.Client +} + +func NewBasicHTTPClient(endpoint string, log log.Logger, opts ...BasicHTTPClientOption) *BasicHTTPClient { + c := &BasicHTTPClient{ + endpoint: endpoint, + log: log, + client: &http.Client{Timeout: DefaultTimeoutSeconds * time.Second}, + } + + for _, opt := range opts { + opt.Apply(c) + } + + return c +} + +type BasicHTTPClientOption interface { + Apply(c *BasicHTTPClient) +} + +type BasicHTTPClientOptionFn func(*BasicHTTPClient) + +func (fn BasicHTTPClientOptionFn) Apply(c *BasicHTTPClient) { + fn(c) +} + +func WithHeader(h http.Header) BasicHTTPClientOption { + return BasicHTTPClientOptionFn(func(c *BasicHTTPClient) { + c.header = h + }) +} + +var ErrNoEndpoint = errors.New("no endpoint is configured") + +func (cl *BasicHTTPClient) Get(ctx context.Context, p string, query url.Values, headers http.Header) (*http.Response, error) { + if cl.endpoint == "" { + return nil, ErrNoEndpoint + } + target, err := url.Parse(cl.endpoint) + if err != nil { + return nil, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + // If we include the raw query in the path-join, it gets url-encoded, + // and fails to parse as query, and ends up in the url.URL.Path part on the server side. + // We want to avoid that, and insert the query manually. Real footgun in the url package. + target = target.JoinPath(p) + target.RawQuery = query.Encode() + req, err := http.NewRequestWithContext(ctx, http.MethodGet, target.String(), nil) + if err != nil { + return nil, fmt.Errorf("%w: failed to construct request", err) + } + addHTTPHeaders(req.Header, cl.header, headers) + return cl.client.Do(req) +} + +func addHTTPHeaders(header http.Header, hs ...http.Header) { + for _, h := range hs { + for key, values := range h { + for _, value := range values { + header.Add(key, value) + } + } + } +} diff --git a/go/ethadapter/http_client.go b/go/ethadapter/http_client.go new file mode 100644 index 0000000000..ffe5c754f1 --- /dev/null +++ b/go/ethadapter/http_client.go @@ -0,0 +1,92 @@ +package ethadapter + +import ( + "context" + "errors" + "fmt" + "github.com/ethereum/go-ethereum/log" + "net/http" + "net/url" + "time" +) + +const ( + DefaultTimeoutSeconds = 30 +) + +var _ HTTP = (*BasicHTTPClient)(nil) + +type HTTP interface { + Get(ctx context.Context, path string, query url.Values, headers http.Header) (*http.Response, error) +} + +type BasicHTTPClient struct { + endpoint string + header http.Header + + log log.Logger + client *http.Client +} + +func NewBasicHTTPClient(endpoint string, log log.Logger, opts ...BasicHTTPClientOption) *BasicHTTPClient { + c := &BasicHTTPClient{ + endpoint: endpoint, + log: log, + client: &http.Client{Timeout: DefaultTimeoutSeconds * time.Second}, + } + + for _, opt := range opts { + opt.Apply(c) + } + + return c +} + +type BasicHTTPClientOption interface { + Apply(c *BasicHTTPClient) +} + +type BasicHTTPClientOptionFn func(*BasicHTTPClient) + +func (fn BasicHTTPClientOptionFn) Apply(c *BasicHTTPClient) { + fn(c) +} + +func WithHeader(h http.Header) BasicHTTPClientOption { + return BasicHTTPClientOptionFn(func(c *BasicHTTPClient) { + c.header = h + }) +} + +var ErrNoEndpoint = errors.New("no endpoint is configured") + +func (cl *BasicHTTPClient) Get(ctx context.Context, p string, query url.Values, headers http.Header) (*http.Response, error) { + if cl.endpoint == "" { + return nil, ErrNoEndpoint + } + target, err := url.Parse(cl.endpoint) + if err != nil { + return nil, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + // If we include the raw query in the path-join, it gets url-encoded, + // and fails to parse as query, and ends up in the url.URL.Path part on the server side. + // We want to avoid that, and insert the query manually. Real footgun in the url package. + target = target.JoinPath(p) + target.RawQuery = query.Encode() + req, err := http.NewRequestWithContext(ctx, http.MethodGet, target.String(), nil) + if err != nil { + return nil, fmt.Errorf("%w: failed to construct request", err) + } + addHTTPHeaders(req.Header, cl.header, headers) + return cl.client.Do(req) +} + +func addHTTPHeaders(header http.Header, hs ...http.Header) { + for _, h := range hs { + for key, values := range h { + for _, value := range values { + header.Add(key, value) + } + } + } +} diff --git a/go/ethadapter/interface.go b/go/ethadapter/interface.go index 1245da18d4..8783eaf50a 100644 --- a/go/ethadapter/interface.go +++ b/go/ethadapter/interface.go @@ -2,6 +2,7 @@ package ethadapter import ( "context" + "fmt" "math/big" "github.com/ten-protocol/go-ten/go/common" @@ -50,3 +51,14 @@ type EthClient interface { type Info struct { L2ID gethcommon.Address // the address of the Obscuro node this client is dedicated to } + +type L1BlockRef struct { + Hash gethcommon.Hash `json:"hash"` + Number uint64 `json:"number"` + ParentHash gethcommon.Hash `json:"parentHash"` + Time uint64 `json:"timestamp"` +} + +func (id L1BlockRef) String() string { + return fmt.Sprintf("%s:%d", id.Hash.String(), id.Number) +} diff --git a/go/ethadapter/l1_transaction.go b/go/ethadapter/l1_transaction.go index c83cfa0cc9..021b804d29 100644 --- a/go/ethadapter/l1_transaction.go +++ b/go/ethadapter/l1_transaction.go @@ -11,13 +11,17 @@ import ( "github.com/ethereum/go-ethereum/crypto" ) -// L1Transaction is an abstraction that transforms an Ethereum transaction into a format that can be consumed more easily by Obscuro. +// L1Transaction is an abstraction that transforms an Ethereum transaction into a format that can be consumed more easily by Ten. type L1Transaction interface{} type L1RollupTx struct { Rollup common.EncodedRollup } +type L1RollupHashes struct { + BlobHashes []gethcommon.Hash +} + type L1DepositTx struct { Amount *big.Int // Amount to be deposited To *gethcommon.Address // Address the ERC20 Transfer was made to (always be the Management Contract Addr) diff --git a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go index 1e54c61fb5..f331538ea4 100644 --- a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go +++ b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go @@ -26,11 +26,12 @@ const methodBytesLen = 4 type MgmtContractLib interface { IsMock() bool CreateRollup(t *ethadapter.L1RollupTx) types.TxData + CreateBlobRollup(t *ethadapter.L1RollupTx) (types.TxData, error) CreateRequestSecret(tx *ethadapter.L1RequestSecretTx) types.TxData CreateRespondSecret(tx *ethadapter.L1RespondSecretTx, verifyAttester bool) types.TxData CreateInitializeSecret(tx *ethadapter.L1InitializeSecretTx) types.TxData - // DecodeTx receives a *types.Transaction and converts it to an common.L1Transaction + // DecodeTx receives a *types.Transaction and converts it to a common.L1Transaction DecodeTx(tx *types.Transaction) ethadapter.L1Transaction GetContractAddr() *gethcommon.Address @@ -87,19 +88,13 @@ func (c *contractLibImpl) DecodeTx(tx *types.Transaction) ethadapter.L1Transacti contractCallData := map[string]interface{}{} switch method.Name { case AddRollupMethod: - if err := method.Inputs.UnpackIntoMap(contractCallData, tx.Data()[4:]); err != nil { - panic(err) - } - callData, found := contractCallData["_rollupData"] - if !found { - panic("call data not found for rollupData") - } - rollup := Base64DecodeFromString(callData.(string)) - - return ðadapter.L1RollupTx{ - Rollup: rollup, + if tx.Type() == types.BlobTxType { + return ðadapter.L1RollupHashes{ + BlobHashes: tx.BlobHashes(), + } + } else { + return nil } - case RespondSecretMethod: return c.unpackRespondSecretTx(tx, method, contractCallData) @@ -155,6 +150,52 @@ func (c *contractLibImpl) CreateRollup(t *ethadapter.L1RollupTx) types.TxData { } } +func (c *contractLibImpl) CreateBlobRollup(t *ethadapter.L1RollupTx) (types.TxData, error) { + decodedRollup, err := common.DecodeRollup(t.Rollup) + if err != nil { + panic(err) + } + + metaRollup := ManagementContract.StructsMetaRollup{ + Hash: decodedRollup.Hash(), + Signature: decodedRollup.Header.Signature, + LastSequenceNumber: big.NewInt(int64(decodedRollup.Header.LastBatchSeqNo)), + } + + crossChain := ManagementContract.StructsHeaderCrossChainData{ + Messages: convertCrossChainMessages(decodedRollup.Header.CrossChainMessages), + } + + data, err := c.contractABI.Pack( + AddRollupMethod, + metaRollup, + crossChain, + ) + if err != nil { + panic(err) + } + + // TODO handle when blobs exceed 1Mb + blobs, err := ethadapter.EncodeBlobs(t.Rollup) + if err != nil { + return nil, fmt.Errorf("failed to encode rollup to blobs: %w", err) + } + + var blobHashes []gethcommon.Hash + var sidecar *types.BlobTxSidecar + + if sidecar, blobHashes, err = ethadapter.MakeSidecar(blobs); err != nil { + return nil, fmt.Errorf("failed to make sidecar: %w", err) + } + + return &types.BlobTx{ + To: *c.addr, + Data: data, + BlobHashes: blobHashes, + Sidecar: sidecar, + }, nil +} + func (c *contractLibImpl) CreateRequestSecret(tx *ethadapter.L1RequestSecretTx) types.TxData { data, err := c.contractABI.Pack(RequestSecretMethod, base64EncodeToString(tx.Attestation)) if err != nil { diff --git a/go/host/container/cli.go b/go/host/container/cli.go index ce2337a4ab..1b51fc086b 100644 --- a/go/host/container/cli.go +++ b/go/host/container/cli.go @@ -54,6 +54,7 @@ type HostConfigToml struct { IsInboundP2PDisabled bool L1BlockTime int MaxRollupSize int + L1BeaconUrl string } // ParseConfig returns a config.HostInputConfig based on either the file identified by the `config` flag, or the flags with @@ -96,6 +97,7 @@ func ParseConfig() (*config.HostInputConfig, error) { crossChainInterval := flag.String(crossChainIntervalName, cfg.CrossChainInterval.String(), flagUsageMap[crossChainIntervalName]) isInboundP2PDisabled := flag.Bool(isInboundP2PDisabledName, cfg.IsInboundP2PDisabled, flagUsageMap[isInboundP2PDisabledName]) maxRollupSize := flag.Uint64(maxRollupSizeFlagName, cfg.MaxRollupSize, flagUsageMap[maxRollupSizeFlagName]) + l1BeaconUrl := flag.String(l1BeaconUrlName, cfg.L1BeaconUrl, flagUsageMap[l1BeaconUrlName]) flag.Parse() @@ -155,6 +157,7 @@ func ParseConfig() (*config.HostInputConfig, error) { } cfg.IsInboundP2PDisabled = *isInboundP2PDisabled cfg.MaxRollupSize = *maxRollupSize + cfg.L1BeaconUrl = *l1BeaconUrl return cfg, nil } diff --git a/go/host/container/cli_flags.go b/go/host/container/cli_flags.go index c44c67b1ce..0e2af36976 100644 --- a/go/host/container/cli_flags.go +++ b/go/host/container/cli_flags.go @@ -37,6 +37,7 @@ const ( crossChainIntervalName = "crossChainInterval" isInboundP2PDisabledName = "isInboundP2PDisabled" maxRollupSizeFlagName = "maxRollupSize" + l1BeaconUrlName = "l1BeaconUrl" ) // Returns a map of the flag usages. @@ -78,5 +79,6 @@ func getFlagUsageMap() map[string]string { isInboundP2PDisabledName: "Whether inbound p2p is enabled", maxRollupSizeFlagName: "Max size of a rollup", crossChainIntervalName: "Duration between each cross chain bundle. Can be put down as 1.0s", + l1BeaconUrlName: "Gateway endpoint url for the beacon chain", } } diff --git a/go/host/container/host_container.go b/go/host/container/host_container.go index feeb7f7625..cd671eb7ae 100644 --- a/go/host/container/host_container.go +++ b/go/host/container/host_container.go @@ -151,7 +151,6 @@ func NewHostContainerFromConfig(parsedConfig *config.HostInputConfig, logger get mgmtContractLib := mgmtcontractlib.NewMgmtContractLib(&cfg.ManagementContractAddress, logger) obscuroRelevantContracts := []gethcommon.Address{cfg.ManagementContractAddress, cfg.MessageBusAddress} l1Repo := l1.NewL1Repository(l1Client, obscuroRelevantContracts, logger) - return NewHostContainer(cfg, services, aggP2P, l1Client, l1Repo, enclaveClients, mgmtContractLib, ethWallet, rpcServer, logger, metricsService) } diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index bd6137ad94..124a497b45 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -8,6 +8,8 @@ import ( "sync" "time" + "github.com/ten-protocol/go-ten/go/ethadapter" + "github.com/ten-protocol/go-ten/go/host/storage" "github.com/ten-protocol/go-ten/go/common/stopcontrol" @@ -439,7 +441,9 @@ func (g *Guardian) submitL1Block(block *common.L1Block, isLatest bool) (bool, er } } - resp, err := g.enclaveClient.SubmitL1Block(context.Background(), block.Header(), txWithReceipts, isLatest) + _, rollupTxs, blobsAndHashes, _ := g.sl.L1Publisher().ExtractTenTransactionsAndBlobs(block) + resp, err := g.enclaveClient.SubmitL1Block(context.Background(), block.Header(), txWithReceipts, blobsAndHashes) + g.submitDataLock.Unlock() // lock is only guarding the enclave call, so we can release it now if err != nil { if strings.Contains(err.Error(), errutil.ErrBlockAlreadyProcessed.Error()) { @@ -459,7 +463,7 @@ func (g *Guardian) submitL1Block(block *common.L1Block, isLatest bool) (bool, er } // successfully processed block, update the state g.state.OnProcessedBlock(block.Hash()) - g.processL1BlockTransactions(block) + g.processL1BlockTransactions(block, rollupTxs) if err != nil { return false, fmt.Errorf("submitted block to enclave but could not store the block processing result. Cause: %w", err) @@ -473,12 +477,14 @@ func (g *Guardian) submitL1Block(block *common.L1Block, isLatest bool) (bool, er return true, nil } -func (g *Guardian) processL1BlockTransactions(block *common.L1Block) { +func (g *Guardian) processL1BlockTransactions(block *common.L1Block, rollupTxs []*ethadapter.L1RollupTx) { + // FIXME // if there are any secret responses in the block we should refresh our P2P list to re-sync with the network - _, rollupTxs, contractAddressTxs := g.sl.L1Publisher().ExtractObscuroRelevantTransactions(block) + _, _, contractAddressTxs := g.sl.L1Publisher().ExtractObscuroRelevantTransactions(block) // TODO (@will) this should be removed and pulled from the L1 err := g.storage.AddBlock(block.Header()) + if err != nil { g.logger.Error("Could not add block to host db.", log.ErrKey, err) } @@ -596,13 +602,13 @@ func (g *Guardian) periodicRollupProduction() { case <-rollupCheckTicker.C: if !g.state.IsUpToDate() { // if we're behind the L1, we don't want to produce rollups - g.logger.Debug("skipping rollup production because L1 is not up to date", "state", g.state) + g.logger.Debug("Skipping rollup production because L1 is not up to date", "state", g.state) continue } fromBatch, err := g.getLatestBatchNo() if err != nil { - g.logger.Error("encountered error while trying to retrieve latest sequence number", log.ErrKey, err) + g.logger.Error("Encountered error while trying to retrieve latest sequence number", log.ErrKey, err) continue } diff --git a/go/host/host.go b/go/host/host.go index 219a9185bf..036f90e8f0 100644 --- a/go/host/host.go +++ b/go/host/host.go @@ -4,8 +4,8 @@ import ( "context" "encoding/json" "fmt" - gethcommon "github.com/ethereum/go-ethereum/common" + "net/http" "github.com/ten-protocol/go-ten/go/host/l2" @@ -45,7 +45,6 @@ type host struct { logger gethlog.Logger metricRegistry gethmetrics.Registry - // l2MessageBusAddress is fetched from the enclave but cache it here because it never changes l2MessageBusAddress *gethcommon.Address newHeads chan *common.BatchHeader @@ -96,6 +95,8 @@ func NewHost(config *config.HostConfig, hostServices *ServicesRegistry, p2p host enclService := enclave.NewService(hostIdentity, hostServices, enclGuardians, logger) l2Repo := l2.NewBatchRepository(config, hostServices, hostStorage, logger) subsService := events.NewLogEventManager(hostServices, logger) + //FIXME + blobResolver := l1.NewBlobResolver(ethadapter.NewL1BeaconClient(ethadapter.NewBeaconHTTPClient(new(http.Client), config.L1BeaconUrl))) l2Repo.SubscribeValidatedBatches(batchListener{newHeads: host.newHeads}) hostServices.RegisterService(hostcommon.P2PName, p2p) @@ -108,6 +109,7 @@ func NewHost(config *config.HostConfig, hostServices *ServicesRegistry, p2p host ethClient, mgmtContractLib, l1Repo, + blobResolver, host.stopControl, logger, maxWaitForL1Receipt, @@ -234,7 +236,7 @@ func (h *host) HealthCheck(ctx context.Context) (*hostcommon.HealthCheck, error) }, nil } -// ObscuroConfig returns info on the Obscuro network +// TenConfig returns info on the TEN network func (h *host) TenConfig() (*common.TenNetworkInfo, error) { if h.l2MessageBusAddress == nil { publicCfg, err := h.EnclaveClient().EnclavePublicConfig(context.Background()) diff --git a/go/host/l1/blob_resolver.go b/go/host/l1/blob_resolver.go new file mode 100644 index 0000000000..65c4e58c82 --- /dev/null +++ b/go/host/l1/blob_resolver.go @@ -0,0 +1,34 @@ +package l1 + +import ( + "context" + "fmt" + + gethcommon "github.com/ethereum/go-ethereum/common" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + + "github.com/ten-protocol/go-ten/go/ethadapter" +) + +type BlobResolver interface { + // FetchBlobs Fetches the blob data using beacon chain APIs + FetchBlobs(ctx context.Context, b *types.Header, hashes []gethcommon.Hash) ([]*kzg4844.Blob, error) +} + +type beaconBlobResolver struct { + beaconClient *ethadapter.L1BeaconClient +} + +func NewBlobResolver(beaconClient *ethadapter.L1BeaconClient) BlobResolver { + return &beaconBlobResolver{beaconClient: beaconClient} +} + +func (r *beaconBlobResolver) FetchBlobs(ctx context.Context, b *types.Header, hashes []gethcommon.Hash) ([]*kzg4844.Blob, error) { + blobs, err := r.beaconClient.FetchBlobs(ctx, b, hashes) + if err != nil { + return nil, fmt.Errorf("failed to fetch blobs from beacon client: %w", err) + } + return blobs, nil +} diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index 88d1ed0e92..9ecc6368eb 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -8,6 +8,8 @@ import ( "sync" "time" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ten-protocol/go-ten/contracts/generated/ManagementContract" "github.com/ten-protocol/go-ten/go/common/errutil" "github.com/ten-protocol/go-ten/go/common/stopcontrol" @@ -33,6 +35,7 @@ type Publisher struct { ethClient ethadapter.EthClient mgmtContractLib mgmtcontractlib.MgmtContractLib // Library to handle Management Contract lib operations storage storage.Storage + blobResolver BlobResolver // cached map of important contract addresses (updated when we see a SetImportantContractsTx) importantContractAddresses map[string]gethcommon.Address @@ -60,6 +63,7 @@ func NewL1Publisher( client ethadapter.EthClient, mgmtContract mgmtcontractlib.MgmtContractLib, repository host.L1BlockRepository, + blobResolver BlobResolver, hostStopper *stopcontrol.StopControl, logger gethlog.Logger, maxWaitForL1Receipt time.Duration, @@ -73,6 +77,7 @@ func NewL1Publisher( ethClient: client, mgmtContractLib: mgmtContract, repository: repository, + blobResolver: blobResolver, hostStopper: hostStopper, logger: logger, maxWaitForL1Receipt: maxWaitForL1Receipt, @@ -221,7 +226,7 @@ func (p *Publisher) PublishSecretResponse(secretResponse *common.ProducedSecretR return nil } -// ExtractObscuroRelevantTransactions will extract any transactions from the block that are relevant to obscuro +// ExtractObscuroRelevantTransactions will extract any transactions from the block that are relevant to Ten // todo (#2495) we should monitor for relevant L1 events instead of scanning every transaction in the block func (p *Publisher) ExtractObscuroRelevantTransactions(block *types.Block) ([]*ethadapter.L1RespondSecretTx, []*ethadapter.L1RollupTx, []*ethadapter.L1SetImportantContractsTx) { var secretRespTxs []*ethadapter.L1RespondSecretTx @@ -236,19 +241,77 @@ func (p *Publisher) ExtractObscuroRelevantTransactions(block *types.Block) ([]*e secretRespTxs = append(secretRespTxs, scrtTx) continue } - if rollupTx, ok := t.(*ethadapter.L1RollupTx); ok { - rollupTxs = append(rollupTxs, rollupTx) + + if contractAddressTx, ok := t.(*ethadapter.L1SetImportantContractsTx); ok { + contractAddressTxs = append(contractAddressTxs, contractAddressTx) + continue + } + rollupHashes, ok := t.(*ethadapter.L1RollupHashes) + if !ok { continue } + blobs, err := p.blobResolver.FetchBlobs(p.sendingContext, block.Header(), rollupHashes.BlobHashes) + if err != nil { + p.logger.Crit("could not fetch blobs publisher", log.ErrKey, err) + return nil, nil, nil + } + encodedRlp, err := ethadapter.DecodeBlobs(blobs) + if err != nil { + p.logger.Crit("could not decode blobs.", log.ErrKey, err) + } + rlp := ðadapter.L1RollupTx{ + Rollup: encodedRlp, + } + rollupTxs = append(rollupTxs, rlp) + } + return secretRespTxs, rollupTxs, contractAddressTxs +} + +func (p *Publisher) ExtractTenTransactionsAndBlobs(block *types.Block) ([]*ethadapter.L1RespondSecretTx, []*ethadapter.L1RollupTx, []*kzg4844.Blob, []*ethadapter.L1SetImportantContractsTx) { + var secretRespTxs []*ethadapter.L1RespondSecretTx + var rollupTxs []*ethadapter.L1RollupTx + var contractAddressTxs []*ethadapter.L1SetImportantContractsTx + var blobs []*kzg4844.Blob + var err error + for _, tx := range block.Transactions() { + t := p.mgmtContractLib.DecodeTx(tx) + if t == nil { + continue + } + if scrtTx, ok := t.(*ethadapter.L1RespondSecretTx); ok { + secretRespTxs = append(secretRespTxs, scrtTx) + continue + } + if contractAddressTx, ok := t.(*ethadapter.L1SetImportantContractsTx); ok { contractAddressTxs = append(contractAddressTxs, contractAddressTx) continue } + rollupHashes, ok := t.(*ethadapter.L1RollupHashes) + if !ok { + continue + } + blobs, err = p.blobResolver.FetchBlobs(p.sendingContext, block.Header(), rollupHashes.BlobHashes) + if err != nil { + p.logger.Crit("could not fetch blobs publisher", log.ErrKey, err) + return nil, nil, nil, nil + } + + encodedRlp, err := ethadapter.DecodeBlobs(blobs) + if err != nil { + p.logger.Crit("could not decode blobs.", log.ErrKey, err) + } + rlp := ðadapter.L1RollupTx{ + Rollup: encodedRlp, + } + rollupTxs = append(rollupTxs, rlp) } - return secretRespTxs, rollupTxs, contractAddressTxs + return secretRespTxs, rollupTxs, blobs, contractAddressTxs } func (p *Publisher) FetchLatestSeqNo() (*big.Int, error) { + //hash := *p.mgmtContractLib.GetContractAddr() + //println("contract address: ", hash.Hex()) return p.ethClient.FetchLastBatchSeqNo(*p.mgmtContractLib.GetContractAddr()) } @@ -274,13 +337,17 @@ func (p *Publisher) PublishRollup(producedRollup *common.ExtRollup) { p.logger.Trace("Sending transaction to publish rollup", "rollup_header", headerLog, log.RollupHashKey, producedRollup.Header.Hash(), "batches_len", len(producedRollup.BatchPayloads)) } - rollupTx := p.mgmtContractLib.CreateRollup(tx) + rollupBlobTx, err := p.mgmtContractLib.CreateBlobRollup(tx) + if err != nil { + p.logger.Error("Could not create rollup blobs", log.RollupHashKey, producedRollup.Hash(), log.ErrKey, err) + } - err = p.publishTransaction(rollupTx) + err = p.publishTransaction(rollupBlobTx) if err != nil { p.logger.Error("Could not issue rollup tx", log.RollupHashKey, producedRollup.Hash(), log.ErrKey, err) } else { p.logger.Info("Rollup included in L1", log.RollupHashKey, producedRollup.Hash()) + time.Sleep(500 * time.Millisecond) } } @@ -395,8 +462,6 @@ func (p *Publisher) publishTransaction(tx types.TxData) error { retries := -1 - // we keep trying to send the transaction with this nonce until it is included in a block - // note: this is only safe because of the sendingLock guaranteeing only one transaction in-flight at a time nonce, err := p.ethClient.Nonce(p.hostWallet.Address()) if err != nil { return fmt.Errorf("could not get nonce for L1 tx: %w", err) @@ -416,8 +481,7 @@ func (p *Publisher) publishTransaction(tx types.TxData) error { if err != nil { return errors.Wrap(err, "could not sign L1 tx") } - - p.logger.Info("Host issuing l1 tx", log.TxKey, signedTx.Hash(), "size", signedTx.Size()/1024, "retries", retries) + p.logger.Info("Host issuing L1 tx", log.TxKey, signedTx.Hash(), "size", signedTx.Size()/1024, "retries", retries) err = p.ethClient.SendTransaction(signedTx) if err != nil { return errors.Wrap(err, "could not broadcast L1 tx") @@ -425,26 +489,27 @@ func (p *Publisher) publishTransaction(tx types.TxData) error { p.logger.Info("Successfully submitted tx to L1", "txHash", signedTx.Hash()) var receipt *types.Receipt - // retry until receipt is found + // retry until receipt is found or context is canceled err = retry.Do( func() error { if p.hostStopper.IsStopping() { - return retry.FailFast(errors.New("host is stopping")) + return retry.FailFast(errors.New("host is stopping or context canceled")) } receipt, err = p.ethClient.TransactionReceipt(signedTx.Hash()) if err != nil { - return fmt.Errorf("could not get receipt for L1 tx=%s: %w", signedTx.Hash(), err) + return fmt.Errorf("could not get receipt publishing tx for L1 tx=%s: %w", signedTx.Hash(), err) } return err }, - retry.NewTimeoutStrategy(p.maxWaitForL1Receipt, p.retryIntervalForL1Receipt), + //FIXME + retry.NewTimeoutStrategy(30*time.Second, p.retryIntervalForL1Receipt), ) if err != nil { p.logger.Info("Receipt not found for transaction, we will re-attempt", log.ErrKey, err) continue // try again with updated gas price } - if err == nil && receipt.Status != types.ReceiptStatusSuccessful { + if receipt.Status != types.ReceiptStatusSuccessful { return fmt.Errorf("unsuccessful receipt found for published L1 transaction, status=%d", receipt.Status) } @@ -462,7 +527,7 @@ func (p *Publisher) awaitTransaction(tx *types.Transaction) error { func() error { receipt, err = p.ethClient.TransactionReceipt(tx.Hash()) if err != nil { - return fmt.Errorf("could not get receipt for L1 tx=%s: %w", tx.Hash(), err) + return fmt.Errorf("could not get receipt for xchain L1 tx=%s: %w", tx.Hash(), err) } return err }, diff --git a/go/host/rpc/enclaverpc/enclave_client.go b/go/host/rpc/enclaverpc/enclave_client.go index 1eaa67d1ee..dfe646ca9a 100644 --- a/go/host/rpc/enclaverpc/enclave_client.go +++ b/go/host/rpc/enclaverpc/enclave_client.go @@ -8,6 +8,8 @@ import ( "math/big" "time" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ethereum/go-ethereum/core/types" "github.com/ten-protocol/go-ten/go/enclave/core" @@ -197,18 +199,23 @@ func (c *Client) EnclaveID(ctx context.Context) (common.EnclaveID, common.System return common.EnclaveID(response.EnclaveID), nil } -func (c *Client) SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*common.TxAndReceipt, isLatest bool) (*common.BlockSubmissionResponse, common.SystemError) { +func (c *Client) SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*common.TxAndReceipt, blobs []*kzg4844.Blob) (*common.BlockSubmissionResponse, common.SystemError) { var buffer bytes.Buffer if err := blockHeader.EncodeRLP(&buffer); err != nil { return nil, fmt.Errorf("could not encode block. Cause: %w", err) } - serialized, err := rlp.EncodeToBytes(receipts) + serializedReceipts, err := rlp.EncodeToBytes(receipts) if err != nil { return nil, fmt.Errorf("could not encode receipts. Cause: %w", err) } - response, err := c.protoClient.SubmitL1Block(ctx, &generated.SubmitBlockRequest{EncodedBlock: buffer.Bytes(), EncodedReceipts: serialized, IsLatest: isLatest}) + serializedBlobs, err := rlp.EncodeToBytes(blobs) + if err != nil { + return nil, fmt.Errorf("could not encode blobs. Cause: %w", err) + } + + response, err := c.protoClient.SubmitL1Block(ctx, &generated.SubmitBlockRequest{EncodedBlock: buffer.Bytes(), EncodedReceipts: serializedReceipts, EncodedBlobs: serializedBlobs}) if err != nil { return nil, fmt.Errorf("could not submit block. Cause: %w", err) } diff --git a/go/node/config.go b/go/node/config.go index 5ad4103be9..54aca76a7f 100644 --- a/go/node/config.go +++ b/go/node/config.go @@ -27,6 +27,7 @@ type Config struct { hostImage string nodeType string l1WSURL string + l1BeaconUrl string sequencerP2PAddr string privateKey string hostP2PPort int @@ -91,6 +92,7 @@ func (c *Config) ToEnclaveConfig() *config.EnclaveConfig { cfg.Address = fmt.Sprintf("%s:%d", _localhost, c.enclaveWSPort) cfg.DebugNamespaceEnabled = c.debugNamespaceEnabled cfg.TenGenesis = c.tenGenesis + cfg.L1BeaconUrl = c.l1BeaconUrl if c.nodeType == "sequencer" && c.coinbaseAddress != "" { cfg.GasPaymentAddress = gethcommon.HexToAddress(c.coinbaseAddress) @@ -128,6 +130,7 @@ func (c *Config) ToHostConfig() *config.HostInputConfig { cfg.L1BlockTime = c.l1BlockTime cfg.L1ChainID = int64(c.l1ChainID) cfg.PostgresDBHost = c.postgresDB + cfg.L1BeaconUrl = c.l1BeaconUrl return cfg } @@ -349,3 +352,9 @@ func WithPostgresDBHost(g string) Option { c.postgresDB = g } } + +func WithL1BeaconUrl(g string) Option { + return func(c *Config) { + c.l1BeaconUrl = g + } +} diff --git a/go/node/docker_node.go b/go/node/docker_node.go index 78e96b80a1..7aa035cd7b 100644 --- a/go/node/docker_node.go +++ b/go/node/docker_node.go @@ -108,7 +108,7 @@ func (d *DockerNode) startHost() error { "-p2pBindAddress", fmt.Sprintf("0.0.0.0:%d", d.cfg.hostP2PPort), "-clientRPCPortHttp", fmt.Sprintf("%d", d.cfg.hostHTTPPort), "-clientRPCPortWs", fmt.Sprintf("%d", d.cfg.hostWSPort), - "-maxRollupSize=65536", + "-maxRollupSize=131072", // host persistence hardcoded to use /data dir within the container, this needs to be mounted fmt.Sprintf("-useInMemoryDB=%t", d.cfg.hostInMemDB), fmt.Sprintf("-debugNamespaceEnabled=%t", d.cfg.debugNamespaceEnabled), @@ -174,9 +174,10 @@ func (d *DockerNode) startEnclave() error { "-logLevel", fmt.Sprintf("%d", log.LvlInfo), fmt.Sprintf("-debugNamespaceEnabled=%t", d.cfg.debugNamespaceEnabled), "-maxBatchSize=56320", - "-maxRollupSize=65536", + "-maxRollupSize=131072", fmt.Sprintf("-logLevel=%d", d.cfg.logLevel), "-tenGenesis", "{}", + "-l1BeaconUrl", "127.0.0.1:12600", "-edgelessDBHost", d.cfg.nodeName+"-edgelessdb", ) diff --git a/go/wallet/wallet.go b/go/wallet/wallet.go index c3dc1a2806..1b87d46965 100644 --- a/go/wallet/wallet.go +++ b/go/wallet/wallet.go @@ -67,7 +67,7 @@ func NewInMemoryWalletFromConfig(pkStr string, l1ChainID int64, logger gethlog.L // SignTransaction returns a signed transaction func (m *inMemoryWallet) SignTransaction(tx types.TxData) (*types.Transaction, error) { - return types.SignNewTx(m.prvKey, types.NewCancunSigner(m.chainID), tx) + return types.MustSignNewTx(m.prvKey, types.NewCancunSigner(m.chainID), tx), nil } // Address returns the current wallet address diff --git a/integration/common/constants.go b/integration/common/constants.go index a7ab617ca0..7eb5ecf019 100644 --- a/integration/common/constants.go +++ b/integration/common/constants.go @@ -81,7 +81,7 @@ func DefaultEnclaveConfig() *config.EnclaveConfig { TenGenesis: "", DebugNamespaceEnabled: false, MaxBatchSize: 1024 * 55, - MaxRollupSize: 1024 * 64, + MaxRollupSize: 1024 * 128, GasPaymentAddress: gethcommon.HexToAddress("0xd6C9230053f45F873Cb66D8A02439380a37A4fbF"), BaseFee: new(big.Int).SetUint64(params.InitialBaseFee), diff --git a/integration/ethereummock/beacon_client_mock.go b/integration/ethereummock/beacon_client_mock.go new file mode 100644 index 0000000000..48da7ad31b --- /dev/null +++ b/integration/ethereummock/beacon_client_mock.go @@ -0,0 +1,264 @@ +package ethereummock + +import ( + "encoding/binary" + "encoding/json" + "errors" + "fmt" + "github.com/ethereum/go-ethereum" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/ethereum/go-ethereum/log" + "github.com/ten-protocol/go-ten/go/ethadapter" + "net" + "net/http" + "strconv" + "strings" + "sync" + "time" +) + +const kzgBlobSize = 131072 + +// BeaconMock presents a beacon-node in testing, without leading any chain-building. +// This merely serves a fake beacon API, and holds on to blocks, +// to complement the actual block-building to happen in testing (e.g. through the fake consensus geth module). +type BeaconMock struct { + log log.Logger + + // map of slots to versioned hashes to match the beacon APIs + slotToVersionedHashes map[uint64][]gethcommon.Hash + // map of versioned hash to blob for efficient lookup + versionedHashToBlob map[gethcommon.Hash]*kzg4844.Blob + + mu sync.Mutex + + beaconSrv *http.Server + beaconAPIListener net.Listener + + genesisTime uint64 + secondsPerSlot uint64 + port int +} + +func NewBeaconMock(log log.Logger, genesisTime uint64, secondsPerSlot uint64, port int) *BeaconMock { + return &BeaconMock{ + log: log, + genesisTime: genesisTime, + secondsPerSlot: secondsPerSlot, + port: port, + slotToVersionedHashes: make(map[uint64][]gethcommon.Hash), + versionedHashToBlob: make(map[gethcommon.Hash]*kzg4844.Blob), + } +} + +func (f *BeaconMock) Start(host string) error { + address := fmt.Sprintf("%s:%d", host, f.port) + listener, err := net.Listen("tcp", address) + if err != nil { + return fmt.Errorf("failed to open tcp listener for http beacon api server: %w", err) + } + f.beaconAPIListener = listener + + mux := new(http.ServeMux) + mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusNotFound) + }) + mux.HandleFunc("/eth/v1/beacon/genesis", func(w http.ResponseWriter, r *http.Request) { + err := json.NewEncoder(w).Encode(ðadapter.APIGenesisResponse{ + Data: ethadapter.ReducedGenesisData{ + GenesisTime: ethadapter.Uint64String(f.genesisTime), + }, + }) + if err != nil { + f.log.Error("genesis handler err", "err", err) + } + }) + mux.HandleFunc("/eth/v1/config/spec", func(w http.ResponseWriter, r *http.Request) { + err := json.NewEncoder(w).Encode(ðadapter.APIConfigResponse{ + Data: ethadapter.ReducedConfigData{ + SecondsPerSlot: ethadapter.Uint64String(f.secondsPerSlot), + }, + }) + if err != nil { + f.log.Error("config handler err", "err", err) + } + }) + mux.HandleFunc("/eth/v1/beacon/blob_sidecars/", func(w http.ResponseWriter, r *http.Request) { + blockID := strings.TrimPrefix(r.URL.Path, "/eth/v1/beacon/blob_sidecars/") + slot, err := strconv.ParseUint(blockID, 10, 64) + if err != nil { + f.log.Error("could not parse block id from request", "url", r.URL.Path, "err", err) + w.WriteHeader(http.StatusBadRequest) + return + } + blobs, err := f.LoadBlobs(slot) + if errors.Is(err, ethereum.NotFound) { + f.log.Error("failed to load blobs - not found", "slot", slot, "err", err) + w.WriteHeader(http.StatusNotFound) + return + } else if err != nil { + f.log.Error("failed to load blobs", "slot", slot, "err", err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + query := r.URL.Query() + rawIndices := query["indices"] + indices := make([]uint64, 0, len(blobs)) + if len(rawIndices) == 0 { + for i := range blobs { + indices = append(indices, uint64(i)) + } + } else { + for _, raw := range rawIndices { + ix, err := strconv.ParseUint(raw, 10, 64) + if err != nil { + f.log.Error("could not parse index from request", "url", r.URL) + w.WriteHeader(http.StatusBadRequest) + return + } + indices = append(indices, ix) + } + } + + var mockBeaconBlockRoot [32]byte + mockBeaconBlockRoot[0] = 42 + binary.LittleEndian.PutUint64(mockBeaconBlockRoot[32-8:], slot) + sidecars := make([]*ethadapter.APIBlobSidecar, len(indices)) + for i, ix := range indices { + if ix >= uint64(len(blobs)) { + f.log.Error("blob index from request is out of range", "url", r.URL) + w.WriteHeader(http.StatusBadRequest) + return + } + + blob := blobs[ix] + + commitment, err := kzg4844.BlobToCommitment(blob) + if err != nil { + f.log.Error("failed to compute KZG commitment", "blobIndex", ix, "err", err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + proof, err := kzg4844.ComputeBlobProof(blob, commitment) + if err != nil { + f.log.Error("failed to compute KZG proof", "blobIndex", ix, "err", err) + w.WriteHeader(http.StatusInternalServerError) + return + } + + sidecars[i] = ðadapter.APIBlobSidecar{ + Index: ethadapter.Uint64String(ix), + Blob: *blob, + KZGCommitment: ethadapter.Bytes48(commitment[:]), + KZGProof: ethadapter.Bytes48(proof[:]), + SignedBlockHeader: ethadapter.SignedBeaconBlockHeader{ + Message: ethadapter.BeaconBlockHeader{ + StateRoot: mockBeaconBlockRoot, + Slot: ethadapter.Uint64String(slot), + }, + }, + } + } + if err := json.NewEncoder(w).Encode(ðadapter.APIGetBlobSidecarsResponse{Data: sidecars}); err != nil { + f.log.Error("blobs handler err", "err", err) + } + }) + f.beaconSrv = &http.Server{ + Handler: mux, + ReadTimeout: time.Second * 20, + ReadHeaderTimeout: time.Second * 20, + WriteTimeout: time.Second * 20, + IdleTimeout: time.Second * 20, + } + go func() { + if err := f.beaconSrv.Serve(f.beaconAPIListener); err != nil && !errors.Is(err, http.ErrServerClosed) { + f.log.Error("failed to start fake-pos beacon server for blobs testing", "err", err) + } + }() + return nil +} + +// StoreBlobs stores the array of blobs against the slot number. +func (f *BeaconMock) StoreBlobs(slot uint64, blobs []*kzg4844.Blob) error { + f.mu.Lock() + defer f.mu.Unlock() + + for _, blob := range blobs { + commitment, err := kzg4844.BlobToCommitment(blob) + if err != nil { + return fmt.Errorf("failed to compute commitment: %w", err) + } + + versionedHash := ethadapter.KZGToVersionedHash(commitment) + f.slotToVersionedHashes[slot] = append(f.slotToVersionedHashes[slot], versionedHash) + f.versionedHashToBlob[versionedHash] = blob + } + return nil +} + +// LoadBlobs retrieves blobs for a given slot and an optional list of versioned hashes. +// If versionedHashes is nil or empty, it returns all blobs for the slot. +// Otherwise, it returns only the blobs that match the provided versioned hashes. +func (f *BeaconMock) LoadBlobs(slot uint64, versionedHashes ...gethcommon.Hash) ([]*kzg4844.Blob, error) { + f.mu.Lock() + defer f.mu.Unlock() + + // Retrieve the list of versioned hashes stored for the slot. + storedHashes, exists := f.slotToVersionedHashes[slot] + if !exists { + return nil, fmt.Errorf("no blobs found for slot %d: %w", slot, ethereum.NotFound) + } + + // If no specific versionedHashes are provided, return all blobs for the slot. + if len(versionedHashes) == 0 { + var allBlobs []*kzg4844.Blob + for _, vh := range storedHashes { + blob, exists := f.versionedHashToBlob[vh] + if !exists { + return nil, fmt.Errorf("blob for hash %s not found", vh.Hex()) + } + allBlobs = append(allBlobs, blob) + } + return allBlobs, nil + } + + // Create a map for quick lookup of stored hashes. + hashSet := make(map[gethcommon.Hash]struct{}, len(storedHashes)) + for _, h := range storedHashes { + hashSet[h] = struct{}{} + } + + // Retrieve the blobs that match the provided versioned hashes. + var blobs []*kzg4844.Blob + for _, vh := range versionedHashes { + if _, found := hashSet[vh]; found { + blob, exists := f.versionedHashToBlob[vh] + if !exists { + return nil, fmt.Errorf("blob for hash %s not found", vh.Hex()) + } + blobs = append(blobs, blob) + } else { + return nil, fmt.Errorf("versioned hash %s not found in slot %d", vh.Hex(), slot) + } + } + + return blobs, nil +} + +func (f *BeaconMock) Close() error { + var out error + if f.beaconSrv != nil { + out = errors.Join(out, f.beaconSrv.Close()) + } + if f.beaconAPIListener != nil { + out = errors.Join(out, f.beaconAPIListener.Close()) + } + return out +} + +func (f *BeaconMock) BeaconAddr() string { + return "http://" + f.beaconAPIListener.Addr().String() +} diff --git a/integration/ethereummock/beacon_client_mock_test.go b/integration/ethereummock/beacon_client_mock_test.go new file mode 100644 index 0000000000..0777dade62 --- /dev/null +++ b/integration/ethereummock/beacon_client_mock_test.go @@ -0,0 +1,213 @@ +package ethereummock + +import ( + "context" + "github.com/ethereum/go-ethereum" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + gethlog "github.com/ethereum/go-ethereum/log" + "github.com/ten-protocol/go-ten/go/ethadapter" + "math/big" + "net/http" + "testing" + + "github.com/ethereum/go-ethereum/crypto/kzg4844" + "github.com/stretchr/testify/require" + "github.com/ten-protocol/go-ten/go/common" +) + +func TestGetVersion(t *testing.T) { + l := gethlog.New() + + beaconApi := NewBeaconMock(l, uint64(1), uint64(1), 8000) + t.Cleanup(func() { + _ = beaconApi.Close() + }) + require.NoError(t, beaconApi.Start("127.0.0.1")) +} + +func TestFetchBlobs(t *testing.T) { + l := gethlog.New() + + beaconApi := NewBeaconMock(l, uint64(1), uint64(1), 8000) + t.Cleanup(func() { + _ = beaconApi.Close() + }) + require.NoError(t, beaconApi.Start("127.0.0.1")) + + indices := []uint64{5, 7, 2} + + hash0, sidecar0 := makeTestBlobSidecar(indices[0]) + hash1, sidecar1 := makeTestBlobSidecar(indices[1]) + hash2, sidecar2 := makeTestBlobSidecar(indices[2]) + + // store the blobs for 2 sidecars in slot 0 + blobs0 := []*kzg4844.Blob{&sidecar0.Blob, &sidecar1.Blob} + hashes0 := []gethcommon.Hash{hash0, hash1} + err := beaconApi.StoreBlobs(0, blobs0) + if err != nil { + t.Errorf("error storing blobs at slot 1: %s", err) + } + + // store the blob in slot 2 + blobs1 := []*kzg4844.Blob{&sidecar2.Blob} + hashes1 := []gethcommon.Hash{hash2} + err = beaconApi.StoreBlobs(4, blobs1) + if err != nil { + t.Errorf("error storing blobs at slot 2: %s", err) + } + + cl := ethadapter.NewL1BeaconClient(ethadapter.NewBeaconHTTPClient(new(http.Client), beaconApi.BeaconAddr())) + + foundBlobs0, err := cl.FetchBlobs(context.Background(), &types.Header{Time: 1}, hashes0) + foundBlobs1, err := cl.FetchBlobs(context.Background(), &types.Header{Time: 5}, hashes1) + + require.Equal(t, blobs0, foundBlobs0) + require.Equal(t, blobs1, foundBlobs1) +} + +func Test404NotFound(t *testing.T) { + l := gethlog.New() + + beaconApi := NewBeaconMock(l, uint64(1), uint64(1), 8000) + t.Cleanup(func() { + _ = beaconApi.Close() + }) + require.NoError(t, beaconApi.Start("127.0.0.1")) + + cl := ethadapter.NewL1BeaconClient(ethadapter.NewBeaconHTTPClient(new(http.Client), beaconApi.BeaconAddr())) + + var hashes []gethcommon.Hash + mockHash := gethcommon.BytesToHash([]byte{1}) + hashes = append(hashes, mockHash) + _, err := cl.FetchBlobs(context.Background(), &types.Header{Number: big.NewInt(10), Time: 120}, hashes) + require.ErrorIs(t, err, ethereum.NotFound) +} + +func TestBlobsFromSidecars(t *testing.T) { + indices := []uint64{5, 7, 2} + + // blobs should be returned in order of their indices in the hashes array regardless + // of the sidecar ordering + hash0, sidecar0 := makeTestBlobSidecar(indices[0]) + hash1, sidecar1 := makeTestBlobSidecar(indices[1]) + hash2, sidecar2 := makeTestBlobSidecar(indices[2]) + + hashes := []gethcommon.Hash{hash0, hash1, hash2} + + // put the sidecars in scrambled order to confirm error + sidecars := []*ethadapter.BlobSidecar{sidecar2, sidecar0, sidecar1} + _, err := ethadapter.BlobsFromSidecars(sidecars, hashes) + require.Error(t, err) + + // too few sidecars should error + sidecars = []*ethadapter.BlobSidecar{sidecar0, sidecar1} + _, err = ethadapter.BlobsFromSidecars(sidecars, hashes) + require.Error(t, err) + + // correct order should work + sidecars = []*ethadapter.BlobSidecar{sidecar0, sidecar1, sidecar2} + blobs, err := ethadapter.BlobsFromSidecars(sidecars, hashes) + require.NoError(t, err) + // confirm order by checking first blob byte against expected index + for i := range blobs { + require.Equal(t, byte(indices[i]), blobs[i][0]) + } + + // mangle a proof to make sure it's detected + badProof := *sidecar0 + badProof.KZGProof[11]++ + sidecars[1] = &badProof + _, err = ethadapter.BlobsFromSidecars(sidecars, hashes) + require.Error(t, err) + + // mangle a commitment to make sure it's detected + badCommitment := *sidecar0 + badCommitment.KZGCommitment[13]++ + sidecars[1] = &badCommitment + _, err = ethadapter.BlobsFromSidecars(sidecars, hashes) + require.Error(t, err) + + // mangle a hash to make sure it's detected + sidecars[1] = sidecar0 + hashes[2][17]++ + _, err = ethadapter.BlobsFromSidecars(sidecars, hashes) + require.Error(t, err) +} + +func TestBlobsFromSidecars_EmptySidecarList(t *testing.T) { + var hashes []gethcommon.Hash + var sidecars []*ethadapter.BlobSidecar + blobs, err := ethadapter.BlobsFromSidecars(sidecars, hashes) + require.NoError(t, err) + require.Empty(t, blobs, "blobs should be empty when no sidecars are provided") +} + +func TestClientPoolSingle(t *testing.T) { + p := ethadapter.NewClientPool[int](1) + for i := 0; i < 10; i++ { + require.Equal(t, 1, p.Get()) + p.MoveToNext() + } +} + +func TestClientPoolSeveral(t *testing.T) { + p := ethadapter.NewClientPool[int](0, 1, 2, 3) + for i := 0; i < 25; i++ { + require.Equal(t, i%4, p.Get()) + p.MoveToNext() + } +} + +func TestBlobEncoding(t *testing.T) { + extRlp := createRollup(4444) + encRollup, err := common.EncodeRollup(&extRlp) + if err != nil { + t.Errorf("error encoding rollup") + } + + // Encode data into blobs + blobs, err := ethadapter.EncodeBlobs(encRollup) + if err != nil { + t.Errorf("error encoding blobs: %s", err) + } + + rollup, err := ethadapter.ReconstructRollup(blobs) + if err != nil { + t.Errorf("error reconstructing rollup: %s", err) + } + + if big.NewInt(int64(rollup.Header.LastBatchSeqNo)).Cmp(big.NewInt(4444)) != 0 { + t.Errorf("rollup was not decoded correctly") + } +} + +func makeTestBlobSidecar(index uint64) (gethcommon.Hash, *ethadapter.BlobSidecar) { + blob := kzg4844.Blob{} + // make first byte of test blob match its index so we can easily verify if is returned in the + // expected order + blob[0] = byte(index) + commit, _ := kzg4844.BlobToCommitment(&blob) + proof, _ := kzg4844.ComputeBlobProof(&blob, commit) + hash := ethadapter.KZGToVersionedHash(commit) + + sidecar := ethadapter.BlobSidecar{ + Index: ethadapter.Uint64String(index), + Blob: blob, + KZGCommitment: ethadapter.Bytes48(commit), + KZGProof: ethadapter.Bytes48(proof), + } + return hash, &sidecar +} + +func createRollup(lastBatch int64) common.ExtRollup { + header := common.RollupHeader{ + LastBatchSeqNo: uint64(lastBatch), + } + + rollup := common.ExtRollup{ + Header: &header, + } + + return rollup +} diff --git a/integration/ethereummock/clock.go b/integration/ethereummock/clock.go new file mode 100644 index 0000000000..5acd3c2f5f --- /dev/null +++ b/integration/ethereummock/clock.go @@ -0,0 +1,131 @@ +package ethereummock + +import ( + "context" + "time" +) + +// Clock represents time in a way that can be provided by varying implementations. +// Methods are designed to be direct replacements for methods in the time package, +// with some new additions to make common patterns simple. +type Clock interface { + // Now provides the current local time. Equivalent to time.Now + Now() time.Time + + // Since returns the time elapsed since t. It is shorthand for time.Now().Sub(t). + Since(time.Time) time.Duration + + // After waits for the duration to elapse and then sends the current time on the returned channel. + // It is equivalent to time.After + After(d time.Duration) <-chan time.Time + + AfterFunc(d time.Duration, f func()) Timer + + // NewTicker returns a new Ticker containing a channel that will send + // the current time on the channel after each tick. The period of the + // ticks is specified by the duration argument. The ticker will adjust + // the time interval or drop ticks to make up for slow receivers. + // The duration d must be greater than zero; if not, NewTicker will + // panic. Stop the ticker to release associated resources. + NewTicker(d time.Duration) Ticker + + // NewTimer creates a new Timer that will send + // the current time on its channel after at least duration d. + NewTimer(d time.Duration) Timer + + // SleepCtx sleeps until either ctx is done or the specified duration has elapsed. + // Returns the ctx.Err if it returns because the context is done. + SleepCtx(ctx context.Context, d time.Duration) error +} + +// A Ticker holds a channel that delivers "ticks" of a clock at intervals +type Ticker interface { + // Ch returns the channel for the ticker. Equivalent to time.Ticker.C + Ch() <-chan time.Time + + // Stop turns off a ticker. After Stop, no more ticks will be sent. + // Stop does not close the channel, to prevent a concurrent goroutine + // reading from the channel from seeing an erroneous "tick". + Stop() + + // Reset stops a ticker and resets its period to the specified duration. + // The next tick will arrive after the new period elapses. The duration d + // must be greater than zero; if not, Reset will panic. + Reset(d time.Duration) +} + +// Timer represents a single event. +type Timer interface { + // Ch returns the channel for the ticker. Equivalent to time.Timer.C + Ch() <-chan time.Time + + // Stop prevents the Timer from firing. + // It returns true if the call stops the timer, false if the timer has already + // expired or been stopped. + // Stop does not close the channel, to prevent a read from the channel succeeding + // incorrectly. + // + // For a timer created with AfterFunc(d, f), if t.Stop returns false, then the timer + // has already expired and the function f has been started in its own goroutine; + // Stop does not wait for f to complete before returning. + // If the caller needs to know whether f is completed, it must coordinate + // with f explicitly. + Stop() bool +} + +// SystemClock provides an instance of Clock that uses the system clock via methods in the time package. +var SystemClock Clock = systemClock{} + +type systemClock struct { +} + +func (s systemClock) Now() time.Time { + return time.Now() +} + +func (s systemClock) Since(t time.Time) time.Duration { + return time.Since(t) +} + +func (s systemClock) After(d time.Duration) <-chan time.Time { + return time.After(d) +} + +type SystemTicker struct { + *time.Ticker +} + +func (t *SystemTicker) Ch() <-chan time.Time { + return t.C +} + +func (s systemClock) NewTicker(d time.Duration) Ticker { + return &SystemTicker{time.NewTicker(d)} +} + +func (s systemClock) NewTimer(d time.Duration) Timer { + return &SystemTimer{time.NewTimer(d)} +} + +type SystemTimer struct { + *time.Timer +} + +func (t *SystemTimer) Ch() <-chan time.Time { + return t.C +} + +func (s systemClock) AfterFunc(d time.Duration, f func()) Timer { + return &SystemTimer{time.AfterFunc(d, f)} +} + +func (s systemClock) SleepCtx(ctx context.Context, d time.Duration) error { + timer := s.NewTimer(d) + defer timer.Stop() + select { + case <-ctx.Done(): + return ctx.Err() + case <-timer.Ch(): + return nil + } +} diff --git a/integration/ethereummock/geth.go b/integration/ethereummock/geth.go new file mode 100644 index 0000000000..bd02e8a505 --- /dev/null +++ b/integration/ethereummock/geth.go @@ -0,0 +1,107 @@ +package ethereummock + +import ( + // Force-load the tracer engines to trigger registration + _ "github.com/ethereum/go-ethereum/eth/tracers/js" + _ "github.com/ethereum/go-ethereum/eth/tracers/native" +) + +//func InitL1(chainID uint64, blockTime uint64, genesis *core.Genesis, c clock.Clock, blobPoolDir string, beaconSrv Beacon, opts ...GethOption) (*node.Node, *eth.Ethereum, error) { +// ethConfig := ðconfig.Config{ +// NetworkId: chainID, +// Genesis: genesis, +// BlobPool: blobpool.Config{ +// Datadir: blobPoolDir, +// Datacap: blobpool.DefaultConfig.Datacap, +// PriceBump: blobpool.DefaultConfig.PriceBump, +// }, +// } +// nodeConfig := &node.Config{ +// Name: "l1-geth", +// HTTPHost: "127.0.0.1", +// HTTPPort: 0, +// WSHost: "127.0.0.1", +// WSPort: 0, +// WSModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, +// HTTPModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, +// } +// +// l1Node, l1Eth, err := createGethNode(false, nodeConfig, ethConfig, opts...) +// if err != nil { +// return nil, nil, err +// } +// // Activate merge +// //l1Eth.Merger().FinalizePoS() +// +// // Instead of running a whole beacon node, we run this fake-proof-of-stake sidecar that sequences L1 blocks using the Engine API. +// l1Node.RegisterLifecycle(&mockPoS{ +// clock: c, +// eth: l1Eth, +// log: log.Root(), // geth logger is global anyway. Would be nice to replace with a local logger though. +// blockTime: blockTime, +// // for testing purposes we make it really fast, otherwise we don't see it finalize in short tests +// finalizedDistance: 8, +// safeDistance: 4, +// engineAPI: catalyst.NewConsensusAPI(l1Eth), +// beacon: beaconSrv, +// }) +// +// return l1Node, l1Eth, nil +//} +// +//func defaultNodeConfig(name string, jwtPath string) *node.Config { +// return &node.Config{ +// Name: name, +// WSHost: "127.0.0.1", +// WSPort: 0, +// AuthAddr: "127.0.0.1", +// AuthPort: 0, +// HTTPHost: "127.0.0.1", +// HTTPPort: 0, +// WSModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, +// HTTPModules: []string{"debug", "admin", "eth", "txpool", "net", "rpc", "web3", "personal", "engine"}, +// JWTSecret: jwtPath, +// } +//} +// +//type GethOption func(ethCfg *ethconfig.Config, nodeCfg *node.Config) error +// +//// createGethNode creates an in-memory geth node based on the configuration. +//// The private keys are added to the keystore and are unlocked. +//// If the node is l2, catalyst is enabled. +//// The node should be started and then closed when done. +//func createGethNode(l2 bool, nodeCfg *node.Config, ethCfg *ethconfig.Config, opts ...GethOption) (*node.Node, *eth.Ethereum, error) { +// for i, opt := range opts { +// if err := opt(ethCfg, nodeCfg); err != nil { +// return nil, nil, fmt.Errorf("failed to apply geth option %d: %w", i, err) +// } +// } +// ethCfg.NoPruning = true // force everything to be an archive node +// n, err := node.New(nodeCfg) +// if err != nil { +// n.Close() +// return nil, nil, err +// } +// +// backend, err := eth.New(n, ethCfg) +// if err != nil { +// n.Close() +// return nil, nil, err +// +// } +// +// // PR 25459 changed this to only default in CLI, but not in default programmatic RPC selection. +// // PR 25642 fixed it for the mobile version only... +// utils.RegisterFilterAPI(n, backend.APIBackend, ethCfg) +// +// n.RegisterAPIs(tracers.APIs(backend.APIBackend)) +// +// // Enable catalyst if l2 +// if l2 { +// if err := catalyst.Register(n, backend); err != nil { +// n.Close() +// return nil, nil, err +// } +// } +// return n, backend, nil +//} diff --git a/integration/ethereummock/mgmt_contract_lib.go b/integration/ethereummock/mgmt_contract_lib.go index 723c5bb141..9534ef6c27 100644 --- a/integration/ethereummock/mgmt_contract_lib.go +++ b/integration/ethereummock/mgmt_contract_lib.go @@ -3,10 +3,10 @@ package ethereummock import ( "bytes" "encoding/gob" - - "github.com/ten-protocol/go-ten/integration/datagenerator" + "fmt" "github.com/ten-protocol/go-ten/go/ethadapter" + "github.com/ten-protocol/go-ten/integration/datagenerator" gethcommon "github.com/ethereum/go-ethereum/common" @@ -56,6 +56,11 @@ func (m *mockContractLib) DecodeTx(tx *types.Transaction) ethadapter.L1Transacti return nil } + if tx.To().Hex() == rollupTxAddr.Hex() { + return ðadapter.L1RollupHashes{ + BlobHashes: tx.BlobHashes(), + } + } return decodeTx(tx) } @@ -63,6 +68,36 @@ func (m *mockContractLib) CreateRollup(tx *ethadapter.L1RollupTx) types.TxData { return encodeTx(tx, rollupTxAddr) } +func (m *mockContractLib) CreateBlobRollup(t *ethadapter.L1RollupTx) (types.TxData, error) { + var err error + blobs, err := ethadapter.EncodeBlobs(t.Rollup) + if err != nil { + return nil, fmt.Errorf("failed to convert rollup to blobs: %w", err) + } + + var blobHashes []gethcommon.Hash + var sidecar *types.BlobTxSidecar + if sidecar, blobHashes, err = ethadapter.MakeSidecar(blobs); err != nil { + return nil, fmt.Errorf("failed to make sidecar: %w", err) + } + + hashesTx := ethadapter.L1RollupHashes{BlobHashes: blobHashes} + + var buf bytes.Buffer + enc := gob.NewEncoder(&buf) + + if err := enc.Encode(hashesTx); err != nil { + panic(err) + } + + return &types.BlobTx{ + To: rollupTxAddr, + Data: buf.Bytes(), + BlobHashes: blobHashes, + Sidecar: sidecar, + }, nil +} + func (m *mockContractLib) CreateRequestSecret(tx *ethadapter.L1RequestSecretTx) types.TxData { return encodeTx(tx, requestSecretTxAddr) } @@ -117,8 +152,6 @@ func decodeTx(tx *types.Transaction) ethadapter.L1Transaction { // so this is a way that we can differentiate different contract calls var t ethadapter.L1Transaction switch tx.To().Hex() { - case rollupTxAddr.Hex(): - t = ðadapter.L1RollupTx{} case storeSecretTxAddr.Hex(): t = ðadapter.L1RespondSecretTx{} case depositTxAddr.Hex(): @@ -135,6 +168,7 @@ func decodeTx(tx *types.Transaction) ethadapter.L1Transaction { if err := dec.Decode(t); err != nil { panic(err) } + return t } diff --git a/integration/ethereummock/mock_blocks.go b/integration/ethereummock/mock_blocks.go index a954c35948..bfbbf12703 100644 --- a/integration/ethereummock/mock_blocks.go +++ b/integration/ethereummock/mock_blocks.go @@ -1,16 +1,17 @@ package ethereummock import ( - "math/big" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "github.com/ethereum/go-ethereum/trie" + "github.com/ten-protocol/go-ten/go/ethadapter" + "math/big" ) -var MockGenesisBlock = NewBlock(nil, common.HexToAddress("0x0"), []*types.Transaction{}) +var MockGenesisBlock, _ = NewBlock(nil, common.HexToAddress("0x0"), []*types.Transaction{}, 0) -func NewBlock(parent *types.Block, nodeID common.Address, txs []*types.Transaction) *types.Block { +func NewBlock(parent *types.Block, nodeID common.Address, txs []*types.Transaction, blockTime uint64) (*types.Block, []*kzg4844.Blob) { var parentHash common.Hash var height uint64 if parent != nil { @@ -30,12 +31,34 @@ func NewBlock(parent *types.Block, nodeID common.Address, txs []*types.Transacti Number: big.NewInt(int64(height)), GasLimit: 0, GasUsed: 0, - Time: 0, + Time: blockTime, // Set the block time here Extra: nil, MixDigest: common.Hash{}, Nonce: types.BlockNonce{}, BaseFee: nil, } + var blobs []*kzg4844.Blob + seenBlobs := make(map[common.Hash]bool) + + for _, tx := range txs { + if tx.BlobHashes() != nil { + for i := range tx.BlobTxSidecar().Blobs { + blobPtr := &tx.BlobTxSidecar().Blobs[i] + commitment, err := kzg4844.BlobToCommitment(blobPtr) + if err != nil { + // Handle error appropriately + continue + } + versionedHash := ethadapter.KZGToVersionedHash(commitment) + + // Check if the blob has already been seen + if !seenBlobs[versionedHash] { + blobs = append(blobs, blobPtr) + seenBlobs[versionedHash] = true + } + } + } + } - return types.NewBlock(&header, &types.Body{Transactions: txs}, nil, trie.NewStackTrie(nil)) + return types.NewBlock(&header, &types.Body{Transactions: txs}, nil, trie.NewStackTrie(nil)), blobs } diff --git a/integration/ethereummock/node.go b/integration/ethereummock/node.go index 457258fb68..25266518c4 100644 --- a/integration/ethereummock/node.go +++ b/integration/ethereummock/node.go @@ -5,6 +5,7 @@ import ( "context" "errors" "fmt" + "github.com/ethereum/go-ethereum/crypto/kzg4844" "math/big" "sync" "sync/atomic" @@ -18,8 +19,6 @@ import ( gethlog "github.com/ethereum/go-ethereum/log" - "github.com/ten-protocol/go-ten/go/common/log" - "github.com/ten-protocol/go-ten/go/common" gethcommon "github.com/ethereum/go-ethereum/common" @@ -32,6 +31,8 @@ import ( "github.com/ten-protocol/go-ten/go/ethadapter/mgmtcontractlib" ) +const SecondsPerSlot = uint64(12) + type L1Network interface { // BroadcastBlock - send the block and the parent to make sure there are no gaps BroadcastBlock(b common.EncodedL1Block, p common.EncodedL1Block) @@ -53,16 +54,22 @@ type StatsCollector interface { L1Reorg(id gethcommon.Address) } +type BlockWithBlobs struct { + Block *types.Block + Blobs []*kzg4844.Blob +} + type Node struct { - l2ID gethcommon.Address // the address of the Obscuro node this client is dedicated to - cfg MiningConfig - Network L1Network - mining bool - stats StatsCollector - Resolver *blockResolverInMem - db TxDB - subs map[uuid.UUID]*mockSubscription // active subscription for mock blocks - subMu sync.Mutex + l2ID gethcommon.Address // the address of the Obscuro node this client is dedicated to + cfg MiningConfig + Network L1Network + mining bool + stats StatsCollector + Resolver *blockResolverInMem + BeaconServer *BeaconMock + db TxDB + subs map[uuid.UUID]*mockSubscription // active subscription for mock blocks + subMu sync.Mutex // Channels exitCh chan bool // the Node stops @@ -84,6 +91,21 @@ type Node struct { } func (m *Node) PrepareTransactionToSend(_ context.Context, txData types.TxData, _ gethcommon.Address) (types.TxData, error) { + switch tx := txData.(type) { + case *types.LegacyTx: + return createLegacyTx(txData) + case *types.BlobTx: + return createBlobTx(txData) + default: + return nil, fmt.Errorf("unsupported transaction type: %T", tx) + } +} + +func (m *Node) PrepareTransactionToRetry(ctx context.Context, txData types.TxData, from gethcommon.Address, _ uint64, _ int) (types.TxData, error) { + return m.PrepareTransactionToSend(ctx, txData, from) +} + +func createLegacyTx(txData types.TxData) (types.TxData, error) { tx := types.NewTx(txData) return &types.LegacyTx{ Nonce: 123, @@ -95,8 +117,14 @@ func (m *Node) PrepareTransactionToSend(_ context.Context, txData types.TxData, }, nil } -func (m *Node) PrepareTransactionToRetry(ctx context.Context, txData types.TxData, from gethcommon.Address, _ uint64, _ int) (types.TxData, error) { - return m.PrepareTransactionToSend(ctx, txData, from) +func createBlobTx(txData types.TxData) (types.TxData, error) { + tx := types.NewTx(txData) + return &types.BlobTx{ + To: *tx.To(), + Data: tx.Data(), + BlobHashes: tx.BlobHashes(), + Sidecar: tx.BlobTxSidecar(), + }, nil } func (m *Node) SendTransaction(tx *types.Transaction) error { @@ -123,11 +151,15 @@ func (m *Node) getRollupFromBlock(block *types.Block) *common.ExtRollup { continue } switch l1tx := decodedTx.(type) { - case *ethadapter.L1RollupTx: - r, err := common.DecodeRollup(l1tx.Rollup) - if err == nil { - return r + case *ethadapter.L1RollupHashes: + slot, err := ethadapter.TimeToSlot(block.Time(), MockGenesisBlock.Time(), SecondsPerSlot) + blobs, _ := m.BeaconServer.LoadBlobs(slot, l1tx.BlobHashes...) + r, err := ethadapter.ReconstructRollup(blobs) + if err != nil { + m.logger.Error("could not recreate rollup from blobs. Cause: %w", err) + return nil } + return r } } return nil @@ -139,7 +171,12 @@ func (m *Node) FetchLastBatchSeqNo(gethcommon.Address) (*big.Int, error) { return nil, err } - for currentBlock := startingBlock; currentBlock.NumberU64() != 0; currentBlock, _ = m.BlockByHash(currentBlock.Header().ParentHash) { + for currentBlock := startingBlock; currentBlock.NumberU64() != 0; { + currentBlock, err = m.BlockByHash(currentBlock.Header().ParentHash) + if err != nil { + m.logger.Error("Error fetching block by hash", "error", err) + break + } rollup := m.getRollupFromBlock(currentBlock) if rollup != nil { return big.NewInt(int64(rollup.Header.LastBatchSeqNo)), nil @@ -250,7 +287,6 @@ func (m *Node) GetLogs(fq ethereum.FilterQuery) ([]types.Log, error) { return logs, nil } -// Start runs an infinite loop that listens to the two block producing channels and processes them. func (m *Node) Start() { if m.mining { // This starts the mining @@ -278,7 +314,7 @@ func (m *Node) Start() { case mb := <-m.miningCh: // Received from the local mining head = m.processBlock(mb, head) - if bytes.Equal(head.Hash().Bytes(), mb.Hash().Bytes()) { // Ignore the locally produced block if someone else found one already + if bytes.Equal(head.Hash().Bytes(), mb.Hash().Bytes()) { // Only broadcast if it's the new head p, err := m.Resolver.FetchBlock(context.Background(), mb.ParentHash()) if err != nil { panic(fmt.Errorf("could not retrieve parent. Cause: %w", err)) @@ -306,6 +342,7 @@ func (m *Node) processBlock(b *types.Block, head *types.Block) *types.Block { if err != nil { m.logger.Crit("Failed to store block. Cause: %w", err) } + _, err = m.Resolver.FetchBlock(context.Background(), b.Header().ParentHash) // only proceed if the parent is available if err != nil { @@ -402,7 +439,6 @@ func (m *Node) startMining() { mempool := make([]*types.Transaction, 0) z := int32(0) interrupt := &z - for { select { case <-m.exitMiningCh: @@ -423,6 +459,7 @@ func (m *Node) startMining() { // Generate a random number, and wait for that number of ms. Equivalent to PoW // Include all rollups received during this period. + blockTime := uint64(time.Now().Unix()) async.Schedule(m.cfg.PowTime(), func() { toInclude := findNotIncludedTxs(canonicalBlock, mempool, m.Resolver, m.db) // todo - iterate through the rollup transactions and include only the ones with the proof on the canonical chain @@ -430,7 +467,16 @@ func (m *Node) startMining() { return } - m.miningCh <- NewBlock(canonicalBlock, m.l2ID, toInclude) + block, blobs := NewBlock(canonicalBlock, m.l2ID, toInclude, blockTime) + blobPointers := make([]*kzg4844.Blob, len(blobs)) + for i := range blobs { + blobPointers[i] = blobs[i] // Assign the address of each blob + } + slot, _ := ethadapter.TimeToSlot(block.Time(), MockGenesisBlock.Time(), SecondsPerSlot) + if len(blobs) > 0 { + _ = m.BeaconServer.StoreBlobs(slot, blobs) + } + m.miningCh <- block }) } } @@ -453,7 +499,7 @@ func (m *Node) Stop() { // block all requests atomic.StoreInt32(m.interrupt, 1) time.Sleep(time.Millisecond * 100) - + _ = m.BeaconServer.Close() m.exitMiningCh <- true m.exitCh <- true } @@ -510,27 +556,31 @@ func NewMiner( cfg MiningConfig, network L1Network, statsCollector StatsCollector, + mockBeaconServer *BeaconMock, + logger gethlog.Logger, ) *Node { return &Node{ - l2ID: id, - mining: true, - cfg: cfg, - stats: statsCollector, - Resolver: NewResolver(), - db: NewTxDB(), - Network: network, - exitCh: make(chan bool), - exitMiningCh: make(chan bool), - interrupt: new(int32), - p2pCh: make(chan *types.Block), - miningCh: make(chan *types.Block), + l2ID: id, + mining: true, + cfg: cfg, + stats: statsCollector, + Resolver: NewResolver(), + BeaconServer: mockBeaconServer, + db: NewTxDB(), + Network: network, + exitCh: make(chan bool), + exitMiningCh: make(chan bool), + interrupt: new(int32), + p2pCh: make(chan *types.Block), + miningCh: make(chan *types.Block), + //miningCh: make(chan *BlockWithBlobs), canonicalCh: make(chan *types.Block), mempoolCh: make(chan *types.Transaction), headInCh: make(chan bool), headOutCh: make(chan *types.Block), erc20ContractLib: NewERC20ContractLibMock(), mgmtContractLib: NewMgmtContractLibMock(), - logger: log.New(log.EthereumL1Cmp, int(gethlog.LvlInfo), cfg.LogFile, log.NodeIDKey, id), + logger: logger, subs: map[uuid.UUID]*mockSubscription{}, subMu: sync.Mutex{}, } diff --git a/integration/networktest/tests/helpful/spin_up_local_network_test.go b/integration/networktest/tests/helpful/spin_up_local_network_test.go index 0b357108c9..b962a7371c 100644 --- a/integration/networktest/tests/helpful/spin_up_local_network_test.go +++ b/integration/networktest/tests/helpful/spin_up_local_network_test.go @@ -32,7 +32,7 @@ const ( // Spins up a local network with a gateway, with all processes debuggable. The network will run until the test is stopped. // Note: If you want to access the gateway frontend you need to `npm run build` its frontend with NEXT_PUBLIC_API_GATEWAY_URL=http://localhost:11180 func TestRunLocalNetwork(t *testing.T) { - networktest.TestOnlyRunsInIDE(t) + //networktest.TestOnlyRunsInIDE(t) networktest.EnsureTestLogsSetUp("local-geth-network") networkConnector, cleanUp, err := env.LocalDevNetwork(devnetwork.WithGateway(), devnetwork.WithPredictableDeployer()).Prepare() if err != nil { diff --git a/integration/simulation/devnetwork/config.go b/integration/simulation/devnetwork/config.go index c90fbde09f..3ae3c62301 100644 --- a/integration/simulation/devnetwork/config.go +++ b/integration/simulation/devnetwork/config.go @@ -35,9 +35,9 @@ type TenConfig struct { NumNodes int TenGatewayEnabled bool NumSeqEnclaves int + L1BeaconPort int + L1BlockTime time.Duration DeployerPK string - - L1BlockTime time.Duration } func DefaultTenConfig() *TenConfig { @@ -50,6 +50,7 @@ func DefaultTenConfig() *TenConfig { CrossChainInterval: 11 * time.Second, TenGatewayEnabled: false, NumSeqEnclaves: 1, // increase for HA simulation + L1BeaconPort: integration.TestPorts.NetworkTestsPort + integration.DefaultPrysmGatewayPortOffset, DeployerPK: "", } } diff --git a/integration/simulation/devnetwork/node.go b/integration/simulation/devnetwork/node.go index 2d6d1669d5..c1472faf2f 100644 --- a/integration/simulation/devnetwork/node.go +++ b/integration/simulation/devnetwork/node.go @@ -153,6 +153,7 @@ func (n *InMemNodeOperator) createHostContainer() *hostcontainer.HostContainer { L1BlockTime: n.config.L1BlockTime, CrossChainInterval: n.config.CrossChainInterval, MaxRollupSize: 1024 * 64, + L1BeaconUrl: fmt.Sprintf("127.0.0.1:%d", n.config.L1BeaconPort), } hostLogger := testlog.Logger().New(log.NodeIDKey, n.l1Wallet.Address(), log.CmpKey, log.HostCmp) @@ -212,12 +213,13 @@ func (n *InMemNodeOperator) createEnclaveContainer(idx int) *enclavecontainer.En SqliteDBPath: n.enclaveDBFilepaths[idx], DebugNamespaceEnabled: true, MaxBatchSize: 1024 * 55, - MaxRollupSize: 1024 * 64, + MaxRollupSize: 1024 * 128, BaseFee: defaultCfg.BaseFee, // todo @siliev:: fix test transaction builders so this can be different GasBatchExecutionLimit: defaultCfg.GasBatchExecutionLimit, GasLocalExecutionCapFlag: defaultCfg.GasLocalExecutionCapFlag, GasPaymentAddress: defaultCfg.GasPaymentAddress, RPCTimeout: 5 * time.Second, + L1BeaconUrl: fmt.Sprintf("127.0.0.1:%d", n.config.L1BeaconPort), } return enclavecontainer.NewEnclaveContainerWithLogger(enclaveConfig, enclaveLogger) } diff --git a/integration/simulation/network/inmemory.go b/integration/simulation/network/inmemory.go index 59897ce573..0ba1afa5fa 100644 --- a/integration/simulation/network/inmemory.go +++ b/integration/simulation/network/inmemory.go @@ -18,8 +18,9 @@ import ( ) type basicNetworkOfInMemoryNodes struct { - ethNodes []*ethereummock.Node - l2Clients []rpc.Client + ethNodes []*ethereummock.Node + l2Clients []rpc.Client + beaconServer *ethereummock.BeaconMock } func NewBasicNetworkOfInMemoryNodes() Network { @@ -45,14 +46,14 @@ func (n *basicNetworkOfInMemoryNodes) Create(params *params.SimParams, stats *st // dummyMgmtContractAddress := datagenerator.RandomAddress() // params.MgmtContractLib + n.beaconServer = createBeaconServer(params.L1BeaconPort) for i := 0; i < params.NumberOfNodes; i++ { isGenesis := i == 0 incomingP2PDisabled := !isGenesis && i == params.NodeWithInboundP2PDisabled // create the in memory l1 and l2 node - miner := createMockEthNode(int64(i), params.NumberOfNodes, params.AvgBlockDuration, params.AvgNetworkLatency, stats) - + miner := createMockEthNode(i, params.NumberOfNodes, params.AvgBlockDuration, params.AvgNetworkLatency, stats, n.beaconServer) agg := createInMemTenNode( int64(i), isGenesis, @@ -68,6 +69,7 @@ func (n *basicNetworkOfInMemoryNodes) Create(params *params.SimParams, stats *st params.AvgBlockDuration/2, incomingP2PDisabled, params.AvgBlockDuration, + params.L1BeaconPort, ) tenClient := p2p.NewInMemTenClient(agg) @@ -112,6 +114,10 @@ func (n *basicNetworkOfInMemoryNodes) Create(params *params.SimParams, stats *st } walletClients := createAuthClientsPerWallet(n.l2Clients, params.Wallets) + err := n.beaconServer.Start(Localhost) + if err != nil { + panic("couldn't start beacon server") + } return &RPCHandles{ EthClients: l1Clients, TenClients: tenClients, @@ -122,7 +128,7 @@ func (n *basicNetworkOfInMemoryNodes) Create(params *params.SimParams, stats *st func (n *basicNetworkOfInMemoryNodes) TearDown() { StopTenNodes(n.l2Clients) - + _ = n.beaconServer.Close() for _, node := range n.ethNodes { temp := node go temp.Stop() diff --git a/integration/simulation/network/network_utils.go b/integration/simulation/network/network_utils.go index c32dfca906..dc1346a2a8 100644 --- a/integration/simulation/network/network_utils.go +++ b/integration/simulation/network/network_utils.go @@ -2,6 +2,7 @@ package network import ( "fmt" + gethlog "github.com/ethereum/go-ethereum/log" "math" "math/big" "time" @@ -36,15 +37,21 @@ const ( DefaultL1RPCTimeout = 15 * time.Second ) -func createMockEthNode(id int64, nrNodes int, avgBlockDuration time.Duration, avgNetworkLatency time.Duration, stats *stats.Stats) *ethereummock.Node { +func createMockEthNode(id int, nrNodes int, avgBlockDuration time.Duration, avgNetworkLatency time.Duration, stats *stats.Stats, beaconServer *ethereummock.BeaconMock) *ethereummock.Node { mockEthNetwork := ethereummock.NewMockEthNetwork(avgBlockDuration, avgNetworkLatency, stats) ethereumMockCfg := defaultMockEthNodeCfg(nrNodes, avgBlockDuration) + logger := log.New(log.EthereumL1Cmp, int(gethlog.LvlInfo), ethereumMockCfg.LogFile, log.NodeIDKey, id) // create an in memory mock ethereum node responsible with notifying the layer 2 node about blocks - miner := ethereummock.NewMiner(gethcommon.BigToAddress(big.NewInt(id)), ethereumMockCfg, mockEthNetwork, stats) + miner := ethereummock.NewMiner(gethcommon.BigToAddress(big.NewInt(int64(id))), ethereumMockCfg, mockEthNetwork, stats, beaconServer, logger) mockEthNetwork.CurrentNode = miner return miner } +func createBeaconServer(beaconPort int) *ethereummock.BeaconMock { + logger := log.New(log.EthereumL1Cmp, int(gethlog.LvlInfo), log.NodeIDKey) + return ethereummock.NewBeaconMock(logger, uint64(0), ethereummock.SecondsPerSlot, beaconPort) +} + func createInMemTenNode( id int64, isGenesis bool, @@ -60,6 +67,7 @@ func createInMemTenNode( batchInterval time.Duration, incomingP2PDisabled bool, l1BlockTime time.Duration, + l1BeaconPort int, ) *container.HostContainer { mgtContractAddress := mgmtContractLib.GetContractAddr() @@ -77,6 +85,7 @@ func createInMemTenNode( IsInboundP2PDisabled: incomingP2PDisabled, L1BlockTime: l1BlockTime, UseInMemoryDB: true, + L1BeaconUrl: fmt.Sprintf("127.0.0.1:%d", l1BeaconPort), } enclaveConfig := &config.EnclaveConfig{ @@ -92,11 +101,12 @@ func createInMemTenNode( MessageBusAddress: l1BusAddress, ManagementContractAddress: *mgtContractAddress, MaxBatchSize: 1024 * 55, - MaxRollupSize: 1024 * 64, + MaxRollupSize: 1024 * 128, BaseFee: big.NewInt(1), // todo @siliev:: fix test transaction builders so this can be different GasLocalExecutionCapFlag: params.MaxGasLimit / 2, GasBatchExecutionLimit: params.MaxGasLimit / 2, RPCTimeout: 5 * time.Second, + L1BeaconUrl: fmt.Sprintf("127.0.0.1:%d", l1BeaconPort), } enclaveLogger := testlog.Logger().New(log.NodeIDKey, id, log.CmpKey, log.EnclaveCmp) diff --git a/integration/simulation/network/obscuro_node_utils.go b/integration/simulation/network/obscuro_node_utils.go index 94dc3f3f39..e7781f2730 100644 --- a/integration/simulation/network/obscuro_node_utils.go +++ b/integration/simulation/network/obscuro_node_utils.go @@ -53,6 +53,7 @@ func startInMemoryTenNodes(params *params.SimParams, genesisJSON []byte, l1Clien params.AvgBlockDuration/3, true, params.AvgBlockDuration, + params.L1BeaconPort, ) tenHosts[i] = tenNodes[i].Host() } @@ -110,7 +111,7 @@ func CreateAuthClients(clients []rpc.Client, wal wallet.Wallet) []*obsclient.Aut // StopTenNodes stops the TEN nodes and their RPC clients. func StopTenNodes(clients []rpc.Client) { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() eg, _ := errgroup.WithContext(ctx) diff --git a/integration/simulation/network/socket.go b/integration/simulation/network/socket.go index 2154d71ed2..1b7d6165dc 100644 --- a/integration/simulation/network/socket.go +++ b/integration/simulation/network/socket.go @@ -109,6 +109,7 @@ func (n *networkOfSocketNodes) Create(simParams *params.SimParams, _ *stats.Stat node.WithDebugNamespaceEnabled(true), node.WithL1BlockTime(simParams.AvgBlockDuration), node.WithTenGenesis(genesis), + node.WithL1BeaconUrl(fmt.Sprintf("127.0.0.1:%d", simParams.L1BeaconPort)), ), ) diff --git a/integration/simulation/node_id b/integration/simulation/node_id new file mode 100644 index 0000000000..e69de29bb2 diff --git a/integration/simulation/params/params.go b/integration/simulation/params/params.go index 2782a81396..4870ec7891 100644 --- a/integration/simulation/params/params.go +++ b/integration/simulation/params/params.go @@ -20,6 +20,7 @@ type SimParams struct { SimulationTime time.Duration // how long the simulations should run for L1EfficiencyThreshold float64 + L1BeaconPort int // MgmtContractLib allows parsing MgmtContract txs to and from the eth txs MgmtContractLib mgmtcontractlib.MgmtContractLib diff --git a/integration/simulation/simulation.go b/integration/simulation/simulation.go index b6d16e105e..3da5ff8194 100644 --- a/integration/simulation/simulation.go +++ b/integration/simulation/simulation.go @@ -108,7 +108,7 @@ func (s *Simulation) waitForTenGenesisOnL1() { if t == nil { continue } - if _, ok := t.(*ethadapter.L1RollupTx); ok { + if _, ok := t.(*ethadapter.L1RollupHashes); ok { // exit at the first TEN rollup we see return } @@ -208,12 +208,13 @@ func (s *Simulation) trackLogs() { func (s *Simulation) prefundTenAccounts() { faucetWallet := s.Params.Wallets.L2FaucetWallet faucetClient := s.RPCHandles.TenWalletClient(faucetWallet.Address(), 0) // get sequencer, else errors on submission get swallowed + // in memory test needs this to allow head batch to be set + time.Sleep(5 * time.Second) nonce := NextNonce(s.ctx, s.RPCHandles, faucetWallet) // Give 1000 ether per account - ether is 1e18 so best convert it by code // as a lot of the hardcodes were giving way too little and choking the gas payments allocObsWallets := big.NewInt(0).Mul(big.NewInt(1000), big.NewInt(gethparams.Ether)) - testcommon.PrefundWallets(s.ctx, faucetWallet, faucetClient, nonce, s.Params.Wallets.AllObsWallets(), allocObsWallets, s.Params.ReceiptTimeout) } diff --git a/integration/simulation/simulation_full_network_test.go b/integration/simulation/simulation_full_network_test.go index 2f70330d03..a25cf0d3d6 100644 --- a/integration/simulation/simulation_full_network_test.go +++ b/integration/simulation/simulation_full_network_test.go @@ -32,6 +32,7 @@ func TestFullNetworkMonteCarloSimulation(t *testing.T) { ReceiptTimeout: 20 * time.Second, StoppingDelay: 15 * time.Second, NodeWithInboundP2PDisabled: 2, + L1BeaconPort: integration.TestPorts.TestFullNetworkMonteCarloSimulationPort + integration.DefaultPrysmGatewayPortOffset, } simParams.AvgNetworkLatency = simParams.AvgBlockDuration / 15 diff --git a/integration/simulation/simulation_geth_in_mem_test.go b/integration/simulation/simulation_geth_in_mem_test.go index 4d156d3f05..c7a8ad8fea 100644 --- a/integration/simulation/simulation_geth_in_mem_test.go +++ b/integration/simulation/simulation_geth_in_mem_test.go @@ -37,6 +37,7 @@ func TestGethSimulation(t *testing.T) { IsInMem: true, ReceiptTimeout: 30 * time.Second, StoppingDelay: 10 * time.Second, + L1BeaconPort: integration.TestPorts.TestGethSimulationPort + integration.DefaultPrysmGatewayPortOffset, } simParams.AvgNetworkLatency = simParams.AvgBlockDuration / 15 diff --git a/integration/simulation/simulation_in_mem_test.go b/integration/simulation/simulation_in_mem_test.go index a6fd99293c..aacc4002dd 100644 --- a/integration/simulation/simulation_in_mem_test.go +++ b/integration/simulation/simulation_in_mem_test.go @@ -35,9 +35,10 @@ func TestInMemoryMonteCarloSimulation(t *testing.T) { StartPort: integration.TestPorts.TestInMemoryMonteCarloSimulationPort, IsInMem: true, L1TenData: ¶ms.L1TenData{}, - ReceiptTimeout: 5 * time.Second, + ReceiptTimeout: 30 * time.Second, StoppingDelay: 15 * time.Second, NodeWithInboundP2PDisabled: 2, + L1BeaconPort: integration.TestPorts.TestInMemoryMonteCarloSimulationPort + integration.DefaultPrysmGatewayPortOffset, } simParams.AvgNetworkLatency = simParams.AvgBlockDuration / 15 diff --git a/integration/simulation/utils.go b/integration/simulation/utils.go index 7fe5ed6400..2ab5e244cf 100644 --- a/integration/simulation/utils.go +++ b/integration/simulation/utils.go @@ -28,7 +28,7 @@ func setupSimTestLog(simType string) { LogDir: testLogs, TestType: "sim-log", TestSubtype: simType, - LogLevel: log.LvlTrace, + LogLevel: log.LvlInfo, }) } diff --git a/integration/simulation/validate_chain.go b/integration/simulation/validate_chain.go index 6543a2b103..b3078609c4 100644 --- a/integration/simulation/validate_chain.go +++ b/integration/simulation/validate_chain.go @@ -3,13 +3,16 @@ package simulation import ( "context" "fmt" + "github.com/ten-protocol/go-ten/go/host/l1" "math/big" + "net/http" "sort" "strings" "sync" "testing" "time" + "github.com/ethereum/go-ethereum/rlp" "github.com/ten-protocol/go-ten/contracts/generated/MessageBus" testcommon "github.com/ten-protocol/go-ten/integration/common" @@ -51,7 +54,7 @@ const ( // For example, all injected transactions were processed correctly, the height of the rollup chain is a function of the total // time of the simulation and the average block duration, that all TEN nodes are roughly in sync, etc func checkNetworkValidity(t *testing.T, s *Simulation) { - time.Sleep(2 * time.Second) + time.Sleep(5 * time.Second) checkTransactionsInjected(t, s) l1MaxHeight := checkEthereumBlockchainValidity(t, s) checkTenBlockchainValidity(t, s, l1MaxHeight) @@ -279,8 +282,8 @@ func ExtractDataFromEthereumChain( deposits = append(deposits, tx.Hash()) totalDeposited.Add(totalDeposited, l1tx.Amount) successfulDeposits++ - case *ethadapter.L1RollupTx: - r, err := common.DecodeRollup(l1tx.Rollup) + case *ethadapter.L1RollupHashes: + r, err := getRollupFromBlobHashes(s.ctx, s.Params.L1BeaconPort, block, l1tx.BlobHashes) if err != nil { testlog.Logger().Crit("could not decode rollup. ", log.ErrKey, err) } @@ -848,3 +851,21 @@ func checkBatchFromTxs(t *testing.T, client rpc.Client, txHash gethcommon.Hash, t.Errorf("node %d: retrieved batch by hash, but hash was incorrect", nodeIdx) } } + +func getRollupFromBlobHashes(ctx context.Context, beaconPort int, block *types.Block, blobHashes []gethcommon.Hash) (*common.ExtRollup, error) { + beaconUrl := fmt.Sprintf("127.0.0.1:%d", beaconPort) + blobResolver := l1.NewBlobResolver(ethadapter.NewL1BeaconClient(ethadapter.NewBeaconHTTPClient(new(http.Client), beaconUrl))) + blobs, err := blobResolver.FetchBlobs(ctx, block.Header(), blobHashes) + if err != nil { + return nil, fmt.Errorf("could not fetch blobs from hashes during chain validation") + } + data, err := ethadapter.DecodeBlobs(blobs) + if err != nil { + fmt.Println("Error decoding rollup blob:", err) + } + var rollup common.ExtRollup + if err := rlp.DecodeBytes(data, &rollup); err != nil { + return nil, fmt.Errorf("could not decode rollup. Cause: %w", err) + } + return &rollup, nil +} diff --git a/integration/smartcontract/debug_mgmt_contract_lib.go b/integration/smartcontract/debug_mgmt_contract_lib.go index 910288bd74..bab07b5a5c 100644 --- a/integration/smartcontract/debug_mgmt_contract_lib.go +++ b/integration/smartcontract/debug_mgmt_contract_lib.go @@ -41,7 +41,10 @@ func (d *debugMgmtContractLib) AwaitedIssueRollup(rollup common.ExtRollup, clien if err != nil { return err } - txData := d.CreateRollup(ðadapter.L1RollupTx{Rollup: encodedRollup}) + txData, err := d.CreateBlobRollup(ðadapter.L1RollupTx{Rollup: encodedRollup}) + if err != nil { + return err + } issuedTx, receipt, err := w.AwaitedSignAndSendTransaction(client, txData) if err != nil { diff --git a/integration/smartcontract/debug_wallet.go b/integration/smartcontract/debug_wallet.go index 41475c22ac..36346a5e5d 100644 --- a/integration/smartcontract/debug_wallet.go +++ b/integration/smartcontract/debug_wallet.go @@ -12,7 +12,7 @@ import ( "github.com/ten-protocol/go-ten/go/wallet" ) -var _timeout = 60 * time.Second +var _timeout = 500 * time.Second // debugWallet is a wrapper around the wallet that simplifies commonly used functions type debugWallet struct { diff --git a/integration/smartcontract/smartcontracts_test.go b/integration/smartcontract/smartcontracts_test.go index 4439858b17..0776fd67d4 100644 --- a/integration/smartcontract/smartcontracts_test.go +++ b/integration/smartcontract/smartcontracts_test.go @@ -155,7 +155,10 @@ func nonAttestedNodesCannotCreateRollup(t *testing.T, mgmtContractLib *debugMgmt if err != nil { t.Error(err) } - txData := mgmtContractLib.CreateRollup(ðadapter.L1RollupTx{Rollup: encodedRollup}) + txData, err := mgmtContractLib.CreateBlobRollup(ðadapter.L1RollupTx{Rollup: encodedRollup}) + if err != nil { + t.Error(err) + } _, _, err = w.AwaitedSignAndSendTransaction(client, txData) if err == nil || !assert.Contains(t, err.Error(), "execution reverted") { diff --git a/integration/tengateway/tengateway_test.go b/integration/tengateway/tengateway_test.go index 00cf051f39..05227031e3 100644 --- a/integration/tengateway/tengateway_test.go +++ b/integration/tengateway/tengateway_test.go @@ -872,6 +872,7 @@ func createTenNetwork(t *testing.T, startPort int) { Wallets: wallets, StartPort: startPort, WithPrefunding: true, + L1BeaconPort: integration.TestPorts.TestTenGatewayPort + integration.DefaultPrysmGatewayPortOffset, } tenNetwork := network.NewNetworkOfSocketNodes(wallets) diff --git a/integration/tenscan/tenscan_test.go b/integration/tenscan/tenscan_test.go index 0ddb67a3ac..7667d8e0f1 100644 --- a/integration/tenscan/tenscan_test.go +++ b/integration/tenscan/tenscan_test.go @@ -78,7 +78,6 @@ func TestTenscan(t *testing.T) { 5, ) - // Issue tests statusCode, body, err := fasthttp.Get(nil, fmt.Sprintf("%s/count/contracts/", serverAddress)) assert.NoError(t, err) assert.Equal(t, 200, statusCode) @@ -302,6 +301,7 @@ func createTenNetwork(t *testing.T, startPort int) { Wallets: wallets, StartPort: startPort, WithPrefunding: true, + L1BeaconPort: integration.TestPorts.TestTenscanPort + integration.DefaultPrysmGatewayPortOffset, } tenNetwork := network.NewNetworkOfSocketNodes(wallets) diff --git a/testnet/launcher/docker.go b/testnet/launcher/docker.go index 05eed725b6..8ee9ff0556 100644 --- a/testnet/launcher/docker.go +++ b/testnet/launcher/docker.go @@ -64,6 +64,8 @@ func (t *Testnet) Start() error { node.WithDebugNamespaceEnabled(true), node.WithLogLevel(t.cfg.logLevel), node.WithEdgelessDBImage("ghcr.io/edgelesssys/edgelessdb-sgx-4gb:v0.3.2"), // default edgeless db value + // FIXME check this + node.WithL1BeaconUrl("127.0.0.1:12600"), ) if !t.cfg.isSGXEnabled { sequencerNodeConfig.UpdateNodeConfig(node.WithEdgelessDBImage("ghcr.io/edgelesssys/edgelessdb-sgx-1gb:v0.3.2"))