diff --git a/bindings/Makefile b/bindings/Makefile index 80655a0c0..a98e10d37 100644 --- a/bindings/Makefile +++ b/bindings/Makefile @@ -52,7 +52,8 @@ bindings: \ morph-standard-erc20-factory-bindings \ morph-wrapped-ether-bindings \ erc20-bindings \ - l2-wst-eth-bindings + l2-wst-eth-bindings \ + l2-token-registry-bindings version: forge --version abigen --version @@ -118,6 +119,8 @@ l2-to-l1-message-passer-bindings: compile ./gen_bindings.sh contracts/l2/system/L2ToL1MessagePasser.sol:L2ToL1MessagePasser $(pkg) l2-tx-fee-vault-bindings: compile ./gen_bindings.sh contracts/l2/system/L2TxFeeVault.sol:L2TxFeeVault $(pkg) +l2-token-registry-bindings: compile + ./gen_bindings.sh contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry $(pkg) # Staking l2-gov-bindings: compile @@ -191,7 +194,7 @@ more: compile-forge go run ./gen/main.go \ -artifacts ../contracts/artifacts \ -out ./bindings \ - -contracts ProxyAdmin,TransparentUpgradeableProxy,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \ + -contracts ProxyAdmin,TransparentUpgradeableProxy,L2TokenRegistry,L1MessageQueueWithGasPriceOracle,L1USDCGateway,L1Staking,L1CrossDomainMessenger,L1StandardERC20Gateway,L1ETHGateway,L1ERC20Gateway,L1GatewayRouter,L1WETHGateway,L1LidoGateway,Rollup,MultipleVersionRollupVerifier,L2CrossDomainMessenger,GasPriceOracle,L2ToL1MessagePasser,L2TxFeeVault,Sequencer,Gov,Distribute,L2Staking,Record,L2ETHGateway,L2StandardERC20Gateway,L2GatewayRouter,L2WETHGateway,L2ERC20Gateway,L2ERC721Gateway,L2ERC1155Gateway,L2LidoGateway,MorphToken,MorphStandardERC20,MorphStandardERC20Factory,WrappedEther,L2USDCGateway,EnforcedTxGateway,L1ERC721Gateway,L1ERC1155Gateway,L1ReverseCustomGateway,L2WithdrawLockERC20Gateway,L2ReverseCustomGateway,Whitelist,ZkEvmVerifierV1,L2WstETHToken \ -package bindings mkdir: diff --git a/bindings/bin/l2staking_deployed.hex b/bindings/bin/l2staking_deployed.hex index c99442dd3..7eec59704 100644 --- a/bindings/bin/l2staking_deployed.hex +++ b/bindings/bin/l2staking_deployed.hex @@ -1 +1 @@ -0x608060405234801561000f575f80fd5b50600436106102ec575f3560e01c8063746c8ae111610192578063affed0e0116100e8578063e10911b111610093578063f2fde38b1161006e578063f2fde38b146106cf578063fad99f98146106e2578063fc6facc6146106ea575f80fd5b8063e10911b11461069e578063ed70b343146106a6578063f0261bc2146106c6575f80fd5b8063cce6cf9f116100c3578063cce6cf9f14610643578063d31d83d914610656578063d557714114610677575f80fd5b8063affed0e0146105f1578063b5d2e0dc146105fa578063c64814dd14610619575f80fd5b80638da5cb5b1161014857806391bd43a41161012357806391bd43a41461059e578063927ede2d146105bd57806396ab994d146105e4575f80fd5b80638da5cb5b146105445780638e21d5fb146105555780639168ae721461057c575f80fd5b80637b05afb5116101785780637b05afb5146104db578063831cfb58146104fa57806384d7d1d414610521575f80fd5b8063746c8ae1146104cb57806376671808146104d3575f80fd5b80633b8024211161024757806343352d61116101fd57806346cdc18a116101d857806346cdc18a146104a85780637046529b146104b0578063715018a6146104c3575f80fd5b806343352d611461047a578063439162b514610482578063459598a214610495575f80fd5b80633cb747bf1161022d5780633cb747bf146104065780633d9353fe1461044057806340b5c83714610467575f80fd5b80633b802421146103ea5780633c323a1b146103f3575f80fd5b8063174e31c4116102a75780632e787be3116102825780632e787be3146103ae57806330158eea146103b75780633385ccc2146103d7575f80fd5b8063174e31c41461037f57806319fac8fd146103925780632cc138be146103a5575f80fd5b80630eb573af116102d75780630eb573af1461032b5780630f3b70591461033e57806312a3e94714610376575f80fd5b806243b758146102f05780629c6f0c14610316575b5f80fd5b6103036102fe36600461465b565b6106fd565b6040519081526020015b60405180910390f35b610329610324366004614676565b610723565b005b6103296103393660046146c0565b610901565b61035161034c3660046146d7565b610a14565b604080516001600160a01b03909416845260208401929092529082015260600161030d565b610303609a5481565b61032961038d3660046146d7565b610a5c565b6103296103a03660046146c0565b610bd4565b61030360985481565b61030360995481565b6103ca6103c5366004614749565b610cf6565b60405161030d91906147e9565b6103296103e536600461465b565b610f1d565b610303609c5481565b6103296104013660046146d7565b611557565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161030d565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b6103296104753660046146c0565b611be6565b6103ca611cf9565b61032961049036600461488f565b611f15565b6104286104a33660046146c0565b612446565b609d54610303565b6103296104be366004614676565b61246e565b6103296125c8565b6103296125db565b6103036128cb565b6103036104e936600461465b565b60a06020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61053461052f36600461465b565b61293f565b604051901515815260200161030d565b6033546001600160a01b0316610428565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61058f61058a36600461465b565b612969565b60405161030d939291906148fd565b6103036105ac36600461465b565b60a16020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b6097546105349060ff1681565b61030360a55481565b61030361060836600461465b565b609e6020525f908152604090205481565b61030361062736600461492d565b60a360209081525f928352604080842090915290825290205481565b610329610651366004614959565b612a1b565b6106696106643660046149a1565b612f87565b60405161030d929190614a16565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b610329613115565b6106b96106b436600461465b565b613499565b60405161030d9190614a36565b610303609b5481565b6103296106dd36600461465b565b61352f565b6103296135bc565b6103296106f8366004614959565b61366a565b6001600160a01b0381165f90815260a26020526040812061071d90613a35565b92915050565b61072b613a3e565b8160a55481146107825760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064015b60405180910390fd5b61078d836001614ac4565b60a555609e5f6107a0602085018561465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f0361084257609d6107d5602084018461465b565b81546001810183555f9283526020808420909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039390931692909217909155609d5491609e916108289086018661465b565b6001600160a01b0316815260208101919091526040015f20555b81609f5f610853602084018461465b565b6001600160a01b0316815260208101919091526040015f206108758282614bf4565b506108859050602083018361465b565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356108c16040860186614ad7565b6040516108d093929190614d5b565b60405180910390a260975460ff161580156108ef5750609954609d5411155b156108fc576108fc613a98565b505050565b610909613a3e565b5f8111801561091a57506099548114155b61098c5760405162461bcd60e51b815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a650000000000000000000000000000000000000000000000000000000000006064820152608401610779565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff166109e157609d546109e5565b609c545b90505f60995482106109f9576099546109fb565b815b9050609b548114610a0e57610a0e613a98565b50505050565b60a4602052815f5260405f208181548110610a2d575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610a64613c18565b6001600160a01b038216610b1a576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b158015610aff575f80fd5b505af1158015610b11573d5f803e3d5ffd5b50505050610bc6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610baf575f80fd5b505af1158015610bc1573d5f803e3d5ffd5b505050505b610bd06001606555565b5050565b335f908152609e6020526040902054610c2f5760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f776564000000000000000000000000006044820152606401610779565b6014811115610c805760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e00000000000000000000000000006044820152606401610779565b335f90815260a06020526040812082905560975460ff16610ca1575f610cb4565b610ca96128cb565b610cb4906001614ac4565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff811115610d1257610d12614b38565b604051908082528060200260200182016040528015610d5e57816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081610d305790505b5090505f5b83811015610f15576040518060600160405280609f5f888886818110610d8b57610d8b614dae565b9050602002016020810190610da0919061465b565b6001600160a01b03908116825260208083019390935260409091015f908120549091168352910190609f90888886818110610ddd57610ddd614dae565b9050602002016020810190610df2919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f888886818110610e2f57610e2f614dae565b9050602002016020810190610e44919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f206002018054610e7190614b65565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9d90614b65565b8015610ee85780601f10610ebf57610100808354040283529160200191610ee8565b820191905f5260205f20905b815481529060010190602001808311610ecb57829003601f168201915b5050505050815250828281518110610f0257610f02614dae565b6020908102919091010152600101610d63565b509392505050565b610f25613c18565b6001600160a01b0381165f90815260a360209081526040808320338452909152902054610f945760405162461bcd60e51b815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f000000000000000000006044820152606401610779565b6001600160a01b0381165f908152609e60205260408120546097549015919060ff16610fc0575f610fd3565b610fc86128cb565b610fd3906001614ac4565b6097549091505f9060ff168015610fe8575082155b610ff25781610fff565b609a54610fff9083614ac4565b604080516060810182526001600160a01b038781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c51600390920201805473ffffffffffffffffffffffffffffffffffffffff191691909b16178a558251908a015551600290980197909755908452908252829055925191815260a1909252928120805494955091936110b6908490614ddb565b90915550506001600160a01b0385165f90815260a2602052604090206110dc9033613c78565b506001600160a01b0385165f908152609e602052604090205484158015611105575060975460ff165b80156111125750609c5481105b15611373576001600160a01b0386165f908152609e602052604081205461113b90600190614ddb565b90505b6001609c5461114d9190614ddb565b8110156113715760a15f609d838154811061116a5761116a614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a190609d61119f856001614ac4565b815481106111af576111af614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611369575f609d82815481106111ed576111ed614dae565b5f918252602090912001546001600160a01b03169050609d611210836001614ac4565b8154811061122057611220614dae565b5f91825260209091200154609d80546001600160a01b03909216918490811061124b5761124b614dae565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609d61128e846001614ac4565b8154811061129e5761129e614dae565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790556112de826001614ac4565b609e5f609d85815481106112f4576112f4614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055611323826002614ac4565b609e5f609d611333866001614ac4565b8154811061134357611343614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b60010161113e565b505b8415801561139657506001600160a01b0386165f90815260a16020526040902054155b156113b3576001609c5f8282546113ad9190614ddb565b90915550505b6001600160a01b038681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b158015611454575f80fd5b505af1158015611466573d5f803e3d5ffd5b505050506114713390565b6001600160a01b0316866001600160a01b03167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c846020015187876040516114cc939291909283526020830191909152604082015260600190565b60405180910390a3841580156114e4575060975460ff165b80156114f25750609b548111155b80156115385750609b546001600160a01b0387165f908152609e602052604090205411806115385750609c546001600160a01b0387165f908152609e6020526040902054115b1561154557611545613a98565b50505050506115546001606555565b50565b6001600160a01b0382165f908152609e602052604090205482906115bd5760405162461bcd60e51b815260206004820152600a60248201527f6e6f74207374616b6572000000000000000000000000000000000000000000006044820152606401610779565b6115c5613c18565b5f82116116145760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e740000000000000000000000006044820152606401610779565b61161e3384613c93565b1561166b5760405162461bcd60e51b815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d6564000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a3602090815260408083203384529091529020546116e95761169c3384613d1c565b156116e95760405162461bcd60e51b815260206004820152601060248201527f72657761726420756e636c61696d6564000000000000000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a1602052604081208054849290611710908490614ac4565b90915550506001600160a01b0383165f90815260a36020908152604080832033845290915281208054849290611747908490614ac4565b90915550506001600160a01b0383165f90815260a26020526040902061176d9033613dd1565b506001600160a01b0383165f90815260a160205260409020548290036117a5576001609c5f82825461179f9190614ac4565b90915550505b6001600160a01b0383165f908152609e602052604090205460975460ff1680156117cf5750600181115b15611a15575f6117e0600183614ddb565b90505b8015611a135760a15f609d6117f9600185614ddb565b8154811061180957611809614dae565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d848154811061185a5761185a614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611a01575f609d611892600184614ddb565b815481106118a2576118a2614dae565b5f91825260209091200154609d80546001600160a01b03909216925090839081106118cf576118cf614dae565b5f918252602090912001546001600160a01b0316609d6118f0600185614ddb565b8154811061190057611900614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d838154811061193f5761193f614dae565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609e90609d611986600185614ddb565b8154811061199657611996614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556119c5826001614ac4565b609e5f609d85815481106119db576119db614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80611a0b81614dee565b9150506117e3565b505b6097545f9060ff16611a27575f611a3a565b611a2f6128cb565b611a3a906001614ac4565b6001600160a01b0386165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a36001600160a01b038581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611b6e575f80fd5b505af1158015611b80573d5f803e3d5ffd5b50505050611b95611b8e3390565b3086613de5565b60975460ff168015611ba85750609b5482115b8015611bcd57506099546001600160a01b0386165f908152609e602052604090205411155b15611bda57611bda613a98565b50506108fc6001606555565b611bee613a3e565b60975460ff1615611c415760405162461bcd60e51b815260206004820152601660248201527f72657761726420616c72656164792073746172746564000000000000000000006044820152606401610779565b4281118015611c5a5750611c586201518082614e30565b155b8015611c6857506098548114155b611cb45760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff811115611d1957611d19614b38565b604051908082528060200260200182016040528015611d6557816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081611d375790505b5090505f5b609d54811015611f0f576040518060600160405280609f5f609d8581548110611d9557611d95614dae565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609d80549390910192609f92919086908110611de157611de1614dae565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f609d8581548110611e3a57611e3a614dae565b5f9182526020808320909101546001600160a01b0316835282019290925260400190206002018054611e6b90614b65565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9790614b65565b8015611ee25780601f10611eb957610100808354040283529160200191611ee2565b820191905f5260205f20905b815481529060010190602001808311611ec557829003601f168201915b5050505050815250828281518110611efc57611efc614dae565b6020908102919091010152600101611d6a565b50919050565b5f54610100900460ff1615808015611f3357505f54600160ff909116105b80611f4c5750303b158015611f4c57505f5460ff166001145b611fbe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610779565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561201a575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0387166120705760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e6572206164647265737300000000000000000000006044820152606401610779565b5f86116120e55760405162461bcd60e51b815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f20300000000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f85116121345760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f636873000000006044820152606401610779565b428411801561214d575061214b6201518085614e30565b155b6121995760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b816121e65760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420696e697469616c207374616b6572730000000000000000006044820152606401610779565b6121ef87614096565b6121f76140f4565b6099869055609a8590556098849055609b8290555f5b609b548110156123685783838281811061222957612229614dae565b905060200281019061223b9190614e43565b609f5f86868581811061225057612250614dae565b90506020028101906122629190614e43565b61227090602081019061465b565b6001600160a01b0316815260208101919091526040015f206122928282614bf4565b905050609d8484838181106122a9576122a9614dae565b90506020028101906122bb9190614e43565b6122c990602081019061465b565b8154600180820184555f938452602090932001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055612312908290614ac4565b609e5f86868581811061232757612327614dae565b90506020028101906123399190614e43565b61234790602081019061465b565b6001600160a01b0316815260208101919091526040015f205560010161220d565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561243d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612455575f80fd5b5f918252602090912001546001600160a01b0316905081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561255657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612527573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061254b9190614e7f565b6001600160a01b0316145b61072b5760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b6125d0613a3e565b6125d95f614096565b565b6125e3613a3e565b60985442101561265a5760405162461bcd60e51b8152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d65000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f609c54116126ab5760405162461bcd60e51b815260206004820152600e60248201527f6e6f6e652063616e6469646174650000000000000000000000000000000000006044820152606401610779565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612868575f5b8181101561285f5760a15f609d838154811061270457612704614dae565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d858154811061275557612755614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612857575f609d828154811061279357612793614dae565b5f91825260209091200154609d80546001600160a01b03909216925090849081106127c0576127c0614dae565b5f91825260209091200154609d80546001600160a01b0390921691849081106127eb576127eb614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d848154811061282a5761282a614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b6001016126e6565b506001016126da565b505f5b609d548110156128c257612880816001614ac4565b609e5f609d848154811061289657612896614dae565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205560010161286b565b506125d9613a98565b5f60985442101561291e5760405162461bcd60e51b815260206004820152601960248201527f726577617264206973206e6f74207374617274656420796574000000000000006044820152606401610779565b62015180609854426129309190614ddb565b61293a9190614e9a565b905090565b6001600160a01b0381165f90815260a360209081526040808320338452909152812054151561071d565b609f6020525f90815260409020805460018201546002830180546001600160a01b0390931693919261299a90614b65565b80601f01602080910402602001604051908101604052809291908181526020018280546129c690614b65565b8015612a115780601f106129e857610100808354040283529160200191612a11565b820191905f5260205f20905b8154815290600101906020018083116129f457829003601f168201915b5050505050905083565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612b0357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ad4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612af89190614e7f565b6001600160a01b0316145b612b755760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b8260a5548114612bc75760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b612bd2846001614ac4565b60a5555f805b83811015612f3857609b54609e5f878785818110612bf857612bf8614dae565b9050602002016020810190612c0d919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205411612c3757600191505b5f609e5f878785818110612c4d57612c4d614dae565b9050602002016020810190612c62919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba575f6001609e5f888886818110612ca057612ca0614dae565b9050602002016020810190612cb5919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f2054612cdf9190614ddb565b90505b609d54612cf190600190614ddb565b811015612dc357609d612d05826001614ac4565b81548110612d1557612d15614dae565b5f91825260209091200154609d80546001600160a01b039092169183908110612d4057612d40614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d8481548110612d8357612d83614dae565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190612db6908490614ddb565b9091555050600101612ce2565b50609d805480612dd557612dd5614ead565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e90868684818110612e1a57612e1a614dae565b9050602002016020810190612e2f919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f878785818110612e6757612e67614dae565b9050602002016020810190612e7c919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba576001609c5f828254612eb49190614ddb565b90915550505b609f5f868684818110612ecf57612ecf614dae565b9050602002016020810190612ee4919061465b565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590612f2e60028301826145fd565b5050600101612bd8565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618484604051612f6a929190614eda565b60405180910390a18015612f8057612f80613a98565b5050505050565b5f60605f8411612fd95760405162461bcd60e51b815260206004820152601160248201527f696e76616c696420706167652073697a650000000000000000000000000000006044820152606401610779565b6001600160a01b0385165f90815260a260205260409020612ff990613a35565b91508367ffffffffffffffff81111561301457613014614b38565b60405190808252806020026020018201604052801561303d578160200160208202803683370190505b5090505f61304b8486614f27565b90505f600161305a8682614ac4565b6130649088614f27565b61306e9190614ddb565b905061307b600185614ddb565b8111156130905761308d600185614ddb565b90505b815f5b828211613109576130c7826130a781614f3e565b6001600160a01b038c165f90815260a26020526040902090945090614178565b85826130d281614f3e565b9350815181106130e4576130e4614dae565b60200260200101906001600160a01b031690816001600160a01b031681525050613093565b50505050935093915050565b61311d613c18565b335f90815260a46020526040812054815b818110156134335760975460ff16158061317e575061314b6128cb565b335f90815260a46020526040902080548390811061316b5761316b614dae565b905f5260205f2090600302016002015411155b1561342157335f90815260a4602052604090208054829081106131a3576131a3614dae565b905f5260205f20906003020160010154836131be9190614ac4565b335f90815260a46020526040812080549295509091839081106131e3576131e3614dae565b5f91825260208220600390910201546001600160a01b0316915060a4816132073390565b6001600160a01b03166001600160a01b031681526020019081526020015f20838154811061323757613237614dae565b905f5260205f2090600302016002015490505f60a45f6132543390565b6001600160a01b03166001600160a01b031681526020019081526020015f20848154811061328457613284614dae565b905f5260205f2090600302016001015490506001856132a39190614ddb565b84101561336857335f90815260a4602052604090206132c3600187614ddb565b815481106132d3576132d3614dae565b905f5260205f20906003020160a45f6132e93390565b6001600160a01b03166001600160a01b031681526020019081526020015f20858154811061331957613319614dae565b5f91825260209091208254600390920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091178155600180830154908201556002918201549101555b335f90815260a46020526040902080548061338557613385614ead565b5f8281526020812060035f1990930192830201805473ffffffffffffffffffffffffffffffffffffffff19168155600181810183905560029091019190915591556133d09086614ddb565b604080518481526020810184905291965033916001600160a01b038616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a350505061312e565b61342c816001614ac4565b905061312e565b505f82116134835760405162461bcd60e51b815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d0000000000000000006044820152606401610779565b61348d3383614183565b50506125d96001606555565b6001600160a01b0381165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613524575f848152602090819020604080516060810182526003860290920180546001600160a01b03168352600180820154848601526002909101549183019190915290835290920191016134d0565b505050509050919050565b613537613a3e565b6001600160a01b0381166135b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610779565b61155481614096565b6135c4613c18565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b15801561364a575f80fd5b505af115801561365c573d5f803e3d5ffd5b505050506125d96001606555565b613672613a3e565b8260a55481146136c45760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b6136cf846001614ac4565b60a5555f805b83811015612f3857609b54609e5f8787858181106136f5576136f5614dae565b905060200201602081019061370a919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20541161373457600191505b5f609e5f87878581811061374a5761374a614dae565b905060200201602081019061375f919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7575f6001609e5f88888681811061379d5761379d614dae565b90506020020160208101906137b2919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20546137dc9190614ddb565b90505b609d546137ee90600190614ddb565b8110156138c057609d613802826001614ac4565b8154811061381257613812614dae565b5f91825260209091200154609d80546001600160a01b03909216918390811061383d5761383d614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d848154811061388057613880614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001812080549091906138b3908490614ddb565b90915550506001016137df565b50609d8054806138d2576138d2614ead565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e9086868481811061391757613917614dae565b905060200201602081019061392c919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f87878581811061396457613964614dae565b9050602002016020810190613979919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7576001609c5f8282546139b19190614ddb565b90915550505b609f5f8686848181106139cc576139cc614dae565b90506020020160208101906139e1919061465b565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590613a2b60028301826145fd565b50506001016136d5565b5f61071d825490565b6033546001600160a01b031633146125d95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610779565b60995460975460ff1615613abc57609954609c541015613ab75750609c545b613acd565b609954609d541015613acd5750609d545b5f8167ffffffffffffffff811115613ae757613ae7614b38565b604051908082528060200260200182016040528015613b10578160200160208202803683370190505b5090505f5b82811015613b7d57609d8181548110613b3057613b30614dae565b905f5260205f20015f9054906101000a90046001600160a01b0316828281518110613b5d57613b5d614dae565b6001600160a01b0390921660209283029190910190910152600101613b15565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490613be3908490600401614f56565b5f604051808303815f87803b158015613bfa575f80fd5b505af1158015613c0c573d5f803e3d5ffd5b50509151609b55505050565b600260655403613c6a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610779565b6002606555565b6001606555565b5f613c8c836001600160a01b03841661442c565b9392505050565b5f805b6001600160a01b0384165f90815260a46020526040902054811015613d13576001600160a01b038481165f90815260a46020526040902080549185169183908110613ce357613ce3614dae565b5f9182526020909120600390910201546001600160a01b031603613d0b57600191505061071d565b600101613c96565b505f9392505050565b6040517fde6ac9330000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015613da5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613dc99190614f68565b159392505050565b5f613c8c836001600160a01b03841661450f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613e66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e8a9190614f87565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015613f1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613f409190614f68565b613f8c5760405162461bcd60e51b815260206004820152601360248201527f7472616e7366657246726f6d206661696c6564000000000000000000000000006044820152606401610779565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561400d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906140319190614f87565b90505f8311801561404a5750826140488383614ddb565b145b612f805760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166141705760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b6125d961455b565b5f613c8c83836145d7565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614204573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142289190614f87565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af11580156142b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142d69190614f68565b6143225760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c656400000000000000000000000000000000006044820152606401610779565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156143a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143c79190614f87565b90505f831180156143e05750826143de8383614ddb565b145b610a0e5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b5f8181526001830160205260408120548015614506575f61444e600183614ddb565b85549091505f9061446190600190614ddb565b90508181146144c0575f865f01828154811061447f5761447f614dae565b905f5260205f200154905080875f01848154811061449f5761449f614dae565b5f918252602080832090910192909255918252600188019052604090208390555b85548690806144d1576144d1614ead565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061071d565b5f91505061071d565b5f81815260018301602052604081205461455457508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561071d565b505f61071d565b5f54610100900460ff16613c715760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b5f825f0182815481106145ec576145ec614dae565b905f5260205f200154905092915050565b50805461460990614b65565b5f825580601f10614618575050565b601f0160209004905f5260205f209081019061155491905b80821115614643575f8155600101614630565b5090565b6001600160a01b0381168114611554575f80fd5b5f6020828403121561466b575f80fd5b8135613c8c81614647565b5f8060408385031215614687575f80fd5b82359150602083013567ffffffffffffffff8111156146a4575f80fd5b8301606081860312156146b5575f80fd5b809150509250929050565b5f602082840312156146d0575f80fd5b5035919050565b5f80604083850312156146e8575f80fd5b82356146f381614647565b946020939093013593505050565b5f8083601f840112614711575f80fd5b50813567ffffffffffffffff811115614728575f80fd5b6020830191508360208260051b8501011115614742575f80fd5b9250929050565b5f806020838503121561475a575f80fd5b823567ffffffffffffffff811115614770575f80fd5b61477c85828601614701565b90969095509350505050565b5f81518084525f5b818110156147ac57602081850181015186830182015201614790565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015614881578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b031684528781015188850152860151606087850181905261486d81860183614788565b968901969450505090860190600101614810565b509098975050505050505050565b5f805f805f8060a087890312156148a4575f80fd5b86356148af81614647565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff8111156148df575f80fd5b6148eb89828a01614701565b979a9699509497509295939492505050565b6001600160a01b0384168152826020820152606060408201525f6149246060830184614788565b95945050505050565b5f806040838503121561493e575f80fd5b823561494981614647565b915060208301356146b581614647565b5f805f6040848603121561496b575f80fd5b83359250602084013567ffffffffffffffff811115614988575f80fd5b61499486828701614701565b9497909650939450505050565b5f805f606084860312156149b3575f80fd5b83356149be81614647565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b83811015614a0b5781516001600160a01b0316875295820195908201906001016149e6565b509495945050505050565b828152604060208201525f614a2e60408301846149d3565b949350505050565b602080825282518282018190525f919060409081850190868401855b82811015614a8a57815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101614a52565b5091979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561071d5761071d614a97565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b0a575f80fd5b83018035915067ffffffffffffffff821115614b24575f80fd5b602001915036819003821315614742575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c90821680614b7957607f821691505b602082108103611f0f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156108fc57805f5260205f20601f840160051c81016020851015614bd55750805b601f840160051c820191505b81811015612f80575f8155600101614be1565b8135614bff81614647565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff1983541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112614c6b575f80fd5b8501803567ffffffffffffffff811115614c83575f80fd5b8036038483011315614c93575f80fd5b614ca781614ca18554614b65565b85614bb0565b5f601f821160018114614cda575f8315614cc357508382018601355b5f19600385901b1c1916600184901b178555614d50565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015614d2657868501890135825593880193908901908801614d07565b5084821015614d44575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181038181111561071d5761071d614a97565b5f81614dfc57614dfc614a97565b505f190190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82614e3e57614e3e614e03565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112614e75575f80fd5b9190910192915050565b5f60208284031215614e8f575f80fd5b8151613c8c81614647565b5f82614ea857614ea8614e03565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015614f1c578235614f0181614647565b6001600160a01b031682529183019190830190600101614eee565b509695505050505050565b808202811582820484141761071d5761071d614a97565b5f5f198203614f4f57614f4f614a97565b5060010190565b602081525f613c8c60208301846149d3565b5f60208284031215614f78575f80fd5b81518015158114613c8c575f80fd5b5f60208284031215614f97575f80fd5b505191905056fea164736f6c6343000818000a +0x608060405234801561000f575f80fd5b50600436106102cc575f3560e01c8063715018a61161017c578063927ede2d116100dd578063d557714111610093578063f0261bc21161006e578063f0261bc21461068a578063f2fde38b14610693578063fad99f98146106a6575f80fd5b8063d55771411461063b578063e10911b114610662578063ed70b3431461066a575f80fd5b8063b5d2e0dc116100c3578063b5d2e0dc146105d1578063c64814dd146105f0578063d31d83d91461061a575f80fd5b8063927ede2d1461059d57806396ab994d146105c4575f80fd5b806384d7d1d4116101325780638e21d5fb116101185780638e21d5fb146105355780639168ae721461055c57806391bd43a41461057e575f80fd5b806384d7d1d4146105015780638da5cb5b14610524575f80fd5b8063766718081161016257806376671808146104b35780637b05afb5146104bb578063831cfb58146104da575f80fd5b8063715018a6146104a3578063746c8ae1146104ab575f80fd5b80633385ccc21161023157806340b5c837116101e7578063459598a2116101c2578063459598a21461047557806346cdc18a146104885780636d454d5114610490575f80fd5b806340b5c8371461044757806343352d611461045a578063439162b514610462575f80fd5b80633c323a1b116102175780633c323a1b146103d35780633cb747bf146103e65780633d9353fe14610420575f80fd5b80633385ccc2146103b75780633b802421146103ca575f80fd5b8063174e31c4116102865780632cc138be1161026c5780632cc138be146103855780632e787be31461038e57806330158eea14610397575f80fd5b8063174e31c41461035f57806319fac8fd14610372575f80fd5b80630eb573af116102b65780630eb573af1461030b5780630f3b70591461031e57806312a3e94714610356575f80fd5b806243b758146102d05780630be67fcc146102f6575b5f80fd5b6102e36102de366004614148565b6106ae565b6040519081526020015b60405180910390f35b6103096103043660046141ab565b6106d4565b005b6103096103193660046141ea565b610bf9565b61033161032c366004614201565b610d0c565b604080516001600160a01b0390941684526020840192909252908201526060016102ed565b6102e3609a5481565b61030961036d366004614201565b610d54565b6103096103803660046141ea565b610ecc565b6102e360985481565b6102e360995481565b6103aa6103a53660046141ab565b610fee565b6040516102ed919061428c565b6103096103c5366004614148565b611215565b6102e3609c5481565b6103096103e1366004614201565b611870565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016102ed565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b6103096104553660046141ea565b611f0a565b6103aa61201d565b610309610470366004614332565b612239565b6104086104833660046141ea565b612775565b609d546102e3565b61030961049e3660046143a0565b61279d565b610309612a6e565b610309612a81565b6102e3612d71565b6102e36104c9366004614148565b60a06020525f908152604090205481565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b61051461050f366004614148565b612de5565b60405190151581526020016102ed565b6033546001600160a01b0316610408565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b61056f61056a366004614148565b612e0f565b6040516102ed939291906143d7565b6102e361058c366004614148565b60a16020525f908152604090205481565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b6097546105149060ff1681565b6102e36105df366004614148565b609e6020525f908152604090205481565b6102e36105fe366004614407565b60a360209081525f928352604080842090915290825290205481565b61062d61062836600461443e565b612ec1565b6040516102ed9291906144b3565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b61030961303b565b61067d610678366004614148565b6133d5565b6040516102ed91906144d3565b6102e3609b5481565b6103096106a1366004614148565b61346b565b6103096134f8565b6001600160a01b0381165f90815260a2602052604081206106ce906135a6565b92915050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156107bc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b19190614534565b6001600160a01b0316145b6108335760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f805b82811015610bac57609b54609e5f8686858181106108565761085661454f565b905060200201602081019061086b9190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20541161089557600191505b5f609e5f8686858181106108ab576108ab61454f565b90506020020160208101906108c09190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115610b23575f6001609e5f8787868181106108fe576108fe61454f565b90506020020160208101906109139190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f205461093d91906145a9565b90505b609d5461094f906001906145a9565b811015610a2157609d6109638260016145bc565b815481106109735761097361454f565b5f91825260209091200154609d80546001600160a01b03909216918390811061099e5761099e61454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d84815481106109e1576109e161454f565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190610a149084906145a9565b9091555050600101610940565b50609d805480610a3357610a336145cf565b5f8281526020812082015f1990810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e90858584818110610a8357610a8361454f565b9050602002016020810190610a989190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f868685818110610ad057610ad061454f565b9050602002016020810190610ae59190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115610b23576001609c5f828254610b1d91906145a9565b90915550505b609f5f858584818110610b3857610b3861454f565b9050602002016020810190610b4d9190614148565b6001600160a01b0316815260208101919091526040015f90812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905590610ba260028301826140ea565b5050600101610836565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618383604051610bde9291906145fc565b60405180910390a18015610bf457610bf46135af565b505050565b610c0161372f565b5f81118015610c1257506099548114155b610c845760405162461bcd60e51b815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a65000000000000000000000000000000000000000000000000000000000000606482015260840161082a565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff16610cd957609d54610cdd565b609c545b90505f6099548210610cf157609954610cf3565b815b9050609b548114610d0657610d066135af565b50505050565b60a4602052815f5260405f208181548110610d25575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610d5c613789565b6001600160a01b038216610e12576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b158015610df7575f80fd5b505af1158015610e09573d5f803e3d5ffd5b50505050610ebe565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610ea7575f80fd5b505af1158015610eb9573d5f803e3d5ffd5b505050505b610ec86001606555565b5050565b335f908152609e6020526040902054610f275760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f77656400000000000000000000000000604482015260640161082a565b6014811115610f785760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e0000000000000000000000000000604482015260640161082a565b335f90815260a06020526040812082905560975460ff16610f99575f610fac565b610fa1612d71565b610fac9060016145bc565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff81111561100a5761100a614649565b60405190808252806020026020018201604052801561105657816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816110285790505b5090505f5b8381101561120d576040518060600160405280609f5f8888868181106110835761108361454f565b90506020020160208101906110989190614148565b6001600160a01b03908116825260208083019390935260409091015f908120549091168352910190609f908888868181106110d5576110d561454f565b90506020020160208101906110ea9190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f8888868181106111275761112761454f565b905060200201602081019061113c9190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20600201805461116990614676565b80601f016020809104026020016040519081016040528092919081815260200182805461119590614676565b80156111e05780601f106111b7576101008083540402835291602001916111e0565b820191905f5260205f20905b8154815290600101906020018083116111c357829003601f168201915b50505050508152508282815181106111fa576111fa61454f565b602090810291909101015260010161105b565b509392505050565b61121d613789565b6001600160a01b0381165f90815260a36020908152604080832033845290915290205461128c5760405162461bcd60e51b815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f00000000000000000000604482015260640161082a565b6001600160a01b0381165f908152609e60205260408120546097549015919060ff166112b8575f6112cb565b6112c0612d71565b6112cb9060016145bc565b6097549091505f9060ff1680156112e0575082155b6112ea57816112f7565b609a546112f790836145bc565b604080516060810182526001600160a01b038781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c5160039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909b16178a558251908a015551600290980197909755908452908252829055925191815260a1909252928120805494955091936113b99084906145a9565b90915550506001600160a01b0385165f90815260a2602052604090206113df90336137e9565b506001600160a01b0385165f908152609e602052604090205484158015611408575060975460ff165b80156114155750609c5481105b1561168c576001600160a01b0386165f908152609e602052604081205461143e906001906145a9565b90505b6001609c5461145091906145a9565b81101561168a5760a15f609d838154811061146d5761146d61454f565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a190609d6114a28560016145bc565b815481106114b2576114b261454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611682575f609d82815481106114f0576114f061454f565b5f918252602090912001546001600160a01b03169050609d6115138360016145bc565b815481106115235761152361454f565b5f91825260209091200154609d80546001600160a01b03909216918490811061154e5761154e61454f565b5f91825260209091200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905580609d61159c8460016145bc565b815481106115ac576115ac61454f565b5f91825260209091200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03929092169190911790556115f78260016145bc565b609e5f609d858154811061160d5761160d61454f565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205561163c8260026145bc565b609e5f609d61164c8660016145bc565b8154811061165c5761165c61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b600101611441565b505b841580156116af57506001600160a01b0386165f90815260a16020526040902054155b156116cc576001609c5f8282546116c691906145a9565b90915550505b6001600160a01b038681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b15801561176d575f80fd5b505af115801561177f573d5f803e3d5ffd5b5050505061178a3390565b6001600160a01b0316866001600160a01b03167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c846020015187876040516117e5939291909283526020830191909152604082015260600190565b60405180910390a3841580156117fd575060975460ff165b801561180b5750609b548111155b80156118515750609b546001600160a01b0387165f908152609e602052604090205411806118515750609c546001600160a01b0387165f908152609e6020526040902054115b1561185e5761185e6135af565b505050505061186d6001606555565b50565b6001600160a01b0382165f908152609e602052604090205482906118d65760405162461bcd60e51b815260206004820152600a60248201527f6e6f74207374616b657200000000000000000000000000000000000000000000604482015260640161082a565b6118de613789565b5f821161192d5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e74000000000000000000000000604482015260640161082a565b6119373384613804565b156119845760405162461bcd60e51b815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d656400000000000000000000604482015260640161082a565b6001600160a01b0383165f90815260a360209081526040808320338452909152902054611a02576119b5338461388d565b15611a025760405162461bcd60e51b815260206004820152601060248201527f72657761726420756e636c61696d656400000000000000000000000000000000604482015260640161082a565b6001600160a01b0383165f90815260a1602052604081208054849290611a299084906145bc565b90915550506001600160a01b0383165f90815260a36020908152604080832033845290915281208054849290611a609084906145bc565b90915550506001600160a01b0383165f90815260a260205260409020611a869033613942565b506001600160a01b0383165f90815260a16020526040902054829003611abe576001609c5f828254611ab891906145bc565b90915550505b6001600160a01b0383165f908152609e602052604090205460975460ff168015611ae85750600181115b15611d39575f611af96001836145a9565b90505b8015611d375760a15f609d611b126001856145a9565b81548110611b2257611b2261454f565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d8481548110611b7357611b7361454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611d25575f609d611bab6001846145a9565b81548110611bbb57611bbb61454f565b5f91825260209091200154609d80546001600160a01b0390921692509083908110611be857611be861454f565b5f918252602090912001546001600160a01b0316609d611c096001856145a9565b81548110611c1957611c1961454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d8381548110611c5857611c5861454f565b5f918252602082200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0393909316929092179091558290609e90609d611caa6001856145a9565b81548110611cba57611cba61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055611ce98260016145bc565b609e5f609d8581548110611cff57611cff61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80611d2f816146c1565b915050611afc565b505b6097545f9060ff16611d4b575f611d5e565b611d53612d71565b611d5e9060016145bc565b6001600160a01b0386165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a36001600160a01b038581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611e92575f80fd5b505af1158015611ea4573d5f803e3d5ffd5b50505050611eb9611eb23390565b3086613956565b60975460ff168015611ecc5750609b5482115b8015611ef157506099546001600160a01b0386165f908152609e602052604090205411155b15611efe57611efe6135af565b5050610bf46001606555565b611f1261372f565b60975460ff1615611f655760405162461bcd60e51b815260206004820152601660248201527f72657761726420616c7265616479207374617274656400000000000000000000604482015260640161082a565b4281118015611f7e5750611f7c6201518082614703565b155b8015611f8c57506098548114155b611fd85760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d6500000000000000604482015260640161082a565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff81111561203d5761203d614649565b60405190808252806020026020018201604052801561208957816020015b60408051606080820183525f80835260208301529181019190915281526020019060019003908161205b5790505b5090505f5b609d54811015612233576040518060600160405280609f5f609d85815481106120b9576120b961454f565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609d80549390910192609f929190869081106121055761210561454f565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f609d858154811061215e5761215e61454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020600201805461218f90614676565b80601f01602080910402602001604051908101604052809291908181526020018280546121bb90614676565b80156122065780601f106121dd57610100808354040283529160200191612206565b820191905f5260205f20905b8154815290600101906020018083116121e957829003601f168201915b50505050508152508282815181106122205761222061454f565b602090810291909101015260010161208e565b50919050565b5f54610100900460ff161580801561225757505f54600160ff909116105b806122705750303b15801561227057505f5460ff166001145b6122e25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161082a565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561233e575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0387166123945760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e657220616464726573730000000000000000000000604482015260640161082a565b5f86116124095760405162461bcd60e51b815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f2030000000000000000000000000000000000000000000000000000000000000606482015260840161082a565b5f85116124585760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f63687300000000604482015260640161082a565b4284118015612471575061246f6201518085614703565b155b6124bd5760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d6500000000000000604482015260640161082a565b8161250a5760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420696e697469616c207374616b657273000000000000000000604482015260640161082a565b61251387613bc3565b61251b613c2c565b6099869055609a8590556098849055609b8290555f5b609b548110156126975783838281811061254d5761254d61454f565b905060200281019061255f9190614716565b609f5f8686858181106125745761257461454f565b90506020028101906125869190614716565b612594906020810190614148565b6001600160a01b0316815260208101919091526040015f206125b682826147f7565b905050609d8484838181106125cd576125cd61454f565b90506020028101906125df9190614716565b6125ed906020810190614148565b8154600180820184555f93845260209093200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03929092169190911790556126419082906145bc565b609e5f8686858181106126565761265661454f565b90506020028101906126689190614716565b612676906020810190614148565b6001600160a01b0316815260208101919091526040015f2055600101612531565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561276c575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612784575f80fd5b5f918252602090912001546001600160a01b0316905081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561288557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612856573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061287a9190614534565b6001600160a01b0316145b6128f75760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f7765640000000000000000000000000000000000000000606482015260840161082a565b609e5f6129076020840184614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f036129b457609d61293c6020830183614148565b81546001810183555f928352602080842090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039390931692909217909155609d5491609e9161299a90850185614148565b6001600160a01b0316815260208101919091526040015f20555b80609f5f6129c56020840184614148565b6001600160a01b0316815260208101919091526040015f206129e782826147f7565b506129f790506020820182614148565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d6020830135612a336040850185614752565b604051612a4293929190614969565b60405180910390a260975460ff16158015612a615750609954609d5411155b1561186d5761186d6135af565b612a7661372f565b612a7f5f613bc3565b565b612a8961372f565b609854421015612b005760405162461bcd60e51b8152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d6500000000000000000000000000000000000000000000000000000000606482015260840161082a565b5f609c5411612b515760405162461bcd60e51b815260206004820152600e60248201527f6e6f6e652063616e646964617465000000000000000000000000000000000000604482015260640161082a565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612d0e575f5b81811015612d055760a15f609d8381548110612baa57612baa61454f565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d8581548110612bfb57612bfb61454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612cfd575f609d8281548110612c3957612c3961454f565b5f91825260209091200154609d80546001600160a01b0390921692509084908110612c6657612c6661454f565b5f91825260209091200154609d80546001600160a01b039092169184908110612c9157612c9161454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d8481548110612cd057612cd061454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600101612b8c565b50600101612b80565b505f5b609d54811015612d6857612d268160016145bc565b609e5f609d8481548110612d3c57612d3c61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101612d11565b50612a7f6135af565b5f609854421015612dc45760405162461bcd60e51b815260206004820152601960248201527f726577617264206973206e6f7420737461727465642079657400000000000000604482015260640161082a565b6201518060985442612dd691906145a9565b612de091906149bc565b905090565b6001600160a01b0381165f90815260a36020908152604080832033845290915281205415156106ce565b609f6020525f90815260409020805460018201546002830180546001600160a01b03909316939192612e4090614676565b80601f0160208091040260200160405190810160405280929190818152602001828054612e6c90614676565b8015612eb75780601f10612e8e57610100808354040283529160200191612eb7565b820191905f5260205f20905b815481529060010190602001808311612e9a57829003601f168201915b5050505050905083565b5f60605f8411612f135760405162461bcd60e51b815260206004820152601160248201527f696e76616c696420706167652073697a65000000000000000000000000000000604482015260640161082a565b6001600160a01b0385165f90815260a260205260409020612f33906135a6565b91508367ffffffffffffffff811115612f4e57612f4e614649565b604051908082528060200260200182016040528015612f77578160200160208202803683370190505b5090505f612f8584866149cf565b90505f6001612f9486826145bc565b612f9e90886149cf565b612fa891906145a9565b9050612fb56001856145a9565b811115612fca57612fc76001856145a9565b90505b815b818111613030576001600160a01b0388165f90815260a260205260409020612ff49082613cb0565b8482815181106130065761300661454f565b6001600160a01b039092166020928302919091019091015280613028816149e6565b915050612fcc565b505050935093915050565b613043613789565b335f90815260a46020526040812054815b8181101561336f5760975460ff1615806130a45750613071612d71565b335f90815260a4602052604090208054839081106130915761309161454f565b905f5260205f2090600302016002015411155b1561335d57335f90815260a4602052604090208054829081106130c9576130c961454f565b905f5260205f20906003020160010154836130e491906145bc565b335f90815260a46020526040812080549295509091839081106131095761310961454f565b5f91825260208220600390910201546001600160a01b0316915060a48161312d3390565b6001600160a01b03166001600160a01b031681526020019081526020015f20838154811061315d5761315d61454f565b905f5260205f2090600302016002015490505f60a45f61317a3390565b6001600160a01b03166001600160a01b031681526020019081526020015f2084815481106131aa576131aa61454f565b905f5260205f2090600302016001015490506001856131c991906145a9565b84101561329957335f90815260a4602052604090206131e96001876145a9565b815481106131f9576131f961454f565b905f5260205f20906003020160a45f61320f3390565b6001600160a01b03166001600160a01b031681526020019081526020015f20858154811061323f5761323f61454f565b5f9182526020909120825460039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091178155600180830154908201556002918201549101555b335f90815260a4602052604090208054806132b6576132b66145cf565b5f8281526020812060035f199093019283020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001818101839055600290910191909155915561330c90866145a9565b604080518481526020810184905291965033916001600160a01b038616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a3505050613054565b6133688160016145bc565b9050613054565b505f82116133bf5760405162461bcd60e51b815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d000000000000000000604482015260640161082a565b6133c93383613cbb565b5050612a7f6001606555565b6001600160a01b0381165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613460575f848152602090819020604080516060810182526003860290920180546001600160a01b031683526001808201548486015260029091015491830191909152908352909201910161340c565b505050509050919050565b61347361372f565b6001600160a01b0381166134ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161082a565b61186d81613bc3565b613500613789565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b158015613586575f80fd5b505af1158015613598573d5f803e3d5ffd5b50505050612a7f6001606555565b5f6106ce825490565b60995460975460ff16156135d357609954609c5410156135ce5750609c545b6135e4565b609954609d5410156135e45750609d545b5f8167ffffffffffffffff8111156135fe576135fe614649565b604051908082528060200260200182016040528015613627578160200160208202803683370190505b5090505f5b8281101561369457609d81815481106136475761364761454f565b905f5260205f20015f9054906101000a90046001600160a01b03168282815181106136745761367461454f565b6001600160a01b039092166020928302919091019091015260010161362c565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a4906136fa9084906004016149fe565b5f604051808303815f87803b158015613711575f80fd5b505af1158015613723573d5f803e3d5ffd5b50509151609b55505050565b6033546001600160a01b03163314612a7f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161082a565b6002606554036137db5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161082a565b6002606555565b6001606555565b5f6137fd836001600160a01b038416613f19565b9392505050565b5f805b6001600160a01b0384165f90815260a46020526040902054811015613884576001600160a01b038481165f90815260a460205260409020805491851691839081106138545761385461454f565b5f9182526020909120600390910201546001600160a01b03160361387c5760019150506106ce565b600101613807565b505f9392505050565b6040517fde6ac9330000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015613916573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061393a9190614a10565b159392505050565b5f6137fd836001600160a01b038416613ffc565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156139d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139fb9190614a2f565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015613a8d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ab19190614a10565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613b33573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b579190614a2f565b90505f83118015613b70575082613b6e83836145a9565b145b613bbc5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c65640000000000604482015260640161082a565b5050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16613ca85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161082a565b612a7f614048565b5f6137fd83836140c4565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613d3c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d609190614a2f565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015613dea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e0e9190614a10565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613e90573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613eb49190614a2f565b90505f83118015613ecd575082613ecb83836145a9565b145b610d065760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c65640000000000604482015260640161082a565b5f8181526001830160205260408120548015613ff3575f613f3b6001836145a9565b85549091505f90613f4e906001906145a9565b9050818114613fad575f865f018281548110613f6c57613f6c61454f565b905f5260205f200154905080875f018481548110613f8c57613f8c61454f565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080613fbe57613fbe6145cf565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506106ce565b5f9150506106ce565b5f81815260018301602052604081205461404157508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556106ce565b505f6106ce565b5f54610100900460ff166137e25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161082a565b5f825f0182815481106140d9576140d961454f565b905f5260205f200154905092915050565b5080546140f690614676565b5f825580601f10614105575050565b601f0160209004905f5260205f209081019061186d91905b80821115614130575f815560010161411d565b5090565b6001600160a01b038116811461186d575f80fd5b5f60208284031215614158575f80fd5b81356137fd81614134565b5f8083601f840112614173575f80fd5b50813567ffffffffffffffff81111561418a575f80fd5b6020830191508360208260051b85010111156141a4575f80fd5b9250929050565b5f80602083850312156141bc575f80fd5b823567ffffffffffffffff8111156141d2575f80fd5b6141de85828601614163565b90969095509350505050565b5f602082840312156141fa575f80fd5b5035919050565b5f8060408385031215614212575f80fd5b823561421d81614134565b946020939093013593505050565b5f81518084525f5b8181101561424f57602081850181015186830182015201614233565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015614324578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b03168452878101518885015286015160608785018190526143108186018361422b565b9689019694505050908601906001016142b3565b509098975050505050505050565b5f805f805f8060a08789031215614347575f80fd5b863561435281614134565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115614382575f80fd5b61438e89828a01614163565b979a9699509497509295939492505050565b5f602082840312156143b0575f80fd5b813567ffffffffffffffff8111156143c6575f80fd5b8201606081850312156137fd575f80fd5b6001600160a01b0384168152826020820152606060408201525f6143fe606083018461422b565b95945050505050565b5f8060408385031215614418575f80fd5b823561442381614134565b9150602083013561443381614134565b809150509250929050565b5f805f60608486031215614450575f80fd5b833561445b81614134565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156144a85781516001600160a01b031687529582019590820190600101614483565b509495945050505050565b828152604060208201525f6144cb6040830184614470565b949350505050565b602080825282518282018190525f919060409081850190868401855b8281101561452757815180516001600160a01b03168552868101518786015285015185850152606090930192908501906001016144ef565b5091979650505050505050565b5f60208284031215614544575f80fd5b81516137fd81614134565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b818103818111156106ce576106ce61457c565b808201808211156106ce576106ce61457c565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b8681101561463e57823561462381614134565b6001600160a01b031682529183019190830190600101614610565b509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c9082168061468a57607f821691505b602082108103612233577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f816146cf576146cf61457c565b505f190190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82614711576147116146d6565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112614748575f80fd5b9190910192915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614785575f80fd5b83018035915067ffffffffffffffff82111561479f575f80fd5b6020019150368190038213156141a4575f80fd5b601f821115610bf457805f5260205f20601f840160051c810160208510156147d85750805b601f840160051c820191505b81811015613bbc575f81556001016147e4565b813561480281614134565b6001600160a01b0381167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112614879575f80fd5b8501803567ffffffffffffffff811115614891575f80fd5b80360384830113156148a1575f80fd5b6148b5816148af8554614676565b856147b3565b5f601f8211600181146148e8575f83156148d157508382018601355b5f19600385901b1c1916600184901b17855561495e565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561493457868501890135825593880193908901908801614915565b5084821015614952575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b5f826149ca576149ca6146d6565b500490565b80820281158282048414176106ce576106ce61457c565b5f5f1982036149f7576149f761457c565b5060010190565b602081525f6137fd6020830184614470565b5f60208284031215614a20575f80fd5b815180151581146137fd575f80fd5b5f60208284031215614a3f575f80fd5b505191905056fea164736f6c6343000818000a diff --git a/bindings/bin/l2tokenregistry_deployed.hex b/bindings/bin/l2tokenregistry_deployed.hex new file mode 100644 index 000000000..775fc2e85 --- /dev/null +++ b/bindings/bin/l2tokenregistry_deployed.hex @@ -0,0 +1 @@ +0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638da5cb5b116100fe578063dddc98be1161009e578063ef0fde0f1161006e578063ef0fde0f146104bd578063efeadb6d146104d0578063f2fde38b146104e3578063fce40489146104f6575f80fd5b8063dddc98be14610471578063e014d85e14610484578063e2f53f2c14610497578063e3de72a5146104aa575f80fd5b8063b10b69ee116100d9578063b10b69ee14610430578063c4d66de814610443578063ce67be2614610456578063dbbb2faa1461045e575f80fd5b80638da5cb5b146103ef5780639190202e1461040a578063a313d0071461041d575f80fd5b80634cbcdd1311610169578063724f91ce11610144578063724f91ce1461030e57806385519c36146103445780638c399691146103c95780638cbab7e4146103dc575f80fd5b80634cbcdd13146102de5780636f6d6cc1146102f1578063715018a614610306575f80fd5b806322bd5c1c116101a457806322bd5c1c146102775780632848aeaf146102945780632a1ea5a2146102b65780632d59c072146102c9575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d2610509565b6040516101df91906120ef565b60405180910390f35b6102076101f6366004612160565b60996020525f908152604090205481565b6040519081526020016101df565b610228610223366004612160565b610608565b6040516101df91905f60a0820190506001600160a01b0383511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102849060ff1681565b60405190151581526020016101df565b6102846102a236600461218f565b609a6020525f908152604090205460ff1681565b6102076102c4366004612160565b6106e6565b6102dc6102d73660046121b7565b61074e565b005b6102846102ec366004612160565b610ac8565b6102f9610ade565b6040516101df9190612208565b6102dc610b86565b61033161031c36600461218f565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b61038f610352366004612160565b60976020525f908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff808316926101009004169085565b604080516001600160a01b03909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102dc6103d73660046123bd565b610b99565b6103316103ea36600461218f565b610d88565b6033546040516001600160a01b0390911681526020016101df565b6102dc610418366004612465565b610df1565b61020761042b366004612160565b610f92565b6102dc61043e3660046124cc565b610ffd565b6102dc61045136600461218f565b611149565b610207611307565b6102dc61046c366004612160565b611317565b61020761047f3660046124cc565b611466565b6102dc6104923660046124f4565b6115b3565b6102dc6104a5366004612596565b6115df565b6102dc6104b836600461268d565b6116c1565b6102dc6104cb3660046124cc565b6117fa565b6102dc6104de366004612749565b61193d565b6102dc6104f136600461218f565b6119aa565b610284610504366004612160565b611a51565b60605f610516609c611a94565b90505f815167ffffffffffffffff8111156105335761053361224f565b60405190808252806020026020018201604052801561057757816020015b604080518082019091525f80825260208201528152602001906001900390816105515790505b5090505f5b8251811015610601575f83828151811061059857610598612762565b60209081029190910181015161ffff81165f818152609784526040908190205481518083019092529181526001600160a01b039091169281018390528551919350908590859081106105ec576105ec612762565b6020908102919091010152505060010161057c565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff851682526097905291909120546001600160a01b0316610681576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f90815260976020908152604091829020825160a08101845281546001600160a01b03168152600182015492810192909252600281015460ff80821615159484019490945261010090049092166060820152600390910154608082015290565b61ffff81165f908152609760205260408120546001600160a01b0316610738576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b610756611aa7565b61075e611b1b565b61ffff85165f908152609760205260409020546001600160a01b03166107b0576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166107f0576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f9081526098602052604090205461ffff16801580159061082357508561ffff168161ffff1614155b1561085a576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156108d7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526108d49181019061278f565b60015b156108df5790505b5f60975f8961ffff1661ffff1681526020019081526020015f205f015f9054906101000a90046001600160a01b031690506040518060a00160405280886001600160a01b0316815260200187815260200186151581526020018360ff1681526020018581525060975f8a61ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff16021790555060808201518160030155905050866001600160a01b0316816001600160a01b031614610a4f576001600160a01b038181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928a1682529020805490911661ffff8a161790555b866001600160a01b03168861ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa988888689604051610aac9493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610ac16001606555565b5050505050565b5f610ad8609c61ffff8416611b8e565b92915050565b60605f610aeb609c611a94565b90505f815167ffffffffffffffff811115610b0857610b0861224f565b604051908082528060200260200182016040528015610b31578160200160208202803683370190505b5090505f5b825181101561060157828181518110610b5157610b51612762565b6020026020010151828281518110610b6b57610b6b612762565b61ffff90921660209283029190910190910152600101610b36565b610b8e611aa7565b610b975f611ba5565b565b609b5460ff168015610bba5750335f908152609a602052604090205460ff16155b8015610bd157506033546001600160a01b03163314155b15610c08576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610c43576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610d83575f6001600160a01b031660975f858481518110610c6d57610c6d612762565b60209081029190910181015161ffff1682528101919091526040015f20546001600160a01b031614610d7b57818181518110610cab57610cab612762565b60200260200101515f0315610d7b57818181518110610ccc57610ccc612762565b602002602001015160995f858481518110610ce957610ce9612762565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610d1c57610d1c612762565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610d5b57610d5b612762565b6020026020010151604051610d7291815260200190565b60405180910390a25b600101610c45565b505050565b6001600160a01b0381165f9081526098602052604081205461ffff1680158015610dba57506001600160a01b03831615155b15610ad8576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610df9611aa7565b828114610e32576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610ac1575f858583818110610e4f57610e4f612762565b9050602002016020810190610e649190612160565b90505f848484818110610e7957610e79612762565b9050602002016020810190610e8e9190612749565b61ffff83165f908152609760205260409020549091506001600160a01b0316610eb8575050610f8a565b61ffff82165f9081526097602052604090206002015460ff1680151582151514610f865761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315801591909117909155610f575760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a2610f86565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610e34565b61ffff81165f908152609760205260408120546001600160a01b0316610fe4576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561101e5750335f908152609a602052604090205460ff16155b801561103557506033546001600160a01b03163314155b1561106c576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b03166110be576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036110f6576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c704679061113d9084815260200190565b60405180910390a25050565b5f54610100900460ff161580801561116757505f54600160ff909116105b806111805750303b15801561118057505f5460ff166001145b611211576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561126d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61127682611ba5565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611303575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f611312609c611c0e565b905090565b61131f611aa7565b611327611b1b565b61ffff81165f908152609760205260409020546001600160a01b03168061137a576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915560039091018490556001600160a01b03861684526098835281842080549091169055928252609990529081205561141f82611c17565b6040516001600160a01b0382169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a3506114636001606555565b50565b61ffff82165f908152609760205260408120546001600160a01b03166114b8576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a08101835281546001600160a01b03168152600182015481850152600282015460ff8082161515838601526101009091041660608201526003909101546080820152938352609990915281205490819003611556576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8082608001518561156791906127dc565b61157191906127f3565b9250825f036115ab576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505092915050565b6115bb611aa7565b6115c3611b1b565b6115cf84848484611c26565b6115d96001606555565b50505050565b6115e7611aa7565b825184511415806115fa57508151845114155b8061160757508051845114155b1561163e576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8451811015610ac1576116b985828151811061165e5761165e612762565b602002602001015185838151811061167857611678612762565b602002602001015185848151811061169257611692612762565b60200260200101518585815181106116ac576116ac612762565b6020026020010151611c26565b600101611640565b6116c9611aa7565b8051825114611704576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610d835781818151811061172157611721612762565b6020026020010151609a5f85848151811061173e5761173e612762565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061178d5761178d612762565b60200260200101516001600160a01b03167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a115888383815181106117d1576117d1612762565b60200260200101516040516117ea911515815260200190565b60405180910390a2600101611706565b609b5460ff16801561181b5750335f908152609a602052604090205460ff16155b801561183257506033546001600160a01b03163314155b15611869576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b03166118bb576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036118f3576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e749061113d9084815260200190565b611945611aa7565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b6119b2611aa7565b6001600160a01b038116611a48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611208565b61146381611ba5565b61ffff81165f908152609760205260408120546001600160a01b0316611a7857505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611aa083611f43565b9392505050565b6033546001600160a01b03163314610b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611208565b600260655403611b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611208565b6002606555565b5f8181526001830160205260408120541515611aa0565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610ad8825490565b611303609c61ffff8316611f9c565b6001600160a01b038316611c66576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361ffff165f03611ca3576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff84165f908152609760205260409020546001600160a01b031615611cf6576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081526098602052604090205461ffff1615611d49576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611dc6575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611dc39181019061278f565b60015b15611dce5790505b6040518060a00160405280856001600160a01b031681526020018481526020015f151581526020018260ff1681526020018381525060975f8761ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508460985f866001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548161ffff021916908361ffff160217905550611ee385611fa7565b604080518481525f602082015260ff8316818301526060810184905290516001600160a01b0386169161ffff8816917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a35050505050565b6060815f01805480602002602001604051908101604052809291908181526020018280548015611f9057602002820191905f5260205f20905b815481526020019060010190808311611f7c575b50505050509050919050565b5f611aa08383611fb6565b611303609c61ffff8316612099565b5f8181526001830160205260408120548015612090575f611fd860018361282b565b85549091505f90611feb9060019061282b565b905081811461204a575f865f01828154811061200957612009612762565b905f5260205f200154905080875f01848154811061202957612029612762565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061205b5761205b61283e565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610ad8565b5f915050610ad8565b5f818152600183016020526040812054611aa0908490849084906120e857508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610ad8565b505f610ad8565b602080825282518282018190525f919060409081850190868401855b8281101561213d578151805161ffff1685528601516001600160a01b031686850152928401929085019060010161210b565b5091979650505050505050565b803561ffff8116811461215b575f80fd5b919050565b5f60208284031215612170575f80fd5b611aa08261214a565b80356001600160a01b038116811461215b575f80fd5b5f6020828403121561219f575f80fd5b611aa082612179565b8035801515811461215b575f80fd5b5f805f805f60a086880312156121cb575f80fd5b6121d48661214a565b94506121e260208701612179565b9350604086013592506121f7606087016121a8565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561224357835161ffff1683529284019291840191600101612223565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156122c3576122c361224f565b604052919050565b5f67ffffffffffffffff8211156122e4576122e461224f565b5060051b60200190565b5f82601f8301126122fd575f80fd5b8135602061231261230d836122cb565b61227c565b8083825260208201915060208460051b870101935086841115612333575f80fd5b602086015b84811015612356576123498161214a565b8352918301918301612338565b509695505050505050565b5f82601f830112612370575f80fd5b8135602061238061230d836122cb565b8083825260208201915060208460051b8701019350868411156123a1575f80fd5b602086015b8481101561235657803583529183019183016123a6565b5f80604083850312156123ce575f80fd5b823567ffffffffffffffff808211156123e5575f80fd5b6123f1868387016122ee565b93506020850135915080821115612406575f80fd5b5061241385828601612361565b9150509250929050565b5f8083601f84011261242d575f80fd5b50813567ffffffffffffffff811115612444575f80fd5b6020830191508360208260051b850101111561245e575f80fd5b9250929050565b5f805f8060408587031215612478575f80fd5b843567ffffffffffffffff8082111561248f575f80fd5b61249b8883890161241d565b909650945060208701359150808211156124b3575f80fd5b506124c08782880161241d565b95989497509550505050565b5f80604083850312156124dd575f80fd5b6124e68361214a565b946020939093013593505050565b5f805f8060808587031215612507575f80fd5b6125108561214a565b935061251e60208601612179565b93969395505050506040820135916060013590565b5f82601f830112612542575f80fd5b8135602061255261230d836122cb565b8083825260208201915060208460051b870101935086841115612573575f80fd5b602086015b848110156123565761258981612179565b8352918301918301612578565b5f805f80608085870312156125a9575f80fd5b843567ffffffffffffffff808211156125c0575f80fd5b6125cc888389016122ee565b95506020915081870135818111156125e2575f80fd5b6125ee89828a01612533565b955050604087013581811115612602575f80fd5b8701601f81018913612612575f80fd5b803561262061230d826122cb565b81815260059190911b8201840190848101908b83111561263e575f80fd5b928501925b8284101561265c57833582529285019290850190612643565b96505050506060870135915080821115612674575f80fd5b5061268187828801612361565b91505092959194509250565b5f806040838503121561269e575f80fd5b823567ffffffffffffffff808211156126b5575f80fd5b6126c186838701612533565b93506020915081850135818111156126d7575f80fd5b85019050601f810186136126e9575f80fd5b80356126f761230d826122cb565b81815260059190911b82018301908381019088831115612715575f80fd5b928401925b8284101561273a5761272b846121a8565b8252928401929084019061271a565b80955050505050509250929050565b5f60208284031215612759575f80fd5b611aa0826121a8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561279f575f80fd5b815160ff81168114611aa0575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417610ad857610ad86127af565b5f82612826577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115610ad857610ad86127af565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a diff --git a/bindings/bindings/l2staking.go b/bindings/bindings/l2staking.go index bb072229b..6889a94ad 100644 --- a/bindings/bindings/l2staking.go +++ b/bindings/bindings/l2staking.go @@ -45,8 +45,8 @@ type TypesStakerInfo struct { // L2StakingMetaData contains all meta data concerning the L2Staking contract. var L2StakingMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherStaking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"percentage\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epochEffective\",\"type\":\"uint256\"}],\"name\":\"CommissionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTime\",\"type\":\"uint256\"}],\"name\":\"RewardStartTimeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSize\",\"type\":\"uint256\"}],\"name\":\"SequencerSetMaxSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"name\":\"StakerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"StakerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"name\":\"Undelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UndelegationClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DISTRIBUTE_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MESSENGER\",\"outputs\":[{\"internalType\":\"contractICrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MORPH_TOKEN_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OTHER_STAKING\",\"outputs\":[{\"internalType\":\"contractStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEQUENCER_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"addStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"candidateNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimCommission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetEpochIndex\",\"type\":\"uint256\"}],\"name\":\"claimReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimUndelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"commissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegateStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"emergencyAddStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"emergencyRemoveStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageIndex\",\"type\":\"uint256\"}],\"name\":\"getAllDelegatorsInPagination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"delegatorsTotalNumber\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"delegatorsInPage\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getDelegatorsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakerAddressesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakers\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"getStakesInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"getUndelegations\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"internalType\":\"structIL2Staking.Undelegation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencersMaxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_undelegateLockEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"_stakers\",\"type\":\"tuple[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStakingTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSequencerSetSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nonce\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nonce\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"removeStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStartTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStarted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerSetMaxSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commission\",\"type\":\"uint256\"}],\"name\":\"setCommissionRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakerAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerDelegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalDelegationAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerRankings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ranking\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"undelegateLockEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"undelegateStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"undelegations\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"}],\"name\":\"updateRewardStartTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sequencerSetMaxSize\",\"type\":\"uint256\"}],\"name\":\"updateSequencerSetMaxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x61012060405234801562000011575f80fd5b506040516200514b3803806200514b8339810160408190526200003491620000a7565b7353000000000000000000000000000000000000076080526001600160a01b031660a05273530000000000000000000000000000000000001360c05273530000000000000000000000000000000000001760e05273530000000000000000000000000000000000001461010052620000d6565b5f60208284031215620000b8575f80fd5b81516001600160a01b0381168114620000cf575f80fd5b9392505050565b60805160a05160c05160e05161010051614fab620001a05f395f818161044501528181610a7c01528181610b240152818161140f01528181611b29015281816135ce0152613d5e01525f818161055a0152613bae01525f818161067c01528181613e1f01528181613ed401528181613fc6015281816141bd0152818161426a015261435c01525f81816104ff015281816124a30152612a5001525f8181610408015281816105c201528181612479015281816124cd01528181612a260152612a7a0152614fab5ff3fe608060405234801561000f575f80fd5b50600436106102ec575f3560e01c8063746c8ae111610192578063affed0e0116100e8578063e10911b111610093578063f2fde38b1161006e578063f2fde38b146106cf578063fad99f98146106e2578063fc6facc6146106ea575f80fd5b8063e10911b11461069e578063ed70b343146106a6578063f0261bc2146106c6575f80fd5b8063cce6cf9f116100c3578063cce6cf9f14610643578063d31d83d914610656578063d557714114610677575f80fd5b8063affed0e0146105f1578063b5d2e0dc146105fa578063c64814dd14610619575f80fd5b80638da5cb5b1161014857806391bd43a41161012357806391bd43a41461059e578063927ede2d146105bd57806396ab994d146105e4575f80fd5b80638da5cb5b146105445780638e21d5fb146105555780639168ae721461057c575f80fd5b80637b05afb5116101785780637b05afb5146104db578063831cfb58146104fa57806384d7d1d414610521575f80fd5b8063746c8ae1146104cb57806376671808146104d3575f80fd5b80633b8024211161024757806343352d61116101fd57806346cdc18a116101d857806346cdc18a146104a85780637046529b146104b0578063715018a6146104c3575f80fd5b806343352d611461047a578063439162b514610482578063459598a214610495575f80fd5b80633cb747bf1161022d5780633cb747bf146104065780633d9353fe1461044057806340b5c83714610467575f80fd5b80633b802421146103ea5780633c323a1b146103f3575f80fd5b8063174e31c4116102a75780632e787be3116102825780632e787be3146103ae57806330158eea146103b75780633385ccc2146103d7575f80fd5b8063174e31c41461037f57806319fac8fd146103925780632cc138be146103a5575f80fd5b80630eb573af116102d75780630eb573af1461032b5780630f3b70591461033e57806312a3e94714610376575f80fd5b806243b758146102f05780629c6f0c14610316575b5f80fd5b6103036102fe36600461465b565b6106fd565b6040519081526020015b60405180910390f35b610329610324366004614676565b610723565b005b6103296103393660046146c0565b610901565b61035161034c3660046146d7565b610a14565b604080516001600160a01b03909416845260208401929092529082015260600161030d565b610303609a5481565b61032961038d3660046146d7565b610a5c565b6103296103a03660046146c0565b610bd4565b61030360985481565b61030360995481565b6103ca6103c5366004614749565b610cf6565b60405161030d91906147e9565b6103296103e536600461465b565b610f1d565b610303609c5481565b6103296104013660046146d7565b611557565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b03909116815260200161030d565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b6103296104753660046146c0565b611be6565b6103ca611cf9565b61032961049036600461488f565b611f15565b6104286104a33660046146c0565b612446565b609d54610303565b6103296104be366004614676565b61246e565b6103296125c8565b6103296125db565b6103036128cb565b6103036104e936600461465b565b60a06020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61053461052f36600461465b565b61293f565b604051901515815260200161030d565b6033546001600160a01b0316610428565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b61058f61058a36600461465b565b612969565b60405161030d939291906148fd565b6103036105ac36600461465b565b60a16020525f908152604090205481565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b6097546105349060ff1681565b61030360a55481565b61030361060836600461465b565b609e6020525f908152604090205481565b61030361062736600461492d565b60a360209081525f928352604080842090915290825290205481565b610329610651366004614959565b612a1b565b6106696106643660046149a1565b612f87565b60405161030d929190614a16565b6104287f000000000000000000000000000000000000000000000000000000000000000081565b610329613115565b6106b96106b436600461465b565b613499565b60405161030d9190614a36565b610303609b5481565b6103296106dd36600461465b565b61352f565b6103296135bc565b6103296106f8366004614959565b61366a565b6001600160a01b0381165f90815260a26020526040812061071d90613a35565b92915050565b61072b613a3e565b8160a55481146107825760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064015b60405180910390fd5b61078d836001614ac4565b60a555609e5f6107a0602085018561465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f0361084257609d6107d5602084018461465b565b81546001810183555f9283526020808420909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039390931692909217909155609d5491609e916108289086018661465b565b6001600160a01b0316815260208101919091526040015f20555b81609f5f610853602084018461465b565b6001600160a01b0316815260208101919091526040015f206108758282614bf4565b506108859050602083018361465b565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356108c16040860186614ad7565b6040516108d093929190614d5b565b60405180910390a260975460ff161580156108ef5750609954609d5411155b156108fc576108fc613a98565b505050565b610909613a3e565b5f8111801561091a57506099548114155b61098c5760405162461bcd60e51b815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a650000000000000000000000000000000000000000000000000000000000006064820152608401610779565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff166109e157609d546109e5565b609c545b90505f60995482106109f9576099546109fb565b815b9050609b548114610a0e57610a0e613a98565b50505050565b60a4602052815f5260405f208181548110610a2d575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610a64613c18565b6001600160a01b038216610b1a576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b158015610aff575f80fd5b505af1158015610b11573d5f803e3d5ffd5b50505050610bc6565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610baf575f80fd5b505af1158015610bc1573d5f803e3d5ffd5b505050505b610bd06001606555565b5050565b335f908152609e6020526040902054610c2f5760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f776564000000000000000000000000006044820152606401610779565b6014811115610c805760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e00000000000000000000000000006044820152606401610779565b335f90815260a06020526040812082905560975460ff16610ca1575f610cb4565b610ca96128cb565b610cb4906001614ac4565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff811115610d1257610d12614b38565b604051908082528060200260200182016040528015610d5e57816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081610d305790505b5090505f5b83811015610f15576040518060600160405280609f5f888886818110610d8b57610d8b614dae565b9050602002016020810190610da0919061465b565b6001600160a01b03908116825260208083019390935260409091015f908120549091168352910190609f90888886818110610ddd57610ddd614dae565b9050602002016020810190610df2919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f888886818110610e2f57610e2f614dae565b9050602002016020810190610e44919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f206002018054610e7190614b65565b80601f0160208091040260200160405190810160405280929190818152602001828054610e9d90614b65565b8015610ee85780601f10610ebf57610100808354040283529160200191610ee8565b820191905f5260205f20905b815481529060010190602001808311610ecb57829003601f168201915b5050505050815250828281518110610f0257610f02614dae565b6020908102919091010152600101610d63565b509392505050565b610f25613c18565b6001600160a01b0381165f90815260a360209081526040808320338452909152902054610f945760405162461bcd60e51b815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f000000000000000000006044820152606401610779565b6001600160a01b0381165f908152609e60205260408120546097549015919060ff16610fc0575f610fd3565b610fc86128cb565b610fd3906001614ac4565b6097549091505f9060ff168015610fe8575082155b610ff25781610fff565b609a54610fff9083614ac4565b604080516060810182526001600160a01b038781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c51600390920201805473ffffffffffffffffffffffffffffffffffffffff191691909b16178a558251908a015551600290980197909755908452908252829055925191815260a1909252928120805494955091936110b6908490614ddb565b90915550506001600160a01b0385165f90815260a2602052604090206110dc9033613c78565b506001600160a01b0385165f908152609e602052604090205484158015611105575060975460ff165b80156111125750609c5481105b15611373576001600160a01b0386165f908152609e602052604081205461113b90600190614ddb565b90505b6001609c5461114d9190614ddb565b8110156113715760a15f609d838154811061116a5761116a614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a190609d61119f856001614ac4565b815481106111af576111af614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611369575f609d82815481106111ed576111ed614dae565b5f918252602090912001546001600160a01b03169050609d611210836001614ac4565b8154811061122057611220614dae565b5f91825260209091200154609d80546001600160a01b03909216918490811061124b5761124b614dae565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039290921691909117905580609d61128e846001614ac4565b8154811061129e5761129e614dae565b5f918252602090912001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03929092169190911790556112de826001614ac4565b609e5f609d85815481106112f4576112f4614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055611323826002614ac4565b609e5f609d611333866001614ac4565b8154811061134357611343614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b60010161113e565b505b8415801561139657506001600160a01b0386165f90815260a16020526040902054155b156113b3576001609c5f8282546113ad9190614ddb565b90915550505b6001600160a01b038681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b158015611454575f80fd5b505af1158015611466573d5f803e3d5ffd5b505050506114713390565b6001600160a01b0316866001600160a01b03167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c846020015187876040516114cc939291909283526020830191909152604082015260600190565b60405180910390a3841580156114e4575060975460ff165b80156114f25750609b548111155b80156115385750609b546001600160a01b0387165f908152609e602052604090205411806115385750609c546001600160a01b0387165f908152609e6020526040902054115b1561154557611545613a98565b50505050506115546001606555565b50565b6001600160a01b0382165f908152609e602052604090205482906115bd5760405162461bcd60e51b815260206004820152600a60248201527f6e6f74207374616b6572000000000000000000000000000000000000000000006044820152606401610779565b6115c5613c18565b5f82116116145760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e740000000000000000000000006044820152606401610779565b61161e3384613c93565b1561166b5760405162461bcd60e51b815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d6564000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a3602090815260408083203384529091529020546116e95761169c3384613d1c565b156116e95760405162461bcd60e51b815260206004820152601060248201527f72657761726420756e636c61696d6564000000000000000000000000000000006044820152606401610779565b6001600160a01b0383165f90815260a1602052604081208054849290611710908490614ac4565b90915550506001600160a01b0383165f90815260a36020908152604080832033845290915281208054849290611747908490614ac4565b90915550506001600160a01b0383165f90815260a26020526040902061176d9033613dd1565b506001600160a01b0383165f90815260a160205260409020548290036117a5576001609c5f82825461179f9190614ac4565b90915550505b6001600160a01b0383165f908152609e602052604090205460975460ff1680156117cf5750600181115b15611a15575f6117e0600183614ddb565b90505b8015611a135760a15f609d6117f9600185614ddb565b8154811061180957611809614dae565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d848154811061185a5761185a614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611a01575f609d611892600184614ddb565b815481106118a2576118a2614dae565b5f91825260209091200154609d80546001600160a01b03909216925090839081106118cf576118cf614dae565b5f918252602090912001546001600160a01b0316609d6118f0600185614ddb565b8154811061190057611900614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d838154811061193f5761193f614dae565b5f9182526020822001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0393909316929092179091558290609e90609d611986600185614ddb565b8154811061199657611996614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020556119c5826001614ac4565b609e5f609d85815481106119db576119db614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80611a0b81614dee565b9150506117e3565b505b6097545f9060ff16611a27575f611a3a565b611a2f6128cb565b611a3a906001614ac4565b6001600160a01b0386165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a36001600160a01b038581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611b6e575f80fd5b505af1158015611b80573d5f803e3d5ffd5b50505050611b95611b8e3390565b3086613de5565b60975460ff168015611ba85750609b5482115b8015611bcd57506099546001600160a01b0386165f908152609e602052604090205411155b15611bda57611bda613a98565b50506108fc6001606555565b611bee613a3e565b60975460ff1615611c415760405162461bcd60e51b815260206004820152601660248201527f72657761726420616c72656164792073746172746564000000000000000000006044820152606401610779565b4281118015611c5a5750611c586201518082614e30565b155b8015611c6857506098548114155b611cb45760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff811115611d1957611d19614b38565b604051908082528060200260200182016040528015611d6557816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081611d375790505b5090505f5b609d54811015611f0f576040518060600160405280609f5f609d8581548110611d9557611d95614dae565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609d80549390910192609f92919086908110611de157611de1614dae565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f609d8581548110611e3a57611e3a614dae565b5f9182526020808320909101546001600160a01b0316835282019290925260400190206002018054611e6b90614b65565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9790614b65565b8015611ee25780601f10611eb957610100808354040283529160200191611ee2565b820191905f5260205f20905b815481529060010190602001808311611ec557829003601f168201915b5050505050815250828281518110611efc57611efc614dae565b6020908102919091010152600101611d6a565b50919050565b5f54610100900460ff1615808015611f3357505f54600160ff909116105b80611f4c5750303b158015611f4c57505f5460ff166001145b611fbe5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610779565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561201a575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0387166120705760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e6572206164647265737300000000000000000000006044820152606401610779565b5f86116120e55760405162461bcd60e51b815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f20300000000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f85116121345760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f636873000000006044820152606401610779565b428411801561214d575061214b6201518085614e30565b155b6121995760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d65000000000000006044820152606401610779565b816121e65760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420696e697469616c207374616b6572730000000000000000006044820152606401610779565b6121ef87614096565b6121f76140f4565b6099869055609a8590556098849055609b8290555f5b609b548110156123685783838281811061222957612229614dae565b905060200281019061223b9190614e43565b609f5f86868581811061225057612250614dae565b90506020028101906122629190614e43565b61227090602081019061465b565b6001600160a01b0316815260208101919091526040015f206122928282614bf4565b905050609d8484838181106122a9576122a9614dae565b90506020028101906122bb9190614e43565b6122c990602081019061465b565b8154600180820184555f938452602090932001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055612312908290614ac4565b609e5f86868581811061232757612327614dae565b90506020028101906123399190614e43565b61234790602081019061465b565b6001600160a01b0316815260208101919091526040015f205560010161220d565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561243d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612455575f80fd5b5f918252602090912001546001600160a01b0316905081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561255657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612527573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061254b9190614e7f565b6001600160a01b0316145b61072b5760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b6125d0613a3e565b6125d95f614096565b565b6125e3613a3e565b60985442101561265a5760405162461bcd60e51b8152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d65000000000000000000000000000000000000000000000000000000006064820152608401610779565b5f609c54116126ab5760405162461bcd60e51b815260206004820152600e60248201527f6e6f6e652063616e6469646174650000000000000000000000000000000000006044820152606401610779565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612868575f5b8181101561285f5760a15f609d838154811061270457612704614dae565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d858154811061275557612755614dae565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612857575f609d828154811061279357612793614dae565b5f91825260209091200154609d80546001600160a01b03909216925090849081106127c0576127c0614dae565b5f91825260209091200154609d80546001600160a01b0390921691849081106127eb576127eb614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d848154811061282a5761282a614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b6001016126e6565b506001016126da565b505f5b609d548110156128c257612880816001614ac4565b609e5f609d848154811061289657612896614dae565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205560010161286b565b506125d9613a98565b5f60985442101561291e5760405162461bcd60e51b815260206004820152601960248201527f726577617264206973206e6f74207374617274656420796574000000000000006044820152606401610779565b62015180609854426129309190614ddb565b61293a9190614e9a565b905090565b6001600160a01b0381165f90815260a360209081526040808320338452909152812054151561071d565b609f6020525f90815260409020805460018201546002830180546001600160a01b0390931693919261299a90614b65565b80601f01602080910402602001604051908101604052809291908181526020018280546129c690614b65565b8015612a115780601f106129e857610100808354040283529160200191612a11565b820191905f5260205f20905b8154815290600101906020018083116129f457829003601f168201915b5050505050905083565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016148015612b0357507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ad4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612af89190614e7f565b6001600160a01b0316145b612b755760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f77656400000000000000000000000000000000000000006064820152608401610779565b8260a5548114612bc75760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b612bd2846001614ac4565b60a5555f805b83811015612f3857609b54609e5f878785818110612bf857612bf8614dae565b9050602002016020810190612c0d919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205411612c3757600191505b5f609e5f878785818110612c4d57612c4d614dae565b9050602002016020810190612c62919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba575f6001609e5f888886818110612ca057612ca0614dae565b9050602002016020810190612cb5919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f2054612cdf9190614ddb565b90505b609d54612cf190600190614ddb565b811015612dc357609d612d05826001614ac4565b81548110612d1557612d15614dae565b5f91825260209091200154609d80546001600160a01b039092169183908110612d4057612d40614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d8481548110612d8357612d83614dae565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190612db6908490614ddb565b9091555050600101612ce2565b50609d805480612dd557612dd5614ead565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e90868684818110612e1a57612e1a614dae565b9050602002016020810190612e2f919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f878785818110612e6757612e67614dae565b9050602002016020810190612e7c919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115612eba576001609c5f828254612eb49190614ddb565b90915550505b609f5f868684818110612ecf57612ecf614dae565b9050602002016020810190612ee4919061465b565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590612f2e60028301826145fd565b5050600101612bd8565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618484604051612f6a929190614eda565b60405180910390a18015612f8057612f80613a98565b5050505050565b5f60605f8411612fd95760405162461bcd60e51b815260206004820152601160248201527f696e76616c696420706167652073697a650000000000000000000000000000006044820152606401610779565b6001600160a01b0385165f90815260a260205260409020612ff990613a35565b91508367ffffffffffffffff81111561301457613014614b38565b60405190808252806020026020018201604052801561303d578160200160208202803683370190505b5090505f61304b8486614f27565b90505f600161305a8682614ac4565b6130649088614f27565b61306e9190614ddb565b905061307b600185614ddb565b8111156130905761308d600185614ddb565b90505b815f5b828211613109576130c7826130a781614f3e565b6001600160a01b038c165f90815260a26020526040902090945090614178565b85826130d281614f3e565b9350815181106130e4576130e4614dae565b60200260200101906001600160a01b031690816001600160a01b031681525050613093565b50505050935093915050565b61311d613c18565b335f90815260a46020526040812054815b818110156134335760975460ff16158061317e575061314b6128cb565b335f90815260a46020526040902080548390811061316b5761316b614dae565b905f5260205f2090600302016002015411155b1561342157335f90815260a4602052604090208054829081106131a3576131a3614dae565b905f5260205f20906003020160010154836131be9190614ac4565b335f90815260a46020526040812080549295509091839081106131e3576131e3614dae565b5f91825260208220600390910201546001600160a01b0316915060a4816132073390565b6001600160a01b03166001600160a01b031681526020019081526020015f20838154811061323757613237614dae565b905f5260205f2090600302016002015490505f60a45f6132543390565b6001600160a01b03166001600160a01b031681526020019081526020015f20848154811061328457613284614dae565b905f5260205f2090600302016001015490506001856132a39190614ddb565b84101561336857335f90815260a4602052604090206132c3600187614ddb565b815481106132d3576132d3614dae565b905f5260205f20906003020160a45f6132e93390565b6001600160a01b03166001600160a01b031681526020019081526020015f20858154811061331957613319614dae565b5f91825260209091208254600390920201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909216919091178155600180830154908201556002918201549101555b335f90815260a46020526040902080548061338557613385614ead565b5f8281526020812060035f1990930192830201805473ffffffffffffffffffffffffffffffffffffffff19168155600181810183905560029091019190915591556133d09086614ddb565b604080518481526020810184905291965033916001600160a01b038616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a350505061312e565b61342c816001614ac4565b905061312e565b505f82116134835760405162461bcd60e51b815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d0000000000000000006044820152606401610779565b61348d3383614183565b50506125d96001606555565b6001600160a01b0381165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613524575f848152602090819020604080516060810182526003860290920180546001600160a01b03168352600180820154848601526002909101549183019190915290835290920191016134d0565b505050509050919050565b613537613a3e565b6001600160a01b0381166135b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610779565b61155481614096565b6135c4613c18565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b15801561364a575f80fd5b505af115801561365c573d5f803e3d5ffd5b505050506125d96001606555565b613672613a3e565b8260a55481146136c45760405162461bcd60e51b815260206004820152600d60248201527f696e76616c6964206e6f6e6365000000000000000000000000000000000000006044820152606401610779565b6136cf846001614ac4565b60a5555f805b83811015612f3857609b54609e5f8787858181106136f5576136f5614dae565b905060200201602081019061370a919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20541161373457600191505b5f609e5f87878581811061374a5761374a614dae565b905060200201602081019061375f919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7575f6001609e5f88888681811061379d5761379d614dae565b90506020020160208101906137b2919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f20546137dc9190614ddb565b90505b609d546137ee90600190614ddb565b8110156138c057609d613802826001614ac4565b8154811061381257613812614dae565b5f91825260209091200154609d80546001600160a01b03909216918390811061383d5761383d614dae565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d848154811061388057613880614dae565b5f9182526020808320909101546001600160a01b03168352820192909252604001812080549091906138b3908490614ddb565b90915550506001016137df565b50609d8054806138d2576138d2614ead565b5f8281526020812082015f19908101805473ffffffffffffffffffffffffffffffffffffffff19169055909101909155609e9086868481811061391757613917614dae565b905060200201602081019061392c919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f87878581811061396457613964614dae565b9050602002016020810190613979919061465b565b6001600160a01b03166001600160a01b031681526020019081526020015f205411156139b7576001609c5f8282546139b19190614ddb565b90915550505b609f5f8686848181106139cc576139cc614dae565b90506020020160208101906139e1919061465b565b6001600160a01b0316815260208101919091526040015f908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905590613a2b60028301826145fd565b50506001016136d5565b5f61071d825490565b6033546001600160a01b031633146125d95760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610779565b60995460975460ff1615613abc57609954609c541015613ab75750609c545b613acd565b609954609d541015613acd5750609d545b5f8167ffffffffffffffff811115613ae757613ae7614b38565b604051908082528060200260200182016040528015613b10578160200160208202803683370190505b5090505f5b82811015613b7d57609d8181548110613b3057613b30614dae565b905f5260205f20015f9054906101000a90046001600160a01b0316828281518110613b5d57613b5d614dae565b6001600160a01b0390921660209283029190910190910152600101613b15565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490613be3908490600401614f56565b5f604051808303815f87803b158015613bfa575f80fd5b505af1158015613c0c573d5f803e3d5ffd5b50509151609b55505050565b600260655403613c6a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610779565b6002606555565b6001606555565b5f613c8c836001600160a01b03841661442c565b9392505050565b5f805b6001600160a01b0384165f90815260a46020526040902054811015613d13576001600160a01b038481165f90815260a46020526040902080549185169183908110613ce357613ce3614dae565b5f9182526020909120600390910201546001600160a01b031603613d0b57600191505061071d565b600101613c96565b505f9392505050565b6040517fde6ac9330000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015613da5573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613dc99190614f68565b159392505050565b5f613c8c836001600160a01b03841661450f565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613e66573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e8a9190614f87565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015613f1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613f409190614f68565b613f8c5760405162461bcd60e51b815260206004820152601360248201527f7472616e7366657246726f6d206661696c6564000000000000000000000000006044820152606401610779565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561400d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906140319190614f87565b90505f8311801561404a5750826140488383614ddb565b145b612f805760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166141705760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b6125d961455b565b5f613c8c83836145d7565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614204573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142289190614f87565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af11580156142b2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142d69190614f68565b6143225760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c656400000000000000000000000000000000006044820152606401610779565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156143a3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143c79190614f87565b90505f831180156143e05750826143de8383614ddb565b145b610a0e5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c656400000000006044820152606401610779565b5f8181526001830160205260408120548015614506575f61444e600183614ddb565b85549091505f9061446190600190614ddb565b90508181146144c0575f865f01828154811061447f5761447f614dae565b905f5260205f200154905080875f01848154811061449f5761449f614dae565b5f918252602080832090910192909255918252600188019052604090208390555b85548690806144d1576144d1614ead565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061071d565b5f91505061071d565b5f81815260018301602052604081205461455457508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561071d565b505f61071d565b5f54610100900460ff16613c715760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610779565b5f825f0182815481106145ec576145ec614dae565b905f5260205f200154905092915050565b50805461460990614b65565b5f825580601f10614618575050565b601f0160209004905f5260205f209081019061155491905b80821115614643575f8155600101614630565b5090565b6001600160a01b0381168114611554575f80fd5b5f6020828403121561466b575f80fd5b8135613c8c81614647565b5f8060408385031215614687575f80fd5b82359150602083013567ffffffffffffffff8111156146a4575f80fd5b8301606081860312156146b5575f80fd5b809150509250929050565b5f602082840312156146d0575f80fd5b5035919050565b5f80604083850312156146e8575f80fd5b82356146f381614647565b946020939093013593505050565b5f8083601f840112614711575f80fd5b50813567ffffffffffffffff811115614728575f80fd5b6020830191508360208260051b8501011115614742575f80fd5b9250929050565b5f806020838503121561475a575f80fd5b823567ffffffffffffffff811115614770575f80fd5b61477c85828601614701565b90969095509350505050565b5f81518084525f5b818110156147ac57602081850181015186830182015201614790565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015614881578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b031684528781015188850152860151606087850181905261486d81860183614788565b968901969450505090860190600101614810565b509098975050505050505050565b5f805f805f8060a087890312156148a4575f80fd5b86356148af81614647565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff8111156148df575f80fd5b6148eb89828a01614701565b979a9699509497509295939492505050565b6001600160a01b0384168152826020820152606060408201525f6149246060830184614788565b95945050505050565b5f806040838503121561493e575f80fd5b823561494981614647565b915060208301356146b581614647565b5f805f6040848603121561496b575f80fd5b83359250602084013567ffffffffffffffff811115614988575f80fd5b61499486828701614701565b9497909650939450505050565b5f805f606084860312156149b3575f80fd5b83356149be81614647565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b83811015614a0b5781516001600160a01b0316875295820195908201906001016149e6565b509495945050505050565b828152604060208201525f614a2e60408301846149d3565b949350505050565b602080825282518282018190525f919060409081850190868401855b82811015614a8a57815180516001600160a01b0316855286810151878601528501518585015260609093019290850190600101614a52565b5091979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561071d5761071d614a97565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614b0a575f80fd5b83018035915067ffffffffffffffff821115614b24575f80fd5b602001915036819003821315614742575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c90821680614b7957607f821691505b602082108103611f0f577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156108fc57805f5260205f20601f840160051c81016020851015614bd55750805b601f840160051c820191505b81811015612f80575f8155600101614be1565b8135614bff81614647565b6001600160a01b03811673ffffffffffffffffffffffffffffffffffffffff1983541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112614c6b575f80fd5b8501803567ffffffffffffffff811115614c83575f80fd5b8036038483011315614c93575f80fd5b614ca781614ca18554614b65565b85614bb0565b5f601f821160018114614cda575f8315614cc357508382018601355b5f19600385901b1c1916600184901b178555614d50565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015614d2657868501890135825593880193908901908801614d07565b5084821015614d44575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181038181111561071d5761071d614a97565b5f81614dfc57614dfc614a97565b505f190190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82614e3e57614e3e614e03565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112614e75575f80fd5b9190910192915050565b5f60208284031215614e8f575f80fd5b8151613c8c81614647565b5f82614ea857614ea8614e03565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015614f1c578235614f0181614647565b6001600160a01b031682529183019190830190600101614eee565b509695505050505050565b808202811582820484141761071d5761071d614a97565b5f5f198203614f4f57614f4f614a97565b5060010190565b602081525f613c8c60208301846149d3565b5f60208284031215614f78575f80fd5b81518015158114613c8c575f80fd5b5f60208284031215614f97575f80fd5b505191905056fea164736f6c6343000818000a", + ABI: "[{\"inputs\":[{\"internalType\":\"addresspayable\",\"name\":\"_otherStaking\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"percentage\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"epochEffective\",\"type\":\"uint256\"}],\"name\":\"CommissionUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"stakeAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTime\",\"type\":\"uint256\"}],\"name\":\"RewardStartTimeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"oldSize\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newSize\",\"type\":\"uint256\"}],\"name\":\"SequencerSetMaxSizeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"name\":\"StakerAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"StakerRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"effectiveEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"name\":\"Undelegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UndelegationClaimed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DISTRIBUTE_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MESSENGER\",\"outputs\":[{\"internalType\":\"contractICrossDomainMessenger\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MORPH_TOKEN_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OTHER_STAKING\",\"outputs\":[{\"internalType\":\"contractStaking\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SEQUENCER_CONTRACT\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo\",\"name\":\"add\",\"type\":\"tuple\"}],\"name\":\"addStaker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"candidateNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimCommission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"targetEpochIndex\",\"type\":\"uint256\"}],\"name\":\"claimReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimUndelegation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"commissions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentEpoch\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"delegateStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"delegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"pageSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"pageIndex\",\"type\":\"uint256\"}],\"name\":\"getAllDelegatorsInPagination\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"delegatorsTotalNumber\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"delegatorsInPage\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"getDelegatorsLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakerAddressesLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakers\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_stakerAddresses\",\"type\":\"address[]\"}],\"name\":\"getStakesInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"getUndelegations\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"internalType\":\"structIL2Staking.Undelegation[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sequencersMaxSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_undelegateLockEpochs\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"internalType\":\"structTypes.StakerInfo[]\",\"name\":\"_stakers\",\"type\":\"tuple[]\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"isStakingTo\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"latestSequencerSetSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"messenger\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"remove\",\"type\":\"address[]\"}],\"name\":\"removeStakers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStartTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardStarted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sequencerSetMaxSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"commission\",\"type\":\"uint256\"}],\"name\":\"setCommissionRate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakerAddresses\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerDelegations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalDelegationAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakerRankings\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"ranking\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"staker\",\"type\":\"address\"}],\"name\":\"stakers\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"tmKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes\",\"name\":\"blsKey\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startReward\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"undelegateLockEpochs\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"undelegateStake\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"undelegations\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"unlockEpoch\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardStartTime\",\"type\":\"uint256\"}],\"name\":\"updateRewardStartTime\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sequencerSetMaxSize\",\"type\":\"uint256\"}],\"name\":\"updateSequencerSetMaxSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x61012060405234801562000011575f80fd5b5060405162004bf338038062004bf38339810160408190526200003491620000a7565b7353000000000000000000000000000000000000076080526001600160a01b031660a05273530000000000000000000000000000000000001360c05273530000000000000000000000000000000000001760e05273530000000000000000000000000000000000001461010052620000d6565b5f60208284031215620000b8575f80fd5b81516001600160a01b0381168114620000cf575f80fd5b9392505050565b60805160a05160c05160e05161010051614a53620001a05f395f818161042501528181610d7401528181610e1c0152818161172801528181611e4d0152818161350a01526138cf01525f818161053a01526136c501525f81816106400152818161399001528181613a4501528181613aec01528181613cf501528181613da20152613e4901525f81816104df0152818161070901526127d201525f81816103e8015281816105a2015281816106df01528181610733015281816127a801526127fc0152614a535ff3fe608060405234801561000f575f80fd5b50600436106102cc575f3560e01c8063715018a61161017c578063927ede2d116100dd578063d557714111610093578063f0261bc21161006e578063f0261bc21461068a578063f2fde38b14610693578063fad99f98146106a6575f80fd5b8063d55771411461063b578063e10911b114610662578063ed70b3431461066a575f80fd5b8063b5d2e0dc116100c3578063b5d2e0dc146105d1578063c64814dd146105f0578063d31d83d91461061a575f80fd5b8063927ede2d1461059d57806396ab994d146105c4575f80fd5b806384d7d1d4116101325780638e21d5fb116101185780638e21d5fb146105355780639168ae721461055c57806391bd43a41461057e575f80fd5b806384d7d1d4146105015780638da5cb5b14610524575f80fd5b8063766718081161016257806376671808146104b35780637b05afb5146104bb578063831cfb58146104da575f80fd5b8063715018a6146104a3578063746c8ae1146104ab575f80fd5b80633385ccc21161023157806340b5c837116101e7578063459598a2116101c2578063459598a21461047557806346cdc18a146104885780636d454d5114610490575f80fd5b806340b5c8371461044757806343352d611461045a578063439162b514610462575f80fd5b80633c323a1b116102175780633c323a1b146103d35780633cb747bf146103e65780633d9353fe14610420575f80fd5b80633385ccc2146103b75780633b802421146103ca575f80fd5b8063174e31c4116102865780632cc138be1161026c5780632cc138be146103855780632e787be31461038e57806330158eea14610397575f80fd5b8063174e31c41461035f57806319fac8fd14610372575f80fd5b80630eb573af116102b65780630eb573af1461030b5780630f3b70591461031e57806312a3e94714610356575f80fd5b806243b758146102d05780630be67fcc146102f6575b5f80fd5b6102e36102de366004614148565b6106ae565b6040519081526020015b60405180910390f35b6103096103043660046141ab565b6106d4565b005b6103096103193660046141ea565b610bf9565b61033161032c366004614201565b610d0c565b604080516001600160a01b0390941684526020840192909252908201526060016102ed565b6102e3609a5481565b61030961036d366004614201565b610d54565b6103096103803660046141ea565b610ecc565b6102e360985481565b6102e360995481565b6103aa6103a53660046141ab565b610fee565b6040516102ed919061428c565b6103096103c5366004614148565b611215565b6102e3609c5481565b6103096103e1366004614201565b611870565b7f00000000000000000000000000000000000000000000000000000000000000005b6040516001600160a01b0390911681526020016102ed565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b6103096104553660046141ea565b611f0a565b6103aa61201d565b610309610470366004614332565b612239565b6104086104833660046141ea565b612775565b609d546102e3565b61030961049e3660046143a0565b61279d565b610309612a6e565b610309612a81565b6102e3612d71565b6102e36104c9366004614148565b60a06020525f908152604090205481565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b61051461050f366004614148565b612de5565b60405190151581526020016102ed565b6033546001600160a01b0316610408565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b61056f61056a366004614148565b612e0f565b6040516102ed939291906143d7565b6102e361058c366004614148565b60a16020525f908152604090205481565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b6097546105149060ff1681565b6102e36105df366004614148565b609e6020525f908152604090205481565b6102e36105fe366004614407565b60a360209081525f928352604080842090915290825290205481565b61062d61062836600461443e565b612ec1565b6040516102ed9291906144b3565b6104087f000000000000000000000000000000000000000000000000000000000000000081565b61030961303b565b61067d610678366004614148565b6133d5565b6040516102ed91906144d3565b6102e3609b5481565b6103096106a1366004614148565b61346b565b6103096134f8565b6001600160a01b0381165f90815260a2602052604081206106ce906135a6565b92915050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156107bc57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b19190614534565b6001600160a01b0316145b6108335760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f805b82811015610bac57609b54609e5f8686858181106108565761085661454f565b905060200201602081019061086b9190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20541161089557600191505b5f609e5f8686858181106108ab576108ab61454f565b90506020020160208101906108c09190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115610b23575f6001609e5f8787868181106108fe576108fe61454f565b90506020020160208101906109139190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f205461093d91906145a9565b90505b609d5461094f906001906145a9565b811015610a2157609d6109638260016145bc565b815481106109735761097361454f565b5f91825260209091200154609d80546001600160a01b03909216918390811061099e5761099e61454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506001609e5f609d84815481106109e1576109e161454f565b5f9182526020808320909101546001600160a01b0316835282019290925260400181208054909190610a149084906145a9565b9091555050600101610940565b50609d805480610a3357610a336145cf565b5f8281526020812082015f1990810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e90858584818110610a8357610a8361454f565b9050602002016020810190610a989190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f205f90555f60a15f868685818110610ad057610ad061454f565b9050602002016020810190610ae59190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20541115610b23576001609c5f828254610b1d91906145a9565b90915550505b609f5f858584818110610b3857610b3861454f565b9050602002016020810190610b4d9190614148565b6001600160a01b0316815260208101919091526040015f90812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905590610ba260028301826140ea565b5050600101610836565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618383604051610bde9291906145fc565b60405180910390a18015610bf457610bf46135af565b505050565b610c0161372f565b5f81118015610c1257506099548114155b610c845760405162461bcd60e51b815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a65000000000000000000000000000000000000000000000000000000000000606482015260840161082a565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff16610cd957609d54610cdd565b609c545b90505f6099548210610cf157609954610cf3565b815b9050609b548114610d0657610d066135af565b50505050565b60a4602052815f5260405f208181548110610d25575f80fd5b5f9182526020909120600390910201805460018201546002909201546001600160a01b03909116935090915083565b610d5c613789565b6001600160a01b038216610e12576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018490526044015f604051808303815f87803b158015610df7575f80fd5b505af1158015610e09573d5f803e3d5ffd5b50505050610ebe565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610ea7575f80fd5b505af1158015610eb9573d5f803e3d5ffd5b505050505b610ec86001606555565b5050565b335f908152609e6020526040902054610f275760405162461bcd60e51b815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f77656400000000000000000000000000604482015260640161082a565b6014811115610f785760405162461bcd60e51b815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e0000000000000000000000000000604482015260640161082a565b335f90815260a06020526040812082905560975460ff16610f99575f610fac565b610fa1612d71565b610fac9060016145bc565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff81111561100a5761100a614649565b60405190808252806020026020018201604052801561105657816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816110285790505b5090505f5b8381101561120d576040518060600160405280609f5f8888868181106110835761108361454f565b90506020020160208101906110989190614148565b6001600160a01b03908116825260208083019390935260409091015f908120549091168352910190609f908888868181106110d5576110d561454f565b90506020020160208101906110ea9190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f8888868181106111275761112761454f565b905060200201602081019061113c9190614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20600201805461116990614676565b80601f016020809104026020016040519081016040528092919081815260200182805461119590614676565b80156111e05780601f106111b7576101008083540402835291602001916111e0565b820191905f5260205f20905b8154815290600101906020018083116111c357829003601f168201915b50505050508152508282815181106111fa576111fa61454f565b602090810291909101015260010161105b565b509392505050565b61121d613789565b6001600160a01b0381165f90815260a36020908152604080832033845290915290205461128c5760405162461bcd60e51b815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f00000000000000000000604482015260640161082a565b6001600160a01b0381165f908152609e60205260408120546097549015919060ff166112b8575f6112cb565b6112c0612d71565b6112cb9060016145bc565b6097549091505f9060ff1680156112e0575082155b6112ea57816112f7565b609a546112f790836145bc565b604080516060810182526001600160a01b038781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c5160039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909b16178a558251908a015551600290980197909755908452908252829055925191815260a1909252928120805494955091936113b99084906145a9565b90915550506001600160a01b0385165f90815260a2602052604090206113df90336137e9565b506001600160a01b0385165f908152609e602052604090205484158015611408575060975460ff165b80156114155750609c5481105b1561168c576001600160a01b0386165f908152609e602052604081205461143e906001906145a9565b90505b6001609c5461145091906145a9565b81101561168a5760a15f609d838154811061146d5761146d61454f565b5f9182526020808320909101546001600160a01b031683528201929092526040018120549060a190609d6114a28560016145bc565b815481106114b2576114b261454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611682575f609d82815481106114f0576114f061454f565b5f918252602090912001546001600160a01b03169050609d6115138360016145bc565b815481106115235761152361454f565b5f91825260209091200154609d80546001600160a01b03909216918490811061154e5761154e61454f565b5f91825260209091200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039290921691909117905580609d61159c8460016145bc565b815481106115ac576115ac61454f565b5f91825260209091200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03929092169190911790556115f78260016145bc565b609e5f609d858154811061160d5761160d61454f565b5f9182526020808320909101546001600160a01b0316835282019290925260400190205561163c8260026145bc565b609e5f609d61164c8660016145bc565b8154811061165c5761165c61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b600101611441565b505b841580156116af57506001600160a01b0386165f90815260a16020526040902054155b156116cc576001609c5f8282546116c691906145a9565b90915550505b6001600160a01b038681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b15801561176d575f80fd5b505af115801561177f573d5f803e3d5ffd5b5050505061178a3390565b6001600160a01b0316866001600160a01b03167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c846020015187876040516117e5939291909283526020830191909152604082015260600190565b60405180910390a3841580156117fd575060975460ff165b801561180b5750609b548111155b80156118515750609b546001600160a01b0387165f908152609e602052604090205411806118515750609c546001600160a01b0387165f908152609e6020526040902054115b1561185e5761185e6135af565b505050505061186d6001606555565b50565b6001600160a01b0382165f908152609e602052604090205482906118d65760405162461bcd60e51b815260206004820152600a60248201527f6e6f74207374616b657200000000000000000000000000000000000000000000604482015260640161082a565b6118de613789565b5f821161192d5760405162461bcd60e51b815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e74000000000000000000000000604482015260640161082a565b6119373384613804565b156119845760405162461bcd60e51b815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d656400000000000000000000604482015260640161082a565b6001600160a01b0383165f90815260a360209081526040808320338452909152902054611a02576119b5338461388d565b15611a025760405162461bcd60e51b815260206004820152601060248201527f72657761726420756e636c61696d656400000000000000000000000000000000604482015260640161082a565b6001600160a01b0383165f90815260a1602052604081208054849290611a299084906145bc565b90915550506001600160a01b0383165f90815260a36020908152604080832033845290915281208054849290611a609084906145bc565b90915550506001600160a01b0383165f90815260a260205260409020611a869033613942565b506001600160a01b0383165f90815260a16020526040902054829003611abe576001609c5f828254611ab891906145bc565b90915550505b6001600160a01b0383165f908152609e602052604090205460975460ff168015611ae85750600181115b15611d39575f611af96001836145a9565b90505b8015611d375760a15f609d611b126001856145a9565b81548110611b2257611b2261454f565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d8481548110611b7357611b7361454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115611d25575f609d611bab6001846145a9565b81548110611bbb57611bbb61454f565b5f91825260209091200154609d80546001600160a01b0390921692509083908110611be857611be861454f565b5f918252602090912001546001600160a01b0316609d611c096001856145a9565b81548110611c1957611c1961454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d8381548110611c5857611c5861454f565b5f918252602082200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0393909316929092179091558290609e90609d611caa6001856145a9565b81548110611cba57611cba61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055611ce98260016145bc565b609e5f609d8581548110611cff57611cff61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055505b80611d2f816146c1565b915050611afc565b505b6097545f9060ff16611d4b575f611d5e565b611d53612d71565b611d5e9060016145bc565b6001600160a01b0386165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a36001600160a01b038581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611e92575f80fd5b505af1158015611ea4573d5f803e3d5ffd5b50505050611eb9611eb23390565b3086613956565b60975460ff168015611ecc5750609b5482115b8015611ef157506099546001600160a01b0386165f908152609e602052604090205411155b15611efe57611efe6135af565b5050610bf46001606555565b611f1261372f565b60975460ff1615611f655760405162461bcd60e51b815260206004820152601660248201527f72657761726420616c7265616479207374617274656400000000000000000000604482015260640161082a565b4281118015611f7e5750611f7c6201518082614703565b155b8015611f8c57506098548114155b611fd85760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d6500000000000000604482015260640161082a565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff81111561203d5761203d614649565b60405190808252806020026020018201604052801561208957816020015b60408051606080820183525f80835260208301529181019190915281526020019060019003908161205b5790505b5090505f5b609d54811015612233576040518060600160405280609f5f609d85815481106120b9576120b961454f565b5f9182526020808320909101546001600160a01b0390811684528382019490945260409092018120549092168352609d80549390910192609f929190869081106121055761210561454f565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f20600101548152602001609f5f609d858154811061215e5761215e61454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020600201805461218f90614676565b80601f01602080910402602001604051908101604052809291908181526020018280546121bb90614676565b80156122065780601f106121dd57610100808354040283529160200191612206565b820191905f5260205f20905b8154815290600101906020018083116121e957829003601f168201915b50505050508152508282815181106122205761222061454f565b602090810291909101015260010161208e565b50919050565b5f54610100900460ff161580801561225757505f54600160ff909116105b806122705750303b15801561227057505f5460ff166001145b6122e25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161082a565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561233e575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6001600160a01b0387166123945760405162461bcd60e51b815260206004820152601560248201527f696e76616c6964206f776e657220616464726573730000000000000000000000604482015260640161082a565b5f86116124095760405162461bcd60e51b815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f2030000000000000000000000000000000000000000000000000000000000000606482015260840161082a565b5f85116124585760405162461bcd60e51b815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f63687300000000604482015260640161082a565b4284118015612471575061246f6201518085614703565b155b6124bd5760405162461bcd60e51b815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d6500000000000000604482015260640161082a565b8161250a5760405162461bcd60e51b815260206004820152601760248201527f696e76616c696420696e697469616c207374616b657273000000000000000000604482015260640161082a565b61251387613bc3565b61251b613c2c565b6099869055609a8590556098849055609b8290555f5b609b548110156126975783838281811061254d5761254d61454f565b905060200281019061255f9190614716565b609f5f8686858181106125745761257461454f565b90506020028101906125869190614716565b612594906020810190614148565b6001600160a01b0316815260208101919091526040015f206125b682826147f7565b905050609d8484838181106125cd576125cd61454f565b90506020028101906125df9190614716565b6125ed906020810190614148565b8154600180820184555f93845260209093200180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03929092169190911790556126419082906145bc565b609e5f8686858181106126565761265661454f565b90506020028101906126689190614716565b612676906020810190614148565b6001600160a01b0316815260208101919091526040015f2055600101612531565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a1801561276c575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612784575f80fd5b5f918252602090912001546001600160a01b0316905081565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561288557507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612856573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061287a9190614534565b6001600160a01b0316145b6128f75760405162461bcd60e51b815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f7765640000000000000000000000000000000000000000606482015260840161082a565b609e5f6129076020840184614148565b6001600160a01b03166001600160a01b031681526020019081526020015f20545f036129b457609d61293c6020830183614148565b81546001810183555f928352602080842090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039390931692909217909155609d5491609e9161299a90850185614148565b6001600160a01b0316815260208101919091526040015f20555b80609f5f6129c56020840184614148565b6001600160a01b0316815260208101919091526040015f206129e782826147f7565b506129f790506020820182614148565b6001600160a01b03167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d6020830135612a336040850185614752565b604051612a4293929190614969565b60405180910390a260975460ff16158015612a615750609954609d5411155b1561186d5761186d6135af565b612a7661372f565b612a7f5f613bc3565b565b612a8961372f565b609854421015612b005760405162461bcd60e51b8152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d6500000000000000000000000000000000000000000000000000000000606482015260840161082a565b5f609c5411612b515760405162461bcd60e51b815260206004820152600e60248201527f6e6f6e652063616e646964617465000000000000000000000000000000000000604482015260640161082a565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612d0e575f5b81811015612d055760a15f609d8381548110612baa57612baa61454f565b905f5260205f20015f9054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020015f205460a15f609d8581548110612bfb57612bfb61454f565b5f9182526020808320909101546001600160a01b031683528201929092526040019020541115612cfd575f609d8281548110612c3957612c3961454f565b5f91825260209091200154609d80546001600160a01b0390921692509084908110612c6657612c6661454f565b5f91825260209091200154609d80546001600160a01b039092169184908110612c9157612c9161454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b0316021790555080609d8481548110612cd057612cd061454f565b905f5260205f20015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550505b600101612b8c565b50600101612b80565b505f5b609d54811015612d6857612d268160016145bc565b609e5f609d8481548110612d3c57612d3c61454f565b5f9182526020808320909101546001600160a01b03168352820192909252604001902055600101612d11565b50612a7f6135af565b5f609854421015612dc45760405162461bcd60e51b815260206004820152601960248201527f726577617264206973206e6f7420737461727465642079657400000000000000604482015260640161082a565b6201518060985442612dd691906145a9565b612de091906149bc565b905090565b6001600160a01b0381165f90815260a36020908152604080832033845290915281205415156106ce565b609f6020525f90815260409020805460018201546002830180546001600160a01b03909316939192612e4090614676565b80601f0160208091040260200160405190810160405280929190818152602001828054612e6c90614676565b8015612eb75780601f10612e8e57610100808354040283529160200191612eb7565b820191905f5260205f20905b815481529060010190602001808311612e9a57829003601f168201915b5050505050905083565b5f60605f8411612f135760405162461bcd60e51b815260206004820152601160248201527f696e76616c696420706167652073697a65000000000000000000000000000000604482015260640161082a565b6001600160a01b0385165f90815260a260205260409020612f33906135a6565b91508367ffffffffffffffff811115612f4e57612f4e614649565b604051908082528060200260200182016040528015612f77578160200160208202803683370190505b5090505f612f8584866149cf565b90505f6001612f9486826145bc565b612f9e90886149cf565b612fa891906145a9565b9050612fb56001856145a9565b811115612fca57612fc76001856145a9565b90505b815b818111613030576001600160a01b0388165f90815260a260205260409020612ff49082613cb0565b8482815181106130065761300661454f565b6001600160a01b039092166020928302919091019091015280613028816149e6565b915050612fcc565b505050935093915050565b613043613789565b335f90815260a46020526040812054815b8181101561336f5760975460ff1615806130a45750613071612d71565b335f90815260a4602052604090208054839081106130915761309161454f565b905f5260205f2090600302016002015411155b1561335d57335f90815260a4602052604090208054829081106130c9576130c961454f565b905f5260205f20906003020160010154836130e491906145bc565b335f90815260a46020526040812080549295509091839081106131095761310961454f565b5f91825260208220600390910201546001600160a01b0316915060a48161312d3390565b6001600160a01b03166001600160a01b031681526020019081526020015f20838154811061315d5761315d61454f565b905f5260205f2090600302016002015490505f60a45f61317a3390565b6001600160a01b03166001600160a01b031681526020019081526020015f2084815481106131aa576131aa61454f565b905f5260205f2090600302016001015490506001856131c991906145a9565b84101561329957335f90815260a4602052604090206131e96001876145a9565b815481106131f9576131f961454f565b905f5260205f20906003020160a45f61320f3390565b6001600160a01b03166001600160a01b031681526020019081526020015f20858154811061323f5761323f61454f565b5f9182526020909120825460039092020180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909216919091178155600180830154908201556002918201549101555b335f90815260a4602052604090208054806132b6576132b66145cf565b5f8281526020812060035f199093019283020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001818101839055600290910191909155915561330c90866145a9565b604080518481526020810184905291965033916001600160a01b038616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a3505050613054565b6133688160016145bc565b9050613054565b505f82116133bf5760405162461bcd60e51b815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d000000000000000000604482015260640161082a565b6133c93383613cbb565b5050612a7f6001606555565b6001600160a01b0381165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613460575f848152602090819020604080516060810182526003860290920180546001600160a01b031683526001808201548486015260029091015491830191909152908352909201910161340c565b505050509050919050565b61347361372f565b6001600160a01b0381166134ef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161082a565b61186d81613bc3565b613500613789565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b158015613586575f80fd5b505af1158015613598573d5f803e3d5ffd5b50505050612a7f6001606555565b5f6106ce825490565b60995460975460ff16156135d357609954609c5410156135ce5750609c545b6135e4565b609954609d5410156135e45750609d545b5f8167ffffffffffffffff8111156135fe576135fe614649565b604051908082528060200260200182016040528015613627578160200160208202803683370190505b5090505f5b8281101561369457609d81815481106136475761364761454f565b905f5260205f20015f9054906101000a90046001600160a01b03168282815181106136745761367461454f565b6001600160a01b039092166020928302919091019091015260010161362c565b506040517f9b8201a40000000000000000000000000000000000000000000000000000000081526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690639b8201a4906136fa9084906004016149fe565b5f604051808303815f87803b158015613711575f80fd5b505af1158015613723573d5f803e3d5ffd5b50509151609b55505050565b6033546001600160a01b03163314612a7f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161082a565b6002606554036137db5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161082a565b6002606555565b6001606555565b5f6137fd836001600160a01b038416613f19565b9392505050565b5f805b6001600160a01b0384165f90815260a46020526040902054811015613884576001600160a01b038481165f90815260a460205260409020805491851691839081106138545761385461454f565b5f9182526020909120600390910201546001600160a01b03160361387c5760019150506106ce565b600101613807565b505f9392505050565b6040517fde6ac9330000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015613916573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061393a9190614a10565b159392505050565b5f6137fd836001600160a01b038416613ffc565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156139d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906139fb9190614a2f565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015613a8d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613ab19190614a10565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613b33573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613b579190614a2f565b90505f83118015613b70575082613b6e83836145a9565b145b613bbc5760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c65640000000000604482015260640161082a565b5050505050565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16613ca85760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161082a565b612a7f614048565b5f6137fd83836140c4565b6040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0383811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613d3c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613d609190614a2f565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015613dea573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613e0e9190614a10565b506040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015613e90573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613eb49190614a2f565b90505f83118015613ecd575082613ecb83836145a9565b145b610d065760405162461bcd60e51b815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c65640000000000604482015260640161082a565b5f8181526001830160205260408120548015613ff3575f613f3b6001836145a9565b85549091505f90613f4e906001906145a9565b9050818114613fad575f865f018281548110613f6c57613f6c61454f565b905f5260205f200154905080875f018481548110613f8c57613f8c61454f565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080613fbe57613fbe6145cf565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506106ce565b5f9150506106ce565b5f81815260018301602052604081205461404157508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556106ce565b505f6106ce565b5f54610100900460ff166137e25760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161082a565b5f825f0182815481106140d9576140d961454f565b905f5260205f200154905092915050565b5080546140f690614676565b5f825580601f10614105575050565b601f0160209004905f5260205f209081019061186d91905b80821115614130575f815560010161411d565b5090565b6001600160a01b038116811461186d575f80fd5b5f60208284031215614158575f80fd5b81356137fd81614134565b5f8083601f840112614173575f80fd5b50813567ffffffffffffffff81111561418a575f80fd5b6020830191508360208260051b85010111156141a4575f80fd5b9250929050565b5f80602083850312156141bc575f80fd5b823567ffffffffffffffff8111156141d2575f80fd5b6141de85828601614163565b90969095509350505050565b5f602082840312156141fa575f80fd5b5035919050565b5f8060408385031215614212575f80fd5b823561421d81614134565b946020939093013593505050565b5f81518084525f5b8181101561424f57602081850181015186830182015201614233565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015614324578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0018552815180516001600160a01b03168452878101518885015286015160608785018190526143108186018361422b565b9689019694505050908601906001016142b3565b509098975050505050505050565b5f805f805f8060a08789031215614347575f80fd5b863561435281614134565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115614382575f80fd5b61438e89828a01614163565b979a9699509497509295939492505050565b5f602082840312156143b0575f80fd5b813567ffffffffffffffff8111156143c6575f80fd5b8201606081850312156137fd575f80fd5b6001600160a01b0384168152826020820152606060408201525f6143fe606083018461422b565b95945050505050565b5f8060408385031215614418575f80fd5b823561442381614134565b9150602083013561443381614134565b809150509250929050565b5f805f60608486031215614450575f80fd5b833561445b81614134565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156144a85781516001600160a01b031687529582019590820190600101614483565b509495945050505050565b828152604060208201525f6144cb6040830184614470565b949350505050565b602080825282518282018190525f919060409081850190868401855b8281101561452757815180516001600160a01b03168552868101518786015285015185850152606090930192908501906001016144ef565b5091979650505050505050565b5f60208284031215614544575f80fd5b81516137fd81614134565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b818103818111156106ce576106ce61457c565b808201808211156106ce576106ce61457c565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b8681101561463e57823561462381614134565b6001600160a01b031682529183019190830190600101614610565b509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c9082168061468a57607f821691505b602082108103612233577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f816146cf576146cf61457c565b505f190190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82614711576147116146d6565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112614748575f80fd5b9190910192915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112614785575f80fd5b83018035915067ffffffffffffffff82111561479f575f80fd5b6020019150368190038213156141a4575f80fd5b601f821115610bf457805f5260205f20601f840160051c810160208510156147d85750805b601f840160051c820191505b81811015613bbc575f81556001016147e4565b813561480281614134565b6001600160a01b0381167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112614879575f80fd5b8501803567ffffffffffffffff811115614891575f80fd5b80360384830113156148a1575f80fd5b6148b5816148af8554614676565b856147b3565b5f601f8211600181146148e8575f83156148d157508382018601355b5f19600385901b1c1916600184901b17855561495e565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561493457868501890135825593880193908901908801614915565b5084821015614952575f1960f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b5f826149ca576149ca6146d6565b500490565b80820281158282048414176106ce576106ce61457c565b5f5f1982036149f7576149f761457c565b5060010190565b602081525f6137fd6020830184614470565b5f60208284031215614a20575f80fd5b815180151581146137fd575f80fd5b5f60208284031215614a3f575f80fd5b505191905056fea164736f6c6343000818000a", } // L2StakingABI is the input ABI used to generate the binding from. diff --git a/bindings/bindings/l2staking_more.go b/bindings/bindings/l2staking_more.go index 082a8d2e7..9488720ab 100644 --- a/bindings/bindings/l2staking_more.go +++ b/bindings/bindings/l2staking_more.go @@ -13,7 +13,7 @@ const L2StakingStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\ var L2StakingStorageLayout = new(solc.StorageLayout) -var L2StakingDeployedBin = "0x608060405234801561000f575f80fd5b50600436106102ec575f3560e01c8063746c8ae111610192578063affed0e0116100e8578063e10911b111610093578063f2fde38b1161006e578063f2fde38b146106f6578063fad99f9814610709578063fc6facc614610711575f80fd5b8063e10911b1146106c5578063ed70b343146106cd578063f0261bc2146106ed575f80fd5b8063cce6cf9f116100c3578063cce6cf9f1461066a578063d31d83d91461067d578063d55771411461069e575f80fd5b8063affed0e014610618578063b5d2e0dc14610621578063c64814dd14610640575f80fd5b80638da5cb5b1161014857806391bd43a41161012357806391bd43a4146105c5578063927ede2d146105e457806396ab994d1461060b575f80fd5b80638da5cb5b1461055e5780638e21d5fb1461057c5780639168ae72146105a3575f80fd5b80637b05afb5116101785780637b05afb5146104f5578063831cfb581461051457806384d7d1d41461053b575f80fd5b8063746c8ae1146104e557806376671808146104ed575f80fd5b80633b8024211161024757806343352d61116101fd57806346cdc18a116101d857806346cdc18a146104c25780637046529b146104ca578063715018a6146104dd575f80fd5b806343352d6114610494578063439162b51461049c578063459598a2146104af575f80fd5b80633cb747bf1161022d5780633cb747bf146104135780633d9353fe1461045a57806340b5c83714610481575f80fd5b80633b802421146103f75780633c323a1b14610400575f80fd5b8063174e31c4116102a75780632e787be3116102825780632e787be3146103bb57806330158eea146103c45780633385ccc2146103e4575f80fd5b8063174e31c41461038c57806319fac8fd1461039f5780632cc138be146103b2575f80fd5b80630eb573af116102d75780630eb573af1461032b5780630f3b70591461033e57806312a3e94714610383575f80fd5b806243b758146102f05780629c6f0c14610316575b5f80fd5b6103036102fe3660046152e8565b610724565b6040519081526020015b60405180910390f35b610329610324366004615303565b610757565b005b61032961033936600461534d565b6109a8565b61035161034c366004615364565b610ad5565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845260208401929092529082015260600161030d565b610303609a5481565b61032961039a366004615364565b610b2a565b6103296103ad36600461534d565b610ce3565b61030360985481565b61030360995481565b6103d76103d23660046153d6565b610e39565b60405161030d9190615476565b6103296103f23660046152e8565b6110a1565b610303609c5481565b61032961040e366004615364565b61181a565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030d565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b61032961048f36600461534d565b61202d565b6103d7612174565b6103296104aa366004615529565b6123d1565b6104356104bd36600461534d565b6129dd565b609d54610303565b6103296104d8366004615303565b612a12565b610329612bba565b610329612bcd565b610303612f80565b6103036105033660046152e8565b60a06020525f908152604090205481565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b61054e6105493660046152e8565b61300e565b604051901515815260200161030d565b60335473ffffffffffffffffffffffffffffffffffffffff16610435565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b6105b66105b13660046152e8565b613045565b60405161030d93929190615597565b6103036105d33660046152e8565b60a16020525f908152604090205481565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b60975461054e9060ff1681565b61030360a55481565b61030361062f3660046152e8565b609e6020525f908152604090205481565b61030361064e3660046155d4565b60a360209081525f928352604080842090915290825290205481565b610329610678366004615600565b613104565b61069061068b366004615648565b6137d0565b60405161030d9291906156ca565b6104357f000000000000000000000000000000000000000000000000000000000000000081565b6103296139ac565b6106e06106db3660046152e8565b613df4565b60405161030d91906156ea565b610303609b5481565b6103296107043660046152e8565b613ea4565b610329613f58565b61032961071f366004615600565b614020565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a260205260408120610751906144fd565b92915050565b61075f614506565b8160a55481146107d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064015b60405180910390fd5b6107db836001615785565b60a555609e5f6107ee60208501856152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f036108cf57609d61083d60208401846152e8565b81546001810183555f928352602080842090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9390931692909217909155609d5491609e916108a8908601866152e8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20555b81609f5f6108e060208401846152e8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2061090f82826158b5565b5061091f905060208301836152e8565b73ffffffffffffffffffffffffffffffffffffffff167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208401356109686040860186615798565b60405161097793929190615a72565b60405180910390a260975460ff161580156109965750609954609d5411155b156109a3576109a3614587565b505050565b6109b0614506565b5f811180156109c157506099548114155b610a4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a6500000000000000000000000000000000000000000000000000000000000060648201526084016107c7565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff16610aa257609d54610aa6565b609c545b90505f6099548210610aba57609954610abc565b815b9050609b548114610acf57610acf614587565b50505050565b60a4602052815f5260405f208181548110610aee575f80fd5b5f91825260209091206003909102018054600182015460029092015473ffffffffffffffffffffffffffffffffffffffff909116935090915083565b610b3261472e565b73ffffffffffffffffffffffffffffffffffffffff8216610c0f5773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044015f604051808303815f87803b158015610bf4575f80fd5b505af1158015610c06573d5f803e3d5ffd5b50505050610cd5565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604481018490526064015f604051808303815f87803b158015610cbe575f80fd5b505af1158015610cd0573d5f803e3d5ffd5b505050505b610cdf6001606555565b5050565b335f908152609e6020526040902054610d58576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f7765640000000000000000000000000060448201526064016107c7565b6014811115610dc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e000000000000000000000000000060448201526064016107c7565b335f90815260a06020526040812082905560975460ff16610de4575f610df7565b610dec612f80565b610df7906001615785565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff811115610e5557610e556157f9565b604051908082528060200260200182016040528015610ea157816020015b60408051606080820183525f808352602083015291810191909152815260200190600190039081610e735790505b5090505f5b83811015611099576040518060600160405280609f5f888886818110610ece57610ece615ac5565b9050602002016020810190610ee391906152e8565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409091015f908120549091168352910190609f90888886818110610f2d57610f2d615ac5565b9050602002016020810190610f4291906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101548152602001609f5f888886818110610f9957610f99615ac5565b9050602002016020810190610fae91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f206002018054610ff590615826565b80601f016020809104026020016040519081016040528092919081815260200182805461102190615826565b801561106c5780601f106110435761010080835404028352916020019161106c565b820191905f5260205f20905b81548152906001019060200180831161104f57829003601f168201915b505050505081525082828151811061108657611086615ac5565b6020908102919091010152600101610ea6565b509392505050565b6110a961472e565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a36020908152604080832033845290915290205461113f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f0000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff81165f908152609e60205260408120546097549015919060ff16611178575f61118b565b611180612f80565b61118b906001615785565b6097549091505f9060ff1680156111a0575082155b6111aa57816111b7565b609a546111b79083615785565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff8781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c5160039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909b16178a558251908a015551600290980197909755908452908252829055925191815260a190925292812080549495509193611286908490615af2565b909155505073ffffffffffffffffffffffffffffffffffffffff85165f90815260a2602052604090206112b990336147a8565b5073ffffffffffffffffffffffffffffffffffffffff85165f908152609e6020526040902054841580156112ef575060975460ff165b80156112fc5750609c5481105b156115e85773ffffffffffffffffffffffffffffffffffffffff86165f908152609e602052604081205461133290600190615af2565b90505b6001609c546113449190615af2565b8110156115e65760a15f609d838154811061136157611361615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120549060a190609d6113a3856001615785565b815481106113b3576113b3615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205411156115de575f609d82815481106113fe576113fe615ac5565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050609d61142e836001615785565b8154811061143e5761143e615ac5565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff909216918490811061147657611476615ac5565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905580609d6114d1846001615785565b815481106114e1576114e1615ac5565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055611539826001615785565b609e5f609d858154811061154f5761154f615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561158b826002615785565b609e5f609d61159b866001615785565b815481106115ab576115ab615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b600101611335565b505b84158015611618575073ffffffffffffffffffffffffffffffffffffffff86165f90815260a16020526040902054155b15611635576001609c5f82825461162f9190615af2565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b1580156116e3575f80fd5b505af11580156116f5573d5f803e3d5ffd5b505050506117003390565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c84602001518787604051611775939291909283526020830191909152604082015260600190565b60405180910390a38415801561178d575060975460ff165b801561179b5750609b548111155b80156117fb5750609b5473ffffffffffffffffffffffffffffffffffffffff87165f908152609e602052604090205411806117fb5750609c5473ffffffffffffffffffffffffffffffffffffffff87165f908152609e6020526040902054115b1561180857611808614587565b50505050506118176001606555565b50565b73ffffffffffffffffffffffffffffffffffffffff82165f908152609e602052604090205482906118a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b65720000000000000000000000000000000000000000000060448201526064016107c7565b6118af61472e565b5f8211611918576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e7400000000000000000000000060448201526064016107c7565b61192233846147d0565b15611989576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d65640000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a360209081526040808320338452909152902054611a2e576119c73384614880565b15611a2e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f72657761726420756e636c61696d65640000000000000000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a1602052604081208054849290611a62908490615785565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a36020908152604080832033845290915281208054849290611aa6908490615785565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a260205260409020611ad99033614942565b5073ffffffffffffffffffffffffffffffffffffffff83165f90815260a16020526040902054829003611b1e576001609c5f828254611b189190615785565b90915550505b73ffffffffffffffffffffffffffffffffffffffff83165f908152609e602052604090205460975460ff168015611b555750600181115b15611e35575f611b66600183615af2565b90505b8015611e335760a15f609d611b7f600185615af2565b81548110611b8f57611b8f615ac5565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460a15f609d8481548110611c0757611c07615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115611e21575f609d611c4c600184615af2565b81548110611c5c57611c5c615ac5565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921692509083908110611c9657611c96615ac5565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16609d611cc4600185615af2565b81548110611cd457611cd4615ac5565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609d8381548110611d2d57611d2d615ac5565b5f918252602082200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff93909316929092179091558290609e90609d611d8c600185615af2565b81548110611d9c57611d9c615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055611dd8826001615785565b609e5f609d8581548110611dee57611dee615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b80611e2b81615b05565b915050611b69565b505b6097545f9060ff16611e47575f611e5a565b611e4f612f80565b611e5a906001615785565b73ffffffffffffffffffffffffffffffffffffffff86165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a373ffffffffffffffffffffffffffffffffffffffff8581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b158015611fa8575f80fd5b505af1158015611fba573d5f803e3d5ffd5b50505050611fcf611fc83390565b3086614963565b60975460ff168015611fe25750609b5482115b8015612014575060995473ffffffffffffffffffffffffffffffffffffffff86165f908152609e602052604090205411155b1561202157612021614587565b50506109a36001606555565b612035614506565b60975460ff16156120a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f72657761726420616c726561647920737461727465640000000000000000000060448201526064016107c7565b42811180156120bb57506120b96201518082615b66565b155b80156120c957506098548114155b61212f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d650000000000000060448201526064016107c7565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff811115612194576121946157f9565b6040519080825280602002602001820160405280156121e057816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816121b25790505b5090505f5b609d548110156123cb576040518060600160405280609f5f609d858154811061221057612210615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409092018120549092168352609d80549390910192609f9291908690811061226957612269615ac5565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101548152602001609f5f609d85815481106122e9576122e9615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020600201805461232790615826565b80601f016020809104026020016040519081016040528092919081815260200182805461235390615826565b801561239e5780601f106123755761010080835404028352916020019161239e565b820191905f5260205f20905b81548152906001019060200180831161238157829003601f168201915b50505050508152508282815181106123b8576123b8615ac5565b60209081029190910101526001016121e5565b50919050565b5f54610100900460ff16158080156123ef57505f54600160ff909116105b806124085750303b15801561240857505f5460ff166001145b612494576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107c7565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156124f0575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff871661256d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c6964206f776e65722061646472657373000000000000000000000060448201526064016107c7565b5f86116125fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f203000000000000000000000000000000000000000000000000000000000000060648201526084016107c7565b5f8511612665576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f6368730000000060448201526064016107c7565b428411801561267e575061267c6201518085615b66565b155b6126e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d650000000000000060448201526064016107c7565b8161274b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f696e76616c696420696e697469616c207374616b65727300000000000000000060448201526064016107c7565b61275487614c6f565b61275c614ce5565b6099869055609a8590556098849055609b8290555f5b609b548110156128ff5783838281811061278e5761278e615ac5565b90506020028101906127a09190615b79565b609f5f8686858181106127b5576127b5615ac5565b90506020028101906127c79190615b79565b6127d59060208101906152e8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2061280482826158b5565b905050609d84848381811061281b5761281b615ac5565b905060200281019061282d9190615b79565b61283b9060208101906152e8565b8154600180820184555f93845260209093200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905561289c908290615785565b609e5f8686858181106128b1576128b1615ac5565b90506020028101906128c39190615b79565b6128d19060208101906152e8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2055600101612772565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a180156129d4575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d81815481106129ec575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015612b2e57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612af2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612b169190615bb5565b73ffffffffffffffffffffffffffffffffffffffff16145b61075f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016107c7565b612bc2614506565b612bcb5f614c6f565b565b612bd5614506565b609854421015612c66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d650000000000000000000000000000000000000000000000000000000060648201526084016107c7565b5f609c5411612cd1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f6e652063616e64696461746500000000000000000000000000000000000060448201526064016107c7565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d54811015612f10575f5b81811015612f075760a15f609d8381548110612d2a57612d2a615ac5565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460a15f609d8581548110612da257612da2615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115612eff575f609d8281548110612ded57612ded615ac5565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921692509084908110612e2757612e27615ac5565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff9092169184908110612e5f57612e5f615ac5565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609d8481548110612eb857612eb8615ac5565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b600101612d0c565b50600101612d00565b505f5b609d54811015612f7757612f28816001615785565b609e5f609d8481548110612f3e57612f3e615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055600101612f13565b50612bcb614587565b5f609854421015612fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f726577617264206973206e6f742073746172746564207965740000000000000060448201526064016107c7565b6201518060985442612fff9190615af2565b6130099190615bd0565b905090565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a3602090815260408083203384529091528120541515610751565b609f6020525f908152604090208054600182015460028301805473ffffffffffffffffffffffffffffffffffffffff90931693919261308390615826565b80601f01602080910402602001604051908101604052809291908181526020018280546130af90615826565b80156130fa5780601f106130d1576101008083540402835291602001916130fa565b820191905f5260205f20905b8154815290600101906020018083116130dd57829003601f168201915b5050505050905083565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561322057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156131e4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132089190615bb5565b73ffffffffffffffffffffffffffffffffffffffff16145b6132ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016107c7565b8260a5548114613318576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064016107c7565b613323846001615785565b60a5555f805b8381101561378157609b54609e5f87878581811061334957613349615ac5565b905060200201602081019061335e91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054116133a257600191505b5f609e5f8787858181106133b8576133b8615ac5565b90506020020160208101906133cd91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205411156136eb575f6001609e5f88888681811061342557613425615ac5565b905060200201602081019061343a91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205461347e9190615af2565b90505b609d5461349090600190615af2565b81101561359657609d6134a4826001615785565b815481106134b4576134b4615ac5565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921691839081106134ec576134ec615ac5565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609e5f609d848154811061354957613549615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181208054909190613589908490615af2565b9091555050600101613481565b50609d8054806135a8576135a8615be3565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e9086868481811061361757613617615ac5565b905060200201602081019061362c91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a15f87878581811061367e5761367e615ac5565b905060200201602081019061369391906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205411156136eb576001609c5f8282546136e59190615af2565b90915550505b609f5f86868481811061370057613700615ac5565b905060200201602081019061371591906152e8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905590613777600283018261527d565b5050600101613329565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f6184846040516137b3929190615c10565b60405180910390a180156137c9576137c9614587565b5050505050565b5f60605f841161383c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e76616c696420706167652073697a6500000000000000000000000000000060448201526064016107c7565b73ffffffffffffffffffffffffffffffffffffffff85165f90815260a260205260409020613869906144fd565b91508367ffffffffffffffff811115613884576138846157f9565b6040519080825280602002602001820160405280156138ad578160200160208202803683370190505b5090505f6138bb8486615c6a565b90505f60016138ca8682615785565b6138d49088615c6a565b6138de9190615af2565b90506138eb600185615af2565b811115613900576138fd600185615af2565b90505b815f5b8282116139a0576139448261391781615c81565b73ffffffffffffffffffffffffffffffffffffffff8c165f90815260a26020526040902090945090614d83565b858261394f81615c81565b93508151811061396157613961615ac5565b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613903565b50505050935093915050565b6139b461472e565b335f90815260a46020526040812054815b81811015613d745760975460ff161580613a1557506139e2612f80565b335f90815260a460205260409020805483908110613a0257613a02615ac5565b905f5260205f2090600302016002015411155b15613d6257335f90815260a460205260409020805482908110613a3a57613a3a615ac5565b905f5260205f2090600302016001015483613a559190615785565b335f90815260a4602052604081208054929550909183908110613a7a57613a7a615ac5565b5f918252602082206003909102015473ffffffffffffffffffffffffffffffffffffffff16915060a481613aab3390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208381548110613af557613af5615ac5565b905f5260205f2090600302016002015490505f60a45f613b123390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208481548110613b5c57613b5c615ac5565b905f5260205f209060030201600101549050600185613b7b9190615af2565b841015613c7257335f90815260a460205260409020613b9b600187615af2565b81548110613bab57613bab615ac5565b905f5260205f20906003020160a45f613bc13390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208581548110613c0b57613c0b615ac5565b5f9182526020909120825460039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091178155600180830154908201556002918201549101555b335f90815260a460205260409020805480613c8f57613c8f615be3565b5f8281526020812060037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020180547fffffffffffffffffffffffff000000000000000000000000000000000000000016815560018181018390556002909101919091559155613d049086615af2565b6040805184815260208101849052919650339173ffffffffffffffffffffffffffffffffffffffff8616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a35050506139c5565b613d6d816001615785565b90506139c5565b505f8211613dde576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d00000000000000000060448201526064016107c7565b613de83383614d8e565b5050612bcb6001606555565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613e99575f8481526020908190206040805160608101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff16835260018082015484860152600290910154918301919091529083529092019101613e38565b505050509050919050565b613eac614506565b73ffffffffffffffffffffffffffffffffffffffff8116613f4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107c7565b61181781614c6f565b613f6061472e565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024015f604051808303815f87803b158015614000575f80fd5b505af1158015614012573d5f803e3d5ffd5b50505050612bcb6001606555565b614028614506565b8260a5548114614094576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f696e76616c6964206e6f6e63650000000000000000000000000000000000000060448201526064016107c7565b61409f846001615785565b60a5555f805b8381101561378157609b54609e5f8787858181106140c5576140c5615ac5565b90506020020160208101906140da91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541161411e57600191505b5f609e5f87878581811061413457614134615ac5565b905060200201602081019061414991906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115614467575f6001609e5f8888868181106141a1576141a1615ac5565b90506020020160208101906141b691906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546141fa9190615af2565b90505b609d5461420c90600190615af2565b81101561431257609d614220826001615785565b8154811061423057614230615ac5565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff909216918390811061426857614268615ac5565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609e5f609d84815481106142c5576142c5615ac5565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181208054909190614305908490615af2565b90915550506001016141fd565b50609d80548061432457614324615be3565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e9086868481811061439357614393615ac5565b90506020020160208101906143a891906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a15f8787858181106143fa576143fa615ac5565b905060200201602081019061440f91906152e8565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115614467576001609c5f8282546144619190615af2565b90915550505b609f5f86868481811061447c5761447c615ac5565b905060200201602081019061449191906152e8565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff000000000000000000000000000000000000000016815560018101829055906144f3600283018261527d565b50506001016140a5565b5f610751825490565b60335473ffffffffffffffffffffffffffffffffffffffff163314612bcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107c7565b60995460975460ff16156145ab57609954609c5410156145a65750609c545b6145bc565b609954609d5410156145bc5750609d545b5f8167ffffffffffffffff8111156145d6576145d66157f9565b6040519080825280602002602001820160405280156145ff578160200160208202803683370190505b5090505f5b8281101561468657609d818154811061461f5761461f615ac5565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682828151811061465957614659615ac5565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101614604565b506040517f9b8201a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b8201a4906146f9908490600401615cb8565b5f604051808303815f87803b158015614710575f80fd5b505af1158015614722573d5f803e3d5ffd5b50509151609b55505050565b60026065540361479a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016107c7565b6002606555565b6001606555565b5f6147c98373ffffffffffffffffffffffffffffffffffffffff8416615092565b9392505050565b5f805b73ffffffffffffffffffffffffffffffffffffffff84165f90815260a460205260409020548110156148775773ffffffffffffffffffffffffffffffffffffffff8481165f90815260a4602052604090208054918516918390811061483a5761483a615ac5565b5f91825260209091206003909102015473ffffffffffffffffffffffffffffffffffffffff160361486f576001915050610751565b6001016147d3565b505f9392505050565b6040517fde6ac93300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa158015614916573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061493a9190615cca565b159392505050565b5f6147c98373ffffffffffffffffffffffffffffffffffffffff8416615175565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156149f1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614a159190615ce9565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015614ab4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614ad89190615cca565b614b3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f7472616e7366657246726f6d206661696c65640000000000000000000000000060448201526064016107c7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614bcc573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614bf09190615ce9565b90505f83118015614c09575082614c078383615af2565b145b6137c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c6564000000000060448201526064016107c7565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff16614d7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107c7565b612bcb6151c1565b5f6147c98383615257565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614e1c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614e409190615ce9565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614ed7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190614efb9190615cca565b614f61576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f7472616e73666572206661696c6564000000000000000000000000000000000060448201526064016107c7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614fef573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906150139190615ce9565b90505f8311801561502c57508261502a8383615af2565b145b610acf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c6564000000000060448201526064016107c7565b5f818152600183016020526040812054801561516c575f6150b4600183615af2565b85549091505f906150c790600190615af2565b9050818114615126575f865f0182815481106150e5576150e5615ac5565b905f5260205f200154905080875f01848154811061510557615105615ac5565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061513757615137615be3565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610751565b5f915050610751565b5f8181526001830160205260408120546151ba57508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610751565b505f610751565b5f54610100900460ff166147a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107c7565b5f825f01828154811061526c5761526c615ac5565b905f5260205f200154905092915050565b50805461528990615826565b5f825580601f10615298575050565b601f0160209004905f5260205f209081019061181791905b808211156152c3575f81556001016152b0565b5090565b73ffffffffffffffffffffffffffffffffffffffff81168114611817575f80fd5b5f602082840312156152f8575f80fd5b81356147c9816152c7565b5f8060408385031215615314575f80fd5b82359150602083013567ffffffffffffffff811115615331575f80fd5b830160608186031215615342575f80fd5b809150509250929050565b5f6020828403121561535d575f80fd5b5035919050565b5f8060408385031215615375575f80fd5b8235615380816152c7565b946020939093013593505050565b5f8083601f84011261539e575f80fd5b50813567ffffffffffffffff8111156153b5575f80fd5b6020830191508360208260051b85010111156153cf575f80fd5b9250929050565b5f80602083850312156153e7575f80fd5b823567ffffffffffffffff8111156153fd575f80fd5b6154098582860161538e565b90969095509350505050565b5f81518084525f5b818110156154395760208185018101518683018201520161541d565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b8381101561551b578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff1684528781015188850152860151606087850181905261550781860183615415565b96890196945050509086019060010161549d565b509098975050505050505050565b5f805f805f8060a0878903121561553e575f80fd5b8635615549816152c7565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115615579575f80fd5b61558589828a0161538e565b979a9699509497509295939492505050565b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201525f6155cb6060830184615415565b95945050505050565b5f80604083850312156155e5575f80fd5b82356155f0816152c7565b91506020830135615342816152c7565b5f805f60408486031215615612575f80fd5b83359250602084013567ffffffffffffffff81111561562f575f80fd5b61563b8682870161538e565b9497909650939450505050565b5f805f6060848603121561565a575f80fd5b8335615665816152c7565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b838110156156bf57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161568d565b509495945050505050565b828152604060208201525f6156e2604083018461567a565b949350505050565b602080825282518282018190525f919060409081850190868401855b8281101561574b578151805173ffffffffffffffffffffffffffffffffffffffff16855286810151878601528501518585015260609093019290850190600101615706565b5091979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561075157610751615758565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126157cb575f80fd5b83018035915067ffffffffffffffff8211156157e5575f80fd5b6020019150368190038213156153cf575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c9082168061583a57607f821691505b6020821081036123cb577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f8211156109a357805f5260205f20601f840160051c810160208510156158965750805b601f840160051c820191505b818110156137c9575f81556001016158a2565b81356158c0816152c7565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112615944575f80fd5b8501803567ffffffffffffffff81111561595c575f80fd5b803603848301131561596c575f80fd5b6159808161597a8554615826565b85615871565b5f601f8211600181146159d2575f831561599c57508382018601355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178555615a67565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015615a1e578685018901358255938801939089019088016159ff565b5084821015615a5b577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b8181038181111561075157610751615758565b5f81615b1357615b13615758565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82615b7457615b74615b39565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615bab575f80fd5b9190910192915050565b5f60208284031215615bc5575f80fd5b81516147c9816152c7565b5f82615bde57615bde615b39565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b86811015615c5f578235615c37816152c7565b73ffffffffffffffffffffffffffffffffffffffff1682529183019190830190600101615c24565b509695505050505050565b808202811582820484141761075157610751615758565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203615cb157615cb1615758565b5060010190565b602081525f6147c9602083018461567a565b5f60208284031215615cda575f80fd5b815180151581146147c9575f80fd5b5f60208284031215615cf9575f80fd5b505191905056fea164736f6c6343000818000a" +var L2StakingDeployedBin = "0x608060405234801561000f575f80fd5b50600436106102cc575f3560e01c8063715018a61161017c578063927ede2d116100dd578063d557714111610093578063f0261bc21161006e578063f0261bc2146106b1578063f2fde38b146106ba578063fad99f98146106cd575f80fd5b8063d557714114610662578063e10911b114610689578063ed70b34314610691575f80fd5b8063b5d2e0dc116100c3578063b5d2e0dc146105f8578063c64814dd14610617578063d31d83d914610641575f80fd5b8063927ede2d146105c457806396ab994d146105eb575f80fd5b806384d7d1d4116101325780638e21d5fb116101185780638e21d5fb1461055c5780639168ae721461058357806391bd43a4146105a5575f80fd5b806384d7d1d41461051b5780638da5cb5b1461053e575f80fd5b8063766718081161016257806376671808146104cd5780637b05afb5146104d5578063831cfb58146104f4575f80fd5b8063715018a6146104bd578063746c8ae1146104c5575f80fd5b80633385ccc21161023157806340b5c837116101e7578063459598a2116101c2578063459598a21461048f57806346cdc18a146104a25780636d454d51146104aa575f80fd5b806340b5c8371461046157806343352d6114610474578063439162b51461047c575f80fd5b80633c323a1b116102175780633c323a1b146103e05780633cb747bf146103f35780633d9353fe1461043a575f80fd5b80633385ccc2146103c45780633b802421146103d7575f80fd5b8063174e31c4116102865780632cc138be1161026c5780632cc138be146103925780632e787be31461039b57806330158eea146103a4575f80fd5b8063174e31c41461036c57806319fac8fd1461037f575f80fd5b80630eb573af116102b65780630eb573af1461030b5780630f3b70591461031e57806312a3e94714610363575f80fd5b806243b758146102d05780630be67fcc146102f6575b5f80fd5b6102e36102de366004614bd5565b6106d5565b6040519081526020015b60405180910390f35b610309610304366004614c38565b610708565b005b610309610319366004614c77565b610d5d565b61033161032c366004614c8e565b610e8a565b6040805173ffffffffffffffffffffffffffffffffffffffff90941684526020840192909252908201526060016102ed565b6102e3609a5481565b61030961037a366004614c8e565b610edf565b61030961038d366004614c77565b611098565b6102e360985481565b6102e360995481565b6103b76103b2366004614c38565b6111ee565b6040516102ed9190614d19565b6103096103d2366004614bd5565b611456565b6102e3609c5481565b6103096103ee366004614c8e565b611bcf565b7f00000000000000000000000000000000000000000000000000000000000000005b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ed565b6104157f000000000000000000000000000000000000000000000000000000000000000081565b61030961046f366004614c77565b6123e2565b6103b7612529565b61030961048a366004614dcc565b612786565b61041561049d366004614c77565b612d92565b609d546102e3565b6103096104b8366004614e3a565b612dc7565b610309613134565b610309613147565b6102e36134fa565b6102e36104e3366004614bd5565b60a06020525f908152604090205481565b6104157f000000000000000000000000000000000000000000000000000000000000000081565b61052e610529366004614bd5565b613588565b60405190151581526020016102ed565b60335473ffffffffffffffffffffffffffffffffffffffff16610415565b6104157f000000000000000000000000000000000000000000000000000000000000000081565b610596610591366004614bd5565b6135bf565b6040516102ed93929190614e71565b6102e36105b3366004614bd5565b60a16020525f908152604090205481565b6104157f000000000000000000000000000000000000000000000000000000000000000081565b60975461052e9060ff1681565b6102e3610606366004614bd5565b609e6020525f908152604090205481565b6102e3610625366004614eae565b60a360209081525f928352604080842090915290825290205481565b61065461064f366004614ee5565b61367e565b6040516102ed929190614f67565b6104157f000000000000000000000000000000000000000000000000000000000000000081565b610309613839565b6106a461069f366004614bd5565b613c81565b6040516102ed9190614f87565b6102e3609b5481565b6103096106c8366004614bd5565b613d31565b610309613de5565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a26020526040812061070290613ead565b92915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614801561082457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107e8573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061080c9190614ff5565b73ffffffffffffffffffffffffffffffffffffffff16145b6108b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f805b82811015610d1057609b54609e5f8686858181106108d8576108d8615010565b90506020020160208101906108ed9190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541161093157600191505b5f609e5f86868581811061094757610947615010565b905060200201602081019061095c9190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115610c7a575f6001609e5f8787868181106109b4576109b4615010565b90506020020160208101906109c99190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054610a0d919061506a565b90505b609d54610a1f9060019061506a565b811015610b2557609d610a3382600161507d565b81548110610a4357610a43615010565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff9092169183908110610a7b57610a7b615010565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001609e5f609d8481548110610ad857610ad8615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400181208054909190610b1890849061506a565b9091555050600101610a10565b50609d805480610b3757610b37615090565b5f8281526020812082017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90810180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055909101909155609e90858584818110610ba657610ba6615010565b9050602002016020810190610bbb9190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f90555f60a15f868685818110610c0d57610c0d615010565b9050602002016020810190610c229190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20541115610c7a576001609c5f828254610c74919061506a565b90915550505b609f5f858584818110610c8f57610c8f615010565b9050602002016020810190610ca49190614bd5565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f90812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001810182905590610d066002830182614b6a565b50506001016108b8565b507f3511bf213f9290ba907e91e12a43e8471251e1879580ae5509292a3514c23f618383604051610d429291906150bd565b60405180910390a18015610d5857610d58613eb6565b505050565b610d6561405d565b5f81118015610d7657506099548114155b610e02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f696e76616c6964206e65772073657175656e63657220736574206d617820736960448201527f7a6500000000000000000000000000000000000000000000000000000000000060648201526084016108ac565b609980549082905560408051828152602081018490527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a16097545f9060ff16610e5757609d54610e5b565b609c545b90505f6099548210610e6f57609954610e71565b815b9050609b548114610e8457610e84613eb6565b50505050565b60a4602052815f5260405f208181548110610ea3575f80fd5b5f91825260209091206003909102018054600182015460029092015473ffffffffffffffffffffffffffffffffffffffff909116935090915083565b610ee76140de565b73ffffffffffffffffffffffffffffffffffffffff8216610fc45773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016635cf20c7b336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff9091166004820152602481018490526044015f604051808303815f87803b158015610fa9575f80fd5b505af1158015610fbb573d5f803e3d5ffd5b5050505061108a565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663996cba6883336040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff928316600482015291166024820152604481018490526064015f604051808303815f87803b158015611073575f80fd5b505af1158015611085573d5f803e3d5ffd5b505050505b6110946001606555565b5050565b335f908152609e602052604090205461110d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79207374616b657220616c6c6f7765640000000000000000000000000060448201526064016108ac565b6014811115611178576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f696e76616c696420636f6d6d697373696f6e000000000000000000000000000060448201526064016108ac565b335f90815260a06020526040812082905560975460ff16611199575f6111ac565b6111a16134fa565b6111ac90600161507d565b604080518481526020810183905291925033917f6e500db30ce535d38852e318f333e9be41a3fec6c65d234ebb06203c896db9a5910160405180910390a25050565b60605f8267ffffffffffffffff81111561120a5761120a615117565b60405190808252806020026020018201604052801561125657816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816112285790505b5090505f5b8381101561144e576040518060600160405280609f5f88888681811061128357611283615010565b90506020020160208101906112989190614bd5565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409091015f908120549091168352910190609f908888868181106112e2576112e2615010565b90506020020160208101906112f79190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101548152602001609f5f88888681811061134e5761134e615010565b90506020020160208101906113639190614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2060020180546113aa90615144565b80601f01602080910402602001604051908101604052809291908181526020018280546113d690615144565b80156114215780601f106113f857610100808354040283529160200191611421565b820191905f5260205f20905b81548152906001019060200180831161140457829003601f168201915b505050505081525082828151811061143b5761143b615010565b602090810291909101015260010161125b565b509392505050565b61145e6140de565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a3602090815260408083203384529091529020546114f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f7374616b696e6720616d6f756e74206973207a65726f0000000000000000000060448201526064016108ac565b73ffffffffffffffffffffffffffffffffffffffff81165f908152609e60205260408120546097549015919060ff1661152d575f611540565b6115356134fa565b61154090600161507d565b6097549091505f9060ff168015611555575082155b61155f578161156c565b609a5461156c908361507d565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff8781168083525f81815260a36020908152858220338084528183528784208054848901908152888a018b815283875260a486528a87208054600180820183559189528789208c5160039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001691909b16178a558251908a015551600290980197909755908452908252829055925191815260a19092529281208054949550919361163b90849061506a565b909155505073ffffffffffffffffffffffffffffffffffffffff85165f90815260a26020526040902061166e9033614158565b5073ffffffffffffffffffffffffffffffffffffffff85165f908152609e6020526040902054841580156116a4575060975460ff165b80156116b15750609c5481105b1561199d5773ffffffffffffffffffffffffffffffffffffffff86165f908152609e60205260408120546116e79060019061506a565b90505b6001609c546116f9919061506a565b81101561199b5760a15f609d838154811061171657611716615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040018120549060a190609d61175885600161507d565b8154811061176857611768615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115611993575f609d82815481106117b3576117b3615010565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff169050609d6117e383600161507d565b815481106117f3576117f3615010565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff909216918490811061182b5761182b615010565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9290921691909117905580609d61188684600161507d565b8154811061189657611896615010565b5f91825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff929092169190911790556118ee82600161507d565b609e5f609d858154811061190457611904615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561194082600261507d565b609e5f609d61195086600161507d565b8154811061196057611960615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b6001016116ea565b505b841580156119cd575073ffffffffffffffffffffffffffffffffffffffff86165f90815260a16020526040902054155b156119ea576001609c5f8282546119e4919061506a565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8681165f81815260a160205260408082205481517f7f683ee30000000000000000000000000000000000000000000000000000000081526004810194909452336024850152604484018990526064840152517f000000000000000000000000000000000000000000000000000000000000000090931692637f683ee392608480820193929182900301818387803b158015611a98575f80fd5b505af1158015611aaa573d5f803e3d5ffd5b50505050611ab53390565b73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f92039db29d8c0a1aa1433fe109c69488c8c5e51b23c9de7d303ad80c1fef778c84602001518787604051611b2a939291909283526020830191909152604082015260600190565b60405180910390a384158015611b42575060975460ff165b8015611b505750609b548111155b8015611bb05750609b5473ffffffffffffffffffffffffffffffffffffffff87165f908152609e60205260409020541180611bb05750609c5473ffffffffffffffffffffffffffffffffffffffff87165f908152609e6020526040902054115b15611bbd57611bbd613eb6565b5050505050611bcc6001606555565b50565b73ffffffffffffffffffffffffffffffffffffffff82165f908152609e60205260409020548290611c5c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f6e6f74207374616b65720000000000000000000000000000000000000000000060448201526064016108ac565b611c646140de565b5f8211611ccd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f696e76616c6964207374616b6520616d6f756e7400000000000000000000000060448201526064016108ac565b611cd73384614180565b15611d3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f756e64656c65676174696f6e20756e636c61696d65640000000000000000000060448201526064016108ac565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a360209081526040808320338452909152902054611de357611d7c3384614230565b15611de3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f72657761726420756e636c61696d65640000000000000000000000000000000060448201526064016108ac565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260a1602052604081208054849290611e1790849061507d565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a36020908152604080832033845290915281208054849290611e5b90849061507d565b909155505073ffffffffffffffffffffffffffffffffffffffff83165f90815260a260205260409020611e8e90336142f2565b5073ffffffffffffffffffffffffffffffffffffffff83165f90815260a16020526040902054829003611ed3576001609c5f828254611ecd919061507d565b90915550505b73ffffffffffffffffffffffffffffffffffffffff83165f908152609e602052604090205460975460ff168015611f0a5750600181115b156121ea575f611f1b60018361506a565b90505b80156121e85760a15f609d611f3460018561506a565b81548110611f4457611f44615010565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460a15f609d8481548110611fbc57611fbc615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205411156121d6575f609d61200160018461506a565b8154811061201157612011615010565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff9092169250908390811061204b5761204b615010565b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16609d61207960018561506a565b8154811061208957612089615010565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609d83815481106120e2576120e2615010565b5f918252602082200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff93909316929092179091558290609e90609d61214160018561506a565b8154811061215157612151615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205561218d82600161507d565b609e5f609d85815481106121a3576121a3615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902055505b806121e08161518f565b915050611f1e565b505b6097545f9060ff166121fc575f61220f565b6122046134fa565b61220f90600161507d565b73ffffffffffffffffffffffffffffffffffffffff86165f81815260a36020908152604080832033808552908352928190205481519081529182018990528181018590525193945090927fc4ad67bad2c1f682946a406d840f1b273f5cd5a53fcc1a03d078d92bfa2e07d09181900360600190a373ffffffffffffffffffffffffffffffffffffffff8581165f81815260a360209081526040808320338085528184528285205486865260a18552838620548287529290945282517fb809af0f000000000000000000000000000000000000000000000000000000008152600481019690965260248601526044850187905260648501839052608485015290881460a4840152517f00000000000000000000000000000000000000000000000000000000000000009093169263b809af0f9260c480820193929182900301818387803b15801561235d575f80fd5b505af115801561236f573d5f803e3d5ffd5b5050505061238461237d3390565b3086614313565b60975460ff1680156123975750609b5482115b80156123c9575060995473ffffffffffffffffffffffffffffffffffffffff86165f908152609e602052604090205411155b156123d6576123d6613eb6565b5050610d586001606555565b6123ea61405d565b60975460ff1615612457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f72657761726420616c726561647920737461727465640000000000000000000060448201526064016108ac565b4281118015612470575061246e62015180826151f0565b155b801561247e57506098548114155b6124e4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d650000000000000060448201526064016108ac565b609880549082905560408051828152602081018490527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a15050565b609d546060905f9067ffffffffffffffff81111561254957612549615117565b60405190808252806020026020018201604052801561259557816020015b60408051606080820183525f8083526020830152918101919091528152602001906001900390816125675790505b5090505f5b609d54811015612780576040518060600160405280609f5f609d85815481106125c5576125c5615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff90811684528382019490945260409092018120549092168352609d80549390910192609f9291908690811061261e5761261e615010565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20600101548152602001609f5f609d858154811061269e5761269e615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902060020180546126dc90615144565b80601f016020809104026020016040519081016040528092919081815260200182805461270890615144565b80156127535780601f1061272a57610100808354040283529160200191612753565b820191905f5260205f20905b81548152906001019060200180831161273657829003601f168201915b505050505081525082828151811061276d5761276d615010565b602090810291909101015260010161259a565b50919050565b5f54610100900460ff16158080156127a457505f54600160ff909116105b806127bd5750303b1580156127bd57505f5460ff166001145b612849576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016108ac565b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156128a5575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b73ffffffffffffffffffffffffffffffffffffffff8716612922576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f696e76616c6964206f776e65722061646472657373000000000000000000000060448201526064016108ac565b5f86116129b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f73657175656e6365727353697a65206d7573742067726561746572207468616e60448201527f203000000000000000000000000000000000000000000000000000000000000060648201526084016108ac565b5f8511612a1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f696e76616c696420756e64656c65676174654c6f636b45706f6368730000000060448201526064016108ac565b4284118015612a335750612a3162015180856151f0565b155b612a99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f696e76616c6964207265776172642073746172742074696d650000000000000060448201526064016108ac565b81612b00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f696e76616c696420696e697469616c207374616b65727300000000000000000060448201526064016108ac565b612b09876145c1565b612b11614637565b6099869055609a8590556098849055609b8290555f5b609b54811015612cb457838382818110612b4357612b43615010565b9050602002810190612b559190615203565b609f5f868685818110612b6a57612b6a615010565b9050602002810190612b7c9190615203565b612b8a906020810190614bd5565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20612bb982826152e4565b905050609d848483818110612bd057612bd0615010565b9050602002810190612be29190615203565b612bf0906020810190614bd5565b8154600180820184555f93845260209093200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055612c5190829061507d565b609e5f868685818110612c6657612c66615010565b9050602002810190612c789190615203565b612c86906020810190614bd5565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f2055600101612b27565b50604080515f8152602081018890527f98b982a120d9be7d9c68d85a1aed8158d1d52e517175bfb3eb4280692f19b1ed910160405180910390a1604080515f8152602081018690527f91c38708087fb4ba51bd0e6a106cc1fbaf340479a2e81d18f2341e8c78f97555910160405180910390a18015612d89575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050565b609d8181548110612da1575f80fd5b5f9182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148015612ee357507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e296e456040518163ffffffff1660e01b8152600401602060405180830381865afa158015612ea7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ecb9190614ff5565b73ffffffffffffffffffffffffffffffffffffffff16145b612f6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f7374616b696e673a206f6e6c79206f74686572207374616b696e6720636f6e7460448201527f7261637420616c6c6f776564000000000000000000000000000000000000000060648201526084016108ac565b609e5f612f7f6020840184614bd5565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20545f0361306057609d612fce6020830183614bd5565b81546001810183555f928352602080842090910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9390931692909217909155609d5491609e9161303990850185614bd5565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f20555b80609f5f6130716020840184614bd5565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f206130a082826152e4565b506130b090506020820182614bd5565b73ffffffffffffffffffffffffffffffffffffffff167f058ecb29c230cd5df283c89e996187ed521393fe4546cd1b097921c4b2de293d60208301356130f9604085018561523f565b604051613108939291906154a1565b60405180910390a260975460ff161580156131275750609954609d5411155b15611bcc57611bcc613eb6565b61313c61405d565b6131455f6145c1565b565b61314f61405d565b6098544210156131e0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f63616e2774207374617274206265666f7265207265776172642073746172742060448201527f74696d650000000000000000000000000000000000000000000000000000000060648201526084016108ac565b5f609c541161324b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6e6f6e652063616e64696461746500000000000000000000000000000000000060448201526064016108ac565b609780547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555b609d5481101561348a575f5b818110156134815760a15f609d83815481106132a4576132a4615010565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205460a15f609d858154811061331c5761331c615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff1683528201929092526040019020541115613479575f609d828154811061336757613367615010565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff909216925090849081106133a1576133a1615010565b5f91825260209091200154609d805473ffffffffffffffffffffffffffffffffffffffff90921691849081106133d9576133d9615010565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080609d848154811061343257613432615010565b905f5260205f20015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b600101613286565b5060010161327a565b505f5b609d548110156134f1576134a281600161507d565b609e5f609d84815481106134b8576134b8615010565b5f91825260208083209091015473ffffffffffffffffffffffffffffffffffffffff16835282019290925260400190205560010161348d565b50613145613eb6565b5f609854421015613567576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f726577617264206973206e6f742073746172746564207965740000000000000060448201526064016108ac565b6201518060985442613579919061506a565b61358391906154f4565b905090565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a3602090815260408083203384529091528120541515610702565b609f6020525f908152604090208054600182015460028301805473ffffffffffffffffffffffffffffffffffffffff9093169391926135fd90615144565b80601f016020809104026020016040519081016040528092919081815260200182805461362990615144565b80156136745780601f1061364b57610100808354040283529160200191613674565b820191905f5260205f20905b81548152906001019060200180831161365757829003601f168201915b5050505050905083565b5f60605f84116136ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f696e76616c696420706167652073697a6500000000000000000000000000000060448201526064016108ac565b73ffffffffffffffffffffffffffffffffffffffff85165f90815260a26020526040902061371790613ead565b91508367ffffffffffffffff81111561373257613732615117565b60405190808252806020026020018201604052801561375b578160200160208202803683370190505b5090505f6137698486615507565b90505f6001613778868261507d565b6137829088615507565b61378c919061506a565b905061379960018561506a565b8111156137ae576137ab60018561506a565b90505b815b81811161382e5773ffffffffffffffffffffffffffffffffffffffff88165f90815260a2602052604090206137e590826146d5565b8482815181106137f7576137f7615010565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152806138268161551e565b9150506137b0565b505050935093915050565b6138416140de565b335f90815260a46020526040812054815b81811015613c015760975460ff1615806138a2575061386f6134fa565b335f90815260a46020526040902080548390811061388f5761388f615010565b905f5260205f2090600302016002015411155b15613bef57335f90815260a4602052604090208054829081106138c7576138c7615010565b905f5260205f20906003020160010154836138e2919061507d565b335f90815260a460205260408120805492955090918390811061390757613907615010565b5f918252602082206003909102015473ffffffffffffffffffffffffffffffffffffffff16915060a4816139383390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20838154811061398257613982615010565b905f5260205f2090600302016002015490505f60a45f61399f3390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2084815481106139e9576139e9615010565b905f5260205f209060030201600101549050600185613a08919061506a565b841015613aff57335f90815260a460205260409020613a2860018761506a565b81548110613a3857613a38615010565b905f5260205f20906003020160a45f613a4e3390565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f208581548110613a9857613a98615010565b5f9182526020909120825460039092020180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091178155600180830154908201556002918201549101555b335f90815260a460205260409020805480613b1c57613b1c615090565b5f8281526020812060037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020180547fffffffffffffffffffffffff000000000000000000000000000000000000000016815560018181018390556002909101919091559155613b91908661506a565b6040805184815260208101849052919650339173ffffffffffffffffffffffffffffffffffffffff8616917f921046659ea3b3b3f8e8fefd2bece3121b2d929ead94c696a75beedee477fdb6910160405180910390a3505050613852565b613bfa81600161507d565b9050613852565b505f8211613c6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f6e6f204d6f72706820746f6b656e20746f20636c61696d00000000000000000060448201526064016108ac565b613c7533836146e0565b50506131456001606555565b73ffffffffffffffffffffffffffffffffffffffff81165f90815260a460209081526040808320805482518185028101850190935280835260609492939192909184015b82821015613d26575f8481526020908190206040805160608101825260038602909201805473ffffffffffffffffffffffffffffffffffffffff16835260018082015484860152600290910154918301919091529083529092019101613cc5565b505050509050919050565b613d3961405d565b73ffffffffffffffffffffffffffffffffffffffff8116613ddc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108ac565b611bcc816145c1565b613ded6140de565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663ac2ac640336040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff90911660048201526024015f604051808303815f87803b158015613e8d575f80fd5b505af1158015613e9f573d5f803e3d5ffd5b505050506131456001606555565b5f610702825490565b60995460975460ff1615613eda57609954609c541015613ed55750609c545b613eeb565b609954609d541015613eeb5750609d545b5f8167ffffffffffffffff811115613f0557613f05615117565b604051908082528060200260200182016040528015613f2e578160200160208202803683370190505b5090505f5b82811015613fb557609d8181548110613f4e57613f4e615010565b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110613f8857613f88615010565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910190910152600101613f33565b506040517f9b8201a400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690639b8201a490614028908490600401615555565b5f604051808303815f87803b15801561403f575f80fd5b505af1158015614051573d5f803e3d5ffd5b50509151609b55505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314613145576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108ac565b60026065540361414a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108ac565b6002606555565b6001606555565b5f6141798373ffffffffffffffffffffffffffffffffffffffff841661497f565b9392505050565b5f805b73ffffffffffffffffffffffffffffffffffffffff84165f90815260a460205260409020548110156142275773ffffffffffffffffffffffffffffffffffffffff8481165f90815260a460205260409020805491851691839081106141ea576141ea615010565b5f91825260209091206003909102015473ffffffffffffffffffffffffffffffffffffffff160361421f576001915050610702565b600101614183565b505f9392505050565b6040517fde6ac93300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff838116600483015282811660248301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063de6ac93390604401602060405180830381865afa1580156142c6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906142ea9190615567565b159392505050565b5f6141798373ffffffffffffffffffffffffffffffffffffffff8416614a62565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156143a1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906143c59190615586565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528581166024830152604482018590529192507f0000000000000000000000000000000000000000000000000000000000000000909116906323b872dd906064016020604051808303815f875af1158015614464573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906144889190615567565b506040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015614517573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061453b9190615586565b90505f83118015614554575082614552838361506a565b145b6145ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c6564000000000060448201526064016108ac565b5050505050565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f54610100900460ff166146cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ac565b613145614aae565b5f6141798383614b44565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa15801561476e573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906147929190615586565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152602482018590529192507f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb906044016020604051808303815f875af1158015614829573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061484d9190615567565b506040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301525f917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156148dc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906149009190615586565b90505f83118015614919575082614917838361506a565b145b610e84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6d6f72706820746f6b656e207472616e73666572206661696c6564000000000060448201526064016108ac565b5f8181526001830160205260408120548015614a59575f6149a160018361506a565b85549091505f906149b49060019061506a565b9050818114614a13575f865f0182815481106149d2576149d2615010565b905f5260205f200154905080875f0184815481106149f2576149f2615010565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080614a2457614a24615090565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610702565b5f915050610702565b5f818152600183016020526040812054614aa757508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610702565b505f610702565b5f54610100900460ff16614151576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016108ac565b5f825f018281548110614b5957614b59615010565b905f5260205f200154905092915050565b508054614b7690615144565b5f825580601f10614b85575050565b601f0160209004905f5260205f2090810190611bcc91905b80821115614bb0575f8155600101614b9d565b5090565b73ffffffffffffffffffffffffffffffffffffffff81168114611bcc575f80fd5b5f60208284031215614be5575f80fd5b813561417981614bb4565b5f8083601f840112614c00575f80fd5b50813567ffffffffffffffff811115614c17575f80fd5b6020830191508360208260051b8501011115614c31575f80fd5b9250929050565b5f8060208385031215614c49575f80fd5b823567ffffffffffffffff811115614c5f575f80fd5b614c6b85828601614bf0565b90969095509350505050565b5f60208284031215614c87575f80fd5b5035919050565b5f8060408385031215614c9f575f80fd5b8235614caa81614bb4565b946020939093013593505050565b5f81518084525f5b81811015614cdc57602081850181015186830182015201614cc0565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b5f60208083018184528085518083526040925060408601915060408160051b8701018488015f5b83811015614dbe578883037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00185528151805173ffffffffffffffffffffffffffffffffffffffff16845287810151888501528601516060878501819052614daa81860183614cb8565b968901969450505090860190600101614d40565b509098975050505050505050565b5f805f805f8060a08789031215614de1575f80fd5b8635614dec81614bb4565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115614e1c575f80fd5b614e2889828a01614bf0565b979a9699509497509295939492505050565b5f60208284031215614e4a575f80fd5b813567ffffffffffffffff811115614e60575f80fd5b820160608185031215614179575f80fd5b73ffffffffffffffffffffffffffffffffffffffff84168152826020820152606060408201525f614ea56060830184614cb8565b95945050505050565b5f8060408385031215614ebf575f80fd5b8235614eca81614bb4565b91506020830135614eda81614bb4565b809150509250929050565b5f805f60608486031215614ef7575f80fd5b8335614f0281614bb4565b95602085013595506040909401359392505050565b5f815180845260208085019450602084015f5b83811015614f5c57815173ffffffffffffffffffffffffffffffffffffffff1687529582019590820190600101614f2a565b509495945050505050565b828152604060208201525f614f7f6040830184614f17565b949350505050565b602080825282518282018190525f919060409081850190868401855b82811015614fe8578151805173ffffffffffffffffffffffffffffffffffffffff16855286810151878601528501518585015260609093019290850190600101614fa3565b5091979650505050505050565b5f60208284031215615005575f80fd5b815161417981614bb4565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b818103818111156107025761070261503d565b808201808211156107025761070261503d565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b60208082528181018390525f908460408401835b8681101561510c5782356150e481614bb4565b73ffffffffffffffffffffffffffffffffffffffff16825291830191908301906001016150d1565b509695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b600181811c9082168061515857607f821691505b602082108103612780577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f8161519d5761519d61503d565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f826151fe576151fe6151c3565b500690565b5f82357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa1833603018112615235575f80fd5b9190910192915050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112615272575f80fd5b83018035915067ffffffffffffffff82111561528c575f80fd5b602001915036819003821315614c31575f80fd5b601f821115610d5857805f5260205f20601f840160051c810160208510156152c55750805b601f840160051c820191505b818110156145ba575f81556001016152d1565b81356152ef81614bb4565b73ffffffffffffffffffffffffffffffffffffffff81167fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825550600160208084013560018401556002830160408501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112615373575f80fd5b8501803567ffffffffffffffff81111561538b575f80fd5b803603848301131561539b575f80fd5b6153af816153a98554615144565b856152a0565b5f601f821160018114615401575f83156153cb57508382018601355b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178555615496565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b8281101561544d5786850189013582559388019390890190880161542e565b508482101561548a577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88660031b161c198885880101351681555b505060018360011b0185555b505050505050505050565b83815260406020820152816040820152818360608301375f818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b5f82615502576155026151c3565b500490565b80820281158282048414176107025761070261503d565b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361554e5761554e61503d565b5060010190565b602081525f6141796020830184614f17565b5f60208284031215615577575f80fd5b81518015158114614179575f80fd5b5f60208284031215615596575f80fd5b505191905056fea164736f6c6343000818000a" func init() { if err := json.Unmarshal([]byte(L2StakingStorageLayoutJSON), L2StakingStorageLayout); err != nil { diff --git a/bindings/bindings/l2tokenregistry.go b/bindings/bindings/l2tokenregistry.go new file mode 100644 index 000000000..201ebad0f --- /dev/null +++ b/bindings/bindings/l2tokenregistry.go @@ -0,0 +1,2627 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/morph-l2/go-ethereum" + "github.com/morph-l2/go-ethereum/accounts/abi" + "github.com/morph-l2/go-ethereum/accounts/abi/bind" + "github.com/morph-l2/go-ethereum/common" + "github.com/morph-l2/go-ethereum/core/types" + "github.com/morph-l2/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// IL2TokenRegistryTokenEntry is an auto generated low-level Go binding around an user-defined struct. +type IL2TokenRegistryTokenEntry struct { + TokenID uint16 + TokenAddress common.Address +} + +// IL2TokenRegistryTokenInfo is an auto generated low-level Go binding around an user-defined struct. +type IL2TokenRegistryTokenInfo struct { + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int +} + +// L2TokenRegistryMetaData contains all meta data concerning the L2TokenRegistry contract. +var L2TokenRegistryMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DifferentLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidArrayLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPercent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTokenID\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenAlreadyRegistered\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TokenNotFound\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isEnabled\",\"type\":\"bool\"}],\"name\":\"AllowListEnabledUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"val\",\"type\":\"bool\"}],\"name\":\"AllowListSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newPrice\",\"type\":\"uint256\"}],\"name\":\"PriceRatioUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"}],\"name\":\"TokenActivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"}],\"name\":\"TokenDeactivated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"balanceSlot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"}],\"name\":\"TokenInfoUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"balanceSlot\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"}],\"name\":\"TokenRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"TokenRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newScale\",\"type\":\"uint256\"}],\"name\":\"TokenScaleUpdated\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowListEnabled\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_tokenIDs\",\"type\":\"uint16[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_prices\",\"type\":\"uint256[]\"}],\"name\":\"batchUpdatePrices\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_tokenIDs\",\"type\":\"uint16[]\"},{\"internalType\":\"bool[]\",\"name\":\"_isActives\",\"type\":\"bool[]\"}],\"name\":\"batchUpdateTokenStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_ethAmount\",\"type\":\"uint256\"}],\"name\":\"calculateTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedIDList\",\"outputs\":[{\"internalType\":\"uint16[]\",\"name\":\"\",\"type\":\"uint16[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSupportedTokenList\",\"outputs\":[{\"components\":[{\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"internalType\":\"structIL2TokenRegistry.TokenEntry[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"getTokenIdByAddress\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"}],\"name\":\"getTokenInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"balanceSlot\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"}],\"internalType\":\"structIL2TokenRegistry.TokenInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"}],\"name\":\"getTokenPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"}],\"name\":\"getTokenScale\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"}],\"name\":\"isTokenActive\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"}],\"name\":\"isTokenSupported\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"priceRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_balanceSlot\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"_scale\",\"type\":\"uint256\"}],\"name\":\"registerToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16[]\",\"name\":\"_tokenIDs\",\"type\":\"uint16[]\"},{\"internalType\":\"address[]\",\"name\":\"_tokenAddresses\",\"type\":\"address[]\"},{\"internalType\":\"bytes32[]\",\"name\":\"_balanceSlots\",\"type\":\"bytes32[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_scales\",\"type\":\"uint256[]\"}],\"name\":\"registerTokens\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"}],\"name\":\"removeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"user\",\"type\":\"address[]\"},{\"internalType\":\"bool[]\",\"name\":\"val\",\"type\":\"bool[]\"}],\"name\":\"setAllowList\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_allowListEnabled\",\"type\":\"bool\"}],\"name\":\"setAllowListEnabled\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokenRegistration\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"name\":\"tokenRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"balanceSlot\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"scale\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_newPrice\",\"type\":\"uint256\"}],\"name\":\"updatePriceRatio\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"_tokenAddress\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_balanceSlot\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_scale\",\"type\":\"uint256\"}],\"name\":\"updateTokenInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_tokenID\",\"type\":\"uint16\"},{\"internalType\":\"uint256\",\"name\":\"_newScale\",\"type\":\"uint256\"}],\"name\":\"updateTokenScale\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x6080604052609b805460ff191660011790553480156200001d575f80fd5b50620000286200002e565b620000ec565b5f54610100900460ff16156200009a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614620000ea575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b61287880620000fa5f395ff3fe608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638da5cb5b116100fe578063dddc98be1161009e578063ef0fde0f1161006e578063ef0fde0f146104bd578063efeadb6d146104d0578063f2fde38b146104e3578063fce40489146104f6575f80fd5b8063dddc98be14610471578063e014d85e14610484578063e2f53f2c14610497578063e3de72a5146104aa575f80fd5b8063b10b69ee116100d9578063b10b69ee14610430578063c4d66de814610443578063ce67be2614610456578063dbbb2faa1461045e575f80fd5b80638da5cb5b146103ef5780639190202e1461040a578063a313d0071461041d575f80fd5b80634cbcdd1311610169578063724f91ce11610144578063724f91ce1461030e57806385519c36146103445780638c399691146103c95780638cbab7e4146103dc575f80fd5b80634cbcdd13146102de5780636f6d6cc1146102f1578063715018a614610306575f80fd5b806322bd5c1c116101a457806322bd5c1c146102775780632848aeaf146102945780632a1ea5a2146102b65780632d59c072146102c9575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d2610509565b6040516101df91906120ef565b60405180910390f35b6102076101f6366004612160565b60996020525f908152604090205481565b6040519081526020016101df565b610228610223366004612160565b610608565b6040516101df91905f60a0820190506001600160a01b0383511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102849060ff1681565b60405190151581526020016101df565b6102846102a236600461218f565b609a6020525f908152604090205460ff1681565b6102076102c4366004612160565b6106e6565b6102dc6102d73660046121b7565b61074e565b005b6102846102ec366004612160565b610ac8565b6102f9610ade565b6040516101df9190612208565b6102dc610b86565b61033161031c36600461218f565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b61038f610352366004612160565b60976020525f908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff808316926101009004169085565b604080516001600160a01b03909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102dc6103d73660046123bd565b610b99565b6103316103ea36600461218f565b610d88565b6033546040516001600160a01b0390911681526020016101df565b6102dc610418366004612465565b610df1565b61020761042b366004612160565b610f92565b6102dc61043e3660046124cc565b610ffd565b6102dc61045136600461218f565b611149565b610207611307565b6102dc61046c366004612160565b611317565b61020761047f3660046124cc565b611466565b6102dc6104923660046124f4565b6115b3565b6102dc6104a5366004612596565b6115df565b6102dc6104b836600461268d565b6116c1565b6102dc6104cb3660046124cc565b6117fa565b6102dc6104de366004612749565b61193d565b6102dc6104f136600461218f565b6119aa565b610284610504366004612160565b611a51565b60605f610516609c611a94565b90505f815167ffffffffffffffff8111156105335761053361224f565b60405190808252806020026020018201604052801561057757816020015b604080518082019091525f80825260208201528152602001906001900390816105515790505b5090505f5b8251811015610601575f83828151811061059857610598612762565b60209081029190910181015161ffff81165f818152609784526040908190205481518083019092529181526001600160a01b039091169281018390528551919350908590859081106105ec576105ec612762565b6020908102919091010152505060010161057c565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff851682526097905291909120546001600160a01b0316610681576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f90815260976020908152604091829020825160a08101845281546001600160a01b03168152600182015492810192909252600281015460ff80821615159484019490945261010090049092166060820152600390910154608082015290565b61ffff81165f908152609760205260408120546001600160a01b0316610738576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b610756611aa7565b61075e611b1b565b61ffff85165f908152609760205260409020546001600160a01b03166107b0576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166107f0576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f9081526098602052604090205461ffff16801580159061082357508561ffff168161ffff1614155b1561085a576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156108d7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526108d49181019061278f565b60015b156108df5790505b5f60975f8961ffff1661ffff1681526020019081526020015f205f015f9054906101000a90046001600160a01b031690506040518060a00160405280886001600160a01b0316815260200187815260200186151581526020018360ff1681526020018581525060975f8a61ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff16021790555060808201518160030155905050866001600160a01b0316816001600160a01b031614610a4f576001600160a01b038181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928a1682529020805490911661ffff8a161790555b866001600160a01b03168861ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa988888689604051610aac9493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610ac16001606555565b5050505050565b5f610ad8609c61ffff8416611b8e565b92915050565b60605f610aeb609c611a94565b90505f815167ffffffffffffffff811115610b0857610b0861224f565b604051908082528060200260200182016040528015610b31578160200160208202803683370190505b5090505f5b825181101561060157828181518110610b5157610b51612762565b6020026020010151828281518110610b6b57610b6b612762565b61ffff90921660209283029190910190910152600101610b36565b610b8e611aa7565b610b975f611ba5565b565b609b5460ff168015610bba5750335f908152609a602052604090205460ff16155b8015610bd157506033546001600160a01b03163314155b15610c08576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610c43576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610d83575f6001600160a01b031660975f858481518110610c6d57610c6d612762565b60209081029190910181015161ffff1682528101919091526040015f20546001600160a01b031614610d7b57818181518110610cab57610cab612762565b60200260200101515f0315610d7b57818181518110610ccc57610ccc612762565b602002602001015160995f858481518110610ce957610ce9612762565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610d1c57610d1c612762565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610d5b57610d5b612762565b6020026020010151604051610d7291815260200190565b60405180910390a25b600101610c45565b505050565b6001600160a01b0381165f9081526098602052604081205461ffff1680158015610dba57506001600160a01b03831615155b15610ad8576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610df9611aa7565b828114610e32576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610ac1575f858583818110610e4f57610e4f612762565b9050602002016020810190610e649190612160565b90505f848484818110610e7957610e79612762565b9050602002016020810190610e8e9190612749565b61ffff83165f908152609760205260409020549091506001600160a01b0316610eb8575050610f8a565b61ffff82165f9081526097602052604090206002015460ff1680151582151514610f865761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315801591909117909155610f575760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a2610f86565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610e34565b61ffff81165f908152609760205260408120546001600160a01b0316610fe4576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561101e5750335f908152609a602052604090205460ff16155b801561103557506033546001600160a01b03163314155b1561106c576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b03166110be576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036110f6576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c704679061113d9084815260200190565b60405180910390a25050565b5f54610100900460ff161580801561116757505f54600160ff909116105b806111805750303b15801561118057505f5460ff166001145b611211576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561126d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61127682611ba5565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611303575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f611312609c611c0e565b905090565b61131f611aa7565b611327611b1b565b61ffff81165f908152609760205260409020546001600160a01b03168061137a576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915560039091018490556001600160a01b03861684526098835281842080549091169055928252609990529081205561141f82611c17565b6040516001600160a01b0382169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a3506114636001606555565b50565b61ffff82165f908152609760205260408120546001600160a01b03166114b8576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a08101835281546001600160a01b03168152600182015481850152600282015460ff8082161515838601526101009091041660608201526003909101546080820152938352609990915281205490819003611556576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8082608001518561156791906127dc565b61157191906127f3565b9250825f036115ab576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505092915050565b6115bb611aa7565b6115c3611b1b565b6115cf84848484611c26565b6115d96001606555565b50505050565b6115e7611aa7565b825184511415806115fa57508151845114155b8061160757508051845114155b1561163e576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8451811015610ac1576116b985828151811061165e5761165e612762565b602002602001015185838151811061167857611678612762565b602002602001015185848151811061169257611692612762565b60200260200101518585815181106116ac576116ac612762565b6020026020010151611c26565b600101611640565b6116c9611aa7565b8051825114611704576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610d835781818151811061172157611721612762565b6020026020010151609a5f85848151811061173e5761173e612762565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061178d5761178d612762565b60200260200101516001600160a01b03167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a115888383815181106117d1576117d1612762565b60200260200101516040516117ea911515815260200190565b60405180910390a2600101611706565b609b5460ff16801561181b5750335f908152609a602052604090205460ff16155b801561183257506033546001600160a01b03163314155b15611869576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b03166118bb576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036118f3576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e749061113d9084815260200190565b611945611aa7565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b6119b2611aa7565b6001600160a01b038116611a48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611208565b61146381611ba5565b61ffff81165f908152609760205260408120546001600160a01b0316611a7857505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611aa083611f43565b9392505050565b6033546001600160a01b03163314610b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611208565b600260655403611b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611208565b6002606555565b5f8181526001830160205260408120541515611aa0565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610ad8825490565b611303609c61ffff8316611f9c565b6001600160a01b038316611c66576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361ffff165f03611ca3576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff84165f908152609760205260409020546001600160a01b031615611cf6576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081526098602052604090205461ffff1615611d49576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611dc6575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611dc39181019061278f565b60015b15611dce5790505b6040518060a00160405280856001600160a01b031681526020018481526020015f151581526020018260ff1681526020018381525060975f8761ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508460985f866001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548161ffff021916908361ffff160217905550611ee385611fa7565b604080518481525f602082015260ff8316818301526060810184905290516001600160a01b0386169161ffff8816917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a35050505050565b6060815f01805480602002602001604051908101604052809291908181526020018280548015611f9057602002820191905f5260205f20905b815481526020019060010190808311611f7c575b50505050509050919050565b5f611aa08383611fb6565b611303609c61ffff8316612099565b5f8181526001830160205260408120548015612090575f611fd860018361282b565b85549091505f90611feb9060019061282b565b905081811461204a575f865f01828154811061200957612009612762565b905f5260205f200154905080875f01848154811061202957612029612762565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061205b5761205b61283e565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610ad8565b5f915050610ad8565b5f818152600183016020526040812054611aa0908490849084906120e857508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610ad8565b505f610ad8565b602080825282518282018190525f919060409081850190868401855b8281101561213d578151805161ffff1685528601516001600160a01b031686850152928401929085019060010161210b565b5091979650505050505050565b803561ffff8116811461215b575f80fd5b919050565b5f60208284031215612170575f80fd5b611aa08261214a565b80356001600160a01b038116811461215b575f80fd5b5f6020828403121561219f575f80fd5b611aa082612179565b8035801515811461215b575f80fd5b5f805f805f60a086880312156121cb575f80fd5b6121d48661214a565b94506121e260208701612179565b9350604086013592506121f7606087016121a8565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561224357835161ffff1683529284019291840191600101612223565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156122c3576122c361224f565b604052919050565b5f67ffffffffffffffff8211156122e4576122e461224f565b5060051b60200190565b5f82601f8301126122fd575f80fd5b8135602061231261230d836122cb565b61227c565b8083825260208201915060208460051b870101935086841115612333575f80fd5b602086015b84811015612356576123498161214a565b8352918301918301612338565b509695505050505050565b5f82601f830112612370575f80fd5b8135602061238061230d836122cb565b8083825260208201915060208460051b8701019350868411156123a1575f80fd5b602086015b8481101561235657803583529183019183016123a6565b5f80604083850312156123ce575f80fd5b823567ffffffffffffffff808211156123e5575f80fd5b6123f1868387016122ee565b93506020850135915080821115612406575f80fd5b5061241385828601612361565b9150509250929050565b5f8083601f84011261242d575f80fd5b50813567ffffffffffffffff811115612444575f80fd5b6020830191508360208260051b850101111561245e575f80fd5b9250929050565b5f805f8060408587031215612478575f80fd5b843567ffffffffffffffff8082111561248f575f80fd5b61249b8883890161241d565b909650945060208701359150808211156124b3575f80fd5b506124c08782880161241d565b95989497509550505050565b5f80604083850312156124dd575f80fd5b6124e68361214a565b946020939093013593505050565b5f805f8060808587031215612507575f80fd5b6125108561214a565b935061251e60208601612179565b93969395505050506040820135916060013590565b5f82601f830112612542575f80fd5b8135602061255261230d836122cb565b8083825260208201915060208460051b870101935086841115612573575f80fd5b602086015b848110156123565761258981612179565b8352918301918301612578565b5f805f80608085870312156125a9575f80fd5b843567ffffffffffffffff808211156125c0575f80fd5b6125cc888389016122ee565b95506020915081870135818111156125e2575f80fd5b6125ee89828a01612533565b955050604087013581811115612602575f80fd5b8701601f81018913612612575f80fd5b803561262061230d826122cb565b81815260059190911b8201840190848101908b83111561263e575f80fd5b928501925b8284101561265c57833582529285019290850190612643565b96505050506060870135915080821115612674575f80fd5b5061268187828801612361565b91505092959194509250565b5f806040838503121561269e575f80fd5b823567ffffffffffffffff808211156126b5575f80fd5b6126c186838701612533565b93506020915081850135818111156126d7575f80fd5b85019050601f810186136126e9575f80fd5b80356126f761230d826122cb565b81815260059190911b82018301908381019088831115612715575f80fd5b928401925b8284101561273a5761272b846121a8565b8252928401929084019061271a565b80955050505050509250929050565b5f60208284031215612759575f80fd5b611aa0826121a8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561279f575f80fd5b815160ff81168114611aa0575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417610ad857610ad86127af565b5f82612826577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115610ad857610ad86127af565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a", +} + +// L2TokenRegistryABI is the input ABI used to generate the binding from. +// Deprecated: Use L2TokenRegistryMetaData.ABI instead. +var L2TokenRegistryABI = L2TokenRegistryMetaData.ABI + +// L2TokenRegistryBin is the compiled bytecode used for deploying new contracts. +// Deprecated: Use L2TokenRegistryMetaData.Bin instead. +var L2TokenRegistryBin = L2TokenRegistryMetaData.Bin + +// DeployL2TokenRegistry deploys a new Ethereum contract, binding an instance of L2TokenRegistry to it. +func DeployL2TokenRegistry(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *L2TokenRegistry, error) { + parsed, err := L2TokenRegistryMetaData.GetAbi() + if err != nil { + return common.Address{}, nil, nil, err + } + if parsed == nil { + return common.Address{}, nil, nil, errors.New("GetABI returned nil") + } + + address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(L2TokenRegistryBin), backend) + if err != nil { + return common.Address{}, nil, nil, err + } + return address, tx, &L2TokenRegistry{L2TokenRegistryCaller: L2TokenRegistryCaller{contract: contract}, L2TokenRegistryTransactor: L2TokenRegistryTransactor{contract: contract}, L2TokenRegistryFilterer: L2TokenRegistryFilterer{contract: contract}}, nil +} + +// L2TokenRegistry is an auto generated Go binding around an Ethereum contract. +type L2TokenRegistry struct { + L2TokenRegistryCaller // Read-only binding to the contract + L2TokenRegistryTransactor // Write-only binding to the contract + L2TokenRegistryFilterer // Log filterer for contract events +} + +// L2TokenRegistryCaller is an auto generated read-only Go binding around an Ethereum contract. +type L2TokenRegistryCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2TokenRegistryTransactor is an auto generated write-only Go binding around an Ethereum contract. +type L2TokenRegistryTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2TokenRegistryFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type L2TokenRegistryFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// L2TokenRegistrySession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type L2TokenRegistrySession struct { + Contract *L2TokenRegistry // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L2TokenRegistryCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type L2TokenRegistryCallerSession struct { + Contract *L2TokenRegistryCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// L2TokenRegistryTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type L2TokenRegistryTransactorSession struct { + Contract *L2TokenRegistryTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// L2TokenRegistryRaw is an auto generated low-level Go binding around an Ethereum contract. +type L2TokenRegistryRaw struct { + Contract *L2TokenRegistry // Generic contract binding to access the raw methods on +} + +// L2TokenRegistryCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type L2TokenRegistryCallerRaw struct { + Contract *L2TokenRegistryCaller // Generic read-only contract binding to access the raw methods on +} + +// L2TokenRegistryTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type L2TokenRegistryTransactorRaw struct { + Contract *L2TokenRegistryTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewL2TokenRegistry creates a new instance of L2TokenRegistry, bound to a specific deployed contract. +func NewL2TokenRegistry(address common.Address, backend bind.ContractBackend) (*L2TokenRegistry, error) { + contract, err := bindL2TokenRegistry(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &L2TokenRegistry{L2TokenRegistryCaller: L2TokenRegistryCaller{contract: contract}, L2TokenRegistryTransactor: L2TokenRegistryTransactor{contract: contract}, L2TokenRegistryFilterer: L2TokenRegistryFilterer{contract: contract}}, nil +} + +// NewL2TokenRegistryCaller creates a new read-only instance of L2TokenRegistry, bound to a specific deployed contract. +func NewL2TokenRegistryCaller(address common.Address, caller bind.ContractCaller) (*L2TokenRegistryCaller, error) { + contract, err := bindL2TokenRegistry(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &L2TokenRegistryCaller{contract: contract}, nil +} + +// NewL2TokenRegistryTransactor creates a new write-only instance of L2TokenRegistry, bound to a specific deployed contract. +func NewL2TokenRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*L2TokenRegistryTransactor, error) { + contract, err := bindL2TokenRegistry(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &L2TokenRegistryTransactor{contract: contract}, nil +} + +// NewL2TokenRegistryFilterer creates a new log filterer instance of L2TokenRegistry, bound to a specific deployed contract. +func NewL2TokenRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*L2TokenRegistryFilterer, error) { + contract, err := bindL2TokenRegistry(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &L2TokenRegistryFilterer{contract: contract}, nil +} + +// bindL2TokenRegistry binds a generic wrapper to an already deployed contract. +func bindL2TokenRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := L2TokenRegistryMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L2TokenRegistry *L2TokenRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L2TokenRegistry.Contract.L2TokenRegistryCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L2TokenRegistry *L2TokenRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.L2TokenRegistryTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L2TokenRegistry *L2TokenRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.L2TokenRegistryTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_L2TokenRegistry *L2TokenRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _L2TokenRegistry.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_L2TokenRegistry *L2TokenRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_L2TokenRegistry *L2TokenRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.contract.Transact(opts, method, params...) +} + +// AllowList is a free data retrieval call binding the contract method 0x2848aeaf. +// +// Solidity: function allowList(address ) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCaller) AllowList(opts *bind.CallOpts, arg0 common.Address) (bool, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "allowList", arg0) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// AllowList is a free data retrieval call binding the contract method 0x2848aeaf. +// +// Solidity: function allowList(address ) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistrySession) AllowList(arg0 common.Address) (bool, error) { + return _L2TokenRegistry.Contract.AllowList(&_L2TokenRegistry.CallOpts, arg0) +} + +// AllowList is a free data retrieval call binding the contract method 0x2848aeaf. +// +// Solidity: function allowList(address ) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) AllowList(arg0 common.Address) (bool, error) { + return _L2TokenRegistry.Contract.AllowList(&_L2TokenRegistry.CallOpts, arg0) +} + +// AllowListEnabled is a free data retrieval call binding the contract method 0x22bd5c1c. +// +// Solidity: function allowListEnabled() view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCaller) AllowListEnabled(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "allowListEnabled") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// AllowListEnabled is a free data retrieval call binding the contract method 0x22bd5c1c. +// +// Solidity: function allowListEnabled() view returns(bool) +func (_L2TokenRegistry *L2TokenRegistrySession) AllowListEnabled() (bool, error) { + return _L2TokenRegistry.Contract.AllowListEnabled(&_L2TokenRegistry.CallOpts) +} + +// AllowListEnabled is a free data retrieval call binding the contract method 0x22bd5c1c. +// +// Solidity: function allowListEnabled() view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) AllowListEnabled() (bool, error) { + return _L2TokenRegistry.Contract.AllowListEnabled(&_L2TokenRegistry.CallOpts) +} + +// CalculateTokenAmount is a free data retrieval call binding the contract method 0xdddc98be. +// +// Solidity: function calculateTokenAmount(uint16 _tokenID, uint256 _ethAmount) view returns(uint256 tokenAmount) +func (_L2TokenRegistry *L2TokenRegistryCaller) CalculateTokenAmount(opts *bind.CallOpts, _tokenID uint16, _ethAmount *big.Int) (*big.Int, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "calculateTokenAmount", _tokenID, _ethAmount) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CalculateTokenAmount is a free data retrieval call binding the contract method 0xdddc98be. +// +// Solidity: function calculateTokenAmount(uint16 _tokenID, uint256 _ethAmount) view returns(uint256 tokenAmount) +func (_L2TokenRegistry *L2TokenRegistrySession) CalculateTokenAmount(_tokenID uint16, _ethAmount *big.Int) (*big.Int, error) { + return _L2TokenRegistry.Contract.CalculateTokenAmount(&_L2TokenRegistry.CallOpts, _tokenID, _ethAmount) +} + +// CalculateTokenAmount is a free data retrieval call binding the contract method 0xdddc98be. +// +// Solidity: function calculateTokenAmount(uint16 _tokenID, uint256 _ethAmount) view returns(uint256 tokenAmount) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) CalculateTokenAmount(_tokenID uint16, _ethAmount *big.Int) (*big.Int, error) { + return _L2TokenRegistry.Contract.CalculateTokenAmount(&_L2TokenRegistry.CallOpts, _tokenID, _ethAmount) +} + +// GetSupportedIDList is a free data retrieval call binding the contract method 0x6f6d6cc1. +// +// Solidity: function getSupportedIDList() view returns(uint16[]) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetSupportedIDList(opts *bind.CallOpts) ([]uint16, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getSupportedIDList") + + if err != nil { + return *new([]uint16), err + } + + out0 := *abi.ConvertType(out[0], new([]uint16)).(*[]uint16) + + return out0, err + +} + +// GetSupportedIDList is a free data retrieval call binding the contract method 0x6f6d6cc1. +// +// Solidity: function getSupportedIDList() view returns(uint16[]) +func (_L2TokenRegistry *L2TokenRegistrySession) GetSupportedIDList() ([]uint16, error) { + return _L2TokenRegistry.Contract.GetSupportedIDList(&_L2TokenRegistry.CallOpts) +} + +// GetSupportedIDList is a free data retrieval call binding the contract method 0x6f6d6cc1. +// +// Solidity: function getSupportedIDList() view returns(uint16[]) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetSupportedIDList() ([]uint16, error) { + return _L2TokenRegistry.Contract.GetSupportedIDList(&_L2TokenRegistry.CallOpts) +} + +// GetSupportedTokenCount is a free data retrieval call binding the contract method 0xce67be26. +// +// Solidity: function getSupportedTokenCount() view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetSupportedTokenCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getSupportedTokenCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetSupportedTokenCount is a free data retrieval call binding the contract method 0xce67be26. +// +// Solidity: function getSupportedTokenCount() view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistrySession) GetSupportedTokenCount() (*big.Int, error) { + return _L2TokenRegistry.Contract.GetSupportedTokenCount(&_L2TokenRegistry.CallOpts) +} + +// GetSupportedTokenCount is a free data retrieval call binding the contract method 0xce67be26. +// +// Solidity: function getSupportedTokenCount() view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetSupportedTokenCount() (*big.Int, error) { + return _L2TokenRegistry.Contract.GetSupportedTokenCount(&_L2TokenRegistry.CallOpts) +} + +// GetSupportedTokenList is a free data retrieval call binding the contract method 0x1585458c. +// +// Solidity: function getSupportedTokenList() view returns((uint16,address)[]) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetSupportedTokenList(opts *bind.CallOpts) ([]IL2TokenRegistryTokenEntry, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getSupportedTokenList") + + if err != nil { + return *new([]IL2TokenRegistryTokenEntry), err + } + + out0 := *abi.ConvertType(out[0], new([]IL2TokenRegistryTokenEntry)).(*[]IL2TokenRegistryTokenEntry) + + return out0, err + +} + +// GetSupportedTokenList is a free data retrieval call binding the contract method 0x1585458c. +// +// Solidity: function getSupportedTokenList() view returns((uint16,address)[]) +func (_L2TokenRegistry *L2TokenRegistrySession) GetSupportedTokenList() ([]IL2TokenRegistryTokenEntry, error) { + return _L2TokenRegistry.Contract.GetSupportedTokenList(&_L2TokenRegistry.CallOpts) +} + +// GetSupportedTokenList is a free data retrieval call binding the contract method 0x1585458c. +// +// Solidity: function getSupportedTokenList() view returns((uint16,address)[]) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetSupportedTokenList() ([]IL2TokenRegistryTokenEntry, error) { + return _L2TokenRegistry.Contract.GetSupportedTokenList(&_L2TokenRegistry.CallOpts) +} + +// GetTokenIdByAddress is a free data retrieval call binding the contract method 0x8cbab7e4. +// +// Solidity: function getTokenIdByAddress(address tokenAddress) view returns(uint16) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetTokenIdByAddress(opts *bind.CallOpts, tokenAddress common.Address) (uint16, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getTokenIdByAddress", tokenAddress) + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// GetTokenIdByAddress is a free data retrieval call binding the contract method 0x8cbab7e4. +// +// Solidity: function getTokenIdByAddress(address tokenAddress) view returns(uint16) +func (_L2TokenRegistry *L2TokenRegistrySession) GetTokenIdByAddress(tokenAddress common.Address) (uint16, error) { + return _L2TokenRegistry.Contract.GetTokenIdByAddress(&_L2TokenRegistry.CallOpts, tokenAddress) +} + +// GetTokenIdByAddress is a free data retrieval call binding the contract method 0x8cbab7e4. +// +// Solidity: function getTokenIdByAddress(address tokenAddress) view returns(uint16) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetTokenIdByAddress(tokenAddress common.Address) (uint16, error) { + return _L2TokenRegistry.Contract.GetTokenIdByAddress(&_L2TokenRegistry.CallOpts, tokenAddress) +} + +// GetTokenInfo is a free data retrieval call binding the contract method 0x1c58e793. +// +// Solidity: function getTokenInfo(uint16 _tokenID) view returns((address,bytes32,bool,uint8,uint256)) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetTokenInfo(opts *bind.CallOpts, _tokenID uint16) (IL2TokenRegistryTokenInfo, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getTokenInfo", _tokenID) + + if err != nil { + return *new(IL2TokenRegistryTokenInfo), err + } + + out0 := *abi.ConvertType(out[0], new(IL2TokenRegistryTokenInfo)).(*IL2TokenRegistryTokenInfo) + + return out0, err + +} + +// GetTokenInfo is a free data retrieval call binding the contract method 0x1c58e793. +// +// Solidity: function getTokenInfo(uint16 _tokenID) view returns((address,bytes32,bool,uint8,uint256)) +func (_L2TokenRegistry *L2TokenRegistrySession) GetTokenInfo(_tokenID uint16) (IL2TokenRegistryTokenInfo, error) { + return _L2TokenRegistry.Contract.GetTokenInfo(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// GetTokenInfo is a free data retrieval call binding the contract method 0x1c58e793. +// +// Solidity: function getTokenInfo(uint16 _tokenID) view returns((address,bytes32,bool,uint8,uint256)) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetTokenInfo(_tokenID uint16) (IL2TokenRegistryTokenInfo, error) { + return _L2TokenRegistry.Contract.GetTokenInfo(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// GetTokenPrice is a free data retrieval call binding the contract method 0x2a1ea5a2. +// +// Solidity: function getTokenPrice(uint16 _tokenID) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetTokenPrice(opts *bind.CallOpts, _tokenID uint16) (*big.Int, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getTokenPrice", _tokenID) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenPrice is a free data retrieval call binding the contract method 0x2a1ea5a2. +// +// Solidity: function getTokenPrice(uint16 _tokenID) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistrySession) GetTokenPrice(_tokenID uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.GetTokenPrice(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// GetTokenPrice is a free data retrieval call binding the contract method 0x2a1ea5a2. +// +// Solidity: function getTokenPrice(uint16 _tokenID) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetTokenPrice(_tokenID uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.GetTokenPrice(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// GetTokenScale is a free data retrieval call binding the contract method 0xa313d007. +// +// Solidity: function getTokenScale(uint16 _tokenID) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCaller) GetTokenScale(opts *bind.CallOpts, _tokenID uint16) (*big.Int, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "getTokenScale", _tokenID) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetTokenScale is a free data retrieval call binding the contract method 0xa313d007. +// +// Solidity: function getTokenScale(uint16 _tokenID) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistrySession) GetTokenScale(_tokenID uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.GetTokenScale(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// GetTokenScale is a free data retrieval call binding the contract method 0xa313d007. +// +// Solidity: function getTokenScale(uint16 _tokenID) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) GetTokenScale(_tokenID uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.GetTokenScale(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// IsTokenActive is a free data retrieval call binding the contract method 0xfce40489. +// +// Solidity: function isTokenActive(uint16 _tokenID) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCaller) IsTokenActive(opts *bind.CallOpts, _tokenID uint16) (bool, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "isTokenActive", _tokenID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTokenActive is a free data retrieval call binding the contract method 0xfce40489. +// +// Solidity: function isTokenActive(uint16 _tokenID) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistrySession) IsTokenActive(_tokenID uint16) (bool, error) { + return _L2TokenRegistry.Contract.IsTokenActive(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// IsTokenActive is a free data retrieval call binding the contract method 0xfce40489. +// +// Solidity: function isTokenActive(uint16 _tokenID) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) IsTokenActive(_tokenID uint16) (bool, error) { + return _L2TokenRegistry.Contract.IsTokenActive(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// IsTokenSupported is a free data retrieval call binding the contract method 0x4cbcdd13. +// +// Solidity: function isTokenSupported(uint16 _tokenID) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCaller) IsTokenSupported(opts *bind.CallOpts, _tokenID uint16) (bool, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "isTokenSupported", _tokenID) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// IsTokenSupported is a free data retrieval call binding the contract method 0x4cbcdd13. +// +// Solidity: function isTokenSupported(uint16 _tokenID) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistrySession) IsTokenSupported(_tokenID uint16) (bool, error) { + return _L2TokenRegistry.Contract.IsTokenSupported(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// IsTokenSupported is a free data retrieval call binding the contract method 0x4cbcdd13. +// +// Solidity: function isTokenSupported(uint16 _tokenID) view returns(bool) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) IsTokenSupported(_tokenID uint16) (bool, error) { + return _L2TokenRegistry.Contract.IsTokenSupported(&_L2TokenRegistry.CallOpts, _tokenID) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_L2TokenRegistry *L2TokenRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_L2TokenRegistry *L2TokenRegistrySession) Owner() (common.Address, error) { + return _L2TokenRegistry.Contract.Owner(&_L2TokenRegistry.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) Owner() (common.Address, error) { + return _L2TokenRegistry.Contract.Owner(&_L2TokenRegistry.CallOpts) +} + +// PriceRatio is a free data retrieval call binding the contract method 0x19904c33. +// +// Solidity: function priceRatio(uint16 ) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCaller) PriceRatio(opts *bind.CallOpts, arg0 uint16) (*big.Int, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "priceRatio", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PriceRatio is a free data retrieval call binding the contract method 0x19904c33. +// +// Solidity: function priceRatio(uint16 ) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistrySession) PriceRatio(arg0 uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.PriceRatio(&_L2TokenRegistry.CallOpts, arg0) +} + +// PriceRatio is a free data retrieval call binding the contract method 0x19904c33. +// +// Solidity: function priceRatio(uint16 ) view returns(uint256) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) PriceRatio(arg0 uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.PriceRatio(&_L2TokenRegistry.CallOpts, arg0) +} + +// TokenRegistration is a free data retrieval call binding the contract method 0x724f91ce. +// +// Solidity: function tokenRegistration(address ) view returns(uint16) +func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistration(opts *bind.CallOpts, arg0 common.Address) (uint16, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "tokenRegistration", arg0) + + if err != nil { + return *new(uint16), err + } + + out0 := *abi.ConvertType(out[0], new(uint16)).(*uint16) + + return out0, err + +} + +// TokenRegistration is a free data retrieval call binding the contract method 0x724f91ce. +// +// Solidity: function tokenRegistration(address ) view returns(uint16) +func (_L2TokenRegistry *L2TokenRegistrySession) TokenRegistration(arg0 common.Address) (uint16, error) { + return _L2TokenRegistry.Contract.TokenRegistration(&_L2TokenRegistry.CallOpts, arg0) +} + +// TokenRegistration is a free data retrieval call binding the contract method 0x724f91ce. +// +// Solidity: function tokenRegistration(address ) view returns(uint16) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) TokenRegistration(arg0 common.Address) (uint16, error) { + return _L2TokenRegistry.Contract.TokenRegistration(&_L2TokenRegistry.CallOpts, arg0) +} + +// TokenRegistry is a free data retrieval call binding the contract method 0x85519c36. +// +// Solidity: function tokenRegistry(uint16 ) view returns(address tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistry(opts *bind.CallOpts, arg0 uint16) (struct { + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int +}, error) { + var out []interface{} + err := _L2TokenRegistry.contract.Call(opts, &out, "tokenRegistry", arg0) + + outstruct := new(struct { + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.TokenAddress = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.BalanceSlot = *abi.ConvertType(out[1], new([32]byte)).(*[32]byte) + outstruct.IsActive = *abi.ConvertType(out[2], new(bool)).(*bool) + outstruct.Decimals = *abi.ConvertType(out[3], new(uint8)).(*uint8) + outstruct.Scale = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// TokenRegistry is a free data retrieval call binding the contract method 0x85519c36. +// +// Solidity: function tokenRegistry(uint16 ) view returns(address tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistrySession) TokenRegistry(arg0 uint16) (struct { + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int +}, error) { + return _L2TokenRegistry.Contract.TokenRegistry(&_L2TokenRegistry.CallOpts, arg0) +} + +// TokenRegistry is a free data retrieval call binding the contract method 0x85519c36. +// +// Solidity: function tokenRegistry(uint16 ) view returns(address tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) TokenRegistry(arg0 uint16) (struct { + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int +}, error) { + return _L2TokenRegistry.Contract.TokenRegistry(&_L2TokenRegistry.CallOpts, arg0) +} + +// BatchUpdatePrices is a paid mutator transaction binding the contract method 0x8c399691. +// +// Solidity: function batchUpdatePrices(uint16[] _tokenIDs, uint256[] _prices) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) BatchUpdatePrices(opts *bind.TransactOpts, _tokenIDs []uint16, _prices []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "batchUpdatePrices", _tokenIDs, _prices) +} + +// BatchUpdatePrices is a paid mutator transaction binding the contract method 0x8c399691. +// +// Solidity: function batchUpdatePrices(uint16[] _tokenIDs, uint256[] _prices) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) BatchUpdatePrices(_tokenIDs []uint16, _prices []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.BatchUpdatePrices(&_L2TokenRegistry.TransactOpts, _tokenIDs, _prices) +} + +// BatchUpdatePrices is a paid mutator transaction binding the contract method 0x8c399691. +// +// Solidity: function batchUpdatePrices(uint16[] _tokenIDs, uint256[] _prices) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) BatchUpdatePrices(_tokenIDs []uint16, _prices []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.BatchUpdatePrices(&_L2TokenRegistry.TransactOpts, _tokenIDs, _prices) +} + +// BatchUpdateTokenStatus is a paid mutator transaction binding the contract method 0x9190202e. +// +// Solidity: function batchUpdateTokenStatus(uint16[] _tokenIDs, bool[] _isActives) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) BatchUpdateTokenStatus(opts *bind.TransactOpts, _tokenIDs []uint16, _isActives []bool) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "batchUpdateTokenStatus", _tokenIDs, _isActives) +} + +// BatchUpdateTokenStatus is a paid mutator transaction binding the contract method 0x9190202e. +// +// Solidity: function batchUpdateTokenStatus(uint16[] _tokenIDs, bool[] _isActives) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) BatchUpdateTokenStatus(_tokenIDs []uint16, _isActives []bool) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.BatchUpdateTokenStatus(&_L2TokenRegistry.TransactOpts, _tokenIDs, _isActives) +} + +// BatchUpdateTokenStatus is a paid mutator transaction binding the contract method 0x9190202e. +// +// Solidity: function batchUpdateTokenStatus(uint16[] _tokenIDs, bool[] _isActives) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) BatchUpdateTokenStatus(_tokenIDs []uint16, _isActives []bool) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.BatchUpdateTokenStatus(&_L2TokenRegistry.TransactOpts, _tokenIDs, _isActives) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address owner_) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) Initialize(opts *bind.TransactOpts, owner_ common.Address) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "initialize", owner_) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address owner_) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) Initialize(owner_ common.Address) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.Initialize(&_L2TokenRegistry.TransactOpts, owner_) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address owner_) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) Initialize(owner_ common.Address) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.Initialize(&_L2TokenRegistry.TransactOpts, owner_) +} + +// RegisterToken is a paid mutator transaction binding the contract method 0xe014d85e. +// +// Solidity: function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) RegisterToken(opts *bind.TransactOpts, _tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "registerToken", _tokenID, _tokenAddress, _balanceSlot, _scale) +} + +// RegisterToken is a paid mutator transaction binding the contract method 0xe014d85e. +// +// Solidity: function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) RegisterToken(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterToken(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _scale) +} + +// RegisterToken is a paid mutator transaction binding the contract method 0xe014d85e. +// +// Solidity: function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) RegisterToken(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterToken(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _scale) +} + +// RegisterTokens is a paid mutator transaction binding the contract method 0xe2f53f2c. +// +// Solidity: function registerTokens(uint16[] _tokenIDs, address[] _tokenAddresses, bytes32[] _balanceSlots, uint256[] _scales) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) RegisterTokens(opts *bind.TransactOpts, _tokenIDs []uint16, _tokenAddresses []common.Address, _balanceSlots [][32]byte, _scales []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "registerTokens", _tokenIDs, _tokenAddresses, _balanceSlots, _scales) +} + +// RegisterTokens is a paid mutator transaction binding the contract method 0xe2f53f2c. +// +// Solidity: function registerTokens(uint16[] _tokenIDs, address[] _tokenAddresses, bytes32[] _balanceSlots, uint256[] _scales) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) RegisterTokens(_tokenIDs []uint16, _tokenAddresses []common.Address, _balanceSlots [][32]byte, _scales []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterTokens(&_L2TokenRegistry.TransactOpts, _tokenIDs, _tokenAddresses, _balanceSlots, _scales) +} + +// RegisterTokens is a paid mutator transaction binding the contract method 0xe2f53f2c. +// +// Solidity: function registerTokens(uint16[] _tokenIDs, address[] _tokenAddresses, bytes32[] _balanceSlots, uint256[] _scales) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) RegisterTokens(_tokenIDs []uint16, _tokenAddresses []common.Address, _balanceSlots [][32]byte, _scales []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterTokens(&_L2TokenRegistry.TransactOpts, _tokenIDs, _tokenAddresses, _balanceSlots, _scales) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0xdbbb2faa. +// +// Solidity: function removeToken(uint16 _tokenID) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) RemoveToken(opts *bind.TransactOpts, _tokenID uint16) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "removeToken", _tokenID) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0xdbbb2faa. +// +// Solidity: function removeToken(uint16 _tokenID) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) RemoveToken(_tokenID uint16) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RemoveToken(&_L2TokenRegistry.TransactOpts, _tokenID) +} + +// RemoveToken is a paid mutator transaction binding the contract method 0xdbbb2faa. +// +// Solidity: function removeToken(uint16 _tokenID) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) RemoveToken(_tokenID uint16) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RemoveToken(&_L2TokenRegistry.TransactOpts, _tokenID) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_L2TokenRegistry *L2TokenRegistrySession) RenounceOwnership() (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RenounceOwnership(&_L2TokenRegistry.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RenounceOwnership(&_L2TokenRegistry.TransactOpts) +} + +// SetAllowList is a paid mutator transaction binding the contract method 0xe3de72a5. +// +// Solidity: function setAllowList(address[] user, bool[] val) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) SetAllowList(opts *bind.TransactOpts, user []common.Address, val []bool) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "setAllowList", user, val) +} + +// SetAllowList is a paid mutator transaction binding the contract method 0xe3de72a5. +// +// Solidity: function setAllowList(address[] user, bool[] val) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) SetAllowList(user []common.Address, val []bool) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.SetAllowList(&_L2TokenRegistry.TransactOpts, user, val) +} + +// SetAllowList is a paid mutator transaction binding the contract method 0xe3de72a5. +// +// Solidity: function setAllowList(address[] user, bool[] val) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) SetAllowList(user []common.Address, val []bool) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.SetAllowList(&_L2TokenRegistry.TransactOpts, user, val) +} + +// SetAllowListEnabled is a paid mutator transaction binding the contract method 0xefeadb6d. +// +// Solidity: function setAllowListEnabled(bool _allowListEnabled) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) SetAllowListEnabled(opts *bind.TransactOpts, _allowListEnabled bool) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "setAllowListEnabled", _allowListEnabled) +} + +// SetAllowListEnabled is a paid mutator transaction binding the contract method 0xefeadb6d. +// +// Solidity: function setAllowListEnabled(bool _allowListEnabled) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) SetAllowListEnabled(_allowListEnabled bool) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.SetAllowListEnabled(&_L2TokenRegistry.TransactOpts, _allowListEnabled) +} + +// SetAllowListEnabled is a paid mutator transaction binding the contract method 0xefeadb6d. +// +// Solidity: function setAllowListEnabled(bool _allowListEnabled) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) SetAllowListEnabled(_allowListEnabled bool) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.SetAllowListEnabled(&_L2TokenRegistry.TransactOpts, _allowListEnabled) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.TransferOwnership(&_L2TokenRegistry.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.TransferOwnership(&_L2TokenRegistry.TransactOpts, newOwner) +} + +// UpdatePriceRatio is a paid mutator transaction binding the contract method 0xb10b69ee. +// +// Solidity: function updatePriceRatio(uint16 _tokenID, uint256 _newPrice) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) UpdatePriceRatio(opts *bind.TransactOpts, _tokenID uint16, _newPrice *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "updatePriceRatio", _tokenID, _newPrice) +} + +// UpdatePriceRatio is a paid mutator transaction binding the contract method 0xb10b69ee. +// +// Solidity: function updatePriceRatio(uint16 _tokenID, uint256 _newPrice) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) UpdatePriceRatio(_tokenID uint16, _newPrice *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdatePriceRatio(&_L2TokenRegistry.TransactOpts, _tokenID, _newPrice) +} + +// UpdatePriceRatio is a paid mutator transaction binding the contract method 0xb10b69ee. +// +// Solidity: function updatePriceRatio(uint16 _tokenID, uint256 _newPrice) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) UpdatePriceRatio(_tokenID uint16, _newPrice *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdatePriceRatio(&_L2TokenRegistry.TransactOpts, _tokenID, _newPrice) +} + +// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x2d59c072. +// +// Solidity: function updateTokenInfo(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _isActive, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) UpdateTokenInfo(opts *bind.TransactOpts, _tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _isActive bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "updateTokenInfo", _tokenID, _tokenAddress, _balanceSlot, _isActive, _scale) +} + +// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x2d59c072. +// +// Solidity: function updateTokenInfo(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _isActive, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) UpdateTokenInfo(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _isActive bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdateTokenInfo(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _isActive, _scale) +} + +// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x2d59c072. +// +// Solidity: function updateTokenInfo(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _isActive, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) UpdateTokenInfo(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _isActive bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdateTokenInfo(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _isActive, _scale) +} + +// UpdateTokenScale is a paid mutator transaction binding the contract method 0xef0fde0f. +// +// Solidity: function updateTokenScale(uint16 _tokenID, uint256 _newScale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) UpdateTokenScale(opts *bind.TransactOpts, _tokenID uint16, _newScale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "updateTokenScale", _tokenID, _newScale) +} + +// UpdateTokenScale is a paid mutator transaction binding the contract method 0xef0fde0f. +// +// Solidity: function updateTokenScale(uint16 _tokenID, uint256 _newScale) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) UpdateTokenScale(_tokenID uint16, _newScale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdateTokenScale(&_L2TokenRegistry.TransactOpts, _tokenID, _newScale) +} + +// UpdateTokenScale is a paid mutator transaction binding the contract method 0xef0fde0f. +// +// Solidity: function updateTokenScale(uint16 _tokenID, uint256 _newScale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) UpdateTokenScale(_tokenID uint16, _newScale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdateTokenScale(&_L2TokenRegistry.TransactOpts, _tokenID, _newScale) +} + +// L2TokenRegistryAllowListEnabledUpdatedIterator is returned from FilterAllowListEnabledUpdated and is used to iterate over the raw logs and unpacked data for AllowListEnabledUpdated events raised by the L2TokenRegistry contract. +type L2TokenRegistryAllowListEnabledUpdatedIterator struct { + Event *L2TokenRegistryAllowListEnabledUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryAllowListEnabledUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryAllowListEnabledUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryAllowListEnabledUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryAllowListEnabledUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryAllowListEnabledUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryAllowListEnabledUpdated represents a AllowListEnabledUpdated event raised by the L2TokenRegistry contract. +type L2TokenRegistryAllowListEnabledUpdated struct { + IsEnabled bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAllowListEnabledUpdated is a free log retrieval operation binding the contract event 0x16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb3. +// +// Solidity: event AllowListEnabledUpdated(bool isEnabled) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterAllowListEnabledUpdated(opts *bind.FilterOpts) (*L2TokenRegistryAllowListEnabledUpdatedIterator, error) { + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "AllowListEnabledUpdated") + if err != nil { + return nil, err + } + return &L2TokenRegistryAllowListEnabledUpdatedIterator{contract: _L2TokenRegistry.contract, event: "AllowListEnabledUpdated", logs: logs, sub: sub}, nil +} + +// WatchAllowListEnabledUpdated is a free log subscription operation binding the contract event 0x16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb3. +// +// Solidity: event AllowListEnabledUpdated(bool isEnabled) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchAllowListEnabledUpdated(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryAllowListEnabledUpdated) (event.Subscription, error) { + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "AllowListEnabledUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryAllowListEnabledUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "AllowListEnabledUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAllowListEnabledUpdated is a log parse operation binding the contract event 0x16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb3. +// +// Solidity: event AllowListEnabledUpdated(bool isEnabled) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseAllowListEnabledUpdated(log types.Log) (*L2TokenRegistryAllowListEnabledUpdated, error) { + event := new(L2TokenRegistryAllowListEnabledUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "AllowListEnabledUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryAllowListSetIterator is returned from FilterAllowListSet and is used to iterate over the raw logs and unpacked data for AllowListSet events raised by the L2TokenRegistry contract. +type L2TokenRegistryAllowListSetIterator struct { + Event *L2TokenRegistryAllowListSet // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryAllowListSetIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryAllowListSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryAllowListSet) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryAllowListSetIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryAllowListSetIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryAllowListSet represents a AllowListSet event raised by the L2TokenRegistry contract. +type L2TokenRegistryAllowListSet struct { + User common.Address + Val bool + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAllowListSet is a free log retrieval operation binding the contract event 0x6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a11588. +// +// Solidity: event AllowListSet(address indexed user, bool val) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterAllowListSet(opts *bind.FilterOpts, user []common.Address) (*L2TokenRegistryAllowListSetIterator, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "AllowListSet", userRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryAllowListSetIterator{contract: _L2TokenRegistry.contract, event: "AllowListSet", logs: logs, sub: sub}, nil +} + +// WatchAllowListSet is a free log subscription operation binding the contract event 0x6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a11588. +// +// Solidity: event AllowListSet(address indexed user, bool val) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchAllowListSet(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryAllowListSet, user []common.Address) (event.Subscription, error) { + + var userRule []interface{} + for _, userItem := range user { + userRule = append(userRule, userItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "AllowListSet", userRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryAllowListSet) + if err := _L2TokenRegistry.contract.UnpackLog(event, "AllowListSet", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAllowListSet is a log parse operation binding the contract event 0x6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a11588. +// +// Solidity: event AllowListSet(address indexed user, bool val) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseAllowListSet(log types.Log) (*L2TokenRegistryAllowListSet, error) { + event := new(L2TokenRegistryAllowListSet) + if err := _L2TokenRegistry.contract.UnpackLog(event, "AllowListSet", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the L2TokenRegistry contract. +type L2TokenRegistryInitializedIterator struct { + Event *L2TokenRegistryInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryInitialized represents a Initialized event raised by the L2TokenRegistry contract. +type L2TokenRegistryInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterInitialized(opts *bind.FilterOpts) (*L2TokenRegistryInitializedIterator, error) { + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &L2TokenRegistryInitializedIterator{contract: _L2TokenRegistry.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryInitialized) (event.Subscription, error) { + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryInitialized) + if err := _L2TokenRegistry.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseInitialized(log types.Log) (*L2TokenRegistryInitialized, error) { + event := new(L2TokenRegistryInitialized) + if err := _L2TokenRegistry.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryOwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the L2TokenRegistry contract. +type L2TokenRegistryOwnershipTransferredIterator struct { + Event *L2TokenRegistryOwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryOwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryOwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryOwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryOwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryOwnershipTransferred represents a OwnershipTransferred event raised by the L2TokenRegistry contract. +type L2TokenRegistryOwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*L2TokenRegistryOwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryOwnershipTransferredIterator{contract: _L2TokenRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryOwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryOwnershipTransferred) + if err := _L2TokenRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*L2TokenRegistryOwnershipTransferred, error) { + event := new(L2TokenRegistryOwnershipTransferred) + if err := _L2TokenRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryPriceRatioUpdatedIterator is returned from FilterPriceRatioUpdated and is used to iterate over the raw logs and unpacked data for PriceRatioUpdated events raised by the L2TokenRegistry contract. +type L2TokenRegistryPriceRatioUpdatedIterator struct { + Event *L2TokenRegistryPriceRatioUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryPriceRatioUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryPriceRatioUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryPriceRatioUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryPriceRatioUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryPriceRatioUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryPriceRatioUpdated represents a PriceRatioUpdated event raised by the L2TokenRegistry contract. +type L2TokenRegistryPriceRatioUpdated struct { + TokenID uint16 + NewPrice *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPriceRatioUpdated is a free log retrieval operation binding the contract event 0xd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467. +// +// Solidity: event PriceRatioUpdated(uint16 indexed tokenID, uint256 newPrice) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterPriceRatioUpdated(opts *bind.FilterOpts, tokenID []uint16) (*L2TokenRegistryPriceRatioUpdatedIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "PriceRatioUpdated", tokenIDRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryPriceRatioUpdatedIterator{contract: _L2TokenRegistry.contract, event: "PriceRatioUpdated", logs: logs, sub: sub}, nil +} + +// WatchPriceRatioUpdated is a free log subscription operation binding the contract event 0xd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467. +// +// Solidity: event PriceRatioUpdated(uint16 indexed tokenID, uint256 newPrice) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchPriceRatioUpdated(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryPriceRatioUpdated, tokenID []uint16) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "PriceRatioUpdated", tokenIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryPriceRatioUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "PriceRatioUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePriceRatioUpdated is a log parse operation binding the contract event 0xd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467. +// +// Solidity: event PriceRatioUpdated(uint16 indexed tokenID, uint256 newPrice) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParsePriceRatioUpdated(log types.Log) (*L2TokenRegistryPriceRatioUpdated, error) { + event := new(L2TokenRegistryPriceRatioUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "PriceRatioUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryTokenActivatedIterator is returned from FilterTokenActivated and is used to iterate over the raw logs and unpacked data for TokenActivated events raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenActivatedIterator struct { + Event *L2TokenRegistryTokenActivated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryTokenActivatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenActivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenActivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryTokenActivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryTokenActivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryTokenActivated represents a TokenActivated event raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenActivated struct { + TokenID uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenActivated is a free log retrieval operation binding the contract event 0xba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8. +// +// Solidity: event TokenActivated(uint16 indexed tokenID) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterTokenActivated(opts *bind.FilterOpts, tokenID []uint16) (*L2TokenRegistryTokenActivatedIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "TokenActivated", tokenIDRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryTokenActivatedIterator{contract: _L2TokenRegistry.contract, event: "TokenActivated", logs: logs, sub: sub}, nil +} + +// WatchTokenActivated is a free log subscription operation binding the contract event 0xba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8. +// +// Solidity: event TokenActivated(uint16 indexed tokenID) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchTokenActivated(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryTokenActivated, tokenID []uint16) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "TokenActivated", tokenIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryTokenActivated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenActivated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTokenActivated is a log parse operation binding the contract event 0xba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8. +// +// Solidity: event TokenActivated(uint16 indexed tokenID) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseTokenActivated(log types.Log) (*L2TokenRegistryTokenActivated, error) { + event := new(L2TokenRegistryTokenActivated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenActivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryTokenDeactivatedIterator is returned from FilterTokenDeactivated and is used to iterate over the raw logs and unpacked data for TokenDeactivated events raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenDeactivatedIterator struct { + Event *L2TokenRegistryTokenDeactivated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryTokenDeactivatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenDeactivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenDeactivated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryTokenDeactivatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryTokenDeactivatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryTokenDeactivated represents a TokenDeactivated event raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenDeactivated struct { + TokenID uint16 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenDeactivated is a free log retrieval operation binding the contract event 0xa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef. +// +// Solidity: event TokenDeactivated(uint16 indexed tokenID) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterTokenDeactivated(opts *bind.FilterOpts, tokenID []uint16) (*L2TokenRegistryTokenDeactivatedIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "TokenDeactivated", tokenIDRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryTokenDeactivatedIterator{contract: _L2TokenRegistry.contract, event: "TokenDeactivated", logs: logs, sub: sub}, nil +} + +// WatchTokenDeactivated is a free log subscription operation binding the contract event 0xa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef. +// +// Solidity: event TokenDeactivated(uint16 indexed tokenID) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchTokenDeactivated(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryTokenDeactivated, tokenID []uint16) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "TokenDeactivated", tokenIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryTokenDeactivated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenDeactivated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTokenDeactivated is a log parse operation binding the contract event 0xa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef. +// +// Solidity: event TokenDeactivated(uint16 indexed tokenID) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseTokenDeactivated(log types.Log) (*L2TokenRegistryTokenDeactivated, error) { + event := new(L2TokenRegistryTokenDeactivated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenDeactivated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryTokenInfoUpdatedIterator is returned from FilterTokenInfoUpdated and is used to iterate over the raw logs and unpacked data for TokenInfoUpdated events raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenInfoUpdatedIterator struct { + Event *L2TokenRegistryTokenInfoUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryTokenInfoUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenInfoUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenInfoUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryTokenInfoUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryTokenInfoUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryTokenInfoUpdated represents a TokenInfoUpdated event raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenInfoUpdated struct { + TokenID uint16 + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenInfoUpdated is a free log retrieval operation binding the contract event 0x60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa9. +// +// Solidity: event TokenInfoUpdated(uint16 indexed tokenID, address indexed tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterTokenInfoUpdated(opts *bind.FilterOpts, tokenID []uint16, tokenAddress []common.Address) (*L2TokenRegistryTokenInfoUpdatedIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "TokenInfoUpdated", tokenIDRule, tokenAddressRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryTokenInfoUpdatedIterator{contract: _L2TokenRegistry.contract, event: "TokenInfoUpdated", logs: logs, sub: sub}, nil +} + +// WatchTokenInfoUpdated is a free log subscription operation binding the contract event 0x60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa9. +// +// Solidity: event TokenInfoUpdated(uint16 indexed tokenID, address indexed tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchTokenInfoUpdated(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryTokenInfoUpdated, tokenID []uint16, tokenAddress []common.Address) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "TokenInfoUpdated", tokenIDRule, tokenAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryTokenInfoUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenInfoUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTokenInfoUpdated is a log parse operation binding the contract event 0x60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa9. +// +// Solidity: event TokenInfoUpdated(uint16 indexed tokenID, address indexed tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseTokenInfoUpdated(log types.Log) (*L2TokenRegistryTokenInfoUpdated, error) { + event := new(L2TokenRegistryTokenInfoUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenInfoUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryTokenRegisteredIterator is returned from FilterTokenRegistered and is used to iterate over the raw logs and unpacked data for TokenRegistered events raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenRegisteredIterator struct { + Event *L2TokenRegistryTokenRegistered // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryTokenRegisteredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenRegistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenRegistered) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryTokenRegisteredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryTokenRegisteredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryTokenRegistered represents a TokenRegistered event raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenRegistered struct { + TokenID uint16 + TokenAddress common.Address + BalanceSlot [32]byte + IsActive bool + Decimals uint8 + Scale *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenRegistered is a free log retrieval operation binding the contract event 0xb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e11. +// +// Solidity: event TokenRegistered(uint16 indexed tokenID, address indexed tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterTokenRegistered(opts *bind.FilterOpts, tokenID []uint16, tokenAddress []common.Address) (*L2TokenRegistryTokenRegisteredIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "TokenRegistered", tokenIDRule, tokenAddressRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryTokenRegisteredIterator{contract: _L2TokenRegistry.contract, event: "TokenRegistered", logs: logs, sub: sub}, nil +} + +// WatchTokenRegistered is a free log subscription operation binding the contract event 0xb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e11. +// +// Solidity: event TokenRegistered(uint16 indexed tokenID, address indexed tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchTokenRegistered(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryTokenRegistered, tokenID []uint16, tokenAddress []common.Address) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "TokenRegistered", tokenIDRule, tokenAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryTokenRegistered) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenRegistered", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTokenRegistered is a log parse operation binding the contract event 0xb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e11. +// +// Solidity: event TokenRegistered(uint16 indexed tokenID, address indexed tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseTokenRegistered(log types.Log) (*L2TokenRegistryTokenRegistered, error) { + event := new(L2TokenRegistryTokenRegistered) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenRegistered", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryTokenRemovedIterator is returned from FilterTokenRemoved and is used to iterate over the raw logs and unpacked data for TokenRemoved events raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenRemovedIterator struct { + Event *L2TokenRegistryTokenRemoved // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryTokenRemovedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenRemoved) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryTokenRemovedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryTokenRemovedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryTokenRemoved represents a TokenRemoved event raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenRemoved struct { + TokenID uint16 + TokenAddress common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenRemoved is a free log retrieval operation binding the contract event 0x330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a. +// +// Solidity: event TokenRemoved(uint16 indexed tokenID, address indexed tokenAddress) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterTokenRemoved(opts *bind.FilterOpts, tokenID []uint16, tokenAddress []common.Address) (*L2TokenRegistryTokenRemovedIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "TokenRemoved", tokenIDRule, tokenAddressRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryTokenRemovedIterator{contract: _L2TokenRegistry.contract, event: "TokenRemoved", logs: logs, sub: sub}, nil +} + +// WatchTokenRemoved is a free log subscription operation binding the contract event 0x330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a. +// +// Solidity: event TokenRemoved(uint16 indexed tokenID, address indexed tokenAddress) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchTokenRemoved(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryTokenRemoved, tokenID []uint16, tokenAddress []common.Address) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + var tokenAddressRule []interface{} + for _, tokenAddressItem := range tokenAddress { + tokenAddressRule = append(tokenAddressRule, tokenAddressItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "TokenRemoved", tokenIDRule, tokenAddressRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryTokenRemoved) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenRemoved", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTokenRemoved is a log parse operation binding the contract event 0x330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a. +// +// Solidity: event TokenRemoved(uint16 indexed tokenID, address indexed tokenAddress) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseTokenRemoved(log types.Log) (*L2TokenRegistryTokenRemoved, error) { + event := new(L2TokenRegistryTokenRemoved) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenRemoved", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// L2TokenRegistryTokenScaleUpdatedIterator is returned from FilterTokenScaleUpdated and is used to iterate over the raw logs and unpacked data for TokenScaleUpdated events raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenScaleUpdatedIterator struct { + Event *L2TokenRegistryTokenScaleUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *L2TokenRegistryTokenScaleUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenScaleUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(L2TokenRegistryTokenScaleUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *L2TokenRegistryTokenScaleUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *L2TokenRegistryTokenScaleUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// L2TokenRegistryTokenScaleUpdated represents a TokenScaleUpdated event raised by the L2TokenRegistry contract. +type L2TokenRegistryTokenScaleUpdated struct { + TokenID uint16 + NewScale *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTokenScaleUpdated is a free log retrieval operation binding the contract event 0x7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74. +// +// Solidity: event TokenScaleUpdated(uint16 indexed tokenID, uint256 newScale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) FilterTokenScaleUpdated(opts *bind.FilterOpts, tokenID []uint16) (*L2TokenRegistryTokenScaleUpdatedIterator, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.FilterLogs(opts, "TokenScaleUpdated", tokenIDRule) + if err != nil { + return nil, err + } + return &L2TokenRegistryTokenScaleUpdatedIterator{contract: _L2TokenRegistry.contract, event: "TokenScaleUpdated", logs: logs, sub: sub}, nil +} + +// WatchTokenScaleUpdated is a free log subscription operation binding the contract event 0x7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74. +// +// Solidity: event TokenScaleUpdated(uint16 indexed tokenID, uint256 newScale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) WatchTokenScaleUpdated(opts *bind.WatchOpts, sink chan<- *L2TokenRegistryTokenScaleUpdated, tokenID []uint16) (event.Subscription, error) { + + var tokenIDRule []interface{} + for _, tokenIDItem := range tokenID { + tokenIDRule = append(tokenIDRule, tokenIDItem) + } + + logs, sub, err := _L2TokenRegistry.contract.WatchLogs(opts, "TokenScaleUpdated", tokenIDRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(L2TokenRegistryTokenScaleUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenScaleUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTokenScaleUpdated is a log parse operation binding the contract event 0x7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74. +// +// Solidity: event TokenScaleUpdated(uint16 indexed tokenID, uint256 newScale) +func (_L2TokenRegistry *L2TokenRegistryFilterer) ParseTokenScaleUpdated(log types.Log) (*L2TokenRegistryTokenScaleUpdated, error) { + event := new(L2TokenRegistryTokenScaleUpdated) + if err := _L2TokenRegistry.contract.UnpackLog(event, "TokenScaleUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/bindings/bindings/l2tokenregistry_more.go b/bindings/bindings/l2tokenregistry_more.go new file mode 100644 index 000000000..021fa454a --- /dev/null +++ b/bindings/bindings/l2tokenregistry_more.go @@ -0,0 +1,25 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package bindings + +import ( + "encoding/json" + + "morph-l2/bindings/solc" +) + +const L2TokenRegistryStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"_initialized\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint8\"},{\"astId\":1001,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"_initializing\",\"offset\":1,\"slot\":\"0\",\"type\":\"t_bool\"},{\"astId\":1002,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_array(t_uint256)1015_storage\"},{\"astId\":1003,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"51\",\"type\":\"t_address\"},{\"astId\":1004,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"52\",\"type\":\"t_array(t_uint256)1014_storage\"},{\"astId\":1005,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"_status\",\"offset\":0,\"slot\":\"101\",\"type\":\"t_uint256\"},{\"astId\":1006,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"102\",\"type\":\"t_array(t_uint256)1014_storage\"},{\"astId\":1007,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"tokenRegistry\",\"offset\":0,\"slot\":\"151\",\"type\":\"t_mapping(t_uint16,t_struct(TokenInfo)1017_storage)\"},{\"astId\":1008,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"tokenRegistration\",\"offset\":0,\"slot\":\"152\",\"type\":\"t_mapping(t_address,t_uint16)\"},{\"astId\":1009,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"priceRatio\",\"offset\":0,\"slot\":\"153\",\"type\":\"t_mapping(t_uint16,t_uint256)\"},{\"astId\":1010,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"allowList\",\"offset\":0,\"slot\":\"154\",\"type\":\"t_mapping(t_address,t_bool)\"},{\"astId\":1011,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"allowListEnabled\",\"offset\":0,\"slot\":\"155\",\"type\":\"t_bool\"},{\"astId\":1012,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"supportedTokenSet\",\"offset\":0,\"slot\":\"156\",\"type\":\"t_struct(UintSet)1018_storage\"},{\"astId\":1013,\"contract\":\"contracts/l2/system/L2TokenRegistry.sol:L2TokenRegistry\",\"label\":\"__gap\",\"offset\":0,\"slot\":\"158\",\"type\":\"t_array(t_uint256)1015_storage\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_array(t_bytes32)dyn_storage\":{\"encoding\":\"dynamic_array\",\"label\":\"bytes32[]\",\"numberOfBytes\":\"32\"},\"t_array(t_uint256)1014_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[49]\",\"numberOfBytes\":\"1568\"},\"t_array(t_uint256)1015_storage\":{\"encoding\":\"inplace\",\"label\":\"uint256[50]\",\"numberOfBytes\":\"1600\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"},\"t_mapping(t_address,t_uint16)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e uint16)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_uint16\"},\"t_mapping(t_bytes32,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(bytes32 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_bytes32\",\"value\":\"t_uint256\"},\"t_mapping(t_uint16,t_struct(TokenInfo)1017_storage)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint16 =\u003e struct IL2TokenRegistry.TokenInfo)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint16\",\"value\":\"t_struct(TokenInfo)1017_storage\"},\"t_mapping(t_uint16,t_uint256)\":{\"encoding\":\"mapping\",\"label\":\"mapping(uint16 =\u003e uint256)\",\"numberOfBytes\":\"32\",\"key\":\"t_uint16\",\"value\":\"t_uint256\"},\"t_struct(Set)1016_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.Set\",\"numberOfBytes\":\"64\"},\"t_struct(TokenInfo)1017_storage\":{\"encoding\":\"inplace\",\"label\":\"struct IL2TokenRegistry.TokenInfo\",\"numberOfBytes\":\"128\"},\"t_struct(UintSet)1018_storage\":{\"encoding\":\"inplace\",\"label\":\"struct EnumerableSetUpgradeable.UintSet\",\"numberOfBytes\":\"64\"},\"t_uint16\":{\"encoding\":\"inplace\",\"label\":\"uint16\",\"numberOfBytes\":\"2\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint8\":{\"encoding\":\"inplace\",\"label\":\"uint8\",\"numberOfBytes\":\"1\"}}}" + +var L2TokenRegistryStorageLayout = new(solc.StorageLayout) + +var L2TokenRegistryDeployedBin = "0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638da5cb5b116100fe578063dddc98be1161009e578063ef0fde0f1161006e578063ef0fde0f146104f1578063efeadb6d14610504578063f2fde38b14610517578063fce404891461052a575f80fd5b8063dddc98be146104a5578063e014d85e146104b8578063e2f53f2c146104cb578063e3de72a5146104de575f80fd5b8063b10b69ee116100d9578063b10b69ee14610464578063c4d66de814610477578063ce67be261461048a578063dbbb2faa14610492575f80fd5b80638da5cb5b146104165780639190202e1461043e578063a313d00714610451575f80fd5b80634cbcdd1311610169578063724f91ce11610144578063724f91ce1461031b57806385519c36146103515780638c399691146103f05780638cbab7e414610403575f80fd5b80634cbcdd13146102eb5780636f6d6cc1146102fe578063715018a614610313575f80fd5b806322bd5c1c116101a457806322bd5c1c146102845780632848aeaf146102a15780632a1ea5a2146102c35780632d59c072146102d6575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d261053d565b6040516101df91906123a0565b60405180910390f35b6102076101f636600461241e565b60996020525f908152604090205481565b6040519081526020016101df565b61022861022336600461241e565b610649565b6040516101df91905f60a08201905073ffffffffffffffffffffffffffffffffffffffff83511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102919060ff1681565b60405190151581526020016101df565b6102916102af36600461245a565b609a6020525f908152604090205460ff1681565b6102076102d136600461241e565b610741565b6102e96102e4366004612482565b6107b6565b005b6102916102f936600461241e565b610bcc565b610306610be2565b6040516101df91906124d3565b6102e9610c8a565b61033e61032936600461245a565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b6103a961035f36600461241e565b60976020525f9081526040902080546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff90921692909160ff808316926101009004169085565b6040805173ffffffffffffffffffffffffffffffffffffffff909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102e96103fe366004612688565b610c9d565b61033e61041136600461245a565b610eb3565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101df565b6102e961044c366004612730565b610f36565b61020761045f36600461241e565b6110e4565b6102e9610472366004612797565b61115c565b6102e961048536600461245a565b6112c2565b610207611480565b6102e96104a036600461241e565b611490565b6102076104b3366004612797565b611606565b6102e96104c63660046127bf565b61176d565b6102e96104d9366004612861565b611799565b6102e96104ec366004612958565b61187b565b6102e96104ff366004612797565b6119db565b6102e9610512366004612a14565b611b38565b6102e961052536600461245a565b611ba5565b61029161053836600461241e565b611c59565b60605f61054a609c611ca9565b90505f815167ffffffffffffffff8111156105675761056761251a565b6040519080825280602002602001820160405280156105ab57816020015b604080518082019091525f80825260208201528152602001906001900390816105855790505b5090505f5b8251811015610642575f8382815181106105cc576105cc612a2d565b60209081029190910181015161ffff81165f8181526097845260409081902054815180830190925291815273ffffffffffffffffffffffffffffffffffffffff90911692810183905285519193509085908590811061062d5761062d612a2d565b602090810291909101015250506001016105b0565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff8516825260979052919091205473ffffffffffffffffffffffffffffffffffffffff166106cf576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f90815260976020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff168152600182015492810192909252600281015460ff80821615159484019490945261010090049092166060820152600390910154608082015290565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff166107a0576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b6107be611cbc565b6107c6611d3d565b61ffff85165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16610825576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416610872576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526098602052604090205461ffff1680158015906108b257508561ffff168161ffff1614155b156108e9576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f601290508573ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610973575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261097091810190612a5a565b60015b1561097b5790505b5f60975f8961ffff1661ffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506040518060a001604052808873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186151581526020018360ff1681526020018581525060975f8a61ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b465773ffffffffffffffffffffffffffffffffffffffff8181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928a1682529020805490911661ffff8a161790555b8673ffffffffffffffffffffffffffffffffffffffff168861ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa988888689604051610bb09493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610bc56001606555565b5050505050565b5f610bdc609c61ffff8416611db0565b92915050565b60605f610bef609c611ca9565b90505f815167ffffffffffffffff811115610c0c57610c0c61251a565b604051908082528060200260200182016040528015610c35578160200160208202803683370190505b5090505f5b825181101561064257828181518110610c5557610c55612a2d565b6020026020010151828281518110610c6f57610c6f612a2d565b61ffff90921660209283029190910190910152600101610c3a565b610c92611cbc565b610c9b5f611dc7565b565b609b5460ff168015610cbe5750335f908152609a602052604090205460ff16155b8015610ce2575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15610d19576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610d54576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610eae575f73ffffffffffffffffffffffffffffffffffffffff1660975f858481518110610d8b57610d8b612a2d565b60209081029190910181015161ffff1682528101919091526040015f205473ffffffffffffffffffffffffffffffffffffffff1614610ea657818181518110610dd657610dd6612a2d565b60200260200101515f0315610ea657818181518110610df757610df7612a2d565b602002602001015160995f858481518110610e1457610e14612a2d565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610e4757610e47612a2d565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610e8657610e86612a2d565b6020026020010151604051610e9d91815260200190565b60405180910390a25b600101610d56565b505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526098602052604081205461ffff1680158015610eff575073ffffffffffffffffffffffffffffffffffffffff831615155b15610bdc576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f3e611cbc565b828114610f77576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610bc5575f858583818110610f9457610f94612a2d565b9050602002016020810190610fa9919061241e565b90505f848484818110610fbe57610fbe612a2d565b9050602002016020810190610fd39190612a14565b61ffff83165f9081526097602052604090205490915073ffffffffffffffffffffffffffffffffffffffff1661100a5750506110dc565b61ffff82165f9081526097602052604090206002015460ff16801515821515146110d85761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001683158015919091179091556110a95760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a26110d8565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610f79565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611143576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561117d5750335f908152609a602052604090205460ff16155b80156111a1575060335473ffffffffffffffffffffffffffffffffffffffff163314155b156111d8576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16611237576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f0361126f576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467906112b69084815260200190565b60405180910390a25050565b5f54610100900460ff16158080156112e057505f54600160ff909116105b806112f95750303b1580156112f957505f5460ff166001145b61138a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156113e6575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6113ef82611dc7565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561147c575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f61148b609c611e3d565b905090565b611498611cbc565b6114a0611d3d565b61ffff81165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff1680611500576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155600390910184905573ffffffffffffffffffffffffffffffffffffffff86168452609883528184208054909116905592825260999052908120556115b282611e46565b60405173ffffffffffffffffffffffffffffffffffffffff82169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a3506116036001606555565b50565b61ffff82165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611665576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff168152600182015481850152600282015460ff8082161515838601526101009091041660608201526003909101546080820152938352609990915281205490819003611710576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808260800151856117219190612aa7565b61172b9190612abe565b9250825f03611765576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505092915050565b611775611cbc565b61177d611d3d565b61178984848484611e55565b6117936001606555565b50505050565b6117a1611cbc565b825184511415806117b457508151845114155b806117c157508051845114155b156117f8576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8451811015610bc55761187385828151811061181857611818612a2d565b602002602001015185838151811061183257611832612a2d565b602002602001015185848151811061184c5761184c612a2d565b602002602001015185858151811061186657611866612a2d565b6020026020010151611e55565b6001016117fa565b611883611cbc565b80518251146118be576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610eae578181815181106118db576118db612a2d565b6020026020010151609a5f8584815181106118f8576118f8612a2d565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061196157611961612a2d565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a115888383815181106119b2576119b2612a2d565b60200260200101516040516119cb911515815260200190565b60405180910390a26001016118c0565b609b5460ff1680156119fc5750335f908152609a602052604090205460ff16155b8015611a20575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15611a57576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16611ab6576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611aee576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74906112b69084815260200190565b611b40611cbc565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b611bad611cbc565b73ffffffffffffffffffffffffffffffffffffffff8116611c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611381565b61160381611dc7565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611c8d57505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611cb5836121f4565b9392505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610c9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611381565b600260655403611da9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611381565b6002606555565b5f8181526001830160205260408120541515611cb5565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610bdc825490565b61147c609c61ffff831661224d565b73ffffffffffffffffffffffffffffffffffffffff8316611ea2576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361ffff165f03611edf576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff84165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff1615611f3f576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f9081526098602052604090205461ffff1615611f9f576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f601290508373ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612029575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261202691810190612a5a565b60015b156120315790505b6040518060a001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020015f151581526020018260ff1681526020018381525060975f8761ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508460985f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548161ffff021916908361ffff16021790555061218785612258565b604080518481525f602082015260ff83168183015260608101849052905173ffffffffffffffffffffffffffffffffffffffff86169161ffff8816917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a35050505050565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561224157602002820191905f5260205f20905b81548152602001906001019080831161222d575b50505050509050919050565b5f611cb58383612267565b61147c609c61ffff831661234a565b5f8181526001830160205260408120548015612341575f612289600183612af6565b85549091505f9061229c90600190612af6565b90508181146122fb575f865f0182815481106122ba576122ba612a2d565b905f5260205f200154905080875f0184815481106122da576122da612a2d565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061230c5761230c612b09565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610bdc565b5f915050610bdc565b5f818152600183016020526040812054611cb59084908490849061239957508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610bdc565b505f610bdc565b602080825282518282018190525f919060409081850190868401855b828110156123fb578151805161ffff16855286015173ffffffffffffffffffffffffffffffffffffffff168685015292840192908501906001016123bc565b5091979650505050505050565b803561ffff81168114612419575f80fd5b919050565b5f6020828403121561242e575f80fd5b611cb582612408565b803573ffffffffffffffffffffffffffffffffffffffff81168114612419575f80fd5b5f6020828403121561246a575f80fd5b611cb582612437565b80358015158114612419575f80fd5b5f805f805f60a08688031215612496575f80fd5b61249f86612408565b94506124ad60208701612437565b9350604086013592506124c260608701612473565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561250e57835161ffff16835292840192918401916001016124ee565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561258e5761258e61251a565b604052919050565b5f67ffffffffffffffff8211156125af576125af61251a565b5060051b60200190565b5f82601f8301126125c8575f80fd5b813560206125dd6125d883612596565b612547565b8083825260208201915060208460051b8701019350868411156125fe575f80fd5b602086015b848110156126215761261481612408565b8352918301918301612603565b509695505050505050565b5f82601f83011261263b575f80fd5b8135602061264b6125d883612596565b8083825260208201915060208460051b87010193508684111561266c575f80fd5b602086015b848110156126215780358352918301918301612671565b5f8060408385031215612699575f80fd5b823567ffffffffffffffff808211156126b0575f80fd5b6126bc868387016125b9565b935060208501359150808211156126d1575f80fd5b506126de8582860161262c565b9150509250929050565b5f8083601f8401126126f8575f80fd5b50813567ffffffffffffffff81111561270f575f80fd5b6020830191508360208260051b8501011115612729575f80fd5b9250929050565b5f805f8060408587031215612743575f80fd5b843567ffffffffffffffff8082111561275a575f80fd5b612766888389016126e8565b9096509450602087013591508082111561277e575f80fd5b5061278b878288016126e8565b95989497509550505050565b5f80604083850312156127a8575f80fd5b6127b183612408565b946020939093013593505050565b5f805f80608085870312156127d2575f80fd5b6127db85612408565b93506127e960208601612437565b93969395505050506040820135916060013590565b5f82601f83011261280d575f80fd5b8135602061281d6125d883612596565b8083825260208201915060208460051b87010193508684111561283e575f80fd5b602086015b848110156126215761285481612437565b8352918301918301612843565b5f805f8060808587031215612874575f80fd5b843567ffffffffffffffff8082111561288b575f80fd5b612897888389016125b9565b95506020915081870135818111156128ad575f80fd5b6128b989828a016127fe565b9550506040870135818111156128cd575f80fd5b8701601f810189136128dd575f80fd5b80356128eb6125d882612596565b81815260059190911b8201840190848101908b831115612909575f80fd5b928501925b828410156129275783358252928501929085019061290e565b9650505050606087013591508082111561293f575f80fd5b5061294c8782880161262c565b91505092959194509250565b5f8060408385031215612969575f80fd5b823567ffffffffffffffff80821115612980575f80fd5b61298c868387016127fe565b93506020915081850135818111156129a2575f80fd5b85019050601f810186136129b4575f80fd5b80356129c26125d882612596565b81815260059190911b820183019083810190888311156129e0575f80fd5b928401925b82841015612a05576129f684612473565b825292840192908401906129e5565b80955050505050509250929050565b5f60208284031215612a24575f80fd5b611cb582612473565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612a6a575f80fd5b815160ff81168114611cb5575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417610bdc57610bdc612a7a565b5f82612af1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115610bdc57610bdc612a7a565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a" + +func init() { + if err := json.Unmarshal([]byte(L2TokenRegistryStorageLayoutJSON), L2TokenRegistryStorageLayout); err != nil { + panic(err) + } + + layouts["L2TokenRegistry"] = L2TokenRegistryStorageLayout + deployedBytecodes["L2TokenRegistry"] = L2TokenRegistryDeployedBin +} diff --git a/bindings/predeploys/addresses.go b/bindings/predeploys/addresses.go index dc8a1b39b..061c61d6a 100644 --- a/bindings/predeploys/addresses.go +++ b/bindings/predeploys/addresses.go @@ -29,6 +29,7 @@ const ( L2ReverseCustomGateway = "0x5300000000000000000000000000000000000018" L2WithdrawLockERC20Gateway = "0x5300000000000000000000000000000000000019" L2USDCGateway = "0x5300000000000000000000000000000000000020" + L2TokenRegistry = "0x5300000000000000000000000000000000000021" ) var ( @@ -56,6 +57,7 @@ var ( L2ReverseCustomGatewayAddr = common.HexToAddress(L2ReverseCustomGateway) L2WithdrawLockERC20GatewayAddr = common.HexToAddress(L2WithdrawLockERC20Gateway) L2USDCGatewayAddr = common.HexToAddress(L2USDCGateway) + L2TokenRegistryAddr = common.HexToAddress(L2TokenRegistry) Predeploys = make(map[string]*common.Address) ) @@ -85,4 +87,5 @@ func init() { Predeploys["L2ReverseCustomGateway"] = &L2ReverseCustomGatewayAddr Predeploys["L2WithdrawLockERC20Gateway"] = &L2WithdrawLockERC20GatewayAddr Predeploys["L2USDCGateway"] = &L2USDCGatewayAddr + Predeploys["L2TokenRegistry"] = &L2TokenRegistryAddr } diff --git a/contracts/contracts/l2/system/IL2TokenRegistry.sol b/contracts/contracts/l2/system/IL2TokenRegistry.sol new file mode 100644 index 000000000..76b6fd5ca --- /dev/null +++ b/contracts/contracts/l2/system/IL2TokenRegistry.sol @@ -0,0 +1,247 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.24; + +/** + * @title IL2TokenRegistry + * @dev Interface for L2TokenRegistry contract + * @notice Interface defining all external functions for ERC20 price oracle and token registry + */ +interface IL2TokenRegistry { + /*////////////////////////////////////////////////////////////// + Structs + //////////////////////////////////////////////////////////////*/ + + /// @notice Token information structure + struct TokenInfo { + address tokenAddress; // ERC20 token contract address + bytes32 balanceSlot; // Token balance storage slot, bytes32(0) -> nil + bool isActive; // Whether the token is active + uint8 decimals; // Token decimals + uint256 scale; // Core convention: rateScaled = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + } + + /// @notice Token entry structure containing ID and address + struct TokenEntry { + uint16 tokenID; // Token ID + address tokenAddress; // ERC20 token contract address + } + + /*////////////////////////////////////////////////////////////// + Events + //////////////////////////////////////////////////////////////*/ + + event TokenRegistered( + uint16 indexed tokenID, + address indexed tokenAddress, + bytes32 balanceSlot, + bool isActive, + uint8 decimals, + uint256 scale + ); + event TokenInfoUpdated( + uint16 indexed tokenID, + address indexed tokenAddress, + bytes32 balanceSlot, + bool isActive, + uint8 decimals, + uint256 scale + ); + event TokenActivated(uint16 indexed tokenID); + event TokenDeactivated(uint16 indexed tokenID); + event TokenRemoved(uint16 indexed tokenID, address indexed tokenAddress); + event PriceRatioUpdated(uint16 indexed tokenID, uint256 newPrice); + event TokenScaleUpdated(uint16 indexed tokenID, uint256 newScale); + event AllowListSet(address indexed user, bool val); + event AllowListEnabledUpdated(bool isEnabled); + + /*////////////////////////////////////////////////////////////// + Errors + //////////////////////////////////////////////////////////////*/ + + error TokenAlreadyRegistered(); + error TokenNotFound(); + error InvalidTokenID(); + error InvalidTokenAddress(); + error InvalidPrice(); + error InvalidPercent(); + error CallerNotAllowed(); + error InvalidArrayLength(); + error DifferentLength(); + error AlreadyInitialized(); + + /*////////////////////////////////////////////////////////////// + Allow List Functions + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Set Allow List + * @param user Array of user addresses + * @param val Array of permission values + */ + function setAllowList(address[] memory user, bool[] memory val) external; + + /** + * @notice Set whether Allow List is enabled + * @param _allowListEnabled Whether to enable + */ + function setAllowListEnabled(bool _allowListEnabled) external; + + /*////////////////////////////////////////////////////////////// + Token Registration Functions + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Batch register tokens + * @param _tokenIDs Array of token IDs + * @param _tokenAddresses Array of token addresses + * @param _balanceSlots Array of balance storage slots + * @param _scales Array of scale values + */ + function registerTokens( + uint16[] memory _tokenIDs, + address[] memory _tokenAddresses, + bytes32[] memory _balanceSlots, + uint256[] memory _scales + ) external; + + /** + * @notice Register a single token + * @param _tokenID Token ID + * @param _tokenAddress Token contract address + * @param _balanceSlot Balance storage slot + * @param _scale Scale value + */ + function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, uint256 _scale) external; + + /** + * @notice Update token information + * @param _tokenID Token ID + * @param _tokenAddress New token contract address + * @param _balanceSlot New balance storage slot + * @param _isActive Whether to activate + * @param _scale Scale value + */ + function updateTokenInfo( + uint16 _tokenID, + address _tokenAddress, + bytes32 _balanceSlot, + bool _isActive, + uint256 _scale + ) external; + + /** + * @notice Remove a token from registry + * @param _tokenID Token ID to remove + */ + function removeToken(uint16 _tokenID) external; + + /** + * @notice Batch update token activation status + * @param _tokenIDs Array of token IDs + * @param _isActives Array of activation statuses + */ + function batchUpdateTokenStatus(uint16[] memory _tokenIDs, bool[] memory _isActives) external; + + /*////////////////////////////////////////////////////////////// + Price Management Functions + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Update price ratio + * @param _tokenID Token ID + * @param _newPrice New price ratio (relative to ETH) + * @dev priceRatio should follow: priceRatio = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + */ + function updatePriceRatio(uint16 _tokenID, uint256 _newPrice) external; + + /** + * @notice Batch update price ratios + * @param _tokenIDs Array of token IDs + * @param _prices Array of price ratios + */ + function batchUpdatePrices(uint16[] memory _tokenIDs, uint256[] memory _prices) external; + + /** + * @notice Get token price + * @param _tokenID Token ID + * @return price Price ratio + */ + function getTokenPrice(uint16 _tokenID) external view returns (uint256); + + /** + * @notice Calculate the corresponding token amount for a given ETH amount + * @param _tokenID Token ID of the ERC20 token + * @param _ethAmount ETH amount (unit: wei) + * @return tokenAmount Corresponding token amount (unit: token's smallest unit) + */ + function calculateTokenAmount(uint16 _tokenID, uint256 _ethAmount) external view returns (uint256 tokenAmount); + + /** + * @notice Get token information + * @param _tokenID Token ID + * @return TokenInfo structure + */ + function getTokenInfo(uint16 _tokenID) external view returns (TokenInfo memory); + + /** + * @notice Get token ID by address + * @param tokenAddress Token address + * @return tokenID Token ID + */ + function getTokenIdByAddress(address tokenAddress) external view returns (uint16); + + /*////////////////////////////////////////////////////////////// + Scale Management Functions + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Update token scale + * @param _tokenID Token ID + * @param _newScale New scale value + */ + function updateTokenScale(uint16 _tokenID, uint256 _newScale) external; + + /** + * @notice Get token scale + * @param _tokenID Token ID + * @return scale Token scale value + */ + function getTokenScale(uint16 _tokenID) external view returns (uint256); + + /*////////////////////////////////////////////////////////////// + View Functions + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Check if token is active + * @param _tokenID Token ID + * @return Whether the token is active + */ + function isTokenActive(uint16 _tokenID) external view returns (bool); + + /** + * @notice Check if a token ID is in the supported list + * @param _tokenID Token ID to check + * @return Whether the token ID is registered + */ + function isTokenSupported(uint16 _tokenID) external view returns (bool); + + /** + * @notice Get all supported token IDs and their addresses + * @return Array of TokenEntry containing token ID and address pairs + */ + function getSupportedTokenList() external view returns (TokenEntry[] memory); + + /** + * @notice Get all supported token IDs + * @return Array of all registered token IDs + */ + function getSupportedIDList() external view returns (uint16[] memory); + + /** + * @notice Get the count of supported tokens + * @return The number of registered tokens + */ + function getSupportedTokenCount() external view returns (uint256); +} + diff --git a/contracts/contracts/l2/system/L2TokenRegistry.sol b/contracts/contracts/l2/system/L2TokenRegistry.sol new file mode 100644 index 000000000..f70932bc0 --- /dev/null +++ b/contracts/contracts/l2/system/L2TokenRegistry.sol @@ -0,0 +1,502 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.24; + +import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; +import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; +import {EnumerableSetUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; +import {IL2TokenRegistry} from "./IL2TokenRegistry.sol"; + +interface IERC20Infos { + function decimals() external view returns (uint8); +} + +/** + * @title L2TokenRegistry + * @dev TokenRegistry contract - Used for registering tokenID and managing token information and prices + * @notice In the transaction scenario where ERC20 is used as gas fee payment, used for storing prices and token registration functionality + */ +contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuardUpgradeable { + using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet; + + /// @notice Mapping from tokenID to TokenInfo + mapping(uint16 => TokenInfo) public tokenRegistry; + + /// @notice Mapping from token address to tokenID + mapping(address => uint16) public tokenRegistration; + + /// @notice Mapping from tokenID to price ratio (relative to ETH) + /// @dev priceRatio = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + mapping(uint16 => uint256) public priceRatio; + + /// @notice Allow List whitelist + mapping(address => bool) public allowList; + + /// @notice Whether whitelist is enabled + bool public allowListEnabled = true; + + /// @notice Set of supported token IDs + EnumerableSetUpgradeable.UintSet private supportedTokenSet; + + /*////////////////////////////////////////////////////////////// + Modifier + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Check if caller is in Allow List + */ + modifier onlyAllowed() { + if (allowListEnabled && !allowList[msg.sender] && msg.sender != owner()) { + revert CallerNotAllowed(); + } + _; + } + + /*////////////////////////////////////////////////////////////// + Initializer + //////////////////////////////////////////////////////////////*/ + + /// @custom:oz-upgrades-unsafe-allow constructor + constructor() { + _disableInitializers(); + } + + /** + * @notice Initialize function for proxy deployment + * @param owner_ Contract owner address + */ + function initialize(address owner_) external initializer { + _transferOwnership(owner_); + allowListEnabled = true; + } + + /*////////////////////////////////////////////////////////////// + Allow List + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Set Allow List + * @param user Array of user addresses + * @param val Array of permission values + */ + function setAllowList(address[] memory user, bool[] memory val) external onlyOwner { + if (user.length != val.length) revert DifferentLength(); + + for (uint256 i = 0; i < user.length; i++) { + allowList[user[i]] = val[i]; + emit AllowListSet(user[i], val[i]); + } + } + + /** + * @notice Set whether Allow List is enabled + * @param _allowListEnabled Whether to enable + */ + function setAllowListEnabled(bool _allowListEnabled) external onlyOwner { + allowListEnabled = _allowListEnabled; + emit AllowListEnabledUpdated(_allowListEnabled); + } + + /*////////////////////////////////////////////////////////////// + Token Registration + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Batch register tokens + * @param _tokenIDs Array of token IDs + * @param _tokenAddresses Array of token addresses + * @param _balanceSlots Array of balance storage slots + * @param _scales Array of scale values + */ + function registerTokens( + uint16[] memory _tokenIDs, + address[] memory _tokenAddresses, + bytes32[] memory _balanceSlots, + uint256[] memory _scales + ) external onlyOwner { + if ( + _tokenIDs.length != _tokenAddresses.length || + _tokenIDs.length != _balanceSlots.length || + _tokenIDs.length != _scales.length + ) { + revert InvalidArrayLength(); + } + + for (uint256 i = 0; i < _tokenIDs.length; i++) { + _registerSingleToken(_tokenIDs[i], _tokenAddresses[i], _balanceSlots[i], _scales[i]); + } + } + + /** + * @notice Register a single token + * @param _tokenID Token ID + * @param _tokenAddress Token contract address + * @param _balanceSlot Balance storage slot + * @param _scale Scale value + */ + function registerToken( + uint16 _tokenID, + address _tokenAddress, + bytes32 _balanceSlot, + uint256 _scale + ) external onlyOwner nonReentrant { + _registerSingleToken(_tokenID, _tokenAddress, _balanceSlot, _scale); + } + + /** + * @notice Internal function: Add token ID to supported list + * @param _tokenID Token ID to add + */ + function _addTokenToList(uint16 _tokenID) internal { + supportedTokenSet.add(uint256(_tokenID)); + } + + /** + * @notice Internal function: Remove token ID from supported list + * @param _tokenID Token ID to remove + */ + function _removeTokenFromList(uint16 _tokenID) internal { + supportedTokenSet.remove(uint256(_tokenID)); + } + + /** + * @notice Internal function: Register a single token + */ + function _registerSingleToken( + uint16 _tokenID, + address _tokenAddress, + bytes32 _balanceSlot, + uint256 _scale + ) internal { + // Check token address + if (_tokenAddress == address(0)) revert InvalidTokenAddress(); + + // Forbid zero ID and enforce uniqueness for both ID and address + if (_tokenID == 0) revert InvalidTokenID(); + if (tokenRegistry[_tokenID].tokenAddress != address(0)) revert TokenAlreadyRegistered(); + if (tokenRegistration[_tokenAddress] != 0) revert TokenAlreadyRegistered(); + + // Get decimals from contract + uint8 decimals = 18; // Default value + try IERC20Infos(_tokenAddress).decimals() returns (uint8 v) { + decimals = v; + } catch { + // If call fails, use default value 18 + } + // Register token (isActive defaults to false) + tokenRegistry[_tokenID] = TokenInfo({ + tokenAddress: _tokenAddress, + balanceSlot: _balanceSlot, + isActive: false, + decimals: decimals, + scale: _scale + }); + tokenRegistration[_tokenAddress] = _tokenID; + _addTokenToList(_tokenID); + emit TokenRegistered(_tokenID, _tokenAddress, _balanceSlot, false, decimals, _scale); + } + + /** + * @notice Update token information + * @param _tokenID Token ID + * @param _tokenAddress New token contract address + * @param _balanceSlot New balance storage slot + * @param _isActive Whether to activate + * @param _scale Scale value + */ + function updateTokenInfo( + uint16 _tokenID, + address _tokenAddress, + bytes32 _balanceSlot, + bool _isActive, + uint256 _scale + ) external onlyOwner nonReentrant { + // Check if token exists + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + + // Check new information + if (_tokenAddress == address(0)) revert InvalidTokenAddress(); + + // Prevent address being shared across different tokenIDs + uint16 existing = tokenRegistration[_tokenAddress]; + if (existing != 0 && existing != _tokenID) revert TokenAlreadyRegistered(); + + // Get decimals from contract + uint8 decimals = 18; // Default value + try IERC20Infos(_tokenAddress).decimals() returns (uint8 v) { + decimals = v; + } catch { + // If call fails, use default value 18 + } + // Update registration information + address oldAddress = tokenRegistry[_tokenID].tokenAddress; + tokenRegistry[_tokenID] = TokenInfo({ + tokenAddress: _tokenAddress, + balanceSlot: _balanceSlot, + isActive: _isActive, + decimals: decimals, + scale: _scale + }); + + // Update address mapping + if (oldAddress != _tokenAddress) { + delete tokenRegistration[oldAddress]; + tokenRegistration[_tokenAddress] = _tokenID; + } + + // Note: tokenID should already be in supportedTokenSet from registration + // No need to add again as EnumerableSet.add() is idempotent but wastes gas + + emit TokenInfoUpdated(_tokenID, _tokenAddress, _balanceSlot, _isActive, decimals, _scale); + } + + /** + * @notice Remove a token from registry + * @param _tokenID Token ID to remove + */ + function removeToken(uint16 _tokenID) external onlyOwner nonReentrant { + // Check if token exists + address tokenAddress = tokenRegistry[_tokenID].tokenAddress; + if (tokenAddress == address(0)) revert TokenNotFound(); + + // Remove from mappings + delete tokenRegistry[_tokenID]; + delete tokenRegistration[tokenAddress]; + delete priceRatio[_tokenID]; + + // Remove from supported list + _removeTokenFromList(_tokenID); + + emit TokenRemoved(_tokenID, tokenAddress); + } + + /** + * @notice Batch update token activation status + * @param _tokenIDs Array of token IDs + * @param _isActives Array of activation statuses + */ + function batchUpdateTokenStatus(uint16[] calldata _tokenIDs, bool[] calldata _isActives) external onlyOwner { + if (_tokenIDs.length != _isActives.length) revert InvalidArrayLength(); + + for (uint256 i = 0; i < _tokenIDs.length; i++) { + uint16 tokenId = _tokenIDs[i]; + bool newStatus = _isActives[i]; + + if (tokenRegistry[tokenId].tokenAddress == address(0)) continue; + bool oldStatus = tokenRegistry[tokenId].isActive; + + if (oldStatus != newStatus) { + tokenRegistry[tokenId].isActive = newStatus; + if (newStatus) { + emit TokenActivated(tokenId); + } else { + emit TokenDeactivated(tokenId); + } + } + } + } + + /*////////////////////////////////////////////////////////////// + Price Management + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Update price ratio + * @param _tokenID Token ID + * @param _newPrice New price ratio (relative to ETH) + * @dev priceRatio should follow: priceRatio = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + */ + function updatePriceRatio(uint16 _tokenID, uint256 _newPrice) external onlyAllowed { + // Check if token exists + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + + if (_newPrice == 0) revert InvalidPrice(); + + priceRatio[_tokenID] = _newPrice; + + emit PriceRatioUpdated(_tokenID, _newPrice); + } + + /** + * @notice Batch update price ratios + * @param _tokenIDs Array of token IDs + * @param _prices Array of price ratios + */ + function batchUpdatePrices(uint16[] memory _tokenIDs, uint256[] memory _prices) external onlyAllowed { + if (_tokenIDs.length != _prices.length) revert InvalidArrayLength(); + + for (uint256 i = 0; i < _tokenIDs.length; i++) { + if (tokenRegistry[_tokenIDs[i]].tokenAddress == address(0)) continue; + if (_prices[i] == 0) continue; + + priceRatio[_tokenIDs[i]] = _prices[i]; + emit PriceRatioUpdated(_tokenIDs[i], _prices[i]); + } + } + + /** + * @notice Get token price + * @param _tokenID Token ID + * @return price Price ratio + */ + function getTokenPrice(uint16 _tokenID) external view returns (uint256) { + // Check if token exists + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + + return priceRatio[_tokenID]; + } + + /** + * @notice Calculate the corresponding token amount for a given ETH amount + * @dev Calculation formula: + * - ratio = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + * - tokenAmount = (ethAmount * 10^tokenDecimals) / ratio + * - Substituting ratio: tokenAmount = (ethAmount * 10^tokenDecimals) / (tokenScale * (tokenPrice / ethPrice) * 10^(18 - tokenDecimals)) + * - Simplified: tokenAmount = (ethAmount * 10^tokenDecimals * 10^tokenDecimals) / (tokenScale * tokenPrice * 10^18 / ethPrice) + * - Final: tokenAmount = (ethAmount * ethPrice * 10^tokenDecimals) / (tokenScale * tokenPrice * 10^18) + * @param _tokenID Token ID of the ERC20 token + * @param _ethAmount ETH amount (unit: wei) + * @return tokenAmount Corresponding token amount (unit: token's smallest unit) + * - ratio follows: ratio = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + * - Will revert if token is not registered or priceRatio is not set + */ + function calculateTokenAmount(uint16 _tokenID, uint256 _ethAmount) external view returns (uint256 tokenAmount) { + // Validate: token must be registered + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + + // Get token information + TokenInfo memory info = tokenRegistry[_tokenID]; + + // Get priceRatio which follows: + // ratio = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + uint256 ratio = priceRatio[_tokenID]; + if (ratio == 0) revert InvalidPrice(); + + // Calculate token amount: + // tokenAmount = (ethAmount * tokenScale) / ratio + // where ratio already contains tokenScale and decimals adjustment to eth (wei) and token smallest unit. + tokenAmount = (_ethAmount * uint256(info.scale)) / ratio; + if (tokenAmount == 0) revert InvalidPrice(); + + return tokenAmount; + } + + /** + * @notice Get token information + * @param _tokenID Token ID + * @return TokenInfo structure + */ + function getTokenInfo(uint16 _tokenID) external view returns (TokenInfo memory) { + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + return tokenRegistry[_tokenID]; + } + + /** + * @notice Get token ID by address + * @param tokenAddress Token address + * @return tokenID Token ID + */ + function getTokenIdByAddress(address tokenAddress) external view returns (uint16) { + uint16 tokenID = tokenRegistration[tokenAddress]; + if (tokenID == 0 && tokenAddress != address(0)) revert TokenNotFound(); + return tokenID; + } + + /*////////////////////////////////////////////////////////////// + Scale Management + //////////////////////////////////////////////////////////////*/ + + /** + * @notice Update token scale + * @param _tokenID Token ID + * @param _newScale New scale value + * @dev Core convention: rateScaled = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) + */ + function updateTokenScale(uint16 _tokenID, uint256 _newScale) external onlyAllowed { + // Check if token exists + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + + // Validate scale is non-zero + if (_newScale == 0) revert InvalidPrice(); // or create a new error like InvalidScale + tokenRegistry[_tokenID].scale = _newScale; + + emit TokenScaleUpdated(_tokenID, _newScale); + } + + /** + * @notice Get token scale + * @param _tokenID Token ID + * @return scale Token scale value + */ + function getTokenScale(uint16 _tokenID) external view returns (uint256) { + if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); + return tokenRegistry[_tokenID].scale; + } + + /*////////////////////////////////////////////////////////////// + View Functions + //////////////////////////////////////////////////////////////*/ + /** + * @notice Check if token is active + * @param _tokenID Token ID + * @return Whether the token is active + */ + function isTokenActive(uint16 _tokenID) external view returns (bool) { + if (tokenRegistry[_tokenID].tokenAddress == address(0)) return false; + return tokenRegistry[_tokenID].isActive; + } + + /** + * @notice Check if a token ID is in the supported list + * @param _tokenID Token ID to check + * @return Whether the token ID is registered + */ + function isTokenSupported(uint16 _tokenID) external view returns (bool) { + return supportedTokenSet.contains(uint256(_tokenID)); + } + + /** + * @notice Get all supported token IDs and their addresses + * @return Array of TokenEntry containing token ID and address pairs + */ + function getSupportedTokenList() external view returns (TokenEntry[] memory) { + uint256[] memory values = supportedTokenSet.values(); + TokenEntry[] memory tokenList = new TokenEntry[](values.length); + + for (uint256 i = 0; i < values.length; ++i) { + uint16 tokenID = uint16(values[i]); + address tokenAddress = tokenRegistry[tokenID].tokenAddress; + tokenList[i] = TokenEntry({ + tokenID: tokenID, + tokenAddress: tokenAddress + }); + } + + return tokenList; + } + + /** + * @notice Get all supported token IDs + * @return Array of all registered token IDs + */ + function getSupportedIDList() external view returns (uint16[] memory) { + uint256[] memory values = supportedTokenSet.values(); + uint16[] memory tokenIDs = new uint16[](values.length); + + for (uint256 i = 0; i < values.length; ++i) { + tokenIDs[i] = uint16(values[i]); + } + + return tokenIDs; + } + + /** + * @notice Get the count of supported tokens + * @return The number of registered tokens + */ + function getSupportedTokenCount() external view returns (uint256) { + return supportedTokenSet.length(); + } + + // Reserve storage space to allow future layout changes + uint256[50] private __gap; +} diff --git a/contracts/contracts/test/L2TokenRegistry.t.sol b/contracts/contracts/test/L2TokenRegistry.t.sol new file mode 100644 index 000000000..ce74f08f4 --- /dev/null +++ b/contracts/contracts/test/L2TokenRegistry.t.sol @@ -0,0 +1,726 @@ +// SPDX-License-Identifier: MIT +pragma solidity =0.8.24; + +import "forge-std/Test.sol"; + +import {L2TokenRegistry} from "../l2/system/L2TokenRegistry.sol"; +import {IL2TokenRegistry} from "../l2/system/IL2TokenRegistry.sol"; +import {MockERC20} from "@rari-capital/solmate/src/test/utils/mocks/MockERC20.sol"; +import {TransparentUpgradeableProxy} from "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol"; +import {ProxyAdmin} from "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol"; + +contract L2TokenRegistryTest is Test { + L2TokenRegistry internal priceOracle; + L2TokenRegistry internal priceOracleImpl; + ProxyAdmin internal proxyAdmin; + + address internal multisig = address(512); + address internal owner = address(64); + address internal alice = address(128); + address internal bob = address(256); + + MockERC20 internal usdc; + MockERC20 internal usdt; + MockERC20 internal dai; + + uint16 constant TOKEN_ID_USDC = 1; + uint16 constant TOKEN_ID_USDT = 2; + uint16 constant TOKEN_ID_DAI = 3; + + bytes32 constant BALANCE_SLOT_USDC = bytes32(uint256(9)); + bytes32 constant BALANCE_SLOT_USDT = bytes32(uint256(10)); + bytes32 constant BALANCE_SLOT_DAI = bytes32(uint256(11)); + + uint256 constant SCALE_USDC = 1e6; // 10^6 + uint256 constant SCALE_USDT = 1e6; // 10^6 + uint256 constant SCALE_DAI = 1e18; // 10^18 + + function setUp() public { + // Deploy proxy admin + vm.prank(multisig); + proxyAdmin = new ProxyAdmin(); + + // Deploy implementation contract + priceOracleImpl = new L2TokenRegistry(); + + // Deploy proxy and initialize + vm.prank(multisig); + TransparentUpgradeableProxy proxy = new TransparentUpgradeableProxy( + address(priceOracleImpl), + address(proxyAdmin), + abi.encodeWithSelector(L2TokenRegistry.initialize.selector, owner) + ); + + priceOracle = L2TokenRegistry(payable(address(proxy))); + + // Deploy Mock ERC20 tokens + usdc = new MockERC20("USD Coin", "USDC", 6); + usdt = new MockERC20("Tether USD", "USDT", 6); + dai = new MockERC20("Dai Stablecoin", "DAI", 18); + + vm.label(address(usdc), "USDC"); + vm.label(address(usdt), "USDT"); + vm.label(address(dai), "DAI"); + vm.label(address(priceOracle), "L2TokenRegistry"); + vm.label(multisig, "multisig"); + vm.label(alice, "alice"); + vm.label(bob, "bob"); + } + + /*////////////////////////////////////////////////////////////// + Initialization Tests + //////////////////////////////////////////////////////////////*/ + + function test_initialize_succeeds() public { + assertEq(priceOracle.owner(), owner); + assertTrue(priceOracle.allowListEnabled()); + } + + function test_initialize_reverts_when_not_called_via_proxy() public { + L2TokenRegistry impl = new L2TokenRegistry(); + vm.expectRevert(); + impl.initialize(owner); + } + + /*////////////////////////////////////////////////////////////// + Token Registration Tests + //////////////////////////////////////////////////////////////*/ + + function test_registerToken_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); + assertEq(info.tokenAddress, address(usdc)); + assertEq(info.balanceSlot, BALANCE_SLOT_USDC); + assertEq(info.isActive, false); + assertEq(info.decimals, 6); + } + + function test_registerToken_reverts_when_tokenID_is_zero() public { + vm.expectRevert(bytes4(keccak256("InvalidTokenID()"))); + vm.prank(owner); + priceOracle.registerToken(0, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + } + + function test_registerToken_reverts_when_tokenID_already_registered() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.expectRevert(bytes4(keccak256("TokenAlreadyRegistered()"))); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + } + + function test_registerToken_reverts_when_address_already_registered() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.expectRevert(bytes4(keccak256("TokenAlreadyRegistered()"))); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdc), BALANCE_SLOT_USDT, SCALE_USDT); + } + + function test_registerToken_autoFetchesDecimals() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); + assertEq(info.decimals, 6); // USDC has 6 decimals + + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + + info = priceOracle.getTokenInfo(TOKEN_ID_DAI); + assertEq(info.decimals, 18); // DAI has 18 decimals + } + + function test_registerToken_setsIsActiveToFalse() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); + assertFalse(info.isActive); + } + + function test_registerToken_reverts_when_not_owner() public { + vm.expectRevert("Ownable: caller is not the owner"); + vm.prank(alice); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + } + + function test_registerToken_reverts_when_tokenAddress_zero() public { + vm.expectRevert(bytes4(keccak256("InvalidTokenAddress()"))); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(0), BALANCE_SLOT_USDC, SCALE_USDC); + } + + function test_registerTokens_succeeds() public { + uint16[] memory tokenIDs = new uint16[](3); + address[] memory tokenAddresses = new address[](3); + bytes32[] memory balanceSlots = new bytes32[](3); + + tokenIDs[0] = TOKEN_ID_USDC; + tokenIDs[1] = TOKEN_ID_USDT; + tokenIDs[2] = TOKEN_ID_DAI; + + tokenAddresses[0] = address(usdc); + tokenAddresses[1] = address(usdt); + tokenAddresses[2] = address(dai); + + balanceSlots[0] = BALANCE_SLOT_USDC; + balanceSlots[1] = BALANCE_SLOT_USDT; + balanceSlots[2] = BALANCE_SLOT_DAI; + + uint256[] memory scales = new uint256[](3); + scales[0] = SCALE_USDC; + scales[1] = SCALE_USDT; + scales[2] = SCALE_DAI; + + vm.prank(owner); + priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, scales); + + assertEq(priceOracle.getTokenInfo(TOKEN_ID_USDC).tokenAddress, address(usdc)); + assertEq(priceOracle.getTokenInfo(TOKEN_ID_USDT).tokenAddress, address(usdt)); + assertEq(priceOracle.getTokenInfo(TOKEN_ID_DAI).tokenAddress, address(dai)); + } + + function test_registerTokens_reverts_when_arrayLength_mismatch() public { + uint16[] memory tokenIDs = new uint16[](2); + address[] memory tokenAddresses = new address[](3); + bytes32[] memory balanceSlots = new bytes32[](2); + uint256[] memory scales = new uint256[](2); + + vm.expectRevert(bytes4(keccak256("InvalidArrayLength()"))); + vm.prank(owner); + priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, scales); + } + + function test_getTokenIdByAddress_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + uint16 tokenID = priceOracle.getTokenIdByAddress(address(usdc)); + assertEq(tokenID, TOKEN_ID_USDC); + } + + function test_getTokenIdByAddress_reverts_when_not_registered() public { + vm.expectRevert(bytes4(keccak256("TokenNotFound()"))); + priceOracle.getTokenIdByAddress(address(usdc)); + } + + /*////////////////////////////////////////////////////////////// + Token Update Tests + //////////////////////////////////////////////////////////////*/ + + function test_updateTokenInfo_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + bytes32 newBalanceSlot = bytes32(uint256(99)); + vm.prank(owner); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), newBalanceSlot, true, SCALE_USDC); + + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); + assertEq(info.balanceSlot, newBalanceSlot); + assertTrue(info.isActive); + } + + function test_updateTokenInfo_reverts_when_address_collision() public { + // Register two tokens + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + + // Try to update USDT to use USDC's address - should revert + vm.expectRevert(bytes4(keccak256("TokenAlreadyRegistered()"))); + vm.prank(owner); + priceOracle.updateTokenInfo(TOKEN_ID_USDT, address(usdc), BALANCE_SLOT_USDT, true, SCALE_USDT); + } + + function test_updateTokenInfo_autoFetchesDecimals() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + // Update to DAI address + vm.prank(owner); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(dai), BALANCE_SLOT_USDC, true, SCALE_DAI); + + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); + assertEq(info.tokenAddress, address(dai)); + assertEq(info.decimals, 18); // Should fetch DAI's decimals + } + + function test_deactivateToken_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.prank(owner); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + + assertTrue(priceOracle.getTokenInfo(TOKEN_ID_USDC).isActive); + + // Use batchUpdateTokenStatus to deactivate token + uint16[] memory tokenIDs = new uint16[](1); + bool[] memory isActives = new bool[](1); + tokenIDs[0] = TOKEN_ID_USDC; + isActives[0] = false; + + vm.prank(owner); + priceOracle.batchUpdateTokenStatus(tokenIDs, isActives); + + assertFalse(priceOracle.getTokenInfo(TOKEN_ID_USDC).isActive); + } + + /*////////////////////////////////////////////////////////////// + Price Management Tests + //////////////////////////////////////////////////////////////*/ + + function test_updatePriceRatio_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + // Set price: 1 USDC = 0.000001 ETH = 1e12 wei + uint256 priceRatio = 1e12; + + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, priceRatio); + + assertEq(priceOracle.getTokenPrice(TOKEN_ID_USDC), priceRatio); + } + + function test_updatePriceRatio_reverts_when_not_allowed() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.expectRevert(bytes4(keccak256("CallerNotAllowed()"))); + vm.prank(alice); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); + } + + function test_updatePriceRatio_succeeds_when_allowListDisabled() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.prank(owner); + priceOracle.setAllowListEnabled(false); + + vm.prank(alice); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); + + assertEq(priceOracle.getTokenPrice(TOKEN_ID_USDC), 1e12); + } + + function test_updatePriceRatio_succeeds_when_in_allowList() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + address[] memory users = new address[](1); + bool[] memory allowed = new bool[](1); + users[0] = alice; + allowed[0] = true; + + vm.prank(owner); + priceOracle.setAllowList(users, allowed); + + vm.prank(alice); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); + + assertEq(priceOracle.getTokenPrice(TOKEN_ID_USDC), 1e12); + } + + function test_updatePriceRatio_reverts_when_invalid_price() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.expectRevert(bytes4(keccak256("InvalidPrice()"))); + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 0); + } + + function test_batchUpdatePrices_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + + uint16[] memory tokenIDs = new uint16[](2); + uint256[] memory prices = new uint256[](2); + + tokenIDs[0] = TOKEN_ID_USDC; + tokenIDs[1] = TOKEN_ID_USDT; + prices[0] = 1e12; + prices[1] = 1e12; + + vm.prank(owner); + priceOracle.batchUpdatePrices(tokenIDs, prices); + + assertEq(priceOracle.getTokenPrice(TOKEN_ID_USDC), 1e12); + assertEq(priceOracle.getTokenPrice(TOKEN_ID_USDT), 1e12); + } + + /*////////////////////////////////////////////////////////////// + Gas Price Calculation Tests + //////////////////////////////////////////////////////////////*/ + + function test_calculateTokenGasPrice_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + // Set price: 1 USDC = 0.000001 ETH = 1e12 wei + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); + + // ETH gas price = 1 gwei = 1e9 wei + uint256 ethGasPrice = 1 gwei; + uint256 expectedTokenAmount = (ethGasPrice * SCALE_USDC) / 1e12; // (1e9 * 1e6) / 1e12 = 1e3 + + uint256 tokenGasAmount = priceOracle.calculateTokenAmount(TOKEN_ID_USDC, ethGasPrice); + assertEq(tokenGasAmount, expectedTokenAmount); + } + + function test_calculateEthGasPrice_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + // Set price: 1 USDC = 0.000001 ETH = 1e12 wei + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); + + // Token gas price = 1000 USDC + uint256 tokenGasPrice = 1000; + uint256 expectedEthGasPrice = (tokenGasPrice * 1e12) / SCALE_USDC; // (1000 * 1e12) / 1e6 = 1e9 + + // Inverse using on-chain values + uint256 ratio = priceOracle.getTokenPrice(TOKEN_ID_USDC); + uint256 scale = priceOracle.getTokenInfo(TOKEN_ID_USDC).scale; + uint256 ethGasPrice = (tokenGasPrice * ratio) / scale; + assertEq(ethGasPrice, expectedEthGasPrice); + } + + function test_calculateTokenGasPrice_withDAI() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + + // Set price: 1 DAI = 0.001 ETH = 1e15 wei + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_DAI, 1e15); + + // ETH gas price = 1 gwei = 1e9 wei + uint256 ethGasPrice = 1 gwei; + uint256 expectedTokenGasPrice = (ethGasPrice * SCALE_DAI) / 1e15; // (1e9 * 1e18) / 1e15 = 1e12 + + uint256 tokenGasPrice = priceOracle.calculateTokenAmount(TOKEN_ID_DAI, ethGasPrice); + assertEq(tokenGasPrice, expectedTokenGasPrice); + } + + /*////////////////////////////////////////////////////////////// + Allow List Tests + //////////////////////////////////////////////////////////////*/ + + function test_setAllowList_succeeds() public { + address[] memory users = new address[](2); + bool[] memory allowed = new bool[](2); + + users[0] = alice; + users[1] = bob; + allowed[0] = true; + allowed[1] = false; + + vm.prank(owner); + priceOracle.setAllowList(users, allowed); + + assertTrue(priceOracle.allowList(alice)); + assertFalse(priceOracle.allowList(bob)); + } + + function test_setAllowList_reverts_when_different_length() public { + address[] memory users = new address[](2); + bool[] memory allowed = new bool[](1); + + vm.expectRevert(bytes4(keccak256("DifferentLength()"))); + vm.prank(owner); + priceOracle.setAllowList(users, allowed); + } + + function test_setAllowListEnabled_succeeds() public { + vm.prank(owner); + priceOracle.setAllowListEnabled(false); + + assertFalse(priceOracle.allowListEnabled()); + + vm.prank(owner); + priceOracle.setAllowListEnabled(true); + + assertTrue(priceOracle.allowListEnabled()); + } + + /*////////////////////////////////////////////////////////////// + View Functions Tests + //////////////////////////////////////////////////////////////*/ + + function test_isTokenActive_succeeds() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + assertFalse(priceOracle.isTokenActive(TOKEN_ID_USDC)); + + vm.prank(owner); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + + assertTrue(priceOracle.isTokenActive(TOKEN_ID_USDC)); + } + + function test_isTokenActive_returns_false_for_nonexistent_token() public { + assertFalse(priceOracle.isTokenActive(TOKEN_ID_USDC)); + } + + /*////////////////////////////////////////////////////////////// + Supported Token List Tests + //////////////////////////////////////////////////////////////*/ + + function test_isTokenSupported_returns_false_when_not_registered() public { + assertFalse(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + } + + function test_isTokenSupported_returns_true_when_registered() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + } + + function test_getSupportedTokenCount_returns_zero_initially() public { + assertEq(priceOracle.getSupportedTokenCount(), 0); + } + + function test_getSupportedTokenCount_increments_on_register() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + assertEq(priceOracle.getSupportedTokenCount(), 1); + + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + assertEq(priceOracle.getSupportedTokenCount(), 2); + + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + assertEq(priceOracle.getSupportedTokenCount(), 3); + } + + function test_getSupportedIDList_returns_empty_when_no_tokens() public { + uint16[] memory tokenIDs = priceOracle.getSupportedIDList(); + assertEq(tokenIDs.length, 0); + } + + function test_getSupportedIDList_returns_all_registered_tokenIDs() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + + uint16[] memory tokenIDs = priceOracle.getSupportedIDList(); + assertEq(tokenIDs.length, 3); + + // Check that all token IDs are present (order may vary) + bool foundUSDC = false; + bool foundUSDT = false; + bool foundDAI = false; + + for (uint256 i = 0; i < tokenIDs.length; ++i) { + if (tokenIDs[i] == TOKEN_ID_USDC) foundUSDC = true; + if (tokenIDs[i] == TOKEN_ID_USDT) foundUSDT = true; + if (tokenIDs[i] == TOKEN_ID_DAI) foundDAI = true; + } + + assertTrue(foundUSDC); + assertTrue(foundUSDT); + assertTrue(foundDAI); + } + + function test_getSupportedTokenList_returns_empty_when_no_tokens() public { + L2TokenRegistry.TokenEntry[] memory tokenList = priceOracle.getSupportedTokenList(); + assertEq(tokenList.length, 0); + } + + function test_getSupportedTokenList_returns_all_registered_tokens() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + + L2TokenRegistry.TokenEntry[] memory tokenList = priceOracle.getSupportedTokenList(); + assertEq(tokenList.length, 2); + + // Check that all tokens are present with correct addresses + bool foundUSDC = false; + bool foundUSDT = false; + + for (uint256 i = 0; i < tokenList.length; ++i) { + if (tokenList[i].tokenID == TOKEN_ID_USDC) { + assertEq(tokenList[i].tokenAddress, address(usdc)); + foundUSDC = true; + } + if (tokenList[i].tokenID == TOKEN_ID_USDT) { + assertEq(tokenList[i].tokenAddress, address(usdt)); + foundUSDT = true; + } + } + + assertTrue(foundUSDC); + assertTrue(foundUSDT); + } + + function test_getSupportedTokenList_includes_correct_tokenAddress() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + L2TokenRegistry.TokenEntry[] memory tokenList = priceOracle.getSupportedTokenList(); + assertEq(tokenList.length, 1); + assertEq(tokenList[0].tokenID, TOKEN_ID_USDC); + assertEq(tokenList[0].tokenAddress, address(usdc)); + } + + function test_registerToken_adds_to_supported_list() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + assertEq(priceOracle.getSupportedTokenCount(), 1); + } + + function test_registerTokens_adds_all_to_supported_list() public { + uint16[] memory tokenIDs = new uint16[](3); + address[] memory tokenAddresses = new address[](3); + bytes32[] memory balanceSlots = new bytes32[](3); + uint256[] memory scales = new uint256[](3); + + tokenIDs[0] = TOKEN_ID_USDC; + tokenIDs[1] = TOKEN_ID_USDT; + tokenIDs[2] = TOKEN_ID_DAI; + + tokenAddresses[0] = address(usdc); + tokenAddresses[1] = address(usdt); + tokenAddresses[2] = address(dai); + + balanceSlots[0] = BALANCE_SLOT_USDC; + balanceSlots[1] = BALANCE_SLOT_USDT; + balanceSlots[2] = BALANCE_SLOT_DAI; + + scales[0] = SCALE_USDC; + scales[1] = SCALE_USDT; + scales[2] = SCALE_DAI; + + vm.prank(owner); + priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, scales); + + assertEq(priceOracle.getSupportedTokenCount(), 3); + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDT)); + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_DAI)); + } + + function test_removeToken_removes_from_supported_list() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + + assertEq(priceOracle.getSupportedTokenCount(), 2); + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + + vm.prank(owner); + priceOracle.removeToken(TOKEN_ID_USDC); + + assertEq(priceOracle.getSupportedTokenCount(), 1); + assertFalse(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDT)); + } + + function test_removeToken_removes_from_tokenList() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + + vm.prank(owner); + priceOracle.removeToken(TOKEN_ID_USDC); + + uint16[] memory tokenIDs = priceOracle.getSupportedIDList(); + assertEq(tokenIDs.length, 1); + assertEq(tokenIDs[0], TOKEN_ID_USDT); + + L2TokenRegistry.TokenEntry[] memory tokenList = priceOracle.getSupportedTokenList(); + assertEq(tokenList.length, 1); + assertEq(tokenList[0].tokenID, TOKEN_ID_USDT); + assertEq(tokenList[0].tokenAddress, address(usdt)); + } + + function test_removeToken_cleans_up_all_mappings() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); + + vm.prank(owner); + priceOracle.removeToken(TOKEN_ID_USDC); + + // Token should be removed from registry + vm.expectRevert(bytes4(keccak256("TokenNotFound()"))); + priceOracle.getTokenInfo(TOKEN_ID_USDC); + + // Token address mapping should be cleared + vm.expectRevert(bytes4(keccak256("TokenNotFound()"))); + priceOracle.getTokenIdByAddress(address(usdc)); + + // Price should be cleared + vm.expectRevert(bytes4(keccak256("TokenNotFound()"))); + priceOracle.getTokenPrice(TOKEN_ID_USDC); + } + + function test_removeToken_reverts_when_not_owner() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.expectRevert("Ownable: caller is not the owner"); + vm.prank(alice); + priceOracle.removeToken(TOKEN_ID_USDC); + } + + function test_removeToken_reverts_when_token_not_found() public { + vm.expectRevert(bytes4(keccak256("TokenNotFound()"))); + vm.prank(owner); + priceOracle.removeToken(TOKEN_ID_USDC); + } + + function test_removeToken_emits_TokenRemoved_event() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + vm.expectEmit(true, true, false, false); + emit IL2TokenRegistry.TokenRemoved(TOKEN_ID_USDC, address(usdc)); + + vm.prank(owner); + priceOracle.removeToken(TOKEN_ID_USDC); + } + + function test_updateTokenInfo_keeps_token_in_supported_list() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + assertEq(priceOracle.getSupportedTokenCount(), 1); + + // Update token info + vm.prank(owner); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + + // Token should still be in supported list + assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); + assertEq(priceOracle.getSupportedTokenCount(), 1); + } +} diff --git a/contracts/scripts/oracle-testing/token.go b/contracts/scripts/oracle-testing/token.go new file mode 100644 index 000000000..d53193b7f --- /dev/null +++ b/contracts/scripts/oracle-testing/token.go @@ -0,0 +1,155 @@ +package oracle_testing + +import ( + "math/big" + + "github.com/morph-l2/go-ethereum/common" + "github.com/morph-l2/go-ethereum/crypto" +) + +// TokenConfig represents token configuration from JSON file +type TokenConfig struct { + Name string `json:"name"` + Symbol string `json:"symbol"` + Decimals uint8 `json:"decimals"` + TokenID uint16 `json:"tokenID"` + BalanceSlot uint64 `json:"balanceSlot"` + Scale string `json:"scale"` + PriceRatio string `json:"priceRatio"` +} + +var TokenRegistryAddress = common.HexToAddress("0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0") + +var ( + // TokenRegistrySlot is the storage slot for mapping(uint16 => TokenInfo) + // TokenInfo struct layout: + // - tokenAddress: address (offset 0) + // - balanceSlot: bytes32 (offset 1) + // - isActive: bool (offset 2, byte 0) + // - decimals: uint8 (offset 2, byte 1) + // - scale: uint256 (offset 3) + // Based on L2TokenRegistryStorageLayout: slot 151 + TokenRegistrySlot = common.BigToHash(big.NewInt(151)) + // TokenRegistrationSlot is the storage slot for mapping(address => uint16) + // Based on L2TokenRegistryStorageLayout: slot 152 + TokenRegistrationSlot = common.BigToHash(big.NewInt(152)) + // PriceRatioSlot is the storage slot for mapping(uint16 => uint256) + // Based on L2TokenRegistryStorageLayout: slot 153 + PriceRatioSlot = common.BigToHash(big.NewInt(153)) + // AllowListSlot is the storage slot for mapping(address => bool) + // Based on L2TokenRegistryStorageLayout: slot 154 + AllowListSlot = common.BigToHash(big.NewInt(154)) + // AllowListEnabledSlot is the storage slot for bool allowListEnabled + // Based on L2TokenRegistryStorageLayout: slot 155 + AllowListEnabledSlot = common.BigToHash(big.NewInt(155)) +) + +// TokenInfo represents the token information structure +type TokenInfo struct { + TokenAddress common.Address + BalanceSlot common.Hash + IsActive bool + Decimals uint8 + Scale *big.Int +} + +// CalculateUint16MappingSlot calculates the storage slot for a mapping key +// For mapping(key => value), the slot is: keccak256(abi.encode(key, mappingSlot)) +func CalculateUint16MappingSlot(key uint16, mappingSlot common.Hash) common.Hash { + // Convert key to 32 bytes (right-padded) + keyBytes := make([]byte, 32) + keyBytes[30] = byte(key >> 8) // high byte + keyBytes[31] = byte(key) // low byte + + // Convert mapping slot to 32 bytes (left-padded) + slotBytes := mappingSlot.Bytes() + paddedSlot := make([]byte, 32) + copy(paddedSlot[32-len(slotBytes):], slotBytes) + + // Concatenate key and slot + data := append(keyBytes, paddedSlot...) + + // Calculate keccak256 hash + hash := crypto.Keccak256(data) + + return common.BytesToHash(hash) +} + +// CalculateStructFieldSlot calculates the storage slot for a struct field within a mapping +// For a struct at baseSlot, fieldOffset is the offset within the struct +func CalculateStructFieldSlot(baseSlot common.Hash, fieldOffset uint64) common.Hash { + // Add fieldOffset to baseSlot + baseInt := new(big.Int).SetBytes(baseSlot[:]) + fieldInt := big.NewInt(int64(fieldOffset)) + result := new(big.Int).Add(baseInt, fieldInt) + return common.BigToHash(result) +} + +// CalculateAddressMappingSlot calculates the storage slot for a mapping key (address type) +// For mapping(address => value), the slot is: keccak256(abi.encode(key, mappingSlot)) +func CalculateAddressMappingSlot(key common.Address, mappingSlot common.Hash) common.Hash { + // Convert address to 32 bytes (left-padded) + keyBytes := make([]byte, 32) + copy(keyBytes[12:], key.Bytes()) + + // Convert mapping slot to 32 bytes (left-padded) + slotBytes := mappingSlot.Bytes() + paddedSlot := make([]byte, 32) + copy(paddedSlot[32-len(slotBytes):], slotBytes) + + // Concatenate key and slot + data := append(keyBytes, paddedSlot...) + + // Calculate keccak256 hash + hash := crypto.Keccak256(data) + + return common.BytesToHash(hash) +} + +// ParseTokenInfoFromStorage parses TokenInfo from storage slots +// baseSlot is the base slot for the TokenInfo struct in the mapping +func ParseTokenInfoFromStorage( + storageAt func(common.Hash) ([]byte, error), + baseSlot common.Hash, +) (*TokenInfo, error) { + // Read tokenAddress (offset 0) + tokenAddrSlot := CalculateStructFieldSlot(baseSlot, 0) + tokenAddrData, err := storageAt(tokenAddrSlot) + if err != nil { + return nil, err + } + tokenAddress := common.BytesToAddress(tokenAddrData[12:32]) + + // Read balanceSlot (offset 1) + balanceSlotField := CalculateStructFieldSlot(baseSlot, 1) + balanceSlotData, err := storageAt(balanceSlotField) + if err != nil { + return nil, err + } + balanceSlot := common.BytesToHash(balanceSlotData) + + // Read isActive and decimals (offset 2, packed together) + isActiveSlot := CalculateStructFieldSlot(baseSlot, 2) + isActiveData, err := storageAt(isActiveSlot) + if err != nil { + return nil, err + } + isActive := isActiveData[31] != 0 + decimals := isActiveData[30] + + // Read scale (offset 3) + scaleSlot := CalculateStructFieldSlot(baseSlot, 3) + scaleData, err := storageAt(scaleSlot) + if err != nil { + return nil, err + } + scale := new(big.Int).SetBytes(scaleData) + + return &TokenInfo{ + TokenAddress: tokenAddress, + BalanceSlot: balanceSlot, + IsActive: isActive, + Decimals: decimals, + Scale: scale, + }, nil +} diff --git a/contracts/scripts/oracle-testing/token_test.go b/contracts/scripts/oracle-testing/token_test.go new file mode 100644 index 000000000..8dc7146dd --- /dev/null +++ b/contracts/scripts/oracle-testing/token_test.go @@ -0,0 +1,276 @@ +package oracle_testing + +import ( + "context" + "encoding/json" + "math/big" + "os" + "path/filepath" + "runtime" + "testing" + + "github.com/morph-l2/go-ethereum/common" + "github.com/morph-l2/go-ethereum/ethclient" +) + +func TestGetStorageAtL2TokenRegistry(t *testing.T) { + TokenRegistryAddress = common.HexToAddress("0x5300000000000000000000000000000000000021") + // Connect to Ethereum node + rpcURL := "http://localhost:8545" + client, err := ethclient.Dial(rpcURL) + if err != nil { + t.Fatalf("Failed to connect to Ethereum node: %v", err) + } + defer client.Close() + + ctx := context.Background() + + // Read allowListEnabled (slot 105, bool) + allowListEnabledSlot := AllowListEnabledSlot + allowListEnabledData, err := client.StorageAt(ctx, TokenRegistryAddress, allowListEnabledSlot, nil) + if err != nil { + t.Fatalf("Failed to read allowListEnabled: %v", err) + } + allowListEnabled := allowListEnabledData[31] != 0 + t.Logf("allowListEnabled: %v", allowListEnabled) + + for tokenID := uint16(1); tokenID <= 10; tokenID++ { + t.Logf("---------- Querying tokenID: %d ----------", tokenID) + + // Calculate baseSlot + baseSlot := CalculateUint16MappingSlot(tokenID, TokenRegistrySlot) + t.Logf("TokenID %d base slot: %s", tokenID, baseSlot.Hex()) + + // Create storage reader + storageReader := func(slot common.Hash) ([]byte, error) { + return client.StorageAt(ctx, TokenRegistryAddress, slot, nil) + } + + // Parse TokenInfo + tokenInfo, err := ParseTokenInfoFromStorage(storageReader, baseSlot) + if err != nil { + t.Logf(" [WARN] Failed to parse TokenInfo: %v", err) + continue + } + + t.Logf("TokenInfo for tokenID %d:", tokenID) + t.Logf(" TokenAddress: %s", tokenInfo.TokenAddress.Hex()) + t.Logf(" BalanceSlot: %s", tokenInfo.BalanceSlot.Hex()) + t.Logf(" IsActive: %v", tokenInfo.IsActive) + t.Logf(" Decimals: %d", tokenInfo.Decimals) + t.Logf(" Scale: %s", tokenInfo.Scale.String()) + + // Query tokenRegistration mapping (address => uint16) + if tokenInfo.TokenAddress != (common.Address{}) { + tokenRegistrationSlot := CalculateAddressMappingSlot(tokenInfo.TokenAddress, TokenRegistrationSlot) + tokenRegistrationData, err := client.StorageAt(ctx, TokenRegistryAddress, tokenRegistrationSlot, nil) + if err != nil { + t.Logf(" [WARN] Failed to read tokenRegistration: %v", err) + } else { + registeredTokenID := uint16(tokenRegistrationData[30])<<8 | uint16(tokenRegistrationData[31]) + t.Logf(" TokenID for address %s: %d", tokenInfo.TokenAddress.Hex(), registeredTokenID) + if registeredTokenID != tokenID { + t.Errorf(" [ERR] Mismatch: expected tokenID %d, got %d", tokenID, registeredTokenID) + } + } + } + + // Query priceRatio mapping (uint16 => uint256) + priceRatioSlot := CalculateUint16MappingSlot(tokenID, PriceRatioSlot) + priceRatioData, err := client.StorageAt(ctx, TokenRegistryAddress, priceRatioSlot, nil) + if err != nil { + t.Logf(" [WARN] Failed to read priceRatio: %v", err) + } else { + priceRatio := new(big.Int).SetBytes(priceRatioData) + t.Logf(" PriceRatio: %s", priceRatio.String()) + } + } + + // Test allowList mapping (address => bool) + testAddress := common.HexToAddress("0x1234567890123456789012345678901234567890") + allowListSlot := CalculateAddressMappingSlot(testAddress, AllowListSlot) + allowListData, err := client.StorageAt(ctx, TokenRegistryAddress, allowListSlot, nil) + if err != nil { + t.Fatalf("Failed to read allowList: %v", err) + } + isAllowed := allowListData[31] != 0 + t.Logf("Address %s in allowList: %v", testAddress.Hex(), isAllowed) +} + +// TestCalculateStorageSlots tests the storage slot calculation functions +func TestCalculateStorageSlots(t *testing.T) { + tokenID := uint16(1) + baseSlot := CalculateUint16MappingSlot(tokenID, TokenRegistrySlot) + t.Logf("Base slot for tokenID %d: %s", tokenID, baseSlot.Hex()) + + // Test struct field slots + tokenAddrSlot := CalculateStructFieldSlot(baseSlot, 0) + t.Logf("TokenAddress slot: %s", tokenAddrSlot.Hex()) + + balanceSlotField := CalculateStructFieldSlot(baseSlot, 1) + t.Logf("BalanceSlot field slot: %s", balanceSlotField.Hex()) + + isActiveSlot := CalculateStructFieldSlot(baseSlot, 2) + t.Logf("IsActive slot: %s", isActiveSlot.Hex()) + + scaleSlot := CalculateStructFieldSlot(baseSlot, 3) + t.Logf("Scale slot: %s", scaleSlot.Hex()) + + // Test address mapping slot + testAddress := common.HexToAddress("0x1234567890123456789012345678901234567890") + addressMappingSlot := CalculateAddressMappingSlot(testAddress, TokenRegistrationSlot) + t.Logf("Address mapping slot for %s: %s", testAddress.Hex(), addressMappingSlot.Hex()) + + // Test priceRatio slot + priceRatioSlot := CalculateUint16MappingSlot(tokenID, PriceRatioSlot) + t.Logf("PriceRatio slot for tokenID %d: %s", tokenID, priceRatioSlot.Hex()) +} + +// TestCompareTokensFromJSON compares token configurations from JSON file with contract data +func TestCompareTokensFromJSON(t *testing.T) { + TokenRegistryAddress = common.HexToAddress("0x5300000000000000000000000000000000000021") + // Connect to Ethereum node + rpcURL := "http://localhost:8545" + client, err := ethclient.Dial(rpcURL) + if err != nil { + t.Fatalf("Failed to connect to Ethereum node: %v", err) + } + defer client.Close() + + ctx := context.Background() + + // Load token configurations from JSON file + // Get absolute path relative to the test file location + _, testFile, _, ok := runtime.Caller(0) + if !ok { + t.Fatalf("Failed to get test file path") + } + testDir := filepath.Dir(testFile) + // Navigate from scripts/oracle-testing to contracts/src/tokens/tokens.json + tokensFilePath := filepath.Join(testDir, "..", "..", "src", "tokens", "tokens.json") + absTokensPath, err := filepath.Abs(tokensFilePath) + if err != nil { + t.Fatalf("Failed to resolve absolute path: %v", err) + } + + t.Logf("Loading tokens from: %s", absTokensPath) + + tokensData, err := os.ReadFile(absTokensPath) + if err != nil { + t.Fatalf("Failed to read tokens.json: %v", err) + } + + var tokenConfigs []TokenConfig + if err := json.Unmarshal(tokensData, &tokenConfigs); err != nil { + t.Fatalf("Failed to parse tokens.json: %v", err) + } + + t.Logf("Loaded %d token configurations from JSON file", len(tokenConfigs)) + + // Create storage reader + storageReader := func(slot common.Hash) ([]byte, error) { + return client.StorageAt(ctx, TokenRegistryAddress, slot, nil) + } + + // Compare each token + mismatches := 0 + notRegistered := 0 + checked := 0 + + for _, config := range tokenConfigs { + t.Logf("\n---------- Comparing tokenID %d: %s (%s) ----------", config.TokenID, config.Name, config.Symbol) + + // Calculate baseSlot + baseSlot := CalculateUint16MappingSlot(config.TokenID, TokenRegistrySlot) + + // Parse TokenInfo from contract + contractTokenInfo, err := ParseTokenInfoFromStorage(storageReader, baseSlot) + if err != nil { + t.Logf(" [WARN] Failed to parse TokenInfo from contract: %v", err) + notRegistered++ + continue + } + + // Check if token is registered (non-zero address) + if contractTokenInfo.TokenAddress == (common.Address{}) { + t.Logf(" [SKIP] TokenID %d is not registered in contract", config.TokenID) + notRegistered++ + continue + } + + checked++ + hasMismatch := false + + // Compare decimals + if contractTokenInfo.Decimals != config.Decimals { + t.Errorf(" [MISMATCH] TokenID %d Decimals: contract=%d, JSON=%d", config.TokenID, contractTokenInfo.Decimals, config.Decimals) + hasMismatch = true + } else { + t.Logf(" ✓ Decimals: %d", contractTokenInfo.Decimals) + } + + // Compare balanceSlot + expectedBalanceSlot := common.BigToHash(big.NewInt(int64(config.BalanceSlot))) + if contractTokenInfo.BalanceSlot != expectedBalanceSlot { + t.Errorf(" [MISMATCH] TokenID %d BalanceSlot: contract=%s, JSON=%s", config.TokenID, contractTokenInfo.BalanceSlot.Hex(), expectedBalanceSlot.Hex()) + hasMismatch = true + } else { + t.Logf(" ✓ BalanceSlot: %s", contractTokenInfo.BalanceSlot.Hex()) + } + + // Compare scale + expectedScale, ok := new(big.Int).SetString(config.Scale, 10) + if !ok { + t.Errorf(" [ERROR] TokenID %d: Invalid scale in JSON: %s", config.TokenID, config.Scale) + hasMismatch = true + } else if contractTokenInfo.Scale.Cmp(expectedScale) != 0 { + t.Errorf(" [MISMATCH] TokenID %d Scale: contract=%s, JSON=%s", config.TokenID, contractTokenInfo.Scale.String(), expectedScale.String()) + hasMismatch = true + } else { + t.Logf(" ✓ Scale: %s", contractTokenInfo.Scale.String()) + } + + // Read and compare priceRatio + priceRatioSlot := CalculateUint16MappingSlot(config.TokenID, PriceRatioSlot) + priceRatioData, err := client.StorageAt(ctx, TokenRegistryAddress, priceRatioSlot, nil) + if err != nil { + t.Logf(" [WARN] Failed to read priceRatio: %v", err) + } else { + contractPriceRatio := new(big.Int).SetBytes(priceRatioData) + expectedPriceRatio, ok := new(big.Int).SetString(config.PriceRatio, 10) + if !ok { + t.Errorf(" [ERROR] TokenID %d: Invalid priceRatio in JSON: %s", config.TokenID, config.PriceRatio) + hasMismatch = true + } else if contractPriceRatio.Cmp(expectedPriceRatio) != 0 { + t.Errorf(" [MISMATCH] TokenID %d PriceRatio: contract=%s, JSON=%s", config.TokenID, contractPriceRatio.String(), expectedPriceRatio.String()) + hasMismatch = true + } else { + t.Logf(" ✓ PriceRatio: %s", contractPriceRatio.String()) + } + } + + // Log token address + t.Logf(" TokenAddress: %s", contractTokenInfo.TokenAddress.Hex()) + + if hasMismatch { + mismatches++ + } else { + t.Logf(" ✓ All fields match for tokenID %d", config.TokenID) + } + } + + // Summary + t.Logf("\n==========================================") + t.Logf("Comparison Summary:") + t.Logf("==========================================") + t.Logf("Total tokens in JSON: %d", len(tokenConfigs)) + t.Logf("Tokens checked: %d", checked) + t.Logf("Tokens not registered: %d", notRegistered) + t.Logf("Tokens with mismatches: %d", mismatches) + t.Logf("Tokens matching: %d", checked-mismatches) + t.Logf("==========================================") + + if mismatches > 0 { + t.Errorf("Found %d token(s) with mismatches", mismatches) + } +} diff --git a/contracts/src/tokens/tokens.json b/contracts/src/tokens/tokens.json new file mode 100644 index 000000000..10ae476fd --- /dev/null +++ b/contracts/src/tokens/tokens.json @@ -0,0 +1,902 @@ +[ + { + "name": "Test USDC", + "symbol": "USDC", + "decimals": 6, + "tokenID": 1, + "balanceSlot": 0, + "scale": "1000000", + "priceRatio": "68951948644506307210" + }, + { + "name": "Test USDT", + "symbol": "USDT", + "decimals": 6, + "tokenID": 2, + "balanceSlot": 0, + "scale": "1000000", + "priceRatio": "14995514838432569260" + }, + { + "name": "Test DAI", + "symbol": "DAI", + "decimals": 18, + "tokenID": 3, + "balanceSlot": 0, + "scale": "1000000000000000000", + "priceRatio": "87820606474325069614" + }, + { + "name": "Test Token 4", + "symbol": "T4", + "decimals": 6, + "tokenID": 4, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "84750141244838638522" + }, + { + "name": "Test Token 5", + "symbol": "T5", + "decimals": 6, + "tokenID": 5, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "43629115832236572446" + }, + { + "name": "Test Token 6", + "symbol": "T6", + "decimals": 18, + "tokenID": 6, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "96894773153476152362" + }, + { + "name": "Test Token 7", + "symbol": "T7", + "decimals": 6, + "tokenID": 7, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "38164714107336114906" + }, + { + "name": "Test Token 8", + "symbol": "T8", + "decimals": 6, + "tokenID": 8, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "53692298236958224075" + }, + { + "name": "Test Token 9", + "symbol": "T9", + "decimals": 18, + "tokenID": 9, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "95420241524621205786" + }, + { + "name": "Test Token 10", + "symbol": "T10", + "decimals": 6, + "tokenID": 10, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "25756632947890861072" + }, + { + "name": "Test Token 11", + "symbol": "T11", + "decimals": 6, + "tokenID": 11, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "18028138931330557088" + }, + { + "name": "Test Token 12", + "symbol": "T12", + "decimals": 18, + "tokenID": 12, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "63796417708902213793" + }, + { + "name": "Test Token 13", + "symbol": "T13", + "decimals": 6, + "tokenID": 13, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "39665915062604805218" + }, + { + "name": "Test Token 14", + "symbol": "T14", + "decimals": 6, + "tokenID": 14, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "12722947968931732842" + }, + { + "name": "Test Token 15", + "symbol": "T15", + "decimals": 18, + "tokenID": 15, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "70109502462455629135" + }, + { + "name": "Test Token 16", + "symbol": "T16", + "decimals": 6, + "tokenID": 16, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "18907807359378053203" + }, + { + "name": "Test Token 17", + "symbol": "T17", + "decimals": 6, + "tokenID": 17, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "46657969304715671332" + }, + { + "name": "Test Token 18", + "symbol": "T18", + "decimals": 18, + "tokenID": 18, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "69472509895868806232" + }, + { + "name": "Test Token 19", + "symbol": "T19", + "decimals": 6, + "tokenID": 19, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "17144409117624266298" + }, + { + "name": "Test Token 20", + "symbol": "T20", + "decimals": 6, + "tokenID": 20, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "33540571034713903643" + }, + { + "name": "Test Token 21", + "symbol": "T21", + "decimals": 18, + "tokenID": 21, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "95273826990777214944" + }, + { + "name": "Test Token 22", + "symbol": "T22", + "decimals": 6, + "tokenID": 22, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "56197288434640708771" + }, + { + "name": "Test Token 23", + "symbol": "T23", + "decimals": 6, + "tokenID": 23, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "73915582533826057379" + }, + { + "name": "Test Token 24", + "symbol": "T24", + "decimals": 18, + "tokenID": 24, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "57444700001693072686" + }, + { + "name": "Test Token 25", + "symbol": "T25", + "decimals": 6, + "tokenID": 25, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "44083880254436672476" + }, + { + "name": "Test Token 26", + "symbol": "T26", + "decimals": 6, + "tokenID": 26, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "21542592563162243546" + }, + { + "name": "Test Token 27", + "symbol": "T27", + "decimals": 18, + "tokenID": 27, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "67535878324713623818" + }, + { + "name": "Test Token 28", + "symbol": "T28", + "decimals": 6, + "tokenID": 28, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "20476599673874955789" + }, + { + "name": "Test Token 29", + "symbol": "T29", + "decimals": 6, + "tokenID": 29, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "34314726040826715299" + }, + { + "name": "Test Token 30", + "symbol": "T30", + "decimals": 18, + "tokenID": 30, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "21515084768582046722" + }, + { + "name": "Test Token 31", + "symbol": "T31", + "decimals": 6, + "tokenID": 31, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "59149159565705288392" + }, + { + "name": "Test Token 32", + "symbol": "T32", + "decimals": 6, + "tokenID": 32, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "114024078846613525" + }, + { + "name": "Test Token 33", + "symbol": "T33", + "decimals": 18, + "tokenID": 33, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "74803508987509964087" + }, + { + "name": "Test Token 34", + "symbol": "T34", + "decimals": 6, + "tokenID": 34, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "36235819884926901790" + }, + { + "name": "Test Token 35", + "symbol": "T35", + "decimals": 6, + "tokenID": 35, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "11259023081896722323" + }, + { + "name": "Test Token 36", + "symbol": "T36", + "decimals": 18, + "tokenID": 36, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "6797200384632383830" + }, + { + "name": "Test Token 37", + "symbol": "T37", + "decimals": 6, + "tokenID": 37, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "49549145671692485507" + }, + { + "name": "Test Token 38", + "symbol": "T38", + "decimals": 6, + "tokenID": 38, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "14375967477826844936" + }, + { + "name": "Test Token 39", + "symbol": "T39", + "decimals": 18, + "tokenID": 39, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "36684899225139230696" + }, + { + "name": "Test Token 40", + "symbol": "T40", + "decimals": 6, + "tokenID": 40, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "67546404948665609945" + }, + { + "name": "Test Token 41", + "symbol": "T41", + "decimals": 6, + "tokenID": 41, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "86898616623323813058" + }, + { + "name": "Test Token 42", + "symbol": "T42", + "decimals": 18, + "tokenID": 42, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "21162735980144258529" + }, + { + "name": "Test Token 43", + "symbol": "T43", + "decimals": 6, + "tokenID": 43, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "98248981425952840663" + }, + { + "name": "Test Token 44", + "symbol": "T44", + "decimals": 6, + "tokenID": 44, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "18661589584463400613" + }, + { + "name": "Test Token 45", + "symbol": "T45", + "decimals": 18, + "tokenID": 45, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "67521340213232829917" + }, + { + "name": "Test Token 46", + "symbol": "T46", + "decimals": 6, + "tokenID": 46, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "26348461062687680656" + }, + { + "name": "Test Token 47", + "symbol": "T47", + "decimals": 6, + "tokenID": 47, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "55822156776537032907" + }, + { + "name": "Test Token 48", + "symbol": "T48", + "decimals": 18, + "tokenID": 48, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "5938247499186059222" + }, + { + "name": "Test Token 49", + "symbol": "T49", + "decimals": 6, + "tokenID": 49, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "7714200568135586056" + }, + { + "name": "Test Token 50", + "symbol": "T50", + "decimals": 6, + "tokenID": 50, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "282993314835393582" + }, + { + "name": "Test Token 51", + "symbol": "T51", + "decimals": 18, + "tokenID": 51, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "90982183814912910049" + }, + { + "name": "Test Token 52", + "symbol": "T52", + "decimals": 6, + "tokenID": 52, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "47773786324994763609" + }, + { + "name": "Test Token 53", + "symbol": "T53", + "decimals": 6, + "tokenID": 53, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "38386985766663882935" + }, + { + "name": "Test Token 54", + "symbol": "T54", + "decimals": 18, + "tokenID": 54, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "99142548748920614516" + }, + { + "name": "Test Token 55", + "symbol": "T55", + "decimals": 6, + "tokenID": 55, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "80945713604301844697" + }, + { + "name": "Test Token 56", + "symbol": "T56", + "decimals": 6, + "tokenID": 56, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "3497343514449409628" + }, + { + "name": "Test Token 57", + "symbol": "T57", + "decimals": 18, + "tokenID": 57, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "83803739592343936212" + }, + { + "name": "Test Token 58", + "symbol": "T58", + "decimals": 6, + "tokenID": 58, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "83120121084834127225" + }, + { + "name": "Test Token 59", + "symbol": "T59", + "decimals": 6, + "tokenID": 59, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "44278989089138351113" + }, + { + "name": "Test Token 60", + "symbol": "T60", + "decimals": 18, + "tokenID": 60, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "79082132030160042260" + }, + { + "name": "Test Token 61", + "symbol": "T61", + "decimals": 6, + "tokenID": 61, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "82052674753343665473" + }, + { + "name": "Test Token 62", + "symbol": "T62", + "decimals": 6, + "tokenID": 62, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "15967944088369769094" + }, + { + "name": "Test Token 63", + "symbol": "T63", + "decimals": 18, + "tokenID": 63, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "65006456314535872445" + }, + { + "name": "Test Token 64", + "symbol": "T64", + "decimals": 6, + "tokenID": 64, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "70520767419421375318" + }, + { + "name": "Test Token 65", + "symbol": "T65", + "decimals": 6, + "tokenID": 65, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "6418782493958243076" + }, + { + "name": "Test Token 66", + "symbol": "T66", + "decimals": 18, + "tokenID": 66, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "37094069467125718529" + }, + { + "name": "Test Token 67", + "symbol": "T67", + "decimals": 6, + "tokenID": 67, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "85658122830627743284" + }, + { + "name": "Test Token 68", + "symbol": "T68", + "decimals": 6, + "tokenID": 68, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "12202753127902304368" + }, + { + "name": "Test Token 69", + "symbol": "T69", + "decimals": 18, + "tokenID": 69, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "39979769689563927951" + }, + { + "name": "Test Token 70", + "symbol": "T70", + "decimals": 6, + "tokenID": 70, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "57765328107123254693" + }, + { + "name": "Test Token 71", + "symbol": "T71", + "decimals": 6, + "tokenID": 71, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "17800617434043947362" + }, + { + "name": "Test Token 72", + "symbol": "T72", + "decimals": 18, + "tokenID": 72, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "23168484743796278493" + }, + { + "name": "Test Token 73", + "symbol": "T73", + "decimals": 6, + "tokenID": 73, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "60051481566495718257" + }, + { + "name": "Test Token 74", + "symbol": "T74", + "decimals": 6, + "tokenID": 74, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "87119605615965973989" + }, + { + "name": "Test Token 75", + "symbol": "T75", + "decimals": 18, + "tokenID": 75, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "69451746761265096178" + }, + { + "name": "Test Token 76", + "symbol": "T76", + "decimals": 6, + "tokenID": 76, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "21847218206971654028" + }, + { + "name": "Test Token 77", + "symbol": "T77", + "decimals": 6, + "tokenID": 77, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "59989885872654629531" + }, + { + "name": "Test Token 78", + "symbol": "T78", + "decimals": 18, + "tokenID": 78, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "12555986186913082249" + }, + { + "name": "Test Token 79", + "symbol": "T79", + "decimals": 6, + "tokenID": 79, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "41014237982409985856" + }, + { + "name": "Test Token 80", + "symbol": "T80", + "decimals": 6, + "tokenID": 80, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "13611242082460003467" + }, + { + "name": "Test Token 81", + "symbol": "T81", + "decimals": 18, + "tokenID": 81, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "44643771504283841241" + }, + { + "name": "Test Token 82", + "symbol": "T82", + "decimals": 6, + "tokenID": 82, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "86137359472213748299" + }, + { + "name": "Test Token 83", + "symbol": "T83", + "decimals": 6, + "tokenID": 83, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "55065485716187332069" + }, + { + "name": "Test Token 84", + "symbol": "T84", + "decimals": 18, + "tokenID": 84, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "38607368716591348773" + }, + { + "name": "Test Token 85", + "symbol": "T85", + "decimals": 6, + "tokenID": 85, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "52603793233934805909" + }, + { + "name": "Test Token 86", + "symbol": "T86", + "decimals": 6, + "tokenID": 86, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "87944642393323176020" + }, + { + "name": "Test Token 87", + "symbol": "T87", + "decimals": 18, + "tokenID": 87, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "32455093939053299619" + }, + { + "name": "Test Token 88", + "symbol": "T88", + "decimals": 6, + "tokenID": 88, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "60482997517815130643" + }, + { + "name": "Test Token 89", + "symbol": "T89", + "decimals": 6, + "tokenID": 89, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "87218564072108661464" + }, + { + "name": "Test Token 90", + "symbol": "T90", + "decimals": 18, + "tokenID": 90, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "81696708175157151135" + }, + { + "name": "Test Token 91", + "symbol": "T91", + "decimals": 6, + "tokenID": 91, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "79132703575151181660" + }, + { + "name": "Test Token 92", + "symbol": "T92", + "decimals": 6, + "tokenID": 92, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "49301528187395195799" + }, + { + "name": "Test Token 93", + "symbol": "T93", + "decimals": 18, + "tokenID": 93, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "65927982334011591895" + }, + { + "name": "Test Token 94", + "symbol": "T94", + "decimals": 6, + "tokenID": 94, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "18486727103065851735" + }, + { + "name": "Test Token 95", + "symbol": "T95", + "decimals": 6, + "tokenID": 95, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "78428131473826940537" + }, + { + "name": "Test Token 96", + "symbol": "T96", + "decimals": 18, + "tokenID": 96, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "35059782306886091423" + }, + { + "name": "Test Token 97", + "symbol": "T97", + "decimals": 6, + "tokenID": 97, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "44048066582413268213" + }, + { + "name": "Test Token 98", + "symbol": "T98", + "decimals": 6, + "tokenID": 98, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "33671922684403215026" + }, + { + "name": "Test Token 99", + "symbol": "T99", + "decimals": 18, + "tokenID": 99, + "balanceSlot": 3, + "scale": "1000000000000000000", + "priceRatio": "21384849698979504579" + }, + { + "name": "Test Token 100", + "symbol": "T100", + "decimals": 6, + "tokenID": 100, + "balanceSlot": 3, + "scale": "1000000", + "priceRatio": "39080747780290942674" + } +] diff --git a/contracts/tasks/token_deploy.ts b/contracts/tasks/token_deploy.ts index b942b243b..b7230eb6c 100644 --- a/contracts/tasks/token_deploy.ts +++ b/contracts/tasks/token_deploy.ts @@ -4,6 +4,8 @@ import "@nomiclabs/hardhat-waffle"; import { task } from "hardhat/config"; import { ethers } from "ethers"; +import * as fs from "fs"; +import * as path from "path"; const V2_1ABI = `[ { @@ -610,4 +612,390 @@ task("deploy-l2-MigrationUSDC") const oldtoken = await migrationProxy.OLD_USDC() const newtoken = await migrationProxy.NEW_USDC() console.log(`owner ${owner}, oldtoken ${oldtoken}, newtoken ${newtoken}`) + }) + +task("deploy-l2-token-registry") + .addParam("proxyadmin","Proxy admin address","0x530000000000000000000000000000000000000B") + .addOptionalParam("proxy", "Existing proxy address (if upgrading)","0x5300000000000000000000000000000000000021") + .addParam("owner") + .setAction(async (taskArgs, hre) => { + // params check + if (!ethers.utils.isAddress(taskArgs.proxyadmin) || + !ethers.utils.isAddress(taskArgs.owner) + ) { + console.error(`address params check failed, proxyadmin: ${taskArgs.proxyadmin}, owner: ${taskArgs.owner}`) + return + } + + // deploy L2TokenRegistry impl + const TokenRegistryFactory = await hre.ethers.getContractFactory("L2TokenRegistry") + const tokenRegistry = await TokenRegistryFactory.deploy() + await tokenRegistry.deployed() + console.log(`L2TokenRegistry impl deployed at ${tokenRegistry.address}`) + + let proxyAddress; + + // Check if proxy parameter exists for upgrade + if (taskArgs.proxy && ethers.utils.isAddress(taskArgs.proxy)) { + console.log(`\nUpgrading existing proxy at ${taskArgs.proxy}`) + + // Get ProxyAdmin contract + const ProxyAdminFactory = await hre.ethers.getContractFactory("ProxyAdmin") + const proxyAdmin = ProxyAdminFactory.attach(taskArgs.proxyadmin) + + // Upgrade the proxy to new implementation + const upgradeTx = await proxyAdmin.upgradeAndCall( + taskArgs.proxy, + tokenRegistry.address, + TokenRegistryFactory.interface.encodeFunctionData('initialize', [ + taskArgs.owner // owner + ]) // data + ) + await upgradeTx.wait() + console.log(`Proxy upgraded to new implementation: ${tokenRegistry.address}`) + + proxyAddress = taskArgs.proxy + } else { + console.log(`\nDeploying new proxy`) + + // deploy proxy with initialize + const TransparentProxyFactory = await hre.ethers.getContractFactory("TransparentUpgradeableProxy") + const proxy = await TransparentProxyFactory.deploy( + tokenRegistry.address, //logic + taskArgs.proxyadmin, //admin + TokenRegistryFactory.interface.encodeFunctionData('initialize', [ + taskArgs.owner // owner + ]) // data + ) + await proxy.deployed() + console.log(`L2TokenRegistry proxy deployed at ${proxy.address}`) + + proxyAddress = proxy.address + } + + // Verify deployment + const tokenRegistryProxy = TokenRegistryFactory.attach(proxyAddress) + const registryOwner = await tokenRegistryProxy.owner() + const allowListEnabled = await tokenRegistryProxy.allowListEnabled() + console.log(`\nL2TokenRegistry proxy address: ${proxyAddress}`) + console.log(`L2TokenRegistry proxy owner: ${registryOwner}`) + console.log(`L2TokenRegistry allowListEnabled: ${allowListEnabled}`) + }) + +task("deploy-test-tokens-and-register") + .addParam("tokenregistry","Contract address","0x5300000000000000000000000000000000000021") + .addOptionalParam("count", "Number of test tokens to deploy", "10") + .setAction(async (taskArgs, hre) => { + // params check + if (!ethers.utils.isAddress(taskArgs.tokenregistry)) { + console.error(`tokenregistry address check failed: ${taskArgs.tokenregistry}`) + return + } + + const tokenCount = parseInt(taskArgs.count || "10") + if (tokenCount < 1) { + console.error(`token count should be at least 1, got: ${tokenCount}`) + return + } + + // Load token configurations from JSON file + const tokensFilePath = path.join(__dirname, "../src/tokens/tokens.json") + if (!fs.existsSync(tokensFilePath)) { + console.error(`Tokens file not found: ${tokensFilePath}`) + return + } + + const allTokensData = JSON.parse(fs.readFileSync(tokensFilePath, "utf8")) + if (!Array.isArray(allTokensData) || allTokensData.length === 0) { + console.error(`Invalid tokens file format or empty tokens array`) + return + } + + console.log(`\n========================================`) + console.log(`Connecting to L2TokenRegistry...`) + console.log(`========================================\n`) + + // Connect to L2TokenRegistry + const TokenRegistryFactory = await hre.ethers.getContractFactory("L2TokenRegistry") + const tokenRegistry = TokenRegistryFactory.attach(taskArgs.tokenregistry) + + // Verify registry + try { + const registryOwner = await tokenRegistry.owner() + console.log(`L2TokenRegistry address: ${taskArgs.tokenregistry}`) + console.log(`L2TokenRegistry owner: ${registryOwner}`) + } catch (error) { + console.error(`Failed to connect to L2TokenRegistry: ${error}`) + return + } + + // Check which tokenIDs are already registered + console.log(`\n========================================`) + console.log(`Checking registered tokenIDs...`) + console.log(`========================================\n`) + + const registeredTokenIDs = new Set() + const maxTokenID = Math.min(100, allTokensData.length) + + for (let tokenID = 1; tokenID <= maxTokenID; tokenID++) { + try { + const tokenInfo = await tokenRegistry.tokenRegistry(tokenID) + if (tokenInfo.tokenAddress !== ethers.constants.AddressZero) { + registeredTokenIDs.add(tokenID) + } + } catch (error) { + // If tokenID is not registered, tokenAddress will be zero address + } + } + + console.log(`Found ${registeredTokenIDs.size} already registered tokenIDs: ${Array.from(registeredTokenIDs).sort((a, b) => a - b).join(", ")}`) + + // Find the next available tokenID to start from + let startTokenID = 1 + for (let i = 1; i <= maxTokenID; i++) { + if (!registeredTokenIDs.has(i)) { + startTokenID = i + break + } + } + + if (registeredTokenIDs.size >= maxTokenID) { + console.log(`\nAll ${maxTokenID} token slots are already registered. Nothing to deploy.`) + return + } + + // Check if total registered tokens would exceed 100 + if (registeredTokenIDs.size >= 100) { + console.log(`\n⚠ Warning: Already have ${registeredTokenIDs.size} registered tokens. Cannot register more than 100 tokens.`) + return + } + + // Calculate how many tokens we can deploy (max 100 total) + const availableSlots = Math.min(100 - registeredTokenIDs.size, maxTokenID - registeredTokenIDs.size) + const tokensToDeployCount = Math.min(tokenCount, availableSlots) + + if (tokensToDeployCount === 0) { + console.log(`No available token slots to deploy.`) + return + } + + console.log(`\nWill deploy ${tokensToDeployCount} tokens starting from tokenID ${startTokenID}`) + console.log(`Total registered after deployment: ${registeredTokenIDs.size + tokensToDeployCount}/100`) + + // Get tokens to deploy + const tokensToDeploy = [] + let currentTokenID = startTokenID + let deployedCount = 0 + + while (deployedCount < tokensToDeployCount && currentTokenID <= maxTokenID && registeredTokenIDs.size + deployedCount < 100) { + if (!registeredTokenIDs.has(currentTokenID)) { + const tokenData = allTokensData.find((t: any) => t.tokenID === currentTokenID) + if (tokenData) { + tokensToDeploy.push({ + ...tokenData, + tokenID: currentTokenID, + scale: ethers.BigNumber.from(tokenData.scale), + priceRatio: ethers.BigNumber.from(tokenData.priceRatio) + }) + deployedCount++ + } + } + currentTokenID++ + } + + if (tokensToDeploy.length === 0) { + console.log(`No tokens available to deploy.`) + return + } + + // Final check: ensure we don't exceed 100 tokens + if (registeredTokenIDs.size + tokensToDeploy.length > 100) { + const maxCanDeploy = 100 - registeredTokenIDs.size + console.log(`\n⚠ Warning: Can only deploy ${maxCanDeploy} tokens to stay within 100 token limit.`) + console.log(`Requested: ${tokensToDeploy.length}, Will deploy: ${maxCanDeploy}`) + tokensToDeploy.splice(maxCanDeploy) + } + + console.log(`\n========================================`) + console.log(`Deploying ${tokensToDeploy.length} test tokens...`) + console.log(`========================================\n`) + + const deployedTokens = [] + const TokenFactory = await hre.ethers.getContractFactory("MockERC20") + + // Deploy tokens + for (let i = 0; i < tokensToDeploy.length; i++) { + const config = tokensToDeploy[i] + console.log(`[${i + 1}/${tokensToDeploy.length}] Deploying ${config.name} (${config.symbol}) - TokenID: ${config.tokenID}...`) + + const token = await TokenFactory.deploy( + config.name, + config.symbol, + config.decimals + ) + await token.deployed() + + console.log(` ✓ Token deployed at: ${token.address}`) + console.log(` - Name: ${config.name}`) + console.log(` - Symbol: ${config.symbol}`) + console.log(` - Decimals: ${config.decimals}`) + + deployedTokens.push({ + ...config, + address: token.address, + contract: token + }) + } + + console.log(`\n========================================`) + console.log(`Registering tokens to L2TokenRegistry...`) + console.log(`========================================\n`) + + // Prepare arrays for batch registration + const tokenIDs: number[] = [] + const tokenAddresses: string[] = [] + const balanceSlots: string[] = [] + const scales: string[] = [] + + for (const token of deployedTokens) { + tokenIDs.push(token.tokenID) + tokenAddresses.push(token.address) + // Calculate balance slot for mapping(address => uint256) at slot 0 + // For MockERC20, balance mapping is typically at slot 0 + // The actual slot for a user's balance is keccak256(abi.encode(userAddress, slot)) + // Here we use slot 0 as the base slot + balanceSlots.push(ethers.utils.hexZeroPad(ethers.BigNumber.from(token.balanceSlot).toHexString(), 32)) + scales.push(token.scale.toString()) + } + + console.log(`Registering ${tokenIDs.length} tokens in batch...`) + console.log(`Token IDs: ${tokenIDs.join(", ")}`) + console.log(`Token Addresses: ${tokenAddresses.join(", ")}`) + + try { + // Batch register tokens + const tx = await tokenRegistry.registerTokens( + tokenIDs, + tokenAddresses, + balanceSlots, + scales + ) + console.log(`\n ✓ Registration transaction sent: ${tx.hash}`) + + const receipt = await tx.wait() + console.log(` ✓ Transaction confirmed in block: ${receipt.blockNumber}`) + console.log(` ✓ Gas used: ${receipt.gasUsed.toString()}`) + + // Set prices for registered tokens + console.log(`\n========================================`) + console.log(`Setting prices for registered tokens...`) + console.log(`========================================\n`) + + try { + const priceTokenIDs: number[] = [] + const prices: string[] = [] + + for (const token of deployedTokens) { + priceTokenIDs.push(token.tokenID) + prices.push(token.priceRatio.toString()) + } + + console.log(`Setting prices for ${priceTokenIDs.length} tokens...`) + const priceTx = await tokenRegistry.batchUpdatePrices(priceTokenIDs, prices) + console.log(` ✓ Price update transaction sent: ${priceTx.hash}`) + + const priceReceipt = await priceTx.wait() + console.log(` ✓ Prices confirmed in block: ${priceReceipt.blockNumber}`) + console.log(` ✓ Gas used: ${priceReceipt.gasUsed.toString()}`) + + // Display price information + console.log(`\nPrice information:`) + for (const token of deployedTokens) { + const price = await tokenRegistry.priceRatio(token.tokenID) + console.log(` ${token.symbol} (ID: ${token.tokenID}): ${price.toString()}`) + } + } catch (priceError) { + console.error(`\n⚠ Failed to set prices: ${priceError}`) + console.log(`Attempting individual price updates...\n`) + + // Fallback to individual price updates + for (const token of deployedTokens) { + try { + const priceTx = await tokenRegistry.updatePriceRatio(token.tokenID, token.priceRatio) + const priceReceipt = await priceTx.wait() + console.log(` ✓ ${token.symbol} price set in block: ${priceReceipt.blockNumber}`) + } catch (err) { + console.error(` ✗ Failed to set price for ${token.symbol}: ${err}`) + } + } + } + + // Verify registration + console.log(`\n========================================`) + console.log(`Verifying token registrations...`) + console.log(`========================================\n`) + + for (const token of deployedTokens) { + try { + const tokenInfo = await tokenRegistry.tokenRegistry(token.tokenID) + const registeredTokenID = await tokenRegistry.tokenRegistration(token.address) + const priceRatio = await tokenRegistry.priceRatio(token.tokenID) + + console.log(`Token ID ${token.tokenID} (${token.symbol}):`) + console.log(` - Address: ${tokenInfo.tokenAddress}`) + console.log(` - Balance Slot: ${tokenInfo.balanceSlot}`) + console.log(` - Is Active: ${tokenInfo.isActive}`) + console.log(` - Decimals: ${tokenInfo.decimals}`) + console.log(` - Scale: ${tokenInfo.scale.toString()}`) + console.log(` - Price Ratio: ${priceRatio.toString()}`) + console.log(` - Registered TokenID: ${registeredTokenID}`) + console.log(` ✓ Registration verified\n`) + } catch (error) { + console.error(` ✗ Failed to verify token ${token.tokenID}: ${error}\n`) + } + } + + console.log(`\n========================================`) + console.log(`Summary:`) + console.log(`========================================`) + console.log(`Total tokens deployed: ${deployedTokens.length}`) + console.log(`Total tokens registered: ${tokenIDs.length}`) + console.log(`\nToken addresses:`) + for (const token of deployedTokens) { + console.log(` ${token.symbol} (ID: ${token.tokenID}): ${token.address}`) + } + console.log(`\nL2TokenRegistry: ${taskArgs.tokenregistry}`) + console.log(`========================================\n`) + + } catch (error) { + console.error(`\n✗ Failed to register tokens: ${error}`) + console.log(`\nTrying individual registration instead...\n`) + + // Fallback to individual registration + for (const token of deployedTokens) { + try { + console.log(`Registering ${token.symbol} (ID: ${token.tokenID}) individually...`) + const balanceSlot = ethers.utils.hexZeroPad(ethers.BigNumber.from(token.balanceSlot).toHexString(), 32) + const tx = await tokenRegistry.registerToken( + token.tokenID, + token.address, + balanceSlot, + token.scale + ) + const receipt = await tx.wait() + console.log(` ✓ ${token.symbol} registered in block: ${receipt.blockNumber}`) + + // Set price after registration + try { + const priceTx = await tokenRegistry.updatePriceRatio(token.tokenID, token.priceRatio) + const priceReceipt = await priceTx.wait() + console.log(` ✓ ${token.symbol} price set in block: ${priceReceipt.blockNumber}\n`) + } catch (priceErr) { + console.error(` ⚠ Failed to set price for ${token.symbol}: ${priceErr}\n`) + } + } catch (err) { + console.error(` ✗ Failed to register ${token.symbol}: ${err}\n`) + } + } + } }) \ No newline at end of file diff --git a/go-ethereum b/go-ethereum index 78b17f183..31e742a5d 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 78b17f183b84e4a5718376b47eb5c1165fcddf08 +Subproject commit 31e742a5deaabde52beb8518a345f1dff01424b2 diff --git a/ops/l2-genesis/deploy-config/devnet-deploy-config.json b/ops/l2-genesis/deploy-config/devnet-deploy-config.json index 0b3b411c8..46923a4b4 100644 --- a/ops/l2-genesis/deploy-config/devnet-deploy-config.json +++ b/ops/l2-genesis/deploy-config/devnet-deploy-config.json @@ -27,6 +27,7 @@ "morphTokenDailyInflationRate": 1, "morph203Time": 0, "viridianTime": 0, + "emeraldTime": 0, "l2StakingSequencerMaxSize": 4, "l2StakingUnDelegatedLockEpochs": 2, "l2StakingRewardStartTime": 1728000000, diff --git a/ops/l2-genesis/deploy-config/qanet-deploy-config.json b/ops/l2-genesis/deploy-config/qanet-deploy-config.json index 5c7adb096..530a442b7 100644 --- a/ops/l2-genesis/deploy-config/qanet-deploy-config.json +++ b/ops/l2-genesis/deploy-config/qanet-deploy-config.json @@ -25,6 +25,7 @@ "recordNextBatchSubmissionIndex": 1, "morph203Time": 0, "viridianTime": 0, + "emeraldTime": 0, "morphTokenName": "Morph Token", "morphTokenSymbol": "Morph", "morphTokenOwner": "0x716173f5BBE0b4B51AaDF5A5840fA9A79D01636E", diff --git a/ops/l2-genesis/morph-chain-ops/genesis/config.go b/ops/l2-genesis/morph-chain-ops/genesis/config.go index 4e963ca03..a87f38c04 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/config.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/config.go @@ -129,6 +129,7 @@ type DeployConfig struct { // Upgrade configs Morph203Time *uint64 `json:"morph203Time,omitempty"` ViridianTime *uint64 `json:"viridianTime,omitempty"` + EmeraldTime *uint64 `json:"emeraldTime,omitempty"` } // GetDeployedAddresses will get the deployed addresses of deployed L1 contracts @@ -455,6 +456,12 @@ func NewL2StorageConfig(config *DeployConfig, baseFee *big.Int) (state.StorageCo // "_initialized": 1, // "_initializing": false, //} + storage["L2TokenRegistry"] = state.StorageValues{ + "_initialized": 1, + "_initializing": false, + "_owner": config.FinalSystemOwner, + "allowListEnabled": true, + } storage["Record"] = state.StorageValues{ "_initialized": 1, "_initializing": false, diff --git a/ops/l2-genesis/morph-chain-ops/genesis/genesis.go b/ops/l2-genesis/morph-chain-ops/genesis/genesis.go index 7dd10ae82..7aae9cd7d 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/genesis.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/genesis.go @@ -45,6 +45,11 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro viridianTime = config.ViridianTime } + var emeraldTime *uint64 + if config.EmeraldTime != nil { + emeraldTime = config.EmeraldTime + } + morphChainConfig := params.ChainConfig{ ChainID: new(big.Int).SetUint64(config.L2ChainID), HomesteadBlock: big.NewInt(0), @@ -67,6 +72,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro CurieBlock: big.NewInt(0), Morph203Time: morph203Time, ViridianTime: viridianTime, + EmeraldTime: emeraldTime, TerminalTotalDifficulty: big.NewInt(0), Morph: params.MorphConfig{ UseZktrie: true, diff --git a/ops/l2-genesis/morph-chain-ops/genesis/layer_two.go b/ops/l2-genesis/morph-chain-ops/genesis/layer_two.go index 3a376818f..46a517f8f 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/layer_two.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/layer_two.go @@ -2,13 +2,16 @@ package genesis import ( "fmt" + "math/big" "github.com/morph-l2/go-ethereum/common" "github.com/morph-l2/go-ethereum/core" "github.com/morph-l2/go-ethereum/core/types" + "github.com/morph-l2/go-ethereum/core/vm" "github.com/morph-l2/go-ethereum/rollup/rcfg" "github.com/morph-l2/go-ethereum/rollup/withdrawtrie" + "morph-l2/bindings/predeploys" "morph-l2/morph-deployer/morph-chain-ops/state" ) @@ -50,5 +53,32 @@ func BuildL2DeveloperGenesis(config *DeployConfig, l1StartBlock *types.Block, cu withdrawRoot := withdrawtrie.ReadWTRSlot(rcfg.L2MessageQueueAddress, db) fmt.Println("get withdraw root:", withdrawRoot) + + // Verify L2TokenRegistry allowListEnabled configuration + if err = VerifyL2TokenRegistryConfig(db); err != nil { + return nil, common.Hash{}, fmt.Errorf("L2TokenRegistry verification failed: %w", err) + } + return db.Genesis(), withdrawRoot, nil } + +// VerifyL2TokenRegistryConfig verifies that L2TokenRegistry's allowListEnabled is set to true at slot 155 +func VerifyL2TokenRegistryConfig(db vm.StateDB) error { + contractAddr := predeploys.L2TokenRegistryAddr + // AllowListEnabledSlot = 155 + allowListEnabledSlot := common.BigToHash(big.NewInt(155)) + + // Read storage at slot 155 + storageValue := db.GetState(contractAddr, allowListEnabledSlot) + + // For bool type, true is represented as 0x01 (or any non-zero value in the last byte) + // Check if the last byte is non-zero + isEnabled := storageValue[31] != 0 + + if !isEnabled { + return fmt.Errorf("L2TokenRegistry allowListEnabled is not set to true at slot 155. Got: %s (value: %d)", storageValue.Hex(), storageValue[31]) + } + + fmt.Printf("✓ L2TokenRegistry allowListEnabled verified: true (slot 155 = %s, value = 0x%02x)\n", allowListEnabledSlot.Hex(), storageValue[31]) + return nil +} diff --git a/ops/l2-genesis/morph-chain-ops/genesis/setters.go b/ops/l2-genesis/morph-chain-ops/genesis/setters.go index 680d191a0..16cacd182 100644 --- a/ops/l2-genesis/morph-chain-ops/genesis/setters.go +++ b/ops/l2-genesis/morph-chain-ops/genesis/setters.go @@ -107,7 +107,7 @@ func SetTouchable(db vm.StateDB, name string, address common.Address, storage st db.SetState(address, ImplementationSlot, codeAddr.Hash()) - if err := setupPredeploy(db, deployResults, slotResults, storage, name, address, codeAddr); err != nil { + if err = setupPredeploy(db, deployResults, slotResults, storage, name, address, codeAddr); err != nil { return err } diff --git a/ops/l2-genesis/morph-chain-ops/immutables/immutables.go b/ops/l2-genesis/morph-chain-ops/immutables/immutables.go index 00faba3b3..eb59080ec 100644 --- a/ops/l2-genesis/morph-chain-ops/immutables/immutables.go +++ b/ops/l2-genesis/morph-chain-ops/immutables/immutables.go @@ -119,6 +119,9 @@ func BuildMorph(immutable ImmutableConfig, config *InitConfig) (DeploymentResult { Name: "ProxyAdmin", }, + { + Name: "L2TokenRegistry", + }, } return BuildL2(deployments, config) } @@ -233,6 +236,8 @@ func l2Deployer(backend *backends.SimulatedBackend, opts *bind.TransactOpts, dep switch deployment.Name { case "GasPriceOracle": _, tx, _, err = bindings.DeployGasPriceOracle(opts, backend, common.BigToAddress(common.Big1)) + case "L2TokenRegistry": + _, tx, _, err = bindings.DeployL2TokenRegistry(opts, backend) case "L2CrossDomainMessenger": _, tx, _, err = bindings.DeployL2CrossDomainMessenger(opts, backend) case "Sequencer":