diff --git a/abi/ContractDeployer.json b/abi/ContractDeployer.json deleted file mode 100644 index 6daec33e..00000000 --- a/abi/ContractDeployer.json +++ /dev/null @@ -1,425 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "accountAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum IContractDeployer.AccountNonceOrdering", - "name": "nonceOrdering", - "type": "uint8" - } - ], - "name": "AccountNonceOrderingUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "accountAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum IContractDeployer.AccountAbstractionVersion", - "name": "aaVersion", - "type": "uint8" - } - ], - "name": "AccountVersionUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "deployerAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "bytecodeHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "contractAddress", - "type": "address" - } - ], - "name": "ContractDeployed", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_salt", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_input", - "type": "bytes" - } - ], - "name": "create", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_salt", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_input", - "type": "bytes" - } - ], - "name": "create2", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_salt", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_input", - "type": "bytes" - }, - { - "internalType": "enum IContractDeployer.AccountAbstractionVersion", - "name": "_aaVersion", - "type": "uint8" - } - ], - "name": "create2Account", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_input", - "type": "bytes" - }, - { - "internalType": "enum IContractDeployer.AccountAbstractionVersion", - "name": "_aaVersion", - "type": "uint8" - } - ], - "name": "createAccount", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "extendedAccountVersion", - "outputs": [ - { - "internalType": "enum IContractDeployer.AccountAbstractionVersion", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_keccak256BytecodeHash", - "type": "bytes32" - } - ], - "name": "forceDeployKeccak256", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "newAddress", - "type": "address" - }, - { - "internalType": "bool", - "name": "callConstructor", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "input", - "type": "bytes" - } - ], - "internalType": "struct ContractDeployer.ForceDeployment", - "name": "_deployment", - "type": "tuple" - }, - { - "internalType": "address", - "name": "_sender", - "type": "address" - } - ], - "name": "forceDeployOnAddress", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "newAddress", - "type": "address" - }, - { - "internalType": "bool", - "name": "callConstructor", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "input", - "type": "bytes" - } - ], - "internalType": "struct ContractDeployer.ForceDeployment[]", - "name": "_deployments", - "type": "tuple[]" - } - ], - "name": "forceDeployOnAddresses", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getAccountInfo", - "outputs": [ - { - "components": [ - { - "internalType": "enum IContractDeployer.AccountAbstractionVersion", - "name": "supportedAAVersion", - "type": "uint8" - }, - { - "internalType": "enum IContractDeployer.AccountNonceOrdering", - "name": "nonceOrdering", - "type": "uint8" - } - ], - "internalType": "struct IContractDeployer.AccountInfo", - "name": "info", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_senderNonce", - "type": "uint256" - } - ], - "name": "getNewAddressCreate", - "outputs": [ - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_salt", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "_input", - "type": "bytes" - } - ], - "name": "getNewAddressCreate2", - "outputs": [ - { - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum IContractDeployer.AccountAbstractionVersion", - "name": "_version", - "type": "uint8" - } - ], - "name": "updateAccountVersion", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "enum IContractDeployer.AccountNonceOrdering", - "name": "_nonceOrdering", - "type": "uint8" - } - ], - "name": "updateNonceOrdering", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/abi/IAllowList.json b/abi/IAllowList.json deleted file mode 100644 index de592dab..00000000 --- a/abi/IAllowList.json +++ /dev/null @@ -1,308 +0,0 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": false, - "internalType": "enum IAllowList.AccessMode", - "name": "previousMode", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "enum IAllowList.AccessMode", - "name": "newMode", - "type": "uint8" - } - ], - "name": "UpdateAccessMode", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "caller", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "target", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes4", - "name": "functionSig", - "type": "bytes4" - }, - { - "indexed": false, - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "name": "UpdateCallPermission", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "l1Token", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "depositLimitation", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "depositCap", - "type": "uint256" - } - ], - "name": "UpdateDepositLimit", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_caller", - "type": "address" - }, - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "_functionSig", - "type": "bytes4" - } - ], - "name": "canCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_target", - "type": "address" - } - ], - "name": "getAccessMode", - "outputs": [ - { - "internalType": "enum IAllowList.AccessMode", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - } - ], - "name": "getTokenDepositLimitData", - "outputs": [ - { - "components": [ - { - "internalType": "bool", - "name": "depositLimitation", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "depositCap", - "type": "uint256" - } - ], - "internalType": "struct IAllowList.Deposit", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_caller", - "type": "address" - }, - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "_functionSig", - "type": "bytes4" - } - ], - "name": "hasSpecialAccessToCall", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "enum IAllowList.AccessMode", - "name": "_accessMode", - "type": "uint8" - } - ], - "name": "setAccessMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_targets", - "type": "address[]" - }, - { - "internalType": "enum IAllowList.AccessMode[]", - "name": "_accessMode", - "type": "uint8[]" - } - ], - "name": "setBatchAccessMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "_callers", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "_targets", - "type": "address[]" - }, - { - "internalType": "bytes4[]", - "name": "_functionSigs", - "type": "bytes4[]" - }, - { - "internalType": "bool[]", - "name": "_enables", - "type": "bool[]" - } - ], - "name": "setBatchPermissionToCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "bool", - "name": "_depositLimitation", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "_depositCap", - "type": "uint256" - } - ], - "name": "setDepositLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_caller", - "type": "address" - }, - { - "internalType": "address", - "name": "_target", - "type": "address" - }, - { - "internalType": "bytes4", - "name": "_functionSig", - "type": "bytes4" - }, - { - "internalType": "bool", - "name": "_enable", - "type": "bool" - } - ], - "name": "setPermissionToCall", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} diff --git a/abi/IContractDeployer.json b/abi/IContractDeployer.json new file mode 100644 index 00000000..8f54565c --- /dev/null +++ b/abi/IContractDeployer.json @@ -0,0 +1,306 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "accountAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum IContractDeployer.AccountNonceOrdering", + "name": "nonceOrdering", + "type": "uint8" + } + ], + "name": "AccountNonceOrderingUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "accountAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum IContractDeployer.AccountAbstractionVersion", + "name": "aaVersion", + "type": "uint8" + } + ], + "name": "AccountVersionUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "deployerAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "bytecodeHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "ContractDeployed", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_input", + "type": "bytes" + } + ], + "name": "create", + "outputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_input", + "type": "bytes" + } + ], + "name": "create2", + "outputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_input", + "type": "bytes" + }, + { + "internalType": "enum IContractDeployer.AccountAbstractionVersion", + "name": "_aaVersion", + "type": "uint8" + } + ], + "name": "create2Account", + "outputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_input", + "type": "bytes" + }, + { + "internalType": "enum IContractDeployer.AccountAbstractionVersion", + "name": "_aaVersion", + "type": "uint8" + } + ], + "name": "createAccount", + "outputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getAccountInfo", + "outputs": [ + { + "components": [ + { + "internalType": "enum IContractDeployer.AccountAbstractionVersion", + "name": "supportedAAVersion", + "type": "uint8" + }, + { + "internalType": "enum IContractDeployer.AccountNonceOrdering", + "name": "nonceOrdering", + "type": "uint8" + } + ], + "internalType": "struct IContractDeployer.AccountInfo", + "name": "info", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_senderNonce", + "type": "uint256" + } + ], + "name": "getNewAddressCreate", + "outputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_salt", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_input", + "type": "bytes" + } + ], + "name": "getNewAddressCreate2", + "outputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IContractDeployer.AccountAbstractionVersion", + "name": "_version", + "type": "uint8" + } + ], + "name": "updateAccountVersion", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "enum IContractDeployer.AccountNonceOrdering", + "name": "_nonceOrdering", + "type": "uint8" + } + ], + "name": "updateNonceOrdering", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/IERC1271.json b/abi/IERC1271.json index 5e153118..bebcf03b 100644 --- a/abi/IERC1271.json +++ b/abi/IERC1271.json @@ -1,28 +1,26 @@ -{ - "abi": [ - { - "inputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - } - ], - "name": "isValidSignature", - "outputs": [ - { - "internalType": "bytes4", - "name": "magicValue", - "type": "bytes4" - } - ], - "stateMutability": "view", - "type": "function" - } - ] -} \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "isValidSignature", + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abi/IERC20.json b/abi/IERC20.json index 2fc72463..177ac839 100644 --- a/abi/IERC20.json +++ b/abi/IERC20.json @@ -1,226 +1,224 @@ -{ - "abi": [ - { - "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": "amount", - "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": "amount", - "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": "amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} +[ + { + "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": "amount", + "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": "amount", + "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": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/IEthToken.json b/abi/IEthToken.json index 26c2ed92..c497f23e 100644 --- a/abi/IEthToken.json +++ b/abi/IEthToken.json @@ -1,247 +1,245 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Mint", - "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" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_l2Sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_l1Receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "Withdrawal", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_l2Sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "_l1Receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_additionalData", - "type": "bytes" - } - ], - "name": "WithdrawalWithMessage", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "address", - "name": "_to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferFromTo", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Receiver", - "type": "address" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Receiver", - "type": "address" - }, - { - "internalType": "bytes", - "name": "_additionalData", - "type": "bytes" - } - ], - "name": "withdrawWithMessage", - "outputs": [], - "stateMutability": "payable", - "type": "function" - } - ] -} +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Mint", + "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" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_l2Sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_l1Receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "Withdrawal", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_l2Sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "_l1Receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_additionalData", + "type": "bytes" + } + ], + "name": "WithdrawalWithMessage", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_from", + "type": "address" + }, + { + "internalType": "address", + "name": "_to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferFromTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Receiver", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Receiver", + "type": "address" + }, + { + "internalType": "bytes", + "name": "_additionalData", + "type": "bytes" + } + ], + "name": "withdrawWithMessage", + "outputs": [], + "stateMutability": "payable", + "type": "function" + } +] diff --git a/abi/IL1Bridge.json b/abi/IL1Bridge.json index fa379928..36bc6b52 100644 --- a/abi/IL1Bridge.json +++ b/abi/IL1Bridge.json @@ -1,267 +1,265 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l1Token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ClaimedFailedDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "bytes32", - "name": "l2DepositTxHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "l1Token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "DepositInitiated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l1Token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "WithdrawalFinalized", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_depositSender", - "type": "address" - }, - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_l2TxHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2MessageIndex", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_l2TxNumberInBatch", - "type": "uint16" - }, - { - "internalType": "bytes32[]", - "name": "_merkleProof", - "type": "bytes32[]" - } - ], - "name": "claimFailedDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l2Receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2TxGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2TxGasPerPubdataByte", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_refundRecipient", - "type": "address" - } - ], - "name": "deposit", - "outputs": [ - { - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2MessageIndex", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_l2TxNumberInBatch", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_message", - "type": "bytes" - }, - { - "internalType": "bytes32[]", - "name": "_merkleProof", - "type": "bytes32[]" - } - ], - "name": "finalizeWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2MessageIndex", - "type": "uint256" - } - ], - "name": "isWithdrawalFinalized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "l2Bridge", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - } - ], - "name": "l2TokenAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } - ] -} +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ClaimedFailedDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "l2DepositTxHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "l1Token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositInitiated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "l1Token", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawalFinalized", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_depositSender", + "type": "address" + }, + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_l2TxHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2MessageIndex", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "_l2TxNumberInBatch", + "type": "uint16" + }, + { + "internalType": "bytes32[]", + "name": "_merkleProof", + "type": "bytes32[]" + } + ], + "name": "claimFailedDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l2Receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2TxGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2TxGasPerPubdataByte", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_refundRecipient", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2MessageIndex", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "_l2TxNumberInBatch", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "bytes32[]", + "name": "_merkleProof", + "type": "bytes32[]" + } + ], + "name": "finalizeWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2MessageIndex", + "type": "uint256" + } + ], + "name": "isWithdrawalFinalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "l2Bridge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + } + ], + "name": "l2TokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abi/IL1Messenger.json b/abi/IL1Messenger.json index b53a4d14..0bf55026 100644 --- a/abi/IL1Messenger.json +++ b/abi/IL1Messenger.json @@ -1,148 +1,146 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - } - ], - "name": "BytecodeL1PublicationRequested", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "_hash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "_message", - "type": "bytes" - } - ], - "name": "L1MessageSent", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "internalType": "uint8", - "name": "l2ShardId", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "isService", - "type": "bool" - }, - { - "internalType": "uint16", - "name": "txNumberInBlock", - "type": "uint16" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "value", - "type": "bytes32" - } - ], - "indexed": false, - "internalType": "struct L2ToL1Log", - "name": "_l2log", - "type": "tuple" - } - ], - "name": "L2ToL1LogSent", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_bytecodeHash", - "type": "bytes32" - } - ], - "name": "requestBytecodeL1Publication", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_isService", - "type": "bool" - }, - { - "internalType": "bytes32", - "name": "_key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "_value", - "type": "bytes32" - } - ], - "name": "sendL2ToL1Log", - "outputs": [ - { - "internalType": "uint256", - "name": "logIdInMerkleTree", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_message", - "type": "bytes" - } - ], - "name": "sendToL1", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + } + ], + "name": "BytecodeL1PublicationRequested", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "L1MessageSent", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "internalType": "uint8", + "name": "l2ShardId", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isService", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "txNumberInBlock", + "type": "uint16" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "value", + "type": "bytes32" + } + ], + "indexed": false, + "internalType": "struct L2ToL1Log", + "name": "_l2log", + "type": "tuple" + } + ], + "name": "L2ToL1LogSent", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_bytecodeHash", + "type": "bytes32" + } + ], + "name": "requestBytecodeL1Publication", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_isService", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "_key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "_value", + "type": "bytes32" + } + ], + "name": "sendL2ToL1Log", + "outputs": [ + { + "internalType": "uint256", + "name": "logIdInMerkleTree", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + } + ], + "name": "sendToL1", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/IL2Bridge.json b/abi/IL2Bridge.json index d6ca3ce5..57504211 100644 --- a/abi/IL2Bridge.json +++ b/abi/IL2Bridge.json @@ -1,173 +1,109 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "l1Sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Receiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "FinalizeDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "l2Sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l1Receiver", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "l2Token", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "WithdrawalInitiated", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Sender", - "type": "address" - }, - { - "internalType": "address", - "name": "_l2Receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_data", - "type": "bytes" - } - ], - "name": "finalizeDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "l1Bridge", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l2Token", - "type": "address" - } - ], - "name": "l1TokenAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Token", - "type": "address" - } - ], - "name": "l2TokenAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_l1Receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "_l2Token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Sender", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2Receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_data", + "type": "bytes" + } + ], + "name": "finalizeDeposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "l1Bridge", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l2Token", + "type": "address" + } + ], + "name": "l1TokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Token", + "type": "address" + } + ], + "name": "l2TokenAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_l1Receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "_l2Token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/INonceHolder.json b/abi/INonceHolder.json index 0205d8ba..1ee9c5c8 100644 --- a/abi/INonceHolder.json +++ b/abi/INonceHolder.json @@ -1,221 +1,219 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "accountAddress", - "type": "address" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "key", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "ValueSetUnderNonce", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getDeploymentNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getMinNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "getRawNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_key", - "type": "uint256" - } - ], - "name": "getValueUnderNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "increaseMinNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "incrementDeploymentNonce", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_expectedNonce", - "type": "uint256" - } - ], - "name": "incrementMinNonceIfEquals", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_nonce", - "type": "uint256" - } - ], - "name": "isNonceUsed", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_key", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_value", - "type": "uint256" - } - ], - "name": "setValueUnderNonce", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_key", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_shouldBeUsed", - "type": "bool" - } - ], - "name": "validateNonceUsage", - "outputs": [], - "stateMutability": "view", - "type": "function" - } - ] -} \ No newline at end of file +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "accountAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "key", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "ValueSetUnderNonce", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getDeploymentNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getMinNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getRawNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_key", + "type": "uint256" + } + ], + "name": "getValueUnderNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "increaseMinNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "incrementDeploymentNonce", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_expectedNonce", + "type": "uint256" + } + ], + "name": "incrementMinNonceIfEquals", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_nonce", + "type": "uint256" + } + ], + "name": "isNonceUsed", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_key", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_value", + "type": "uint256" + } + ], + "name": "setValueUnderNonce", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_key", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_shouldBeUsed", + "type": "bool" + } + ], + "name": "validateNonceUsage", + "outputs": [], + "stateMutability": "view", + "type": "function" + } +] diff --git a/abi/IPaymasterFlow.json b/abi/IPaymasterFlow.json index c78e121f..132e55b6 100644 --- a/abi/IPaymasterFlow.json +++ b/abi/IPaymasterFlow.json @@ -1,40 +1,38 @@ -{ - "abi": [ - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_minAllowance", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_innerInput", - "type": "bytes" - } - ], - "name": "approvalBased", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "input", - "type": "bytes" - } - ], - "name": "general", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_minAllowance", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_innerInput", + "type": "bytes" + } + ], + "name": "approvalBased", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "input", + "type": "bytes" + } + ], + "name": "general", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/IZkSync.json b/abi/IZkSync.json index d53eaeb6..f6480098 100644 --- a/abi/IZkSync.json +++ b/abi/IZkSync.json @@ -1,1637 +1,1622 @@ -{ - "abi": [ - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "batchNumber", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "batchHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - } - ], - "name": "BlockCommit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "batchNumber", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "batchHash", - "type": "bytes32" - }, - { - "indexed": true, - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - } - ], - "name": "BlockExecution", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "totalBatchesCommitted", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBatchesVerified", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBatchesExecuted", - "type": "uint256" - } - ], - "name": "BlocksRevert", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "previousLastVerifiedBatch", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "uint256", - "name": "currentLastVerifiedBatch", - "type": "uint256" - } - ], - "name": "BlocksVerification", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "EthWithdrawalFinalized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "facet", - "type": "address" - }, - { - "internalType": "enum Diamond.Action", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "isFreezable", - "type": "bool" - }, - { - "internalType": "bytes4[]", - "name": "selectors", - "type": "bytes4[]" - } - ], - "internalType": "struct Diamond.FacetCut[]", - "name": "facetCuts", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "initAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "initCalldata", - "type": "bytes" - } - ], - "indexed": false, - "internalType": "struct Diamond.DiamondCutData", - "name": "diamondCut", - "type": "tuple" - } - ], - "name": "ExecuteUpgrade", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Freeze", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "isPorterAvailable", - "type": "bool" - } - ], - "name": "IsPorterAvailableStatusUpdate", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newAdmin", - "type": "address" - } - ], - "name": "NewAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldGovernor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newGovernor", - "type": "address" - } - ], - "name": "NewGovernor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldPendingAdmin", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newPendingAdmin", - "type": "address" - } - ], - "name": "NewPendingAdmin", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldPendingGovernor", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newPendingGovernor", - "type": "address" - } - ], - "name": "NewPendingGovernor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "txId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "txHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint64", - "name": "expirationTimestamp", - "type": "uint64" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "txType", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "from", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "to", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "gasPerPubdataByteLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxPriorityFeePerGas", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "paymaster", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "value", - "type": "uint256" - }, - { - "internalType": "uint256[4]", - "name": "reserved", - "type": "uint256[4]" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "signature", - "type": "bytes" - }, - { - "internalType": "uint256[]", - "name": "factoryDeps", - "type": "uint256[]" - }, - { - "internalType": "bytes", - "name": "paymasterInput", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "reservedDynamic", - "type": "bytes" - } - ], - "indexed": false, - "internalType": "struct IMailbox.L2CanonicalTransaction", - "name": "transaction", - "type": "tuple" - }, - { - "indexed": false, - "internalType": "bytes[]", - "name": "factoryDeps", - "type": "bytes[]" - } - ], - "name": "NewPriorityRequest", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "oldPriorityTxMaxGasLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newPriorityTxMaxGasLimit", - "type": "uint256" - } - ], - "name": "NewPriorityTxMaxGasLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [], - "name": "Unfreeze", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "validatorAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "bool", - "name": "isActive", - "type": "bool" - } - ], - "name": "ValidatorStatusUpdate", - "type": "event" - }, - { - "inputs": [], - "name": "acceptAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "acceptGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "batchNumber", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "batchHash", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "indexRepeatedStorageChanges", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "numberOfLayer1Txs", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "priorityOperationsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "l2LogsTreeRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - } - ], - "internalType": "struct IExecutor.StoredBatchInfo", - "name": "_lastCommittedBatchData", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint64", - "name": "batchNumber", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "timestamp", - "type": "uint64" - }, - { - "internalType": "uint64", - "name": "indexRepeatedStorageChanges", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "newStateRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "numberOfLayer1Txs", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "priorityOperationsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "bootloaderHeapInitialContentsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "eventsQueueStateHash", - "type": "bytes32" - }, - { - "internalType": "bytes", - "name": "systemLogs", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "totalL2ToL1Pubdata", - "type": "bytes" - } - ], - "internalType": "struct IExecutor.CommitBatchInfo[]", - "name": "_newBatchesData", - "type": "tuple[]" - } - ], - "name": "commitBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "batchNumber", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "batchHash", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "indexRepeatedStorageChanges", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "numberOfLayer1Txs", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "priorityOperationsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "l2LogsTreeRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - } - ], - "internalType": "struct IExecutor.StoredBatchInfo[]", - "name": "_batchesData", - "type": "tuple[]" - } - ], - "name": "executeBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "facet", - "type": "address" - }, - { - "internalType": "enum Diamond.Action", - "name": "action", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "isFreezable", - "type": "bool" - }, - { - "internalType": "bytes4[]", - "name": "selectors", - "type": "bytes4[]" - } - ], - "internalType": "struct Diamond.FacetCut[]", - "name": "facetCuts", - "type": "tuple[]" - }, - { - "internalType": "address", - "name": "initAddress", - "type": "address" - }, - { - "internalType": "bytes", - "name": "initCalldata", - "type": "bytes" - } - ], - "internalType": "struct Diamond.DiamondCutData", - "name": "_diamondCut", - "type": "tuple" - } - ], - "name": "executeUpgrade", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_selector", - "type": "bytes4" - } - ], - "name": "facetAddress", - "outputs": [ - { - "internalType": "address", - "name": "facet", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facetAddresses", - "outputs": [ - { - "internalType": "address[]", - "name": "facets", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_facet", - "type": "address" - } - ], - "name": "facetFunctionSelectors", - "outputs": [ - { - "internalType": "bytes4[]", - "name": "", - "type": "bytes4[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "facets", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "addr", - "type": "address" - }, - { - "internalType": "bytes4[]", - "name": "selectors", - "type": "bytes4[]" - } - ], - "internalType": "struct IGetters.Facet[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2MessageIndex", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_l2TxNumberInBatch", - "type": "uint16" - }, - { - "internalType": "bytes", - "name": "_message", - "type": "bytes" - }, - { - "internalType": "bytes32[]", - "name": "_merkleProof", - "type": "bytes32[]" - } - ], - "name": "finalizeEthWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "freezeDiamond", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "getAllowList", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFirstUnprocessedPriorityTx", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getGovernor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2BootloaderBytecodeHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2DefaultAccountBytecodeHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2SystemContractsUpgradeBatchNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getL2SystemContractsUpgradeTxHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getName", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPendingGovernor", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPriorityQueueSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPriorityTxMaxGasLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getProtocolVersion", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBatchesCommitted", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBatchesExecuted", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalBatchesVerified", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalPriorityTxs", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVerifier", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVerifierParams", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "recursionNodeLevelVkHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "recursionLeafLevelVkHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "recursionCircuitsSetVksHash", - "type": "bytes32" - } - ], - "internalType": "struct VerifierParams", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isDiamondStorageFrozen", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2MessageIndex", - "type": "uint256" - } - ], - "name": "isEthWithdrawalFinalized", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_facet", - "type": "address" - } - ], - "name": "isFacetFreezable", - "outputs": [ - { - "internalType": "bool", - "name": "isFreezable", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "_selector", - "type": "bytes4" - } - ], - "name": "isFunctionFreezable", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_address", - "type": "address" - } - ], - "name": "isValidator", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_batchNumber", - "type": "uint256" - } - ], - "name": "l2LogsRootHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "hash", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_gasPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2GasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2GasPerPubdataByteLimit", - "type": "uint256" - } - ], - "name": "l2TransactionBaseCost", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "priorityQueueFrontOperation", - "outputs": [ - { - "components": [ - { - "internalType": "bytes32", - "name": "canonicalTxHash", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "expirationTimestamp", - "type": "uint64" - }, - { - "internalType": "uint192", - "name": "layer2Tip", - "type": "uint192" - } - ], - "internalType": "struct PriorityOperation", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint64", - "name": "batchNumber", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "batchHash", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "indexRepeatedStorageChanges", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "numberOfLayer1Txs", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "priorityOperationsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "l2LogsTreeRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - } - ], - "internalType": "struct IExecutor.StoredBatchInfo", - "name": "_prevBatch", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint64", - "name": "batchNumber", - "type": "uint64" - }, - { - "internalType": "bytes32", - "name": "batchHash", - "type": "bytes32" - }, - { - "internalType": "uint64", - "name": "indexRepeatedStorageChanges", - "type": "uint64" - }, - { - "internalType": "uint256", - "name": "numberOfLayer1Txs", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "priorityOperationsHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "l2LogsTreeRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "commitment", - "type": "bytes32" - } - ], - "internalType": "struct IExecutor.StoredBatchInfo[]", - "name": "_committedBatches", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256[]", - "name": "recursiveAggregationInput", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "serializedProof", - "type": "uint256[]" - } - ], - "internalType": "struct IExecutor.ProofInput", - "name": "_proof", - "type": "tuple" - } - ], - "name": "proveBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "_l2TxHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2MessageIndex", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "_l2TxNumberInBatch", - "type": "uint16" - }, - { - "internalType": "bytes32[]", - "name": "_merkleProof", - "type": "bytes32[]" - }, - { - "internalType": "enum TxStatus", - "name": "_status", - "type": "uint8" - } - ], - "name": "proveL1ToL2TransactionStatus", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint8", - "name": "l2ShardId", - "type": "uint8" - }, - { - "internalType": "bool", - "name": "isService", - "type": "bool" - }, - { - "internalType": "uint16", - "name": "txNumberInBatch", - "type": "uint16" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "value", - "type": "bytes32" - } - ], - "internalType": "struct L2Log", - "name": "_log", - "type": "tuple" - }, - { - "internalType": "bytes32[]", - "name": "_proof", - "type": "bytes32[]" - } - ], - "name": "proveL2LogInclusion", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_l2BatchNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint16", - "name": "txNumberInBatch", - "type": "uint16" - }, - { - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "bytes", - "name": "data", - "type": "bytes" - } - ], - "internalType": "struct L2Message", - "name": "_message", - "type": "tuple" - }, - { - "internalType": "bytes32[]", - "name": "_proof", - "type": "bytes32[]" - } - ], - "name": "proveL2MessageInclusion", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_contractL2", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_l2Value", - "type": "uint256" - }, - { - "internalType": "bytes", - "name": "_calldata", - "type": "bytes" - }, - { - "internalType": "uint256", - "name": "_l2GasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_l2GasPerPubdataByteLimit", - "type": "uint256" - }, - { - "internalType": "bytes[]", - "name": "_factoryDeps", - "type": "bytes[]" - }, - { - "internalType": "address", - "name": "_refundRecipient", - "type": "address" - } - ], - "name": "requestL2Transaction", - "outputs": [ - { - "internalType": "bytes32", - "name": "canonicalTxHash", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newLastBatch", - "type": "uint256" - } - ], - "name": "revertBatches", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newPendingAdmin", - "type": "address" - } - ], - "name": "setPendingAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_newPendingGovernor", - "type": "address" - } - ], - "name": "setPendingGovernor", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_zkPorterIsAvailable", - "type": "bool" - } - ], - "name": "setPorterAvailability", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_newPriorityTxMaxGasLimit", - "type": "uint256" - } - ], - "name": "setPriorityTxMaxGasLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_validator", - "type": "address" - }, - { - "internalType": "bool", - "name": "_active", - "type": "bool" - } - ], - "name": "setValidator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_batchNumber", - "type": "uint256" - } - ], - "name": "storedBatchHash", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unfreezeDiamond", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ] -} +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "batchNumber", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "batchHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + } + ], + "name": "BlockCommit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "batchNumber", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "batchHash", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + } + ], + "name": "BlockExecution", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "totalBatchesCommitted", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBatchesVerified", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalBatchesExecuted", + "type": "uint256" + } + ], + "name": "BlocksRevert", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "previousLastVerifiedBatch", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "currentLastVerifiedBatch", + "type": "uint256" + } + ], + "name": "BlocksVerification", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "EthWithdrawalFinalized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "facet", + "type": "address" + }, + { + "internalType": "enum Diamond.Action", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isFreezable", + "type": "bool" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + } + ], + "internalType": "struct Diamond.FacetCut[]", + "name": "facetCuts", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "initAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initCalldata", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct Diamond.DiamondCutData", + "name": "diamondCut", + "type": "tuple" + } + ], + "name": "ExecuteUpgrade", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Freeze", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "isPorterAvailable", + "type": "bool" + } + ], + "name": "IsPorterAvailableStatusUpdate", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAdmin", + "type": "address" + } + ], + "name": "NewAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldGovernor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newGovernor", + "type": "address" + } + ], + "name": "NewGovernor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPendingAdmin", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPendingAdmin", + "type": "address" + } + ], + "name": "NewPendingAdmin", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldPendingGovernor", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newPendingGovernor", + "type": "address" + } + ], + "name": "NewPendingGovernor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "txId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "txHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "expirationTimestamp", + "type": "uint64" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "txType", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "to", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "gasPerPubdataByteLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxPriorityFeePerGas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "paymaster", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256[4]", + "name": "reserved", + "type": "uint256[4]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256[]", + "name": "factoryDeps", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "paymasterInput", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "reservedDynamic", + "type": "bytes" + } + ], + "indexed": false, + "internalType": "struct IMailbox.L2CanonicalTransaction", + "name": "transaction", + "type": "tuple" + }, + { + "indexed": false, + "internalType": "bytes[]", + "name": "factoryDeps", + "type": "bytes[]" + } + ], + "name": "NewPriorityRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldPriorityTxMaxGasLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newPriorityTxMaxGasLimit", + "type": "uint256" + } + ], + "name": "NewPriorityTxMaxGasLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "Unfreeze", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "validatorAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isActive", + "type": "bool" + } + ], + "name": "ValidatorStatusUpdate", + "type": "event" + }, + { + "inputs": [], + "name": "acceptAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "acceptGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "batchNumber", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "batchHash", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "indexRepeatedStorageChanges", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "numberOfLayer1Txs", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "priorityOperationsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l2LogsTreeRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + } + ], + "internalType": "struct IExecutor.StoredBatchInfo", + "name": "_lastCommittedBatchData", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "batchNumber", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "timestamp", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "indexRepeatedStorageChanges", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "newStateRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "numberOfLayer1Txs", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "priorityOperationsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "bootloaderHeapInitialContentsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "eventsQueueStateHash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "systemLogs", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "totalL2ToL1Pubdata", + "type": "bytes" + } + ], + "internalType": "struct IExecutor.CommitBatchInfo[]", + "name": "_newBatchesData", + "type": "tuple[]" + } + ], + "name": "commitBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "batchNumber", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "batchHash", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "indexRepeatedStorageChanges", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "numberOfLayer1Txs", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "priorityOperationsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l2LogsTreeRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + } + ], + "internalType": "struct IExecutor.StoredBatchInfo[]", + "name": "_batchesData", + "type": "tuple[]" + } + ], + "name": "executeBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "facet", + "type": "address" + }, + { + "internalType": "enum Diamond.Action", + "name": "action", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isFreezable", + "type": "bool" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + } + ], + "internalType": "struct Diamond.FacetCut[]", + "name": "facetCuts", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "initAddress", + "type": "address" + }, + { + "internalType": "bytes", + "name": "initCalldata", + "type": "bytes" + } + ], + "internalType": "struct Diamond.DiamondCutData", + "name": "_diamondCut", + "type": "tuple" + } + ], + "name": "executeUpgrade", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_selector", + "type": "bytes4" + } + ], + "name": "facetAddress", + "outputs": [ + { + "internalType": "address", + "name": "facet", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facetAddresses", + "outputs": [ + { + "internalType": "address[]", + "name": "facets", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "facetFunctionSelectors", + "outputs": [ + { + "internalType": "bytes4[]", + "name": "", + "type": "bytes4[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "facets", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "bytes4[]", + "name": "selectors", + "type": "bytes4[]" + } + ], + "internalType": "struct IGetters.Facet[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2MessageIndex", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "_l2TxNumberInBatch", + "type": "uint16" + }, + { + "internalType": "bytes", + "name": "_message", + "type": "bytes" + }, + { + "internalType": "bytes32[]", + "name": "_merkleProof", + "type": "bytes32[]" + } + ], + "name": "finalizeEthWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "freezeDiamond", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getFirstUnprocessedPriorityTx", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getGovernor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getL2BootloaderBytecodeHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getL2DefaultAccountBytecodeHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getL2SystemContractsUpgradeBatchNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getL2SystemContractsUpgradeTxHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getName", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPendingGovernor", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPriorityQueueSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPriorityTxMaxGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getProtocolVersion", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalBatchesCommitted", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalBatchesExecuted", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalBatchesVerified", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalPriorityTxs", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifier", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVerifierParams", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "recursionNodeLevelVkHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "recursionLeafLevelVkHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "recursionCircuitsSetVksHash", + "type": "bytes32" + } + ], + "internalType": "struct VerifierParams", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isDiamondStorageFrozen", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2MessageIndex", + "type": "uint256" + } + ], + "name": "isEthWithdrawalFinalized", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_facet", + "type": "address" + } + ], + "name": "isFacetFreezable", + "outputs": [ + { + "internalType": "bool", + "name": "isFreezable", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "_selector", + "type": "bytes4" + } + ], + "name": "isFunctionFreezable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "isValidator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_batchNumber", + "type": "uint256" + } + ], + "name": "l2LogsRootHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "hash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_gasPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2GasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2GasPerPubdataByteLimit", + "type": "uint256" + } + ], + "name": "l2TransactionBaseCost", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "priorityQueueFrontOperation", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "canonicalTxHash", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationTimestamp", + "type": "uint64" + }, + { + "internalType": "uint192", + "name": "layer2Tip", + "type": "uint192" + } + ], + "internalType": "struct PriorityOperation", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint64", + "name": "batchNumber", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "batchHash", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "indexRepeatedStorageChanges", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "numberOfLayer1Txs", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "priorityOperationsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l2LogsTreeRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + } + ], + "internalType": "struct IExecutor.StoredBatchInfo", + "name": "_prevBatch", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint64", + "name": "batchNumber", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "batchHash", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "indexRepeatedStorageChanges", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "numberOfLayer1Txs", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "priorityOperationsHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "l2LogsTreeRoot", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "commitment", + "type": "bytes32" + } + ], + "internalType": "struct IExecutor.StoredBatchInfo[]", + "name": "_committedBatches", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint256[]", + "name": "recursiveAggregationInput", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "serializedProof", + "type": "uint256[]" + } + ], + "internalType": "struct IExecutor.ProofInput", + "name": "_proof", + "type": "tuple" + } + ], + "name": "proveBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "_l2TxHash", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2MessageIndex", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "_l2TxNumberInBatch", + "type": "uint16" + }, + { + "internalType": "bytes32[]", + "name": "_merkleProof", + "type": "bytes32[]" + }, + { + "internalType": "enum TxStatus", + "name": "_status", + "type": "uint8" + } + ], + "name": "proveL1ToL2TransactionStatus", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint8", + "name": "l2ShardId", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isService", + "type": "bool" + }, + { + "internalType": "uint16", + "name": "txNumberInBatch", + "type": "uint16" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "value", + "type": "bytes32" + } + ], + "internalType": "struct L2Log", + "name": "_log", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + } + ], + "name": "proveL2LogInclusion", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_l2BatchNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint16", + "name": "txNumberInBatch", + "type": "uint16" + }, + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct L2Message", + "name": "_message", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_proof", + "type": "bytes32[]" + } + ], + "name": "proveL2MessageInclusion", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_contractL2", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_l2Value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_calldata", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_l2GasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_l2GasPerPubdataByteLimit", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "_factoryDeps", + "type": "bytes[]" + }, + { + "internalType": "address", + "name": "_refundRecipient", + "type": "address" + } + ], + "name": "requestL2Transaction", + "outputs": [ + { + "internalType": "bytes32", + "name": "canonicalTxHash", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newLastBatch", + "type": "uint256" + } + ], + "name": "revertBatches", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newPendingAdmin", + "type": "address" + } + ], + "name": "setPendingAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newPendingGovernor", + "type": "address" + } + ], + "name": "setPendingGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_zkPorterIsAvailable", + "type": "bool" + } + ], + "name": "setPorterAvailability", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newPriorityTxMaxGasLimit", + "type": "uint256" + } + ], + "name": "setPriorityTxMaxGasLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_validator", + "type": "address" + }, + { + "internalType": "bool", + "name": "_active", + "type": "bool" + } + ], + "name": "setValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_batchNumber", + "type": "uint256" + } + ], + "name": "storedBatchHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unfreezeDiamond", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/abi/update-abi.sh b/abi/update-abi.sh deleted file mode 100755 index 5961ae34..00000000 --- a/abi/update-abi.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -cd `dirname $0` - -OPEN_ZEPPELIN_CONTRACTS=$ZKSYNC_HOME/contracts/ethereum/artifacts/@openzeppelin/contracts -ETHEREUM_CONTRACTS=$ZKSYNC_HOME/contracts/ethereum/artifacts/cache/solpp-generated-contracts -ZKSYNC_CONTRACTS=$ZKSYNC_HOME/contracts/zksync/artifacts-zk/cache-zk/solpp-generated-contracts -SYSTEM_CONTRACTS=$ZKSYNC_HOME/etc/system-contracts/artifacts-zk/cache-zk/solpp-generated-contracts - -cat $OPEN_ZEPPELIN_CONTRACTS/token/ERC20/extensions/IERC20Metadata.sol/IERC20Metadata.json | jq '{ abi: .abi}' > IERC20.json - -cat $ETHEREUM_CONTRACTS/bridge/interfaces/IL1Bridge.sol/IL1Bridge.json | jq '{ abi: .abi}' > IL1Bridge.json -cat $ETHEREUM_CONTRACTS/zksync/interfaces/IZkSync.sol/IZkSync.json | jq '{ abi: .abi}' > IZkSync.json -cat $ETHEREUM_CONTRACTS/common/interfaces/IAllowList.sol/IAllowList.json | jq '{ abi: .abi}' > IAllowList.json - -cat $ZKSYNC_CONTRACTS/bridge/interfaces/IL2Bridge.sol/IL2Bridge.json | jq '{ abi: .abi}' > IL2Bridge.json -cat $ZKSYNC_CONTRACTS/interfaces/IPaymasterFlow.sol/IPaymasterFlow.json | jq '{ abi: .abi}' > IPaymasterFlow.json - -cat $SYSTEM_CONTRACTS/interfaces/IL1Messenger.sol/IL1Messenger.json | jq '{ abi: .abi}' > IL1Messenger.json -cat $SYSTEM_CONTRACTS/interfaces/IEthToken.sol/IEthToken.json | jq '{ abi: .abi}' > IEthToken.json -cat $SYSTEM_CONTRACTS/ContractDeployer.sol/ContractDeployer.json | jq '{ abi: .abi}' > ContractDeployer.json diff --git a/package.json b/package.json index 7c2825ce..97cd40a2 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "lint:check": "prettier . --check", "watch": "tsc --watch", "types:fetch": "cd scripts && ./update-abi.sh && cd ../", - "types": "find ./abi -name \"*.json\" -print0 | xargs -0 -I {} npx typechain --target ethers-v5 --outDir typechain {}" + "types": "rm typechain/*.ts && find ./abi -name \"*.json\" -print0 | xargs -0 -I {} npx typechain --target ethers-v5 --outDir typechain {}" }, "publishConfig": { "access": "public" diff --git a/src/adapters.ts b/src/adapters.ts index b010727c..4bf22491 100644 --- a/src/adapters.ts +++ b/src/adapters.ts @@ -1,11 +1,9 @@ import { BigNumber, BigNumberish, BytesLike, ethers } from "ethers"; -import { - IERC20Factory, - IL1BridgeFactory, - IL2BridgeFactory, - IZkSyncFactory, - INonceHolderFactory, -} from "../typechain"; +import { Ierc20Factory as IERC20Factory } from "../typechain/Ierc20Factory"; +import { Il1BridgeFactory as IL1BridgeFactory } from "../typechain/Il1BridgeFactory"; +import { Il2BridgeFactory as IL2BridgeFactory } from "../typechain/Il2BridgeFactory"; +import { IZkSyncFactory } from "../typechain/IZkSyncFactory"; +import { INonceHolderFactory } from "../typechain/INonceHolderFactory"; import { Provider } from "./provider"; import { Address, diff --git a/src/paymaster-utils.ts b/src/paymaster-utils.ts index 16c3f552..4938f7d4 100644 --- a/src/paymaster-utils.ts +++ b/src/paymaster-utils.ts @@ -8,7 +8,7 @@ import { PaymasterParams, } from "./types"; -export const IPaymasterFlow = new ethers.utils.Interface(require("../abi/IPaymasterFlow.json").abi); +export const IPaymasterFlow = new ethers.utils.Interface(require("../abi/IPaymasterFlow.json")); export function getApprovalBasedPaymasterInput(paymasterInput: ApprovalBasedPaymasterInput): BytesLike { return IPaymasterFlow.encodeFunctionData("approvalBased", [ diff --git a/src/provider.ts b/src/provider.ts index 78ae49c1..419ec366 100644 --- a/src/provider.ts +++ b/src/provider.ts @@ -1,7 +1,9 @@ import { BigNumber, BigNumberish, BytesLike, Contract, ethers, providers, utils } from "ethers"; import { ExternalProvider } from "@ethersproject/providers"; import { ConnectionInfo, poll } from "@ethersproject/web"; -import { IERC20Factory, IEthTokenFactory, IL2BridgeFactory } from "../typechain"; +import { Ierc20Factory as IERC20Factory } from "../typechain/Ierc20Factory"; +import { IEthTokenFactory as IEthTokenFactory } from "../typechain/IEthTokenFactory"; +import { Il2BridgeFactory as IL2BridgeFactory } from "../typechain/Il2BridgeFactory"; import { Address, BalancesMap, @@ -15,7 +17,6 @@ import { Log, MessageProof, PriorityOpResponse, - Token, TransactionDetails, TransactionReceipt, TransactionRequest, diff --git a/src/utils.ts b/src/utils.ts index 57f62e04..fa1330ae 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,31 +1,32 @@ -import { utils, ethers, BigNumber, BigNumberish, BytesLike } from "ethers"; +import { BigNumber, BigNumberish, BytesLike, ethers, utils } from "ethers"; import { SignatureLike } from "@ethersproject/bytes"; import { Address, - Eip712Meta, - PriorityQueueType, - PriorityOpTree, DeploymentInfo, - PaymasterParams, + Eip712Meta, EthereumSignature, + PaymasterParams, + PriorityOpTree, + PriorityQueueType, } from "./types"; import { TypedDataDomain, TypedDataField } from "@ethersproject/abstract-signer"; import { Provider } from "./provider"; import { EIP712Signer } from "./signer"; -import { IERC20Factory, IL1BridgeFactory } from "../typechain"; +import { Ierc20Factory as IERC20Factory } from "../typechain/Ierc20Factory"; +import { Il1BridgeFactory as IL1BridgeFactory } from "../typechain/Il1BridgeFactory"; import { AbiCoder } from "ethers/lib/utils"; export * from "./paymaster-utils"; -export const ZKSYNC_MAIN_ABI = new utils.Interface(require("../abi/IZkSync.json").abi); -export const CONTRACT_DEPLOYER = new utils.Interface(require("../abi/ContractDeployer.json").abi); -export const L1_MESSENGER = new utils.Interface(require("../abi/IL1Messenger.json").abi); -export const IERC20 = new utils.Interface(require("../abi/IERC20.json").abi); -export const IERC1271 = new utils.Interface(require("../abi/IERC1271.json").abi); -export const L1_BRIDGE_ABI = new utils.Interface(require("../abi/IL1Bridge.json").abi); -export const L2_BRIDGE_ABI = new utils.Interface(require("../abi/IL2Bridge.json").abi); -export const NONCE_HOLDER_ABI = new utils.Interface(require("../abi/INonceHolder.json").abi); -export const PAYMASTER_FLOW_ABI = new utils.Interface(require("../abi/IPaymasterFlow.json").abi); +export const ZKSYNC_MAIN_ABI = new utils.Interface(require("../abi/IZkSync.json")); +export const CONTRACT_DEPLOYER = new utils.Interface(require("../abi/IContractDeployer.json")); +export const L1_MESSENGER = new utils.Interface(require("../abi/IL1Messenger.json")); +export const IERC20 = new utils.Interface(require("../abi/IERC20.json")); +export const IERC1271 = new utils.Interface(require("../abi/IERC1271.json")); +export const L1_BRIDGE_ABI = new utils.Interface(require("../abi/IL1Bridge.json")); +export const L2_BRIDGE_ABI = new utils.Interface(require("../abi/IL2Bridge.json")); +export const NONCE_HOLDER_ABI = new utils.Interface(require("../abi/INonceHolder.json")); +export const PAYMASTER_FLOW_ABI = new utils.Interface(require("../abi/IPaymasterFlow.json")); export const ETH_ADDRESS = "0x0000000000000000000000000000000000000000"; export const BOOTLOADER_FORMAL_ADDRESS = "0x0000000000000000000000000000000000008001"; @@ -94,25 +95,25 @@ export function getHashedL2ToL1Msg(sender: Address, msg: BytesLike, txNumberInBl export function getDeployedContracts(receipt: ethers.providers.TransactionReceipt): DeploymentInfo[] { const addressBytesLen = 40; - const deployedContracts = receipt.logs - .filter( - (log) => - log.topics[0] == utils.id("ContractDeployed(address,bytes32,address)") && - log.address == CONTRACT_DEPLOYER_ADDRESS, - ) - // Take the last topic (deployed contract address as U256) and extract address from it (U160). - .map((log) => { - const sender = `0x${log.topics[1].slice(log.topics[1].length - addressBytesLen)}`; - const bytesCodehash = log.topics[2]; - const address = `0x${log.topics[3].slice(log.topics[3].length - addressBytesLen)}`; - return { - sender: utils.getAddress(sender), - bytecodeHash: bytesCodehash, - deployedAddress: utils.getAddress(address), - }; - }); - - return deployedContracts; + return ( + receipt.logs + .filter( + (log) => + log.topics[0] == utils.id("ContractDeployed(address,bytes32,address)") && + log.address == CONTRACT_DEPLOYER_ADDRESS, + ) + // Take the last topic (deployed contract address as U256) and extract address from it (U160). + .map((log) => { + const sender = `0x${log.topics[1].slice(log.topics[1].length - addressBytesLen)}`; + const bytecodeHash = log.topics[2]; + const address = `0x${log.topics[3].slice(log.topics[3].length - addressBytesLen)}`; + return { + sender: utils.getAddress(sender), + bytecodeHash: bytecodeHash, + deployedAddress: utils.getAddress(address), + }; + }) + ); } export function create2Address( @@ -181,7 +182,7 @@ export function serialize(transaction: ethers.providers.TransactionRequest, sign } if (!transaction.from) { - throw new Error("Explicitly providing `from` field is reqiured for EIP712 transactions"); + throw new Error("Explicitly providing `from` field is required for EIP712 transactions"); } const from = transaction.from; @@ -505,7 +506,7 @@ async function isSignatureCorrect( } } -// Returns `true` or `false` depending on whether or not the account abstraction's +// Returns `true` or `false` depending on whether the account abstraction's // signature is correct. Note, that while currently it does not do any `async` actions. // in the future it will. That's why the `Promise` is returned. export async function isMessageSignatureCorrect( @@ -518,7 +519,7 @@ export async function isMessageSignatureCorrect( return await isSignatureCorrect(provider, address, msgHash, signature); } -// Returns `true` or `false` depending on whether or not the account abstraction's +// Returns `true` or `false` depending on whether the account abstraction's // EIP712 signature is correct. Note, that while currently it does not do any `async` actions. // in the future it will. That's why the `Promise` is returned. export async function isTypedDataSignatureCorrect( diff --git a/tests/integration/wallet.test.ts b/tests/integration/wallet.test.ts index af6c8309..97d8b2f9 100644 --- a/tests/integration/wallet.test.ts +++ b/tests/integration/wallet.test.ts @@ -266,7 +266,7 @@ describe("Wallet", () => { amount: 5, refundRecipient: await wallet.getAddress(), }); - expect(result.eq(BigNumber.from(283_657))).to.be.true; + expect(result.eq(BigNumber.from(283_642))).to.be.true; }); }); @@ -329,7 +329,7 @@ describe("Wallet", () => { it("should return fee for DAI token deposit", async () => { const FEE_DATA = { baseCost: BigNumber.from(290_939_000_000_000), - l1GasLimit: BigNumber.from(283_416), + l1GasLimit: BigNumber.from(283_401), l2GasLimit: BigNumber.from("0x08e0f6"), maxFeePerGas: BigNumber.from(1_500_000_010), maxPriorityFeePerGas: BigNumber.from(1_500_000_000), diff --git a/typechain/IAllowList.d.ts b/typechain/IAllowList.d.ts deleted file mode 100644 index 2d018c66..00000000 --- a/typechain/IAllowList.d.ts +++ /dev/null @@ -1,789 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { - ethers, - EventFilter, - Signer, - BigNumber, - BigNumberish, - PopulatedTransaction, -} from "ethers"; -import { - Contract, - ContractTransaction, - Overrides, - CallOverrides, -} from "@ethersproject/contracts"; -import { BytesLike } from "@ethersproject/bytes"; -import { Listener, Provider } from "@ethersproject/providers"; -import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; - -interface IAllowListInterface extends ethers.utils.Interface { - functions: { - "canCall(address,address,bytes4)": FunctionFragment; - "getAccessMode(address)": FunctionFragment; - "getTokenDepositLimitData(address)": FunctionFragment; - "hasSpecialAccessToCall(address,address,bytes4)": FunctionFragment; - "setAccessMode(address,uint8)": FunctionFragment; - "setBatchAccessMode(address[],uint8[])": FunctionFragment; - "setBatchPermissionToCall(address[],address[],bytes4[],bool[])": FunctionFragment; - "setDepositLimit(address,bool,uint256)": FunctionFragment; - "setPermissionToCall(address,address,bytes4,bool)": FunctionFragment; - }; - - encodeFunctionData( - functionFragment: "canCall", - values: [string, string, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "getAccessMode", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "getTokenDepositLimitData", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "hasSpecialAccessToCall", - values: [string, string, BytesLike] - ): string; - encodeFunctionData( - functionFragment: "setAccessMode", - values: [string, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setBatchAccessMode", - values: [string[], BigNumberish[]] - ): string; - encodeFunctionData( - functionFragment: "setBatchPermissionToCall", - values: [string[], string[], BytesLike[], boolean[]] - ): string; - encodeFunctionData( - functionFragment: "setDepositLimit", - values: [string, boolean, BigNumberish] - ): string; - encodeFunctionData( - functionFragment: "setPermissionToCall", - values: [string, string, BytesLike, boolean] - ): string; - - decodeFunctionResult(functionFragment: "canCall", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "getAccessMode", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getTokenDepositLimitData", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "hasSpecialAccessToCall", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setAccessMode", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setBatchAccessMode", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setBatchPermissionToCall", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setDepositLimit", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setPermissionToCall", - data: BytesLike - ): Result; - - events: { - "UpdateAccessMode(address,uint8,uint8)": EventFragment; - "UpdateCallPermission(address,address,bytes4,bool)": EventFragment; - "UpdateDepositLimit(address,bool,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "UpdateAccessMode"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UpdateCallPermission"): EventFragment; - getEvent(nameOrSignatureOrTopic: "UpdateDepositLimit"): EventFragment; -} - -export class IAllowList extends Contract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - on(event: EventFilter | string, listener: Listener): this; - once(event: EventFilter | string, listener: Listener): this; - addListener(eventName: EventFilter | string, listener: Listener): this; - removeAllListeners(eventName: EventFilter | string): this; - removeListener(eventName: any, listener: Listener): this; - - interface: IAllowListInterface; - - functions: { - canCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise<{ - 0: boolean; - }>; - - "canCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise<{ - 0: boolean; - }>; - - getAccessMode( - _target: string, - overrides?: CallOverrides - ): Promise<{ - 0: number; - }>; - - "getAccessMode(address)"( - _target: string, - overrides?: CallOverrides - ): Promise<{ - 0: number; - }>; - - getTokenDepositLimitData( - _l1Token: string, - overrides?: CallOverrides - ): Promise<{ - 0: { - depositLimitation: boolean; - depositCap: BigNumber; - 0: boolean; - 1: BigNumber; - }; - }>; - - "getTokenDepositLimitData(address)"( - _l1Token: string, - overrides?: CallOverrides - ): Promise<{ - 0: { - depositLimitation: boolean; - depositCap: BigNumber; - 0: boolean; - 1: BigNumber; - }; - }>; - - hasSpecialAccessToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise<{ - 0: boolean; - }>; - - "hasSpecialAccessToCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise<{ - 0: boolean; - }>; - - setAccessMode( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - "setAccessMode(address,uint8)"( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - setBatchAccessMode( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - "setBatchAccessMode(address[],uint8[])"( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - setBatchPermissionToCall( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - "setBatchPermissionToCall(address[],address[],bytes4[],bool[])"( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - setDepositLimit( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - "setDepositLimit(address,bool,uint256)"( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - setPermissionToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - - "setPermissionToCall(address,address,bytes4,bool)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - }; - - canCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "canCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - getAccessMode(_target: string, overrides?: CallOverrides): Promise; - - "getAccessMode(address)"( - _target: string, - overrides?: CallOverrides - ): Promise; - - getTokenDepositLimitData( - _l1Token: string, - overrides?: CallOverrides - ): Promise<{ - depositLimitation: boolean; - depositCap: BigNumber; - 0: boolean; - 1: BigNumber; - }>; - - "getTokenDepositLimitData(address)"( - _l1Token: string, - overrides?: CallOverrides - ): Promise<{ - depositLimitation: boolean; - depositCap: BigNumber; - 0: boolean; - 1: BigNumber; - }>; - - hasSpecialAccessToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "hasSpecialAccessToCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - setAccessMode( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - "setAccessMode(address,uint8)"( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - setBatchAccessMode( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - "setBatchAccessMode(address[],uint8[])"( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - setBatchPermissionToCall( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - "setBatchPermissionToCall(address[],address[],bytes4[],bool[])"( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - setDepositLimit( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - "setDepositLimit(address,bool,uint256)"( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - setPermissionToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - - "setPermissionToCall(address,address,bytes4,bool)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - - callStatic: { - canCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "canCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - getAccessMode(_target: string, overrides?: CallOverrides): Promise; - - "getAccessMode(address)"( - _target: string, - overrides?: CallOverrides - ): Promise; - - getTokenDepositLimitData( - _l1Token: string, - overrides?: CallOverrides - ): Promise<{ - depositLimitation: boolean; - depositCap: BigNumber; - 0: boolean; - 1: BigNumber; - }>; - - "getTokenDepositLimitData(address)"( - _l1Token: string, - overrides?: CallOverrides - ): Promise<{ - depositLimitation: boolean; - depositCap: BigNumber; - 0: boolean; - 1: BigNumber; - }>; - - hasSpecialAccessToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "hasSpecialAccessToCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - setAccessMode( - _target: string, - _accessMode: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "setAccessMode(address,uint8)"( - _target: string, - _accessMode: BigNumberish, - overrides?: CallOverrides - ): Promise; - - setBatchAccessMode( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: CallOverrides - ): Promise; - - "setBatchAccessMode(address[],uint8[])"( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: CallOverrides - ): Promise; - - setBatchPermissionToCall( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: CallOverrides - ): Promise; - - "setBatchPermissionToCall(address[],address[],bytes4[],bool[])"( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: CallOverrides - ): Promise; - - setDepositLimit( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: CallOverrides - ): Promise; - - "setDepositLimit(address,bool,uint256)"( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: CallOverrides - ): Promise; - - setPermissionToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: CallOverrides - ): Promise; - - "setPermissionToCall(address,address,bytes4,bool)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - UpdateAccessMode( - target: string | null, - previousMode: null, - newMode: null - ): EventFilter; - - UpdateCallPermission( - caller: string | null, - target: string | null, - functionSig: BytesLike | null, - status: null - ): EventFilter; - - UpdateDepositLimit( - l1Token: string | null, - depositLimitation: null, - depositCap: null - ): EventFilter; - }; - - estimateGas: { - canCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "canCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - getAccessMode( - _target: string, - overrides?: CallOverrides - ): Promise; - - "getAccessMode(address)"( - _target: string, - overrides?: CallOverrides - ): Promise; - - getTokenDepositLimitData( - _l1Token: string, - overrides?: CallOverrides - ): Promise; - - "getTokenDepositLimitData(address)"( - _l1Token: string, - overrides?: CallOverrides - ): Promise; - - hasSpecialAccessToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "hasSpecialAccessToCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - setAccessMode( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - "setAccessMode(address,uint8)"( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - setBatchAccessMode( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - "setBatchAccessMode(address[],uint8[])"( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - setBatchPermissionToCall( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - "setBatchPermissionToCall(address[],address[],bytes4[],bool[])"( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - setDepositLimit( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - "setDepositLimit(address,bool,uint256)"( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - setPermissionToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - - "setPermissionToCall(address,address,bytes4,bool)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - }; - - populateTransaction: { - canCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "canCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - getAccessMode( - _target: string, - overrides?: CallOverrides - ): Promise; - - "getAccessMode(address)"( - _target: string, - overrides?: CallOverrides - ): Promise; - - getTokenDepositLimitData( - _l1Token: string, - overrides?: CallOverrides - ): Promise; - - "getTokenDepositLimitData(address)"( - _l1Token: string, - overrides?: CallOverrides - ): Promise; - - hasSpecialAccessToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - "hasSpecialAccessToCall(address,address,bytes4)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - overrides?: CallOverrides - ): Promise; - - setAccessMode( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - "setAccessMode(address,uint8)"( - _target: string, - _accessMode: BigNumberish, - overrides?: Overrides - ): Promise; - - setBatchAccessMode( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - "setBatchAccessMode(address[],uint8[])"( - _targets: string[], - _accessMode: BigNumberish[], - overrides?: Overrides - ): Promise; - - setBatchPermissionToCall( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - "setBatchPermissionToCall(address[],address[],bytes4[],bool[])"( - _callers: string[], - _targets: string[], - _functionSigs: BytesLike[], - _enables: boolean[], - overrides?: Overrides - ): Promise; - - setDepositLimit( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - "setDepositLimit(address,bool,uint256)"( - _l1Token: string, - _depositLimitation: boolean, - _depositCap: BigNumberish, - overrides?: Overrides - ): Promise; - - setPermissionToCall( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - - "setPermissionToCall(address,address,bytes4,bool)"( - _caller: string, - _target: string, - _functionSig: BytesLike, - _enable: boolean, - overrides?: Overrides - ): Promise; - }; -} diff --git a/typechain/IAllowListFactory.ts b/typechain/IAllowListFactory.ts deleted file mode 100644 index 7563387d..00000000 --- a/typechain/IAllowListFactory.ts +++ /dev/null @@ -1,324 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer } from "ethers"; -import { Provider } from "@ethersproject/providers"; - -import type { IAllowList } from "./IAllowList"; - -export class IAllowListFactory { - static connect( - address: string, - signerOrProvider: Signer | Provider - ): IAllowList { - return new Contract(address, _abi, signerOrProvider) as IAllowList; - } -} - -const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "target", - type: "address", - }, - { - indexed: false, - internalType: "enum IAllowList.AccessMode", - name: "previousMode", - type: "uint8", - }, - { - indexed: false, - internalType: "enum IAllowList.AccessMode", - name: "newMode", - type: "uint8", - }, - ], - name: "UpdateAccessMode", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "caller", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "target", - type: "address", - }, - { - indexed: true, - internalType: "bytes4", - name: "functionSig", - type: "bytes4", - }, - { - indexed: false, - internalType: "bool", - name: "status", - type: "bool", - }, - ], - name: "UpdateCallPermission", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "l1Token", - type: "address", - }, - { - indexed: false, - internalType: "bool", - name: "depositLimitation", - type: "bool", - }, - { - indexed: false, - internalType: "uint256", - name: "depositCap", - type: "uint256", - }, - ], - name: "UpdateDepositLimit", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "_caller", - type: "address", - }, - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "bytes4", - name: "_functionSig", - type: "bytes4", - }, - ], - name: "canCall", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - ], - name: "getAccessMode", - outputs: [ - { - internalType: "enum IAllowList.AccessMode", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_l1Token", - type: "address", - }, - ], - name: "getTokenDepositLimitData", - outputs: [ - { - components: [ - { - internalType: "bool", - name: "depositLimitation", - type: "bool", - }, - { - internalType: "uint256", - name: "depositCap", - type: "uint256", - }, - ], - internalType: "struct IAllowList.Deposit", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_caller", - type: "address", - }, - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "bytes4", - name: "_functionSig", - type: "bytes4", - }, - ], - name: "hasSpecialAccessToCall", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "enum IAllowList.AccessMode", - name: "_accessMode", - type: "uint8", - }, - ], - name: "setAccessMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_targets", - type: "address[]", - }, - { - internalType: "enum IAllowList.AccessMode[]", - name: "_accessMode", - type: "uint8[]", - }, - ], - name: "setBatchAccessMode", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address[]", - name: "_callers", - type: "address[]", - }, - { - internalType: "address[]", - name: "_targets", - type: "address[]", - }, - { - internalType: "bytes4[]", - name: "_functionSigs", - type: "bytes4[]", - }, - { - internalType: "bool[]", - name: "_enables", - type: "bool[]", - }, - ], - name: "setBatchPermissionToCall", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_l1Token", - type: "address", - }, - { - internalType: "bool", - name: "_depositLimitation", - type: "bool", - }, - { - internalType: "uint256", - name: "_depositCap", - type: "uint256", - }, - ], - name: "setDepositLimit", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_caller", - type: "address", - }, - { - internalType: "address", - name: "_target", - type: "address", - }, - { - internalType: "bytes4", - name: "_functionSig", - type: "bytes4", - }, - { - internalType: "bool", - name: "_enable", - type: "bool", - }, - ], - name: "setPermissionToCall", - outputs: [], - stateMutability: "nonpayable", - type: "function", - }, -]; diff --git a/typechain/ContractDeployer.d.ts b/typechain/IContractDeployer.d.ts similarity index 66% rename from typechain/ContractDeployer.d.ts rename to typechain/IContractDeployer.d.ts index 85f727b9..7cd88871 100644 --- a/typechain/ContractDeployer.d.ts +++ b/typechain/IContractDeployer.d.ts @@ -21,16 +21,12 @@ import { BytesLike } from "@ethersproject/bytes"; import { Listener, Provider } from "@ethersproject/providers"; import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; -interface ContractDeployerInterface extends ethers.utils.Interface { +interface IContractDeployerInterface extends ethers.utils.Interface { functions: { "create(bytes32,bytes32,bytes)": FunctionFragment; "create2(bytes32,bytes32,bytes)": FunctionFragment; "create2Account(bytes32,bytes32,bytes,uint8)": FunctionFragment; "createAccount(bytes32,bytes32,bytes,uint8)": FunctionFragment; - "extendedAccountVersion(address)": FunctionFragment; - "forceDeployKeccak256(bytes32)": FunctionFragment; - "forceDeployOnAddress(tuple,address)": FunctionFragment; - "forceDeployOnAddresses(tuple[])": FunctionFragment; "getAccountInfo(address)": FunctionFragment; "getNewAddressCreate(address,uint256)": FunctionFragment; "getNewAddressCreate2(address,bytes32,bytes32,bytes)": FunctionFragment; @@ -54,39 +50,6 @@ interface ContractDeployerInterface extends ethers.utils.Interface { functionFragment: "createAccount", values: [BytesLike, BytesLike, BytesLike, BigNumberish] ): string; - encodeFunctionData( - functionFragment: "extendedAccountVersion", - values: [string] - ): string; - encodeFunctionData( - functionFragment: "forceDeployKeccak256", - values: [BytesLike] - ): string; - encodeFunctionData( - functionFragment: "forceDeployOnAddress", - values: [ - { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - string - ] - ): string; - encodeFunctionData( - functionFragment: "forceDeployOnAddresses", - values: [ - { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[] - ] - ): string; encodeFunctionData( functionFragment: "getAccountInfo", values: [string] @@ -118,22 +81,6 @@ interface ContractDeployerInterface extends ethers.utils.Interface { functionFragment: "createAccount", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "extendedAccountVersion", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "forceDeployKeccak256", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "forceDeployOnAddress", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "forceDeployOnAddresses", - data: BytesLike - ): Result; decodeFunctionResult( functionFragment: "getAccountInfo", data: BytesLike @@ -168,7 +115,7 @@ interface ContractDeployerInterface extends ethers.utils.Interface { getEvent(nameOrSignatureOrTopic: "ContractDeployed"): EventFragment; } -export class ContractDeployer extends Contract { +export class IContractDeployer extends Contract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; @@ -179,7 +126,7 @@ export class ContractDeployer extends Contract { removeAllListeners(eventName: EventFilter | string): this; removeListener(eventName: any, listener: Listener): this; - interface: ContractDeployerInterface; + interface: IContractDeployerInterface; functions: { create( @@ -227,7 +174,7 @@ export class ContractDeployer extends Contract { ): Promise; createAccount( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, @@ -235,83 +182,13 @@ export class ContractDeployer extends Contract { ): Promise; "createAccount(bytes32,bytes32,bytes,uint8)"( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, overrides?: PayableOverrides ): Promise; - extendedAccountVersion( - _address: string, - overrides?: CallOverrides - ): Promise<{ - 0: number; - }>; - - "extendedAccountVersion(address)"( - _address: string, - overrides?: CallOverrides - ): Promise<{ - 0: number; - }>; - - forceDeployKeccak256( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - "forceDeployKeccak256(bytes32)"( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddress( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddress(tuple,address)"( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddresses( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddresses(tuple[])"( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - getAccountInfo( _address: string, overrides?: CallOverrides @@ -454,7 +331,7 @@ export class ContractDeployer extends Contract { ): Promise; createAccount( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, @@ -462,79 +339,13 @@ export class ContractDeployer extends Contract { ): Promise; "createAccount(bytes32,bytes32,bytes,uint8)"( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, overrides?: PayableOverrides ): Promise; - extendedAccountVersion( - _address: string, - overrides?: CallOverrides - ): Promise; - - "extendedAccountVersion(address)"( - _address: string, - overrides?: CallOverrides - ): Promise; - - forceDeployKeccak256( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - "forceDeployKeccak256(bytes32)"( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddress( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddress(tuple,address)"( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddresses( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddresses(tuple[])"( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - getAccountInfo( _address: string, overrides?: CallOverrides @@ -649,7 +460,7 @@ export class ContractDeployer extends Contract { ): Promise; createAccount( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, @@ -657,79 +468,13 @@ export class ContractDeployer extends Contract { ): Promise; "createAccount(bytes32,bytes32,bytes,uint8)"( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, overrides?: CallOverrides ): Promise; - extendedAccountVersion( - _address: string, - overrides?: CallOverrides - ): Promise; - - "extendedAccountVersion(address)"( - _address: string, - overrides?: CallOverrides - ): Promise; - - forceDeployKeccak256( - _keccak256BytecodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - "forceDeployKeccak256(bytes32)"( - _keccak256BytecodeHash: BytesLike, - overrides?: CallOverrides - ): Promise; - - forceDeployOnAddress( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: CallOverrides - ): Promise; - - "forceDeployOnAddress(tuple,address)"( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: CallOverrides - ): Promise; - - forceDeployOnAddresses( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: CallOverrides - ): Promise; - - "forceDeployOnAddresses(tuple[])"( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: CallOverrides - ): Promise; - getAccountInfo( _address: string, overrides?: CallOverrides @@ -863,7 +608,7 @@ export class ContractDeployer extends Contract { ): Promise; createAccount( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, @@ -871,79 +616,13 @@ export class ContractDeployer extends Contract { ): Promise; "createAccount(bytes32,bytes32,bytes,uint8)"( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, overrides?: PayableOverrides ): Promise; - extendedAccountVersion( - _address: string, - overrides?: CallOverrides - ): Promise; - - "extendedAccountVersion(address)"( - _address: string, - overrides?: CallOverrides - ): Promise; - - forceDeployKeccak256( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - "forceDeployKeccak256(bytes32)"( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddress( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddress(tuple,address)"( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddresses( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddresses(tuple[])"( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - getAccountInfo( _address: string, overrides?: CallOverrides @@ -1049,7 +728,7 @@ export class ContractDeployer extends Contract { ): Promise; createAccount( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, @@ -1057,79 +736,13 @@ export class ContractDeployer extends Contract { ): Promise; "createAccount(bytes32,bytes32,bytes,uint8)"( - arg0: BytesLike, + _salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike, _aaVersion: BigNumberish, overrides?: PayableOverrides ): Promise; - extendedAccountVersion( - _address: string, - overrides?: CallOverrides - ): Promise; - - "extendedAccountVersion(address)"( - _address: string, - overrides?: CallOverrides - ): Promise; - - forceDeployKeccak256( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - "forceDeployKeccak256(bytes32)"( - _keccak256BytecodeHash: BytesLike, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddress( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddress(tuple,address)"( - _deployment: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }, - _sender: string, - overrides?: PayableOverrides - ): Promise; - - forceDeployOnAddresses( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - - "forceDeployOnAddresses(tuple[])"( - _deployments: { - bytecodeHash: BytesLike; - newAddress: string; - callConstructor: boolean; - value: BigNumberish; - input: BytesLike; - }[], - overrides?: PayableOverrides - ): Promise; - getAccountInfo( _address: string, overrides?: CallOverrides diff --git a/typechain/ContractDeployerFactory.ts b/typechain/IContractDeployerFactory.ts similarity index 68% rename from typechain/ContractDeployerFactory.ts rename to typechain/IContractDeployerFactory.ts index 6d8795d6..3905e602 100644 --- a/typechain/ContractDeployerFactory.ts +++ b/typechain/IContractDeployerFactory.ts @@ -5,14 +5,14 @@ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; -import type { ContractDeployer } from "./ContractDeployer"; +import type { IContractDeployer } from "./IContractDeployer"; -export class ContractDeployerFactory { +export class IContractDeployerFactory { static connect( address: string, signerOrProvider: Signer | Provider - ): ContractDeployer { - return new Contract(address, _abi, signerOrProvider) as ContractDeployer; + ): IContractDeployer { + return new Contract(address, _abi, signerOrProvider) as IContractDeployer; } } @@ -102,7 +102,7 @@ const _abi = [ outputs: [ { internalType: "address", - name: "", + name: "newAddress", type: "address", }, ], @@ -131,7 +131,7 @@ const _abi = [ outputs: [ { internalType: "address", - name: "", + name: "newAddress", type: "address", }, ], @@ -165,7 +165,7 @@ const _abi = [ outputs: [ { internalType: "address", - name: "", + name: "newAddress", type: "address", }, ], @@ -176,7 +176,7 @@ const _abi = [ inputs: [ { internalType: "bytes32", - name: "", + name: "_salt", type: "bytes32", }, { @@ -199,127 +199,10 @@ const _abi = [ outputs: [ { internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "_address", - type: "address", - }, - ], - name: "extendedAccountVersion", - outputs: [ - { - internalType: "enum IContractDeployer.AccountAbstractionVersion", - name: "", - type: "uint8", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes32", - name: "_keccak256BytecodeHash", - type: "bytes32", - }, - ], - name: "forceDeployKeccak256", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes32", - name: "bytecodeHash", - type: "bytes32", - }, - { - internalType: "address", - name: "newAddress", - type: "address", - }, - { - internalType: "bool", - name: "callConstructor", - type: "bool", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "input", - type: "bytes", - }, - ], - internalType: "struct ContractDeployer.ForceDeployment", - name: "_deployment", - type: "tuple", - }, - { - internalType: "address", - name: "_sender", + name: "newAddress", type: "address", }, ], - name: "forceDeployOnAddress", - outputs: [], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "bytes32", - name: "bytecodeHash", - type: "bytes32", - }, - { - internalType: "address", - name: "newAddress", - type: "address", - }, - { - internalType: "bool", - name: "callConstructor", - type: "bool", - }, - { - internalType: "uint256", - name: "value", - type: "uint256", - }, - { - internalType: "bytes", - name: "input", - type: "bytes", - }, - ], - internalType: "struct ContractDeployer.ForceDeployment[]", - name: "_deployments", - type: "tuple[]", - }, - ], - name: "forceDeployOnAddresses", - outputs: [], stateMutability: "payable", type: "function", }, diff --git a/typechain/IZkSync.d.ts b/typechain/IZkSync.d.ts index 278e053e..1a37f3ba 100644 --- a/typechain/IZkSync.d.ts +++ b/typechain/IZkSync.d.ts @@ -34,7 +34,6 @@ interface IZkSyncInterface extends ethers.utils.Interface { "facets()": FunctionFragment; "finalizeEthWithdrawal(uint256,uint256,uint16,bytes,bytes32[])": FunctionFragment; "freezeDiamond()": FunctionFragment; - "getAllowList()": FunctionFragment; "getFirstUnprocessedPriorityTx()": FunctionFragment; "getGovernor()": FunctionFragment; "getL2BootloaderBytecodeHash()": FunctionFragment; @@ -161,10 +160,6 @@ interface IZkSyncInterface extends ethers.utils.Interface { functionFragment: "freezeDiamond", values?: undefined ): string; - encodeFunctionData( - functionFragment: "getAllowList", - values?: undefined - ): string; encodeFunctionData( functionFragment: "getFirstUnprocessedPriorityTx", values?: undefined @@ -410,10 +405,6 @@ interface IZkSyncInterface extends ethers.utils.Interface { functionFragment: "freezeDiamond", data: BytesLike ): Result; - decodeFunctionResult( - functionFragment: "getAllowList", - data: BytesLike - ): Result; decodeFunctionResult( functionFragment: "getFirstUnprocessedPriorityTx", data: BytesLike @@ -803,14 +794,6 @@ export class IZkSync extends Contract { "freezeDiamond()"(overrides?: Overrides): Promise; - getAllowList(overrides?: CallOverrides): Promise<{ - 0: string; - }>; - - "getAllowList()"(overrides?: CallOverrides): Promise<{ - 0: string; - }>; - getFirstUnprocessedPriorityTx(overrides?: CallOverrides): Promise<{ 0: BigNumber; }>; @@ -1502,10 +1485,6 @@ export class IZkSync extends Contract { "freezeDiamond()"(overrides?: Overrides): Promise; - getAllowList(overrides?: CallOverrides): Promise; - - "getAllowList()"(overrides?: CallOverrides): Promise; - getFirstUnprocessedPriorityTx(overrides?: CallOverrides): Promise; "getFirstUnprocessedPriorityTx()"( @@ -2087,10 +2066,6 @@ export class IZkSync extends Contract { "freezeDiamond()"(overrides?: CallOverrides): Promise; - getAllowList(overrides?: CallOverrides): Promise; - - "getAllowList()"(overrides?: CallOverrides): Promise; - getFirstUnprocessedPriorityTx( overrides?: CallOverrides ): Promise; @@ -2746,10 +2721,6 @@ export class IZkSync extends Contract { "freezeDiamond()"(overrides?: Overrides): Promise; - getAllowList(overrides?: CallOverrides): Promise; - - "getAllowList()"(overrides?: CallOverrides): Promise; - getFirstUnprocessedPriorityTx( overrides?: CallOverrides ): Promise; @@ -3310,10 +3281,6 @@ export class IZkSync extends Contract { "freezeDiamond()"(overrides?: Overrides): Promise; - getAllowList(overrides?: CallOverrides): Promise; - - "getAllowList()"(overrides?: CallOverrides): Promise; - getFirstUnprocessedPriorityTx( overrides?: CallOverrides ): Promise; diff --git a/typechain/IZkSyncFactory.ts b/typechain/IZkSyncFactory.ts index 5325b483..06214459 100644 --- a/typechain/IZkSyncFactory.ts +++ b/typechain/IZkSyncFactory.ts @@ -789,19 +789,6 @@ const _abi = [ stateMutability: "nonpayable", type: "function", }, - { - inputs: [], - name: "getAllowList", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, { inputs: [], name: "getFirstUnprocessedPriorityTx", diff --git a/typechain/IERC1271.d.ts b/typechain/Ierc1271.d.ts similarity index 98% rename from typechain/IERC1271.d.ts rename to typechain/Ierc1271.d.ts index 54149f21..b82e3baf 100644 --- a/typechain/IERC1271.d.ts +++ b/typechain/Ierc1271.d.ts @@ -37,7 +37,7 @@ interface Ierc1271Interface extends ethers.utils.Interface { events: {}; } -export class IERC1271 extends Contract { +export class Ierc1271 extends Contract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; diff --git a/typechain/IERC1271Factory.ts b/typechain/Ierc1271Factory.ts similarity index 82% rename from typechain/IERC1271Factory.ts rename to typechain/Ierc1271Factory.ts index ddb00e0a..a80e27bf 100644 --- a/typechain/IERC1271Factory.ts +++ b/typechain/Ierc1271Factory.ts @@ -5,14 +5,14 @@ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; -import type { IERC1271 } from "./IERC1271"; +import type { Ierc1271 } from "./Ierc1271"; -export class IERC1271Factory { +export class Ierc1271Factory { static connect( address: string, signerOrProvider: Signer | Provider - ): IERC1271 { - return new Contract(address, _abi, signerOrProvider) as IERC1271; + ): Ierc1271 { + return new Contract(address, _abi, signerOrProvider) as Ierc1271; } } diff --git a/typechain/IERC20.d.ts b/typechain/Ierc20.d.ts similarity index 99% rename from typechain/IERC20.d.ts rename to typechain/Ierc20.d.ts index 74e4b469..537ae702 100644 --- a/typechain/IERC20.d.ts +++ b/typechain/Ierc20.d.ts @@ -83,7 +83,7 @@ interface Ierc20Interface extends ethers.utils.Interface { getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; } -export class IERC20 extends Contract { +export class Ierc20 extends Contract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; diff --git a/typechain/IERC20Factory.ts b/typechain/Ierc20Factory.ts similarity index 96% rename from typechain/IERC20Factory.ts rename to typechain/Ierc20Factory.ts index 306765ce..beb8d4a0 100644 --- a/typechain/IERC20Factory.ts +++ b/typechain/Ierc20Factory.ts @@ -5,11 +5,11 @@ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; -import type { IERC20 } from "./IERC20"; +import type { Ierc20 } from "./Ierc20"; -export class IERC20Factory { - static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { - return new Contract(address, _abi, signerOrProvider) as IERC20; +export class Ierc20Factory { + static connect(address: string, signerOrProvider: Signer | Provider): Ierc20 { + return new Contract(address, _abi, signerOrProvider) as Ierc20; } } diff --git a/typechain/IL1Bridge.d.ts b/typechain/Il1Bridge.d.ts similarity index 99% rename from typechain/IL1Bridge.d.ts rename to typechain/Il1Bridge.d.ts index c7405a1f..5ac8c671 100644 --- a/typechain/IL1Bridge.d.ts +++ b/typechain/Il1Bridge.d.ts @@ -91,7 +91,7 @@ interface Il1BridgeInterface extends ethers.utils.Interface { getEvent(nameOrSignatureOrTopic: "WithdrawalFinalized"): EventFragment; } -export class IL1Bridge extends Contract { +export class Il1Bridge extends Contract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; diff --git a/typechain/IL1BridgeFactory.ts b/typechain/Il1BridgeFactory.ts similarity index 97% rename from typechain/IL1BridgeFactory.ts rename to typechain/Il1BridgeFactory.ts index f12527ac..c6afb2d2 100644 --- a/typechain/IL1BridgeFactory.ts +++ b/typechain/Il1BridgeFactory.ts @@ -5,14 +5,14 @@ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; -import type { IL1Bridge } from "./IL1Bridge"; +import type { Il1Bridge } from "./Il1Bridge"; -export class IL1BridgeFactory { +export class Il1BridgeFactory { static connect( address: string, signerOrProvider: Signer | Provider - ): IL1Bridge { - return new Contract(address, _abi, signerOrProvider) as IL1Bridge; + ): Il1Bridge { + return new Contract(address, _abi, signerOrProvider) as Il1Bridge; } } diff --git a/typechain/IL1Messenger.d.ts b/typechain/Il1Messenger.d.ts similarity index 99% rename from typechain/IL1Messenger.d.ts rename to typechain/Il1Messenger.d.ts index 44e71c63..4a6a2834 100644 --- a/typechain/IL1Messenger.d.ts +++ b/typechain/Il1Messenger.d.ts @@ -60,7 +60,7 @@ interface Il1MessengerInterface extends ethers.utils.Interface { getEvent(nameOrSignatureOrTopic: "L2ToL1LogSent"): EventFragment; } -export class IL1Messenger extends Contract { +export class Il1Messenger extends Contract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; diff --git a/typechain/IL1MessengerFactory.ts b/typechain/Il1MessengerFactory.ts similarity index 94% rename from typechain/IL1MessengerFactory.ts rename to typechain/Il1MessengerFactory.ts index 4fea7ddb..52a6e157 100644 --- a/typechain/IL1MessengerFactory.ts +++ b/typechain/Il1MessengerFactory.ts @@ -5,14 +5,14 @@ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; -import type { IL1Messenger } from "./IL1Messenger"; +import type { Il1Messenger } from "./Il1Messenger"; -export class IL1MessengerFactory { +export class Il1MessengerFactory { static connect( address: string, signerOrProvider: Signer | Provider - ): IL1Messenger { - return new Contract(address, _abi, signerOrProvider) as IL1Messenger; + ): Il1Messenger { + return new Contract(address, _abi, signerOrProvider) as Il1Messenger; } } diff --git a/typechain/IL2Bridge.d.ts b/typechain/Il2Bridge.d.ts similarity index 93% rename from typechain/IL2Bridge.d.ts rename to typechain/Il2Bridge.d.ts index 76d2781c..1a8b77b5 100644 --- a/typechain/IL2Bridge.d.ts +++ b/typechain/Il2Bridge.d.ts @@ -63,16 +63,10 @@ interface Il2BridgeInterface extends ethers.utils.Interface { ): Result; decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; - events: { - "FinalizeDeposit(address,address,address,uint256)": EventFragment; - "WithdrawalInitiated(address,address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "FinalizeDeposit"): EventFragment; - getEvent(nameOrSignatureOrTopic: "WithdrawalInitiated"): EventFragment; + events: {}; } -export class IL2Bridge extends Contract { +export class Il2Bridge extends Contract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; @@ -263,21 +257,7 @@ export class IL2Bridge extends Contract { ): Promise; }; - filters: { - FinalizeDeposit( - l1Sender: string | null, - l2Receiver: string | null, - l2Token: string | null, - amount: null - ): EventFilter; - - WithdrawalInitiated( - l2Sender: string | null, - l1Receiver: string | null, - l2Token: string | null, - amount: null - ): EventFilter; - }; + filters: {}; estimateGas: { finalizeDeposit( diff --git a/typechain/IL2BridgeFactory.ts b/typechain/Il2BridgeFactory.ts similarity index 62% rename from typechain/IL2BridgeFactory.ts rename to typechain/Il2BridgeFactory.ts index 4b8c9a05..d9ea9e79 100644 --- a/typechain/IL2BridgeFactory.ts +++ b/typechain/Il2BridgeFactory.ts @@ -5,80 +5,18 @@ import { Contract, Signer } from "ethers"; import { Provider } from "@ethersproject/providers"; -import type { IL2Bridge } from "./IL2Bridge"; +import type { Il2Bridge } from "./Il2Bridge"; -export class IL2BridgeFactory { +export class Il2BridgeFactory { static connect( address: string, signerOrProvider: Signer | Provider - ): IL2Bridge { - return new Contract(address, _abi, signerOrProvider) as IL2Bridge; + ): Il2Bridge { + return new Contract(address, _abi, signerOrProvider) as Il2Bridge; } } const _abi = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "l1Sender", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "l2Receiver", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "l2Token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "FinalizeDeposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "l2Sender", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "l1Receiver", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "l2Token", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "WithdrawalInitiated", - type: "event", - }, { inputs: [ { diff --git a/typechain/index.ts b/typechain/index.ts index 0a771f53..42623e6c 100644 --- a/typechain/index.ts +++ b/typechain/index.ts @@ -1,23 +1,3 @@ -export {ContractDeployerFactory} from './ContractDeployerFactory'; -export type {ContractDeployer} from './ContractDeployer'; -export {IAllowListFactory} from './IAllowListFactory'; -export type {IAllowList} from './IAllowList'; -export {IERC20Factory} from './IERC20Factory'; -export type {IERC20} from './IERC20'; -export {IERC1271Factory} from './IERC1271Factory'; -export type {IERC1271} from './IERC1271'; -export {IEthTokenFactory} from './IEthTokenFactory'; -export type {IEthToken} from './IEthToken'; -export {IL1BridgeFactory} from './IL1BridgeFactory'; -export type {IL1Bridge} from './IL1Bridge'; -export {IL1MessengerFactory} from './IL1MessengerFactory'; -export type {IL1Messenger} from './IL1Messenger'; -export {IL2BridgeFactory} from './IL2BridgeFactory'; -export type {IL2Bridge} from './IL2Bridge'; -export {IPaymasterFlowFactory} from './IPaymasterFlowFactory'; -export type {IPaymasterFlow} from './IPaymasterFlow'; -export {INonceHolderFactory} from './INonceHolderFactory'; -export type {INonceHolder} from './INonceHolder'; -export {IZkSyncFactory} from './IZkSyncFactory'; -export type {IZkSync} from './IZkSync'; - +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */