diff --git a/bindings/bin/l2tokenregistry_deployed.hex b/bindings/bin/l2tokenregistry_deployed.hex index 775fc2e85..6debd77ec 100644 --- a/bindings/bin/l2tokenregistry_deployed.hex +++ b/bindings/bin/l2tokenregistry_deployed.hex @@ -1 +1 @@ -0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638da5cb5b116100fe578063dddc98be1161009e578063ef0fde0f1161006e578063ef0fde0f146104bd578063efeadb6d146104d0578063f2fde38b146104e3578063fce40489146104f6575f80fd5b8063dddc98be14610471578063e014d85e14610484578063e2f53f2c14610497578063e3de72a5146104aa575f80fd5b8063b10b69ee116100d9578063b10b69ee14610430578063c4d66de814610443578063ce67be2614610456578063dbbb2faa1461045e575f80fd5b80638da5cb5b146103ef5780639190202e1461040a578063a313d0071461041d575f80fd5b80634cbcdd1311610169578063724f91ce11610144578063724f91ce1461030e57806385519c36146103445780638c399691146103c95780638cbab7e4146103dc575f80fd5b80634cbcdd13146102de5780636f6d6cc1146102f1578063715018a614610306575f80fd5b806322bd5c1c116101a457806322bd5c1c146102775780632848aeaf146102945780632a1ea5a2146102b65780632d59c072146102c9575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d2610509565b6040516101df91906120ef565b60405180910390f35b6102076101f6366004612160565b60996020525f908152604090205481565b6040519081526020016101df565b610228610223366004612160565b610608565b6040516101df91905f60a0820190506001600160a01b0383511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102849060ff1681565b60405190151581526020016101df565b6102846102a236600461218f565b609a6020525f908152604090205460ff1681565b6102076102c4366004612160565b6106e6565b6102dc6102d73660046121b7565b61074e565b005b6102846102ec366004612160565b610ac8565b6102f9610ade565b6040516101df9190612208565b6102dc610b86565b61033161031c36600461218f565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b61038f610352366004612160565b60976020525f908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff808316926101009004169085565b604080516001600160a01b03909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102dc6103d73660046123bd565b610b99565b6103316103ea36600461218f565b610d88565b6033546040516001600160a01b0390911681526020016101df565b6102dc610418366004612465565b610df1565b61020761042b366004612160565b610f92565b6102dc61043e3660046124cc565b610ffd565b6102dc61045136600461218f565b611149565b610207611307565b6102dc61046c366004612160565b611317565b61020761047f3660046124cc565b611466565b6102dc6104923660046124f4565b6115b3565b6102dc6104a5366004612596565b6115df565b6102dc6104b836600461268d565b6116c1565b6102dc6104cb3660046124cc565b6117fa565b6102dc6104de366004612749565b61193d565b6102dc6104f136600461218f565b6119aa565b610284610504366004612160565b611a51565b60605f610516609c611a94565b90505f815167ffffffffffffffff8111156105335761053361224f565b60405190808252806020026020018201604052801561057757816020015b604080518082019091525f80825260208201528152602001906001900390816105515790505b5090505f5b8251811015610601575f83828151811061059857610598612762565b60209081029190910181015161ffff81165f818152609784526040908190205481518083019092529181526001600160a01b039091169281018390528551919350908590859081106105ec576105ec612762565b6020908102919091010152505060010161057c565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff851682526097905291909120546001600160a01b0316610681576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f90815260976020908152604091829020825160a08101845281546001600160a01b03168152600182015492810192909252600281015460ff80821615159484019490945261010090049092166060820152600390910154608082015290565b61ffff81165f908152609760205260408120546001600160a01b0316610738576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b610756611aa7565b61075e611b1b565b61ffff85165f908152609760205260409020546001600160a01b03166107b0576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166107f0576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f9081526098602052604090205461ffff16801580159061082357508561ffff168161ffff1614155b1561085a576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156108d7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526108d49181019061278f565b60015b156108df5790505b5f60975f8961ffff1661ffff1681526020019081526020015f205f015f9054906101000a90046001600160a01b031690506040518060a00160405280886001600160a01b0316815260200187815260200186151581526020018360ff1681526020018581525060975f8a61ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff16021790555060808201518160030155905050866001600160a01b0316816001600160a01b031614610a4f576001600160a01b038181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928a1682529020805490911661ffff8a161790555b866001600160a01b03168861ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa988888689604051610aac9493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610ac16001606555565b5050505050565b5f610ad8609c61ffff8416611b8e565b92915050565b60605f610aeb609c611a94565b90505f815167ffffffffffffffff811115610b0857610b0861224f565b604051908082528060200260200182016040528015610b31578160200160208202803683370190505b5090505f5b825181101561060157828181518110610b5157610b51612762565b6020026020010151828281518110610b6b57610b6b612762565b61ffff90921660209283029190910190910152600101610b36565b610b8e611aa7565b610b975f611ba5565b565b609b5460ff168015610bba5750335f908152609a602052604090205460ff16155b8015610bd157506033546001600160a01b03163314155b15610c08576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610c43576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610d83575f6001600160a01b031660975f858481518110610c6d57610c6d612762565b60209081029190910181015161ffff1682528101919091526040015f20546001600160a01b031614610d7b57818181518110610cab57610cab612762565b60200260200101515f0315610d7b57818181518110610ccc57610ccc612762565b602002602001015160995f858481518110610ce957610ce9612762565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610d1c57610d1c612762565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610d5b57610d5b612762565b6020026020010151604051610d7291815260200190565b60405180910390a25b600101610c45565b505050565b6001600160a01b0381165f9081526098602052604081205461ffff1680158015610dba57506001600160a01b03831615155b15610ad8576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610df9611aa7565b828114610e32576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610ac1575f858583818110610e4f57610e4f612762565b9050602002016020810190610e649190612160565b90505f848484818110610e7957610e79612762565b9050602002016020810190610e8e9190612749565b61ffff83165f908152609760205260409020549091506001600160a01b0316610eb8575050610f8a565b61ffff82165f9081526097602052604090206002015460ff1680151582151514610f865761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315801591909117909155610f575760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a2610f86565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610e34565b61ffff81165f908152609760205260408120546001600160a01b0316610fe4576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561101e5750335f908152609a602052604090205460ff16155b801561103557506033546001600160a01b03163314155b1561106c576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b03166110be576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036110f6576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c704679061113d9084815260200190565b60405180910390a25050565b5f54610100900460ff161580801561116757505f54600160ff909116105b806111805750303b15801561118057505f5460ff166001145b611211576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561126d575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61127682611ba5565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611303575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f611312609c611c0e565b905090565b61131f611aa7565b611327611b1b565b61ffff81165f908152609760205260409020546001600160a01b03168061137a576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915560039091018490556001600160a01b03861684526098835281842080549091169055928252609990529081205561141f82611c17565b6040516001600160a01b0382169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a3506114636001606555565b50565b61ffff82165f908152609760205260408120546001600160a01b03166114b8576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a08101835281546001600160a01b03168152600182015481850152600282015460ff8082161515838601526101009091041660608201526003909101546080820152938352609990915281205490819003611556576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8082608001518561156791906127dc565b61157191906127f3565b9250825f036115ab576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505092915050565b6115bb611aa7565b6115c3611b1b565b6115cf84848484611c26565b6115d96001606555565b50505050565b6115e7611aa7565b825184511415806115fa57508151845114155b8061160757508051845114155b1561163e576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8451811015610ac1576116b985828151811061165e5761165e612762565b602002602001015185838151811061167857611678612762565b602002602001015185848151811061169257611692612762565b60200260200101518585815181106116ac576116ac612762565b6020026020010151611c26565b600101611640565b6116c9611aa7565b8051825114611704576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610d835781818151811061172157611721612762565b6020026020010151609a5f85848151811061173e5761173e612762565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061178d5761178d612762565b60200260200101516001600160a01b03167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a115888383815181106117d1576117d1612762565b60200260200101516040516117ea911515815260200190565b60405180910390a2600101611706565b609b5460ff16801561181b5750335f908152609a602052604090205460ff16155b801561183257506033546001600160a01b03163314155b15611869576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b03166118bb576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036118f3576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e749061113d9084815260200190565b611945611aa7565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b6119b2611aa7565b6001600160a01b038116611a48576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611208565b61146381611ba5565b61ffff81165f908152609760205260408120546001600160a01b0316611a7857505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611aa083611f43565b9392505050565b6033546001600160a01b03163314610b97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611208565b600260655403611b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611208565b6002606555565b5f8181526001830160205260408120541515611aa0565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610ad8825490565b611303609c61ffff8316611f9c565b6001600160a01b038316611c66576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361ffff165f03611ca3576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff84165f908152609760205260409020546001600160a01b031615611cf6576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0383165f9081526098602052604090205461ffff1615611d49576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050836001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611dc6575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611dc39181019061278f565b60015b15611dce5790505b6040518060a00160405280856001600160a01b031681526020018481526020015f151581526020018260ff1681526020018381525060975f8761ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a8154816001600160a01b0302191690836001600160a01b03160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508460985f866001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548161ffff021916908361ffff160217905550611ee385611fa7565b604080518481525f602082015260ff8316818301526060810184905290516001600160a01b0386169161ffff8816917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a35050505050565b6060815f01805480602002602001604051908101604052809291908181526020018280548015611f9057602002820191905f5260205f20905b815481526020019060010190808311611f7c575b50505050509050919050565b5f611aa08383611fb6565b611303609c61ffff8316612099565b5f8181526001830160205260408120548015612090575f611fd860018361282b565b85549091505f90611feb9060019061282b565b905081811461204a575f865f01828154811061200957612009612762565b905f5260205f200154905080875f01848154811061202957612029612762565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061205b5761205b61283e565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610ad8565b5f915050610ad8565b5f818152600183016020526040812054611aa0908490849084906120e857508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610ad8565b505f610ad8565b602080825282518282018190525f919060409081850190868401855b8281101561213d578151805161ffff1685528601516001600160a01b031686850152928401929085019060010161210b565b5091979650505050505050565b803561ffff8116811461215b575f80fd5b919050565b5f60208284031215612170575f80fd5b611aa08261214a565b80356001600160a01b038116811461215b575f80fd5b5f6020828403121561219f575f80fd5b611aa082612179565b8035801515811461215b575f80fd5b5f805f805f60a086880312156121cb575f80fd5b6121d48661214a565b94506121e260208701612179565b9350604086013592506121f7606087016121a8565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561224357835161ffff1683529284019291840191600101612223565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156122c3576122c361224f565b604052919050565b5f67ffffffffffffffff8211156122e4576122e461224f565b5060051b60200190565b5f82601f8301126122fd575f80fd5b8135602061231261230d836122cb565b61227c565b8083825260208201915060208460051b870101935086841115612333575f80fd5b602086015b84811015612356576123498161214a565b8352918301918301612338565b509695505050505050565b5f82601f830112612370575f80fd5b8135602061238061230d836122cb565b8083825260208201915060208460051b8701019350868411156123a1575f80fd5b602086015b8481101561235657803583529183019183016123a6565b5f80604083850312156123ce575f80fd5b823567ffffffffffffffff808211156123e5575f80fd5b6123f1868387016122ee565b93506020850135915080821115612406575f80fd5b5061241385828601612361565b9150509250929050565b5f8083601f84011261242d575f80fd5b50813567ffffffffffffffff811115612444575f80fd5b6020830191508360208260051b850101111561245e575f80fd5b9250929050565b5f805f8060408587031215612478575f80fd5b843567ffffffffffffffff8082111561248f575f80fd5b61249b8883890161241d565b909650945060208701359150808211156124b3575f80fd5b506124c08782880161241d565b95989497509550505050565b5f80604083850312156124dd575f80fd5b6124e68361214a565b946020939093013593505050565b5f805f8060808587031215612507575f80fd5b6125108561214a565b935061251e60208601612179565b93969395505050506040820135916060013590565b5f82601f830112612542575f80fd5b8135602061255261230d836122cb565b8083825260208201915060208460051b870101935086841115612573575f80fd5b602086015b848110156123565761258981612179565b8352918301918301612578565b5f805f80608085870312156125a9575f80fd5b843567ffffffffffffffff808211156125c0575f80fd5b6125cc888389016122ee565b95506020915081870135818111156125e2575f80fd5b6125ee89828a01612533565b955050604087013581811115612602575f80fd5b8701601f81018913612612575f80fd5b803561262061230d826122cb565b81815260059190911b8201840190848101908b83111561263e575f80fd5b928501925b8284101561265c57833582529285019290850190612643565b96505050506060870135915080821115612674575f80fd5b5061268187828801612361565b91505092959194509250565b5f806040838503121561269e575f80fd5b823567ffffffffffffffff808211156126b5575f80fd5b6126c186838701612533565b93506020915081850135818111156126d7575f80fd5b85019050601f810186136126e9575f80fd5b80356126f761230d826122cb565b81815260059190911b82018301908381019088831115612715575f80fd5b928401925b8284101561273a5761272b846121a8565b8252928401929084019061271a565b80955050505050509250929050565b5f60208284031215612759575f80fd5b611aa0826121a8565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6020828403121561279f575f80fd5b815160ff81168114611aa0575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417610ad857610ad86127af565b5f82612826577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115610ad857610ad86127af565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a +0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638cbab7e4116100fe578063ce67be261161009e578063ef0fde0f1161006e578063ef0fde0f146104bd578063efeadb6d146104d0578063f2fde38b146104e3578063fce40489146104f6575f80fd5b8063ce67be261461047c578063dbbb2faa14610484578063dddc98be14610497578063e3de72a5146104aa575f80fd5b8063a1218001116100d9578063a121800114610430578063a313d00714610443578063b10b69ee14610456578063c4d66de814610469575f80fd5b80638cbab7e4146103ef5780638da5cb5b146104025780639190202e1461041d575f80fd5b80635c45246b11610169578063724f91ce11610144578063724f91ce1461030e5780637304880c1461034457806385519c36146103575780638c399691146103dc575f80fd5b80635c45246b146102dc5780636f6d6cc1146102f1578063715018a614610306575f80fd5b806322bd5c1c116101a457806322bd5c1c146102775780632848aeaf146102945780632a1ea5a2146102b65780634cbcdd13146102c9575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d2610509565b6040516101df91906124fa565b60405180910390f35b6102076101f636600461256b565b60996020525f908152604090205481565b6040519081526020016101df565b61022861022336600461256b565b610608565b6040516101df91905f60a0820190506001600160a01b0383511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102849060ff1681565b60405190151581526020016101df565b6102846102a236600461259a565b609a6020525f908152604090205460ff1681565b6102076102c436600461256b565b6106f4565b6102846102d736600461256b565b61075c565b6102ef6102ea3660046125c2565b610772565b005b6102f96107a0565b6040516101df9190612613565b6102ef610848565b61033161031c36600461259a565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b6102ef61035236600461265a565b61085b565b6103a261036536600461256b565b60976020525f908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff808316926101009004169085565b604080516001600160a01b03909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102ef6103ea36600461282a565b610bee565b6103316103fd36600461259a565b610ddd565b6033546040516001600160a01b0390911681526020016101df565b6102ef61042b3660046128d2565b610e46565b6102ef61043e3660046129ff565b610fe7565b61020761045136600461256b565b611103565b6102ef610464366004612ac8565b61116e565b6102ef61047736600461259a565b6112ba565b610207611488565b6102ef61049236600461256b565b611498565b6102076104a5366004612ac8565b61161a565b6102ef6104b8366004612af0565b611781565b6102ef6104cb366004612ac8565b6118ba565b6102ef6104de366004612b46565b6119fe565b6102ef6104f136600461259a565b611a6b565b61028461050436600461256b565b611b15565b60605f610516609c611b58565b90505f815167ffffffffffffffff811115610533576105336126bc565b60405190808252806020026020018201604052801561057757816020015b604080518082019091525f80825260208201528152602001906001900390816105515790505b5090505f5b8251811015610601575f83828151811061059857610598612b5f565b60209081029190910181015161ffff81165f818152609784526040908190205481518083019092529181526001600160a01b039091169281018390528551919350908590859081106105ec576105ec612b5f565b6020908102919091010152505060010161057c565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff851682526097905291909120546001600160a01b0316610681576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f90815260976020908152604091829020825160a08101845281546001600160a01b031681526001820154928101839052600282015460ff808216151595830195909552610100900490931660608401526003015460808301526106e990611b6b565b602082015292915050565b61ffff81165f908152609760205260408120546001600160a01b0316610746576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b5f61076c609c61ffff8416611b9e565b92915050565b61077a611bb5565b610782611c29565b61078f8585858585611c9c565b6107996001606555565b5050505050565b60605f6107ad609c611b58565b90505f815167ffffffffffffffff8111156107ca576107ca6126bc565b6040519080825280602002602001820160405280156107f3578160200160208202803683370190505b5090505f5b82518110156106015782818151811061081357610813612b5f565b602002602001015182828151811061082d5761082d612b5f565b61ffff909216602092830291909101909101526001016107f8565b610850611bb5565b6108595f61200c565b565b610863611bb5565b61086b611c29565b61ffff86165f908152609760205260409020546001600160a01b03166108bd576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166108fd576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385165f9081526098602052604090205461ffff16801580159061093057508661ffff168161ffff1614155b15610967576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156109e4575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526109e191810190612b8c565b60015b156109ec5790505b61ffff88165f9081526097602090815260409182902054825160a081019093526001600160a01b038a811684521691908101610a288989612075565b815286151560208083019190915260ff808616604080850191909152606093840189905261ffff8e165f90815260978452819020855181546001600160a01b039182167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161782559386015160018201559085015160028201805495870151909316610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff911515919091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941793909317905560809092015160039091015581811690891614610b74576001600160a01b038181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928b1682529020805490911661ffff8b161790555b876001600160a01b03168961ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa989888689604051610bd19493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610be66001606555565b505050505050565b609b5460ff168015610c0f5750335f908152609a602052604090205460ff16155b8015610c2657506033546001600160a01b03163314155b15610c5d576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610c98576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610dd8575f6001600160a01b031660975f858481518110610cc257610cc2612b5f565b60209081029190910181015161ffff1682528101919091526040015f20546001600160a01b031614610dd057818181518110610d0057610d00612b5f565b60200260200101515f0315610dd057818181518110610d2157610d21612b5f565b602002602001015160995f858481518110610d3e57610d3e612b5f565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610d7157610d71612b5f565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610db057610db0612b5f565b6020026020010151604051610dc791815260200190565b60405180910390a25b600101610c9a565b505050565b6001600160a01b0381165f9081526098602052604081205461ffff1680158015610e0f57506001600160a01b03831615155b1561076c576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e4e611bb5565b828114610e87576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610799575f858583818110610ea457610ea4612b5f565b9050602002016020810190610eb9919061256b565b90505f848484818110610ece57610ece612b5f565b9050602002016020810190610ee39190612b46565b61ffff83165f908152609760205260409020549091506001600160a01b0316610f0d575050610fdf565b61ffff82165f9081526097602052604090206002015460ff1680151582151514610fdb5761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315801591909117909155610fac5760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a2610fdb565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610e89565b610fef611bb5565b610ff7611c29565b8351855114158061100a57508251855114155b8061101757508151855114155b8061102457508051855114155b1561105b576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85518110156110f8576110f086828151811061107b5761107b612b5f565b602002602001015186838151811061109557611095612b5f565b60200260200101518684815181106110af576110af612b5f565b60200260200101518685815181106110c9576110c9612b5f565b60200260200101518686815181106110e3576110e3612b5f565b6020026020010151611c9c565b60010161105d565b506107996001606555565b61ffff81165f908152609760205260408120546001600160a01b0316611155576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561118f5750335f908152609a602052604090205460ff16155b80156111a657506033546001600160a01b03163314155b156111dd576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b031661122f576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611267576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467906112ae9084815260200190565b60405180910390a25050565b5f54610100900460ff16158080156112d857505f54600160ff909116105b806112f15750303b1580156112f157505f5460ff166001145b611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156113de575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6113e66120c4565b6113ee612162565b6113f78261200c565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611484575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f611493609c612200565b905090565b6114a0611bb5565b61ffff81165f908152609760205260409020546001600160a01b0316806114f3576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611502609c61ffff8416611b9e565b611538576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915560039091018490556001600160a01b0386168452609883528184208054909116905592825260999052908120556115dd82612209565b6040516001600160a01b0382169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a35050565b61ffff82165f908152609760205260408120546001600160a01b031661166c576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a08101835281546001600160a01b03168152600182015481850152600282015460ff808216151583860152610100909104166060820152600390910154608082015293835260999091528120549081900361170a576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82608001518561171b9190612bd9565b905081600161172a8284612bf0565b6117349190612c03565b61173e9190612c16565b9350835f03611778576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505092915050565b611789611bb5565b80518251146117c4576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610dd8578181815181106117e1576117e1612b5f565b6020026020010151609a5f8584815181106117fe576117fe612b5f565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061184d5761184d612b5f565b60200260200101516001600160a01b03167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a1158883838151811061189157611891612b5f565b60200260200101516040516118aa911515815260200190565b60405180910390a26001016117c6565b609b5460ff1680156118db5750335f908152609a602052604090205460ff16155b80156118f257506033546001600160a01b03163314155b15611929576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b031661197b576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036119b4576040517f70ce14bb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74906112ae9084815260200190565b611a06611bb5565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b611a73611bb5565b6001600160a01b038116611b09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611379565b611b128161200c565b50565b61ffff81165f908152609760205260408120546001600160a01b0316611b3c57505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611b6483612218565b9392505050565b5f81611b7857505f919050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b5f8181526001830160205260408120541515611b64565b6033546001600160a01b03163314610859576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611379565b600260655403611c95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611379565b6002606555565b6001600160a01b038416611cdc576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461ffff165f03611d19576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff85165f908152609760205260409020546001600160a01b031615611d6c576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f9081526098602052604090205461ffff1615611dbf576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611df8576040517f70ce14bb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611e75575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611e7291810190612b8c565b60015b15611e7d5790505b6040518060a00160405280866001600160a01b03168152602001611ea18686612075565b81525f602080830182905260ff808616604080860191909152606094850188905261ffff8c1680855260978452818520875181546001600160a01b039182167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617825588860151600183015588840151600283018054998b0151909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff911515919091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000998a161717909455608090970151600390970196909655908a1683526098909152902080549091169091179055611fa486612271565b604080518581525f602082015260ff8316818301526060810184905290516001600160a01b0387169161ffff8916917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a3505050505050565b6001606555565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f8161208257505f61076c565b600183016120bc576040517feab9612d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505060010190565b5f54610100900460ff1661215a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b610859612280565b5f54610100900460ff166121f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b61085961231f565b5f61076c825490565b611484609c61ffff83166123b5565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561226557602002820191905f5260205f20905b815481526020019060010190808311612251575b50505050509050919050565b611484609c61ffff83166123c0565b5f54610100900460ff16612316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b6108593361200c565b5f54610100900460ff16612005576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b5f611b6483836123cb565b5f611b6483836124ae565b5f81815260018301602052604081205480156124a5575f6123ed600183612c03565b85549091505f9061240090600190612c03565b905081811461245f575f865f01828154811061241e5761241e612b5f565b905f5260205f200154905080875f01848154811061243e5761243e612b5f565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061247057612470612c4e565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061076c565b5f91505061076c565b5f8181526001830160205260408120546124f357508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561076c565b505f61076c565b602080825282518282018190525f919060409081850190868401855b82811015612548578151805161ffff1685528601516001600160a01b0316868501529284019290850190600101612516565b5091979650505050505050565b803561ffff81168114612566575f80fd5b919050565b5f6020828403121561257b575f80fd5b611b6482612555565b80356001600160a01b0381168114612566575f80fd5b5f602082840312156125aa575f80fd5b611b6482612584565b80358015158114612566575f80fd5b5f805f805f60a086880312156125d6575f80fd5b6125df86612555565b94506125ed60208701612584565b935060408601359250612602606087016125b3565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561264e57835161ffff168352928401929184019160010161262e565b50909695505050505050565b5f805f805f8060c0878903121561266f575f80fd5b61267887612555565b955061268660208801612584565b94506040870135935061269b606088016125b3565b92506126a9608088016125b3565b915060a087013590509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612730576127306126bc565b604052919050565b5f67ffffffffffffffff821115612751576127516126bc565b5060051b60200190565b5f82601f83011261276a575f80fd5b8135602061277f61277a83612738565b6126e9565b8083825260208201915060208460051b8701019350868411156127a0575f80fd5b602086015b848110156127c3576127b681612555565b83529183019183016127a5565b509695505050505050565b5f82601f8301126127dd575f80fd5b813560206127ed61277a83612738565b8083825260208201915060208460051b87010193508684111561280e575f80fd5b602086015b848110156127c35780358352918301918301612813565b5f806040838503121561283b575f80fd5b823567ffffffffffffffff80821115612852575f80fd5b61285e8683870161275b565b93506020850135915080821115612873575f80fd5b50612880858286016127ce565b9150509250929050565b5f8083601f84011261289a575f80fd5b50813567ffffffffffffffff8111156128b1575f80fd5b6020830191508360208260051b85010111156128cb575f80fd5b9250929050565b5f805f80604085870312156128e5575f80fd5b843567ffffffffffffffff808211156128fc575f80fd5b6129088883890161288a565b90965094506020870135915080821115612920575f80fd5b5061292d8782880161288a565b95989497509550505050565b5f82601f830112612948575f80fd5b8135602061295861277a83612738565b8083825260208201915060208460051b870101935086841115612979575f80fd5b602086015b848110156127c35761298f81612584565b835291830191830161297e565b5f82601f8301126129ab575f80fd5b813560206129bb61277a83612738565b8083825260208201915060208460051b8701019350868411156129dc575f80fd5b602086015b848110156127c3576129f2816125b3565b83529183019183016129e1565b5f805f805f60a08688031215612a13575f80fd5b853567ffffffffffffffff80821115612a2a575f80fd5b612a3689838a0161275b565b96506020880135915080821115612a4b575f80fd5b612a5789838a01612939565b95506040880135915080821115612a6c575f80fd5b612a7889838a016127ce565b94506060880135915080821115612a8d575f80fd5b612a9989838a0161299c565b93506080880135915080821115612aae575f80fd5b50612abb888289016127ce565b9150509295509295909350565b5f8060408385031215612ad9575f80fd5b612ae283612555565b946020939093013593505050565b5f8060408385031215612b01575f80fd5b823567ffffffffffffffff80821115612b18575f80fd5b612b2486838701612939565b93506020850135915080821115612b39575f80fd5b506128808582860161299c565b5f60208284031215612b56575f80fd5b611b64826125b3565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612b9c575f80fd5b815160ff81168114611b64575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808202811582820484141761076c5761076c612bac565b8082018082111561076c5761076c612bac565b8181038181111561076c5761076c612bac565b5f82612c49577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a diff --git a/bindings/bindings/l2tokenregistry.go b/bindings/bindings/l2tokenregistry.go index 201ebad0f..2110dfea6 100644 --- a/bindings/bindings/l2tokenregistry.go +++ b/bindings/bindings/l2tokenregistry.go @@ -46,8 +46,8 @@ type IL2TokenRegistryTokenInfo struct { // 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", + 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\":\"InvalidBalanceSlot\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPercent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidScale\",\"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\":\"user\",\"type\":\"address\"}],\"name\":\"allowList\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"allowed\",\"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\":\"tokenID\",\"type\":\"uint16\"}],\"name\":\"priceRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"priceRatio\",\"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\":\"bool\",\"name\":\"_needBalanceSlot\",\"type\":\"bool\"},{\"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\":\"bool[]\",\"name\":\"_needBalanceSlots\",\"type\":\"bool[]\"},{\"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\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"tokenRegistration\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"tokenID\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"tokenID\",\"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\":\"_needBalanceSlot\",\"type\":\"bool\"},{\"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: "0x6080604052609b805460ff191660011790553480156200001d575f80fd5b50620000286200002e565b620000ec565b5f54610100900460ff16156200009a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b5f5460ff90811614620000ea575f805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b612c8880620000fa5f395ff3fe608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638cbab7e4116100fe578063ce67be261161009e578063ef0fde0f1161006e578063ef0fde0f146104bd578063efeadb6d146104d0578063f2fde38b146104e3578063fce40489146104f6575f80fd5b8063ce67be261461047c578063dbbb2faa14610484578063dddc98be14610497578063e3de72a5146104aa575f80fd5b8063a1218001116100d9578063a121800114610430578063a313d00714610443578063b10b69ee14610456578063c4d66de814610469575f80fd5b80638cbab7e4146103ef5780638da5cb5b146104025780639190202e1461041d575f80fd5b80635c45246b11610169578063724f91ce11610144578063724f91ce1461030e5780637304880c1461034457806385519c36146103575780638c399691146103dc575f80fd5b80635c45246b146102dc5780636f6d6cc1146102f1578063715018a614610306575f80fd5b806322bd5c1c116101a457806322bd5c1c146102775780632848aeaf146102945780632a1ea5a2146102b65780634cbcdd13146102c9575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d2610509565b6040516101df91906124fa565b60405180910390f35b6102076101f636600461256b565b60996020525f908152604090205481565b6040519081526020016101df565b61022861022336600461256b565b610608565b6040516101df91905f60a0820190506001600160a01b0383511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102849060ff1681565b60405190151581526020016101df565b6102846102a236600461259a565b609a6020525f908152604090205460ff1681565b6102076102c436600461256b565b6106f4565b6102846102d736600461256b565b61075c565b6102ef6102ea3660046125c2565b610772565b005b6102f96107a0565b6040516101df9190612613565b6102ef610848565b61033161031c36600461259a565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b6102ef61035236600461265a565b61085b565b6103a261036536600461256b565b60976020525f908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff808316926101009004169085565b604080516001600160a01b03909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102ef6103ea36600461282a565b610bee565b6103316103fd36600461259a565b610ddd565b6033546040516001600160a01b0390911681526020016101df565b6102ef61042b3660046128d2565b610e46565b6102ef61043e3660046129ff565b610fe7565b61020761045136600461256b565b611103565b6102ef610464366004612ac8565b61116e565b6102ef61047736600461259a565b6112ba565b610207611488565b6102ef61049236600461256b565b611498565b6102076104a5366004612ac8565b61161a565b6102ef6104b8366004612af0565b611781565b6102ef6104cb366004612ac8565b6118ba565b6102ef6104de366004612b46565b6119fe565b6102ef6104f136600461259a565b611a6b565b61028461050436600461256b565b611b15565b60605f610516609c611b58565b90505f815167ffffffffffffffff811115610533576105336126bc565b60405190808252806020026020018201604052801561057757816020015b604080518082019091525f80825260208201528152602001906001900390816105515790505b5090505f5b8251811015610601575f83828151811061059857610598612b5f565b60209081029190910181015161ffff81165f818152609784526040908190205481518083019092529181526001600160a01b039091169281018390528551919350908590859081106105ec576105ec612b5f565b6020908102919091010152505060010161057c565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff851682526097905291909120546001600160a01b0316610681576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f90815260976020908152604091829020825160a08101845281546001600160a01b031681526001820154928101839052600282015460ff808216151595830195909552610100900490931660608401526003015460808301526106e990611b6b565b602082015292915050565b61ffff81165f908152609760205260408120546001600160a01b0316610746576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b5f61076c609c61ffff8416611b9e565b92915050565b61077a611bb5565b610782611c29565b61078f8585858585611c9c565b6107996001606555565b5050505050565b60605f6107ad609c611b58565b90505f815167ffffffffffffffff8111156107ca576107ca6126bc565b6040519080825280602002602001820160405280156107f3578160200160208202803683370190505b5090505f5b82518110156106015782818151811061081357610813612b5f565b602002602001015182828151811061082d5761082d612b5f565b61ffff909216602092830291909101909101526001016107f8565b610850611bb5565b6108595f61200c565b565b610863611bb5565b61086b611c29565b61ffff86165f908152609760205260409020546001600160a01b03166108bd576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385166108fd576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0385165f9081526098602052604090205461ffff16801580159061093057508661ffff168161ffff1614155b15610967576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa9250505080156109e4575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526109e191810190612b8c565b60015b156109ec5790505b61ffff88165f9081526097602090815260409182902054825160a081019093526001600160a01b038a811684521691908101610a288989612075565b815286151560208083019190915260ff808616604080850191909152606093840189905261ffff8e165f90815260978452819020855181546001600160a01b039182167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161782559386015160018201559085015160028201805495870151909316610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff911515919091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941793909317905560809092015160039091015581811690891614610b74576001600160a01b038181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928b1682529020805490911661ffff8b161790555b876001600160a01b03168961ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa989888689604051610bd19493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610be66001606555565b505050505050565b609b5460ff168015610c0f5750335f908152609a602052604090205460ff16155b8015610c2657506033546001600160a01b03163314155b15610c5d576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610c98576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610dd8575f6001600160a01b031660975f858481518110610cc257610cc2612b5f565b60209081029190910181015161ffff1682528101919091526040015f20546001600160a01b031614610dd057818181518110610d0057610d00612b5f565b60200260200101515f0315610dd057818181518110610d2157610d21612b5f565b602002602001015160995f858481518110610d3e57610d3e612b5f565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610d7157610d71612b5f565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610db057610db0612b5f565b6020026020010151604051610dc791815260200190565b60405180910390a25b600101610c9a565b505050565b6001600160a01b0381165f9081526098602052604081205461ffff1680158015610e0f57506001600160a01b03831615155b1561076c576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e4e611bb5565b828114610e87576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610799575f858583818110610ea457610ea4612b5f565b9050602002016020810190610eb9919061256b565b90505f848484818110610ece57610ece612b5f565b9050602002016020810190610ee39190612b46565b61ffff83165f908152609760205260409020549091506001600160a01b0316610f0d575050610fdf565b61ffff82165f9081526097602052604090206002015460ff1680151582151514610fdb5761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168315801591909117909155610fac5760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a2610fdb565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610e89565b610fef611bb5565b610ff7611c29565b8351855114158061100a57508251855114155b8061101757508151855114155b8061102457508051855114155b1561105b576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85518110156110f8576110f086828151811061107b5761107b612b5f565b602002602001015186838151811061109557611095612b5f565b60200260200101518684815181106110af576110af612b5f565b60200260200101518685815181106110c9576110c9612b5f565b60200260200101518686815181106110e3576110e3612b5f565b6020026020010151611c9c565b60010161105d565b506107996001606555565b61ffff81165f908152609760205260408120546001600160a01b0316611155576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561118f5750335f908152609a602052604090205460ff16155b80156111a657506033546001600160a01b03163314155b156111dd576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b031661122f576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611267576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467906112ae9084815260200190565b60405180910390a25050565b5f54610100900460ff16158080156112d857505f54600160ff909116105b806112f15750303b1580156112f157505f5460ff166001145b611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156113de575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6113e66120c4565b6113ee612162565b6113f78261200c565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611484575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f611493609c612200565b905090565b6114a0611bb5565b61ffff81165f908152609760205260409020546001600160a01b0316806114f3576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611502609c61ffff8416611b9e565b611538576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000090811690915560039091018490556001600160a01b0386168452609883528184208054909116905592825260999052908120556115dd82612209565b6040516001600160a01b0382169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a35050565b61ffff82165f908152609760205260408120546001600160a01b031661166c576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a08101835281546001600160a01b03168152600182015481850152600282015460ff808216151583860152610100909104166060820152600390910154608082015293835260999091528120549081900361170a576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f82608001518561171b9190612bd9565b905081600161172a8284612bf0565b6117349190612c03565b61173e9190612c16565b9350835f03611778576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505092915050565b611789611bb5565b80518251146117c4576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610dd8578181815181106117e1576117e1612b5f565b6020026020010151609a5f8584815181106117fe576117fe612b5f565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061184d5761184d612b5f565b60200260200101516001600160a01b03167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a1158883838151811061189157611891612b5f565b60200260200101516040516118aa911515815260200190565b60405180910390a26001016117c6565b609b5460ff1680156118db5750335f908152609a602052604090205460ff16155b80156118f257506033546001600160a01b03163314155b15611929576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f908152609760205260409020546001600160a01b031661197b576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036119b4576040517f70ce14bb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74906112ae9084815260200190565b611a06611bb5565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b611a73611bb5565b6001600160a01b038116611b09576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611379565b611b128161200c565b50565b61ffff81165f908152609760205260408120546001600160a01b0316611b3c57505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611b6483612218565b9392505050565b5f81611b7857505f919050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b5f8181526001830160205260408120541515611b64565b6033546001600160a01b03163314610859576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611379565b600260655403611c95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611379565b6002606555565b6001600160a01b038416611cdc576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461ffff165f03611d19576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff85165f908152609760205260409020546001600160a01b031615611d6c576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384165f9081526098602052604090205461ffff1615611dbf576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611df8576040517f70ce14bb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f60129050846001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611e75575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611e7291810190612b8c565b60015b15611e7d5790505b6040518060a00160405280866001600160a01b03168152602001611ea18686612075565b81525f602080830182905260ff808616604080860191909152606094850188905261ffff8c1680855260978452818520875181546001600160a01b039182167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617825588860151600183015588840151600283018054998b0151909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff911515919091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000998a161717909455608090970151600390970196909655908a1683526098909152902080549091169091179055611fa486612271565b604080518581525f602082015260ff8316818301526060810184905290516001600160a01b0387169161ffff8916917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a3505050505050565b6001606555565b603380546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f8161208257505f61076c565b600183016120bc576040517feab9612d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505060010190565b5f54610100900460ff1661215a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b610859612280565b5f54610100900460ff166121f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b61085961231f565b5f61076c825490565b611484609c61ffff83166123b5565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561226557602002820191905f5260205f20905b815481526020019060010190808311612251575b50505050509050919050565b611484609c61ffff83166123c0565b5f54610100900460ff16612316576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b6108593361200c565b5f54610100900460ff16612005576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401611379565b5f611b6483836123cb565b5f611b6483836124ae565b5f81815260018301602052604081205480156124a5575f6123ed600183612c03565b85549091505f9061240090600190612c03565b905081811461245f575f865f01828154811061241e5761241e612b5f565b905f5260205f200154905080875f01848154811061243e5761243e612b5f565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061247057612470612c4e565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f90556001935050505061076c565b5f91505061076c565b5f8181526001830160205260408120546124f357508154600181810184555f84815260208082209093018490558454848252828601909352604090209190915561076c565b505f61076c565b602080825282518282018190525f919060409081850190868401855b82811015612548578151805161ffff1685528601516001600160a01b0316868501529284019290850190600101612516565b5091979650505050505050565b803561ffff81168114612566575f80fd5b919050565b5f6020828403121561257b575f80fd5b611b6482612555565b80356001600160a01b0381168114612566575f80fd5b5f602082840312156125aa575f80fd5b611b6482612584565b80358015158114612566575f80fd5b5f805f805f60a086880312156125d6575f80fd5b6125df86612555565b94506125ed60208701612584565b935060408601359250612602606087016125b3565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561264e57835161ffff168352928401929184019160010161262e565b50909695505050505050565b5f805f805f8060c0878903121561266f575f80fd5b61267887612555565b955061268660208801612584565b94506040870135935061269b606088016125b3565b92506126a9608088016125b3565b915060a087013590509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715612730576127306126bc565b604052919050565b5f67ffffffffffffffff821115612751576127516126bc565b5060051b60200190565b5f82601f83011261276a575f80fd5b8135602061277f61277a83612738565b6126e9565b8083825260208201915060208460051b8701019350868411156127a0575f80fd5b602086015b848110156127c3576127b681612555565b83529183019183016127a5565b509695505050505050565b5f82601f8301126127dd575f80fd5b813560206127ed61277a83612738565b8083825260208201915060208460051b87010193508684111561280e575f80fd5b602086015b848110156127c35780358352918301918301612813565b5f806040838503121561283b575f80fd5b823567ffffffffffffffff80821115612852575f80fd5b61285e8683870161275b565b93506020850135915080821115612873575f80fd5b50612880858286016127ce565b9150509250929050565b5f8083601f84011261289a575f80fd5b50813567ffffffffffffffff8111156128b1575f80fd5b6020830191508360208260051b85010111156128cb575f80fd5b9250929050565b5f805f80604085870312156128e5575f80fd5b843567ffffffffffffffff808211156128fc575f80fd5b6129088883890161288a565b90965094506020870135915080821115612920575f80fd5b5061292d8782880161288a565b95989497509550505050565b5f82601f830112612948575f80fd5b8135602061295861277a83612738565b8083825260208201915060208460051b870101935086841115612979575f80fd5b602086015b848110156127c35761298f81612584565b835291830191830161297e565b5f82601f8301126129ab575f80fd5b813560206129bb61277a83612738565b8083825260208201915060208460051b8701019350868411156129dc575f80fd5b602086015b848110156127c3576129f2816125b3565b83529183019183016129e1565b5f805f805f60a08688031215612a13575f80fd5b853567ffffffffffffffff80821115612a2a575f80fd5b612a3689838a0161275b565b96506020880135915080821115612a4b575f80fd5b612a5789838a01612939565b95506040880135915080821115612a6c575f80fd5b612a7889838a016127ce565b94506060880135915080821115612a8d575f80fd5b612a9989838a0161299c565b93506080880135915080821115612aae575f80fd5b50612abb888289016127ce565b9150509295509295909350565b5f8060408385031215612ad9575f80fd5b612ae283612555565b946020939093013593505050565b5f8060408385031215612b01575f80fd5b823567ffffffffffffffff80821115612b18575f80fd5b612b2486838701612939565b93506020850135915080821115612b39575f80fd5b506128808582860161299c565b5f60208284031215612b56575f80fd5b611b64826125b3565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612b9c575f80fd5b815160ff81168114611b64575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b808202811582820484141761076c5761076c612bac565b8082018082111561076c5761076c612bac565b8181038181111561076c5761076c612bac565b5f82612c49577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a", } // L2TokenRegistryABI is the input ABI used to generate the binding from. @@ -219,10 +219,10 @@ func (_L2TokenRegistry *L2TokenRegistryTransactorRaw) Transact(opts *bind.Transa // 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) { +// Solidity: function allowList(address user) view returns(bool allowed) +func (_L2TokenRegistry *L2TokenRegistryCaller) AllowList(opts *bind.CallOpts, user common.Address) (bool, error) { var out []interface{} - err := _L2TokenRegistry.contract.Call(opts, &out, "allowList", arg0) + err := _L2TokenRegistry.contract.Call(opts, &out, "allowList", user) if err != nil { return *new(bool), err @@ -236,16 +236,16 @@ func (_L2TokenRegistry *L2TokenRegistryCaller) AllowList(opts *bind.CallOpts, ar // 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) +// Solidity: function allowList(address user) view returns(bool allowed) +func (_L2TokenRegistry *L2TokenRegistrySession) AllowList(user common.Address) (bool, error) { + return _L2TokenRegistry.Contract.AllowList(&_L2TokenRegistry.CallOpts, user) } // 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) +// Solidity: function allowList(address user) view returns(bool allowed) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) AllowList(user common.Address) (bool, error) { + return _L2TokenRegistry.Contract.AllowList(&_L2TokenRegistry.CallOpts, user) } // AllowListEnabled is a free data retrieval call binding the contract method 0x22bd5c1c. @@ -622,10 +622,10 @@ func (_L2TokenRegistry *L2TokenRegistryCallerSession) Owner() (common.Address, e // 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) { +// Solidity: function priceRatio(uint16 tokenID) view returns(uint256 priceRatio) +func (_L2TokenRegistry *L2TokenRegistryCaller) PriceRatio(opts *bind.CallOpts, tokenID uint16) (*big.Int, error) { var out []interface{} - err := _L2TokenRegistry.contract.Call(opts, &out, "priceRatio", arg0) + err := _L2TokenRegistry.contract.Call(opts, &out, "priceRatio", tokenID) if err != nil { return *new(*big.Int), err @@ -639,24 +639,24 @@ func (_L2TokenRegistry *L2TokenRegistryCaller) PriceRatio(opts *bind.CallOpts, a // 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) +// Solidity: function priceRatio(uint16 tokenID) view returns(uint256 priceRatio) +func (_L2TokenRegistry *L2TokenRegistrySession) PriceRatio(tokenID uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.PriceRatio(&_L2TokenRegistry.CallOpts, tokenID) } // 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) +// Solidity: function priceRatio(uint16 tokenID) view returns(uint256 priceRatio) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) PriceRatio(tokenID uint16) (*big.Int, error) { + return _L2TokenRegistry.Contract.PriceRatio(&_L2TokenRegistry.CallOpts, tokenID) } // 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) { +// Solidity: function tokenRegistration(address tokenAddress) view returns(uint16 tokenID) +func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistration(opts *bind.CallOpts, tokenAddress common.Address) (uint16, error) { var out []interface{} - err := _L2TokenRegistry.contract.Call(opts, &out, "tokenRegistration", arg0) + err := _L2TokenRegistry.contract.Call(opts, &out, "tokenRegistration", tokenAddress) if err != nil { return *new(uint16), err @@ -670,22 +670,22 @@ func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistration(opts *bind.Call // 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) +// Solidity: function tokenRegistration(address tokenAddress) view returns(uint16 tokenID) +func (_L2TokenRegistry *L2TokenRegistrySession) TokenRegistration(tokenAddress common.Address) (uint16, error) { + return _L2TokenRegistry.Contract.TokenRegistration(&_L2TokenRegistry.CallOpts, tokenAddress) } // 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) +// Solidity: function tokenRegistration(address tokenAddress) view returns(uint16 tokenID) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) TokenRegistration(tokenAddress common.Address) (uint16, error) { + return _L2TokenRegistry.Contract.TokenRegistration(&_L2TokenRegistry.CallOpts, tokenAddress) } // 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 { +// Solidity: function tokenRegistry(uint16 tokenID) view returns(address tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistry(opts *bind.CallOpts, tokenID uint16) (struct { TokenAddress common.Address BalanceSlot [32]byte IsActive bool @@ -693,7 +693,7 @@ func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistry(opts *bind.CallOpts Scale *big.Int }, error) { var out []interface{} - err := _L2TokenRegistry.contract.Call(opts, &out, "tokenRegistry", arg0) + err := _L2TokenRegistry.contract.Call(opts, &out, "tokenRegistry", tokenID) outstruct := new(struct { TokenAddress common.Address @@ -718,28 +718,28 @@ func (_L2TokenRegistry *L2TokenRegistryCaller) TokenRegistry(opts *bind.CallOpts // 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 { +// Solidity: function tokenRegistry(uint16 tokenID) view returns(address tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistrySession) TokenRegistry(tokenID uint16) (struct { TokenAddress common.Address BalanceSlot [32]byte IsActive bool Decimals uint8 Scale *big.Int }, error) { - return _L2TokenRegistry.Contract.TokenRegistry(&_L2TokenRegistry.CallOpts, arg0) + return _L2TokenRegistry.Contract.TokenRegistry(&_L2TokenRegistry.CallOpts, tokenID) } // 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 { +// Solidity: function tokenRegistry(uint16 tokenID) view returns(address tokenAddress, bytes32 balanceSlot, bool isActive, uint8 decimals, uint256 scale) +func (_L2TokenRegistry *L2TokenRegistryCallerSession) TokenRegistry(tokenID uint16) (struct { TokenAddress common.Address BalanceSlot [32]byte IsActive bool Decimals uint8 Scale *big.Int }, error) { - return _L2TokenRegistry.Contract.TokenRegistry(&_L2TokenRegistry.CallOpts, arg0) + return _L2TokenRegistry.Contract.TokenRegistry(&_L2TokenRegistry.CallOpts, tokenID) } // BatchUpdatePrices is a paid mutator transaction binding the contract method 0x8c399691. @@ -805,46 +805,46 @@ func (_L2TokenRegistry *L2TokenRegistryTransactorSession) Initialize(owner_ comm return _L2TokenRegistry.Contract.Initialize(&_L2TokenRegistry.TransactOpts, owner_) } -// RegisterToken is a paid mutator transaction binding the contract method 0xe014d85e. +// RegisterToken is a paid mutator transaction binding the contract method 0x5c45246b. // -// 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) +// Solidity: function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _needBalanceSlot, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) RegisterToken(opts *bind.TransactOpts, _tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _needBalanceSlot bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "registerToken", _tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _scale) } -// RegisterToken is a paid mutator transaction binding the contract method 0xe014d85e. +// RegisterToken is a paid mutator transaction binding the contract method 0x5c45246b. // -// 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) +// Solidity: function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _needBalanceSlot, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) RegisterToken(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _needBalanceSlot bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterToken(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _scale) } -// RegisterToken is a paid mutator transaction binding the contract method 0xe014d85e. +// RegisterToken is a paid mutator transaction binding the contract method 0x5c45246b. // -// 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) +// Solidity: function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _needBalanceSlot, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) RegisterToken(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _needBalanceSlot bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterToken(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _scale) } -// RegisterTokens is a paid mutator transaction binding the contract method 0xe2f53f2c. +// RegisterTokens is a paid mutator transaction binding the contract method 0xa1218001. // -// 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) +// Solidity: function registerTokens(uint16[] _tokenIDs, address[] _tokenAddresses, bytes32[] _balanceSlots, bool[] _needBalanceSlots, uint256[] _scales) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) RegisterTokens(opts *bind.TransactOpts, _tokenIDs []uint16, _tokenAddresses []common.Address, _balanceSlots [][32]byte, _needBalanceSlots []bool, _scales []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "registerTokens", _tokenIDs, _tokenAddresses, _balanceSlots, _needBalanceSlots, _scales) } -// RegisterTokens is a paid mutator transaction binding the contract method 0xe2f53f2c. +// RegisterTokens is a paid mutator transaction binding the contract method 0xa1218001. // -// 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) +// Solidity: function registerTokens(uint16[] _tokenIDs, address[] _tokenAddresses, bytes32[] _balanceSlots, bool[] _needBalanceSlots, uint256[] _scales) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) RegisterTokens(_tokenIDs []uint16, _tokenAddresses []common.Address, _balanceSlots [][32]byte, _needBalanceSlots []bool, _scales []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterTokens(&_L2TokenRegistry.TransactOpts, _tokenIDs, _tokenAddresses, _balanceSlots, _needBalanceSlots, _scales) } -// RegisterTokens is a paid mutator transaction binding the contract method 0xe2f53f2c. +// RegisterTokens is a paid mutator transaction binding the contract method 0xa1218001. // -// 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) +// Solidity: function registerTokens(uint16[] _tokenIDs, address[] _tokenAddresses, bytes32[] _balanceSlots, bool[] _needBalanceSlots, uint256[] _scales) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) RegisterTokens(_tokenIDs []uint16, _tokenAddresses []common.Address, _balanceSlots [][32]byte, _needBalanceSlots []bool, _scales []*big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.RegisterTokens(&_L2TokenRegistry.TransactOpts, _tokenIDs, _tokenAddresses, _balanceSlots, _needBalanceSlots, _scales) } // RemoveToken is a paid mutator transaction binding the contract method 0xdbbb2faa. @@ -973,25 +973,25 @@ func (_L2TokenRegistry *L2TokenRegistryTransactorSession) UpdatePriceRatio(_toke return _L2TokenRegistry.Contract.UpdatePriceRatio(&_L2TokenRegistry.TransactOpts, _tokenID, _newPrice) } -// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x2d59c072. +// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x7304880c. // -// 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) +// Solidity: function updateTokenInfo(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _needBalanceSlot, bool _isActive, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactor) UpdateTokenInfo(opts *bind.TransactOpts, _tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _needBalanceSlot bool, _isActive bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.contract.Transact(opts, "updateTokenInfo", _tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _isActive, _scale) } -// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x2d59c072. +// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x7304880c. // -// 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) +// Solidity: function updateTokenInfo(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _needBalanceSlot, bool _isActive, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistrySession) UpdateTokenInfo(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _needBalanceSlot bool, _isActive bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdateTokenInfo(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _isActive, _scale) } -// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x2d59c072. +// UpdateTokenInfo is a paid mutator transaction binding the contract method 0x7304880c. // -// 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) +// Solidity: function updateTokenInfo(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, bool _needBalanceSlot, bool _isActive, uint256 _scale) returns() +func (_L2TokenRegistry *L2TokenRegistryTransactorSession) UpdateTokenInfo(_tokenID uint16, _tokenAddress common.Address, _balanceSlot [32]byte, _needBalanceSlot bool, _isActive bool, _scale *big.Int) (*types.Transaction, error) { + return _L2TokenRegistry.Contract.UpdateTokenInfo(&_L2TokenRegistry.TransactOpts, _tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _isActive, _scale) } // UpdateTokenScale is a paid mutator transaction binding the contract method 0xef0fde0f. diff --git a/bindings/bindings/l2tokenregistry_more.go b/bindings/bindings/l2tokenregistry_more.go index 021fa454a..f7ac7c100 100644 --- a/bindings/bindings/l2tokenregistry_more.go +++ b/bindings/bindings/l2tokenregistry_more.go @@ -13,7 +13,7 @@ const L2TokenRegistryStorageLayoutJSON = "{\"storage\":[{\"astId\":1000,\"contra var L2TokenRegistryStorageLayout = new(solc.StorageLayout) -var L2TokenRegistryDeployedBin = "0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638da5cb5b116100fe578063dddc98be1161009e578063ef0fde0f1161006e578063ef0fde0f146104f1578063efeadb6d14610504578063f2fde38b14610517578063fce404891461052a575f80fd5b8063dddc98be146104a5578063e014d85e146104b8578063e2f53f2c146104cb578063e3de72a5146104de575f80fd5b8063b10b69ee116100d9578063b10b69ee14610464578063c4d66de814610477578063ce67be261461048a578063dbbb2faa14610492575f80fd5b80638da5cb5b146104165780639190202e1461043e578063a313d00714610451575f80fd5b80634cbcdd1311610169578063724f91ce11610144578063724f91ce1461031b57806385519c36146103515780638c399691146103f05780638cbab7e414610403575f80fd5b80634cbcdd13146102eb5780636f6d6cc1146102fe578063715018a614610313575f80fd5b806322bd5c1c116101a457806322bd5c1c146102845780632848aeaf146102a15780632a1ea5a2146102c35780632d59c072146102d6575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d261053d565b6040516101df91906123a0565b60405180910390f35b6102076101f636600461241e565b60996020525f908152604090205481565b6040519081526020016101df565b61022861022336600461241e565b610649565b6040516101df91905f60a08201905073ffffffffffffffffffffffffffffffffffffffff83511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102919060ff1681565b60405190151581526020016101df565b6102916102af36600461245a565b609a6020525f908152604090205460ff1681565b6102076102d136600461241e565b610741565b6102e96102e4366004612482565b6107b6565b005b6102916102f936600461241e565b610bcc565b610306610be2565b6040516101df91906124d3565b6102e9610c8a565b61033e61032936600461245a565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b6103a961035f36600461241e565b60976020525f9081526040902080546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff90921692909160ff808316926101009004169085565b6040805173ffffffffffffffffffffffffffffffffffffffff909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102e96103fe366004612688565b610c9d565b61033e61041136600461245a565b610eb3565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101df565b6102e961044c366004612730565b610f36565b61020761045f36600461241e565b6110e4565b6102e9610472366004612797565b61115c565b6102e961048536600461245a565b6112c2565b610207611480565b6102e96104a036600461241e565b611490565b6102076104b3366004612797565b611606565b6102e96104c63660046127bf565b61176d565b6102e96104d9366004612861565b611799565b6102e96104ec366004612958565b61187b565b6102e96104ff366004612797565b6119db565b6102e9610512366004612a14565b611b38565b6102e961052536600461245a565b611ba5565b61029161053836600461241e565b611c59565b60605f61054a609c611ca9565b90505f815167ffffffffffffffff8111156105675761056761251a565b6040519080825280602002602001820160405280156105ab57816020015b604080518082019091525f80825260208201528152602001906001900390816105855790505b5090505f5b8251811015610642575f8382815181106105cc576105cc612a2d565b60209081029190910181015161ffff81165f8181526097845260409081902054815180830190925291815273ffffffffffffffffffffffffffffffffffffffff90911692810183905285519193509085908590811061062d5761062d612a2d565b602090810291909101015250506001016105b0565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff8516825260979052919091205473ffffffffffffffffffffffffffffffffffffffff166106cf576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f90815260976020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff168152600182015492810192909252600281015460ff80821615159484019490945261010090049092166060820152600390910154608082015290565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff166107a0576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b6107be611cbc565b6107c6611d3d565b61ffff85165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16610825576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416610872576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526098602052604090205461ffff1680158015906108b257508561ffff168161ffff1614155b156108e9576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f601290508573ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610973575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261097091810190612a5a565b60015b1561097b5790505b5f60975f8961ffff1661ffff1681526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506040518060a001604052808873ffffffffffffffffffffffffffffffffffffffff16815260200187815260200186151581526020018360ff1681526020018581525060975f8a61ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610b465773ffffffffffffffffffffffffffffffffffffffff8181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928a1682529020805490911661ffff8a161790555b8673ffffffffffffffffffffffffffffffffffffffff168861ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa988888689604051610bb09493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610bc56001606555565b5050505050565b5f610bdc609c61ffff8416611db0565b92915050565b60605f610bef609c611ca9565b90505f815167ffffffffffffffff811115610c0c57610c0c61251a565b604051908082528060200260200182016040528015610c35578160200160208202803683370190505b5090505f5b825181101561064257828181518110610c5557610c55612a2d565b6020026020010151828281518110610c6f57610c6f612a2d565b61ffff90921660209283029190910190910152600101610c3a565b610c92611cbc565b610c9b5f611dc7565b565b609b5460ff168015610cbe5750335f908152609a602052604090205460ff16155b8015610ce2575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15610d19576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610d54576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610eae575f73ffffffffffffffffffffffffffffffffffffffff1660975f858481518110610d8b57610d8b612a2d565b60209081029190910181015161ffff1682528101919091526040015f205473ffffffffffffffffffffffffffffffffffffffff1614610ea657818181518110610dd657610dd6612a2d565b60200260200101515f0315610ea657818181518110610df757610df7612a2d565b602002602001015160995f858481518110610e1457610e14612a2d565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610e4757610e47612a2d565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610e8657610e86612a2d565b6020026020010151604051610e9d91815260200190565b60405180910390a25b600101610d56565b505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526098602052604081205461ffff1680158015610eff575073ffffffffffffffffffffffffffffffffffffffff831615155b15610bdc576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f3e611cbc565b828114610f77576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610bc5575f858583818110610f9457610f94612a2d565b9050602002016020810190610fa9919061241e565b90505f848484818110610fbe57610fbe612a2d565b9050602002016020810190610fd39190612a14565b61ffff83165f9081526097602052604090205490915073ffffffffffffffffffffffffffffffffffffffff1661100a5750506110dc565b61ffff82165f9081526097602052604090206002015460ff16801515821515146110d85761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001683158015919091179091556110a95760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a26110d8565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610f79565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611143576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff16801561117d5750335f908152609a602052604090205460ff16155b80156111a1575060335473ffffffffffffffffffffffffffffffffffffffff163314155b156111d8576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16611237576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f0361126f576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467906112b69084815260200190565b60405180910390a25050565b5f54610100900460ff16158080156112e057505f54600160ff909116105b806112f95750303b1580156112f957505f5460ff166001145b61138a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156113e6575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b6113ef82611dc7565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561147c575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f61148b609c611e3d565b905090565b611498611cbc565b6114a0611d3d565b61ffff81165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff1680611500576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155600390910184905573ffffffffffffffffffffffffffffffffffffffff86168452609883528184208054909116905592825260999052908120556115b282611e46565b60405173ffffffffffffffffffffffffffffffffffffffff82169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a3506116036001606555565b50565b61ffff82165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611665576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff168152600182015481850152600282015460ff8082161515838601526101009091041660608201526003909101546080820152938352609990915281205490819003611710576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808260800151856117219190612aa7565b61172b9190612abe565b9250825f03611765576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505092915050565b611775611cbc565b61177d611d3d565b61178984848484611e55565b6117936001606555565b50505050565b6117a1611cbc565b825184511415806117b457508151845114155b806117c157508051845114155b156117f8576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8451811015610bc55761187385828151811061181857611818612a2d565b602002602001015185838151811061183257611832612a2d565b602002602001015185848151811061184c5761184c612a2d565b602002602001015185858151811061186657611866612a2d565b6020026020010151611e55565b6001016117fa565b611883611cbc565b80518251146118be576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610eae578181815181106118db576118db612a2d565b6020026020010151609a5f8584815181106118f8576118f8612a2d565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555082818151811061196157611961612a2d565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a115888383815181106119b2576119b2612a2d565b60200260200101516040516119cb911515815260200190565b60405180910390a26001016118c0565b609b5460ff1680156119fc5750335f908152609a602052604090205460ff16155b8015611a20575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15611a57576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16611ab6576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611aee576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74906112b69084815260200190565b611b40611cbc565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b611bad611cbc565b73ffffffffffffffffffffffffffffffffffffffff8116611c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401611381565b61160381611dc7565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611c8d57505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611cb5836121f4565b9392505050565b60335473ffffffffffffffffffffffffffffffffffffffff163314610c9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611381565b600260655403611da9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611381565b6002606555565b5f8181526001830160205260408120541515611cb5565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610bdc825490565b61147c609c61ffff831661224d565b73ffffffffffffffffffffffffffffffffffffffff8316611ea2576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361ffff165f03611edf576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff84165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff1615611f3f576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f9081526098602052604090205461ffff1615611f9f576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f601290508373ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612029575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261202691810190612a5a565b60015b156120315790505b6040518060a001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020015f151581526020018260ff1681526020018381525060975f8761ffff1661ffff1681526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015f6101000a81548160ff02191690831515021790555060608201518160020160016101000a81548160ff021916908360ff160217905550608082015181600301559050508460985f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548161ffff021916908361ffff16021790555061218785612258565b604080518481525f602082015260ff83168183015260608101849052905173ffffffffffffffffffffffffffffffffffffffff86169161ffff8816917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a35050505050565b6060815f0180548060200260200160405190810160405280929190818152602001828054801561224157602002820191905f5260205f20905b81548152602001906001019080831161222d575b50505050509050919050565b5f611cb58383612267565b61147c609c61ffff831661234a565b5f8181526001830160205260408120548015612341575f612289600183612af6565b85549091505f9061229c90600190612af6565b90508181146122fb575f865f0182815481106122ba576122ba612a2d565b905f5260205f200154905080875f0184815481106122da576122da612a2d565b5f918252602080832090910192909255918252600188019052604090208390555b855486908061230c5761230c612b09565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610bdc565b5f915050610bdc565b5f818152600183016020526040812054611cb59084908490849061239957508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610bdc565b505f610bdc565b602080825282518282018190525f919060409081850190868401855b828110156123fb578151805161ffff16855286015173ffffffffffffffffffffffffffffffffffffffff168685015292840192908501906001016123bc565b5091979650505050505050565b803561ffff81168114612419575f80fd5b919050565b5f6020828403121561242e575f80fd5b611cb582612408565b803573ffffffffffffffffffffffffffffffffffffffff81168114612419575f80fd5b5f6020828403121561246a575f80fd5b611cb582612437565b80358015158114612419575f80fd5b5f805f805f60a08688031215612496575f80fd5b61249f86612408565b94506124ad60208701612437565b9350604086013592506124c260608701612473565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b8181101561250e57835161ffff16835292840192918401916001016124ee565b50909695505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561258e5761258e61251a565b604052919050565b5f67ffffffffffffffff8211156125af576125af61251a565b5060051b60200190565b5f82601f8301126125c8575f80fd5b813560206125dd6125d883612596565b612547565b8083825260208201915060208460051b8701019350868411156125fe575f80fd5b602086015b848110156126215761261481612408565b8352918301918301612603565b509695505050505050565b5f82601f83011261263b575f80fd5b8135602061264b6125d883612596565b8083825260208201915060208460051b87010193508684111561266c575f80fd5b602086015b848110156126215780358352918301918301612671565b5f8060408385031215612699575f80fd5b823567ffffffffffffffff808211156126b0575f80fd5b6126bc868387016125b9565b935060208501359150808211156126d1575f80fd5b506126de8582860161262c565b9150509250929050565b5f8083601f8401126126f8575f80fd5b50813567ffffffffffffffff81111561270f575f80fd5b6020830191508360208260051b8501011115612729575f80fd5b9250929050565b5f805f8060408587031215612743575f80fd5b843567ffffffffffffffff8082111561275a575f80fd5b612766888389016126e8565b9096509450602087013591508082111561277e575f80fd5b5061278b878288016126e8565b95989497509550505050565b5f80604083850312156127a8575f80fd5b6127b183612408565b946020939093013593505050565b5f805f80608085870312156127d2575f80fd5b6127db85612408565b93506127e960208601612437565b93969395505050506040820135916060013590565b5f82601f83011261280d575f80fd5b8135602061281d6125d883612596565b8083825260208201915060208460051b87010193508684111561283e575f80fd5b602086015b848110156126215761285481612437565b8352918301918301612843565b5f805f8060808587031215612874575f80fd5b843567ffffffffffffffff8082111561288b575f80fd5b612897888389016125b9565b95506020915081870135818111156128ad575f80fd5b6128b989828a016127fe565b9550506040870135818111156128cd575f80fd5b8701601f810189136128dd575f80fd5b80356128eb6125d882612596565b81815260059190911b8201840190848101908b831115612909575f80fd5b928501925b828410156129275783358252928501929085019061290e565b9650505050606087013591508082111561293f575f80fd5b5061294c8782880161262c565b91505092959194509250565b5f8060408385031215612969575f80fd5b823567ffffffffffffffff80821115612980575f80fd5b61298c868387016127fe565b93506020915081850135818111156129a2575f80fd5b85019050601f810186136129b4575f80fd5b80356129c26125d882612596565b81815260059190911b820183019083810190888311156129e0575f80fd5b928401925b82841015612a05576129f684612473565b825292840192908401906129e5565b80955050505050509250929050565b5f60208284031215612a24575f80fd5b611cb582612473565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612a6a575f80fd5b815160ff81168114611cb5575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082028115828204841417610bdc57610bdc612a7a565b5f82612af1577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b81810381811115610bdc57610bdc612a7a565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a" +var L2TokenRegistryDeployedBin = "0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c80638cbab7e4116100fe578063ce67be261161009e578063ef0fde0f1161006e578063ef0fde0f146104f1578063efeadb6d14610504578063f2fde38b14610517578063fce404891461052a575f80fd5b8063ce67be26146104b0578063dbbb2faa146104b8578063dddc98be146104cb578063e3de72a5146104de575f80fd5b8063a1218001116100d9578063a121800114610464578063a313d00714610477578063b10b69ee1461048a578063c4d66de81461049d575f80fd5b80638cbab7e4146104165780638da5cb5b146104295780639190202e14610451575f80fd5b80635c45246b11610169578063724f91ce11610144578063724f91ce1461031b5780637304880c1461035157806385519c36146103645780638c39969114610403575f80fd5b80635c45246b146102e95780636f6d6cc1146102fe578063715018a614610313575f80fd5b806322bd5c1c116101a457806322bd5c1c146102845780632848aeaf146102a15780632a1ea5a2146102c35780634cbcdd13146102d6575f80fd5b80631585458c146101ca57806319904c33146101e85780631c58e79314610215575b5f80fd5b6101d261053d565b6040516101df9190612750565b60405180910390f35b6102076101f63660046127ce565b60996020525f908152604090205481565b6040519081526020016101df565b6102286102233660046127ce565b610649565b6040516101df91905f60a08201905073ffffffffffffffffffffffffffffffffffffffff83511682526020830151602083015260408301511515604083015260ff60608401511660608301526080830151608083015292915050565b609b546102919060ff1681565b60405190151581526020016101df565b6102916102af36600461280a565b609a6020525f908152604090205460ff1681565b6102076102d13660046127ce565b61074f565b6102916102e43660046127ce565b6107c4565b6102fc6102f7366004612832565b6107da565b005b610306610808565b6040516101df9190612883565b6102fc6108b0565b61033e61032936600461280a565b60986020525f908152604090205461ffff1681565b60405161ffff90911681526020016101df565b6102fc61035f3660046128ca565b6108c3565b6103bc6103723660046127ce565b60976020525f9081526040902080546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff90921692909160ff808316926101009004169085565b6040805173ffffffffffffffffffffffffffffffffffffffff909616865260208601949094529115159284019290925260ff9091166060830152608082015260a0016101df565b6102fc610411366004612a9a565b610cbe565b61033e61042436600461280a565b610ed4565b60335460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101df565b6102fc61045f366004612b42565b610f57565b6102fc610472366004612c6f565b611105565b6102076104853660046127ce565b611221565b6102fc610498366004612d38565b611299565b6102fc6104ab36600461280a565b6113ff565b6102076115cd565b6102fc6104c63660046127ce565b6115dd565b6102076104d9366004612d38565b611786565b6102fc6104ec366004612d60565b611907565b6102fc6104ff366004612d38565b611a67565b6102fc610512366004612db6565b611bc5565b6102fc61052536600461280a565b611c32565b6102916105383660046127ce565b611ce9565b60605f61054a609c611d39565b90505f815167ffffffffffffffff8111156105675761056761292c565b6040519080825280602002602001820160405280156105ab57816020015b604080518082019091525f80825260208201528152602001906001900390816105855790505b5090505f5b8251811015610642575f8382815181106105cc576105cc612dcf565b60209081029190910181015161ffff81165f8181526097845260409081902054815180830190925291815273ffffffffffffffffffffffffffffffffffffffff90911692810183905285519193509085908590811061062d5761062d612dcf565b602090810291909101015250506001016105b0565b5092915050565b6040805160a0810182525f8082526020808301829052828401829052606083018290526080830182905261ffff8516825260979052919091205473ffffffffffffffffffffffffffffffffffffffff166106cf576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f90815260976020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff1681526001820154928101839052600282015460ff8082161515958301959095526101009004909316606084015260030154608083015261074490611d4c565b602082015292915050565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff166107ae576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526099602052604090205490565b5f6107d4609c61ffff8416611d7f565b92915050565b6107e2611d96565b6107ea611e17565b6107f78585858585611e8a565b6108016001606555565b5050505050565b60605f610815609c611d39565b90505f815167ffffffffffffffff8111156108325761083261292c565b60405190808252806020026020018201604052801561085b578160200160208202803683370190505b5090505f5b82518110156106425782818151811061087b5761087b612dcf565b602002602001015182828151811061089557610895612dcf565b61ffff90921660209283029190910190910152600101610860565b6108b8611d96565b6108c15f612255565b565b6108cb611d96565b6108d3611e17565b61ffff86165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16610932576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851661097f576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f9081526098602052604090205461ffff1680158015906109bf57508661ffff168161ffff1614155b156109f6576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f601290508673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610a80575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610a7d91810190612dfc565b60015b15610a885790505b61ffff88165f9081526097602090815260409182902054825160a0810190935273ffffffffffffffffffffffffffffffffffffffff8a811684521691908101610ad189896122cb565b815286151560208083019190915260ff808616604080850191909152606093840189905261ffff8e165f908152609784528190208551815473ffffffffffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffff00000000000000000000000000000000000000009091161782559386015160018201559085015160028201805495870151909316610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff911515919091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009095169490941793909317905560809092015160039091015581811690891614610c375773ffffffffffffffffffffffffffffffffffffffff8181165f9081526098602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155928b1682529020805490911661ffff8b161790555b8773ffffffffffffffffffffffffffffffffffffffff168961ffff167f60281b1abf645864e8443ca11a3c3b51a6a9203a376da58db7919f7cfebc4aa989888689604051610ca19493929190938452911515602084015260ff166040830152606082015260800190565b60405180910390a3505050610cb66001606555565b505050505050565b609b5460ff168015610cdf5750335f908152609a602052604090205460ff16155b8015610d03575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15610d3a576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8051825114610d75576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610ecf575f73ffffffffffffffffffffffffffffffffffffffff1660975f858481518110610dac57610dac612dcf565b60209081029190910181015161ffff1682528101919091526040015f205473ffffffffffffffffffffffffffffffffffffffff1614610ec757818181518110610df757610df7612dcf565b60200260200101515f0315610ec757818181518110610e1857610e18612dcf565b602002602001015160995f858481518110610e3557610e35612dcf565b602002602001015161ffff1661ffff1681526020019081526020015f2081905550828181518110610e6857610e68612dcf565b602002602001015161ffff167fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467838381518110610ea757610ea7612dcf565b6020026020010151604051610ebe91815260200190565b60405180910390a25b600101610d77565b505050565b73ffffffffffffffffffffffffffffffffffffffff81165f9081526098602052604081205461ffff1680158015610f20575073ffffffffffffffffffffffffffffffffffffffff831615155b156107d4576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f5f611d96565b828114610f98576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b83811015610801575f858583818110610fb557610fb5612dcf565b9050602002016020810190610fca91906127ce565b90505f848484818110610fdf57610fdf612dcf565b9050602002016020810190610ff49190612db6565b61ffff83165f9081526097602052604090205490915073ffffffffffffffffffffffffffffffffffffffff1661102b5750506110fd565b61ffff82165f9081526097602052604090206002015460ff16801515821515146110f95761ffff83165f90815260976020526040902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001683158015919091179091556110ca5760405161ffff8416907fba78a86bd882b78fb95715a0d827188ec0a8ad3f500310d33a39b94c9ff677b8905f90a26110f9565b60405161ffff8416907fa625871090c2595895650b8e9222d1a3267cedf9de819bf446400962ce1357ef905f90a25b5050505b600101610f9a565b61110d611d96565b611115611e17565b8351855114158061112857508251855114155b8061113557508151855114155b8061114257508051855114155b15611179576040517f9d89020a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b85518110156112165761120e86828151811061119957611199612dcf565b60200260200101518683815181106111b3576111b3612dcf565b60200260200101518684815181106111cd576111cd612dcf565b60200260200101518685815181106111e7576111e7612dcf565b602002602001015186868151811061120157611201612dcf565b6020026020010151611e8a565b60010161117b565b506108016001606555565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611280576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5061ffff165f9081526097602052604090206003015490565b609b5460ff1680156112ba5750335f908152609a602052604090205460ff16155b80156112de575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15611315576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16611374576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f036113ac576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526099602052604090819020839055517fd73999ac164146908368455e72209122b67c149b37aab024e2707394a2c70467906113f39084815260200190565b60405180910390a25050565b5f54610100900460ff161580801561141d57505f54600160ff909116105b806114365750303b15801561143657505f5460ff166001145b6114c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b5f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558015611523575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61152b61231a565b6115336123b8565b61153c82612255565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905580156115c9575f80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b5f6115d8609c612456565b905090565b6115e5611d96565b61ffff81165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff1680611645576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611654609c61ffff8416611d7f565b61168a576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f81815260976020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600181018490556002810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000908116909155600390910184905573ffffffffffffffffffffffffffffffffffffffff861684526098835281842080549091169055928252609990529081205561173c8261245f565b60405173ffffffffffffffffffffffffffffffffffffffff82169061ffff8416907f330282f89b53f03dfc62130ddb33062a147ad25d691915b575732f62fb6fce9a905f90a35050565b61ffff82165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff166117e5576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff83165f818152609760209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff168152600182015481850152600282015460ff8082161515838601526101009091041660608201526003909101546080820152938352609990915281205490819003611890576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8260800151856118a19190612e49565b90508160016118b08284612e60565b6118ba9190612e73565b6118c49190612e86565b9350835f036118fe576040517ebfc92100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505092915050565b61190f611d96565b805182511461194a576040517fd9183d2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5b8251811015610ecf5781818151811061196757611967612dcf565b6020026020010151609a5f85848151811061198457611984612dcf565b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508281815181106119ed576119ed612dcf565b602002602001015173ffffffffffffffffffffffffffffffffffffffff167f6dad0aed33f4b7f07095619b668698e17943fd9f4c83e7cfcc7f6dd880a11588838381518110611a3e57611a3e612dcf565b6020026020010151604051611a57911515815260200190565b60405180910390a260010161194c565b609b5460ff168015611a885750335f908152609a602052604090205460ff16155b8015611aac575060335473ffffffffffffffffffffffffffffffffffffffff163314155b15611ae3576040517f2af07d2000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff16611b42576040517fcbdb7b3000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611b7b576040517f70ce14bb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff82165f8181526097602052604090819020600301839055517f7b614d0c690ae942aec30d9378eb72c3678dd8cb74a55343c87baf8dfe078e74906113f39084815260200190565b611bcd611d96565b609b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168215159081179091556040519081527f16435b45f7482047f839a6a19d291442627200f52cad2803c595150d0d440eb39060200160405180910390a150565b611c3a611d96565b73ffffffffffffffffffffffffffffffffffffffff8116611cdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016114be565b611ce681612255565b50565b61ffff81165f9081526097602052604081205473ffffffffffffffffffffffffffffffffffffffff16611d1d57505f919050565b5061ffff165f9081526097602052604090206002015460ff1690565b60605f611d458361246e565b9392505050565b5f81611d5957505f919050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b5f8181526001830160205260408120541515611d45565b60335473ffffffffffffffffffffffffffffffffffffffff1633146108c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016114be565b600260655403611e83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016114be565b6002606555565b73ffffffffffffffffffffffffffffffffffffffff8416611ed7576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8461ffff165f03611f14576040517f6aa2a93700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff85165f9081526097602052604090205473ffffffffffffffffffffffffffffffffffffffff1615611f74576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff84165f9081526098602052604090205461ffff1615611fd4576040517f7d4fffb200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f0361200d576040517f70ce14bb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f601290508473ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015612097575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261209491810190612dfc565b60015b1561209f5790505b6040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020016120d086866122cb565b81525f602080830182905260ff808616604080860191909152606094850188905261ffff8c16808552609784528185208751815473ffffffffffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffff000000000000000000000000000000000000000090911617825588860151600183015588840151600283018054998b0151909616610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff911515919091167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000998a161717909455608090970151600390970196909655908a16835260989091529020805490911690911790556121e0866124c7565b604080518581525f602082015260ff83168183015260608101849052905173ffffffffffffffffffffffffffffffffffffffff87169161ffff8916917fb9d0acb419ab21384716fbeaa0bcbc172f6347c9bf4fc0614c4e79fc47b36e119181900360800190a3505050505050565b6001606555565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f816122d857505f6107d4565b60018301612312576040517feab9612d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505060010190565b5f54610100900460ff166123b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016114be565b6108c16124d6565b5f54610100900460ff1661244e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016114be565b6108c1612575565b5f6107d4825490565b6115c9609c61ffff831661260b565b6060815f018054806020026020016040519081016040528092919081815260200182805480156124bb57602002820191905f5260205f20905b8154815260200190600101908083116124a7575b50505050509050919050565b6115c9609c61ffff8316612616565b5f54610100900460ff1661256c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016114be565b6108c133612255565b5f54610100900460ff1661224e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016114be565b5f611d458383612621565b5f611d458383612704565b5f81815260018301602052604081205480156126fb575f612643600183612e73565b85549091505f9061265690600190612e73565b90508181146126b5575f865f01828154811061267457612674612dcf565b905f5260205f200154905080875f01848154811061269457612694612dcf565b5f918252602080832090910192909255918252600188019052604090208390555b85548690806126c6576126c6612ebe565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f9055600193505050506107d4565b5f9150506107d4565b5f81815260018301602052604081205461274957508154600181810184555f8481526020808220909301849055845484825282860190935260409020919091556107d4565b505f6107d4565b602080825282518282018190525f919060409081850190868401855b828110156127ab578151805161ffff16855286015173ffffffffffffffffffffffffffffffffffffffff1686850152928401929085019060010161276c565b5091979650505050505050565b803561ffff811681146127c9575f80fd5b919050565b5f602082840312156127de575f80fd5b611d45826127b8565b803573ffffffffffffffffffffffffffffffffffffffff811681146127c9575f80fd5b5f6020828403121561281a575f80fd5b611d45826127e7565b803580151581146127c9575f80fd5b5f805f805f60a08688031215612846575f80fd5b61284f866127b8565b945061285d602087016127e7565b93506040860135925061287260608701612823565b949793965091946080013592915050565b602080825282518282018190525f9190848201906040850190845b818110156128be57835161ffff168352928401929184019160010161289e565b50909695505050505050565b5f805f805f8060c087890312156128df575f80fd5b6128e8876127b8565b95506128f6602088016127e7565b94506040870135935061290b60608801612823565b925061291960808801612823565b915060a087013590509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156129a0576129a061292c565b604052919050565b5f67ffffffffffffffff8211156129c1576129c161292c565b5060051b60200190565b5f82601f8301126129da575f80fd5b813560206129ef6129ea836129a8565b612959565b8083825260208201915060208460051b870101935086841115612a10575f80fd5b602086015b84811015612a3357612a26816127b8565b8352918301918301612a15565b509695505050505050565b5f82601f830112612a4d575f80fd5b81356020612a5d6129ea836129a8565b8083825260208201915060208460051b870101935086841115612a7e575f80fd5b602086015b84811015612a335780358352918301918301612a83565b5f8060408385031215612aab575f80fd5b823567ffffffffffffffff80821115612ac2575f80fd5b612ace868387016129cb565b93506020850135915080821115612ae3575f80fd5b50612af085828601612a3e565b9150509250929050565b5f8083601f840112612b0a575f80fd5b50813567ffffffffffffffff811115612b21575f80fd5b6020830191508360208260051b8501011115612b3b575f80fd5b9250929050565b5f805f8060408587031215612b55575f80fd5b843567ffffffffffffffff80821115612b6c575f80fd5b612b7888838901612afa565b90965094506020870135915080821115612b90575f80fd5b50612b9d87828801612afa565b95989497509550505050565b5f82601f830112612bb8575f80fd5b81356020612bc86129ea836129a8565b8083825260208201915060208460051b870101935086841115612be9575f80fd5b602086015b84811015612a3357612bff816127e7565b8352918301918301612bee565b5f82601f830112612c1b575f80fd5b81356020612c2b6129ea836129a8565b8083825260208201915060208460051b870101935086841115612c4c575f80fd5b602086015b84811015612a3357612c6281612823565b8352918301918301612c51565b5f805f805f60a08688031215612c83575f80fd5b853567ffffffffffffffff80821115612c9a575f80fd5b612ca689838a016129cb565b96506020880135915080821115612cbb575f80fd5b612cc789838a01612ba9565b95506040880135915080821115612cdc575f80fd5b612ce889838a01612a3e565b94506060880135915080821115612cfd575f80fd5b612d0989838a01612c0c565b93506080880135915080821115612d1e575f80fd5b50612d2b88828901612a3e565b9150509295509295909350565b5f8060408385031215612d49575f80fd5b612d52836127b8565b946020939093013593505050565b5f8060408385031215612d71575f80fd5b823567ffffffffffffffff80821115612d88575f80fd5b612d9486838701612ba9565b93506020850135915080821115612da9575f80fd5b50612af085828601612c0c565b5f60208284031215612dc6575f80fd5b611d4582612823565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f60208284031215612e0c575f80fd5b815160ff81168114611d45575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176107d4576107d4612e1c565b808201808211156107d4576107d4612e1c565b818103818111156107d4576107d4612e1c565b5f82612eb9577f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffdfea164736f6c6343000818000a" func init() { if err := json.Unmarshal([]byte(L2TokenRegistryStorageLayoutJSON), L2TokenRegistryStorageLayout); err != nil { diff --git a/contracts/contracts/l2/system/IL2TokenRegistry.sol b/contracts/contracts/l2/system/IL2TokenRegistry.sol index 76b6fd5ca..7ed2dd0a4 100644 --- a/contracts/contracts/l2/system/IL2TokenRegistry.sol +++ b/contracts/contracts/l2/system/IL2TokenRegistry.sol @@ -14,7 +14,7 @@ interface IL2TokenRegistry { /// @notice Token information structure struct TokenInfo { address tokenAddress; // ERC20 token contract address - bytes32 balanceSlot; // Token balance storage slot, bytes32(0) -> nil + bytes32 balanceSlot; // Token balance storage slot bool isActive; // Whether the token is active uint8 decimals; // Token decimals uint256 scale; // Core convention: rateScaled = tokenScale * (tokenPrice / ethPrice) * 10^(ethDecimals - tokenDecimals) @@ -62,6 +62,8 @@ interface IL2TokenRegistry { error TokenNotFound(); error InvalidTokenID(); error InvalidTokenAddress(); + error InvalidBalanceSlot(); + error InvalidScale(); error InvalidPrice(); error InvalidPercent(); error CallerNotAllowed(); @@ -95,12 +97,14 @@ interface IL2TokenRegistry { * @param _tokenIDs Array of token IDs * @param _tokenAddresses Array of token addresses * @param _balanceSlots Array of balance storage slots + * @param _needBalanceSlots Array of boolean flags indicating whether balanceSlot is needed * @param _scales Array of scale values */ function registerTokens( uint16[] memory _tokenIDs, address[] memory _tokenAddresses, bytes32[] memory _balanceSlots, + bool[] memory _needBalanceSlots, uint256[] memory _scales ) external; @@ -109,15 +113,23 @@ interface IL2TokenRegistry { * @param _tokenID Token ID * @param _tokenAddress Token contract address * @param _balanceSlot Balance storage slot + * @param _needBalanceSlot Whether balanceSlot is needed (if false, stores 0; if true, stores balanceSlot+1) * @param _scale Scale value */ - function registerToken(uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, uint256 _scale) external; + function registerToken( + uint16 _tokenID, + address _tokenAddress, + bytes32 _balanceSlot, + bool _needBalanceSlot, + uint256 _scale + ) external; /** * @notice Update token information * @param _tokenID Token ID * @param _tokenAddress New token contract address * @param _balanceSlot New balance storage slot + * @param _needBalanceSlot Whether balanceSlot is needed (if false, stores 0; if true, stores balanceSlot+1) * @param _isActive Whether to activate * @param _scale Scale value */ @@ -125,6 +137,7 @@ interface IL2TokenRegistry { uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, + bool _needBalanceSlot, bool _isActive, uint256 _scale ) external; diff --git a/contracts/contracts/l2/system/L2TokenRegistry.sol b/contracts/contracts/l2/system/L2TokenRegistry.sol index f70932bc0..698f70851 100644 --- a/contracts/contracts/l2/system/L2TokenRegistry.sol +++ b/contracts/contracts/l2/system/L2TokenRegistry.sol @@ -19,17 +19,17 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar using EnumerableSetUpgradeable for EnumerableSetUpgradeable.UintSet; /// @notice Mapping from tokenID to TokenInfo - mapping(uint16 => TokenInfo) public tokenRegistry; + mapping(uint16 tokenID => TokenInfo tokenInfo) public tokenRegistry; /// @notice Mapping from token address to tokenID - mapping(address => uint16) public tokenRegistration; + mapping(address tokenAddress => uint16 tokenID) 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; + mapping(uint16 tokenID => uint256 priceRatio) public priceRatio; /// @notice Allow List whitelist - mapping(address => bool) public allowList; + mapping(address user => bool allowed) public allowList; /// @notice Whether whitelist is enabled bool public allowListEnabled = true; @@ -65,6 +65,9 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar * @param owner_ Contract owner address */ function initialize(address owner_) external initializer { + __Ownable_init(); + __ReentrancyGuard_init(); + _transferOwnership(owner_); allowListEnabled = true; } @@ -105,24 +108,27 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar * @param _tokenIDs Array of token IDs * @param _tokenAddresses Array of token addresses * @param _balanceSlots Array of balance storage slots + * @param _needBalanceSlots Array of boolean flags indicating whether balanceSlot is needed * @param _scales Array of scale values */ function registerTokens( uint16[] memory _tokenIDs, address[] memory _tokenAddresses, bytes32[] memory _balanceSlots, + bool[] memory _needBalanceSlots, uint256[] memory _scales - ) external onlyOwner { + ) external onlyOwner nonReentrant { if ( _tokenIDs.length != _tokenAddresses.length || _tokenIDs.length != _balanceSlots.length || + _tokenIDs.length != _needBalanceSlots.length || _tokenIDs.length != _scales.length ) { revert InvalidArrayLength(); } for (uint256 i = 0; i < _tokenIDs.length; i++) { - _registerSingleToken(_tokenIDs[i], _tokenAddresses[i], _balanceSlots[i], _scales[i]); + _registerSingleToken(_tokenIDs[i], _tokenAddresses[i], _balanceSlots[i], _needBalanceSlots[i], _scales[i]); } } @@ -131,15 +137,17 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar * @param _tokenID Token ID * @param _tokenAddress Token contract address * @param _balanceSlot Balance storage slot + * @param _needBalanceSlot Whether balanceSlot is needed (if false, stores 0; if true, stores balanceSlot+1) * @param _scale Scale value */ function registerToken( uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, + bool _needBalanceSlot, uint256 _scale ) external onlyOwner nonReentrant { - _registerSingleToken(_tokenID, _tokenAddress, _balanceSlot, _scale); + _registerSingleToken(_tokenID, _tokenAddress, _balanceSlot, _needBalanceSlot, _scale); } /** @@ -158,6 +166,40 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar supportedTokenSet.remove(uint256(_tokenID)); } + /** + * @notice Internal function: Convert actual balanceSlot to stored value (adds 1 if needed) + * @param _actualSlot The actual balance slot value + * @param _needBalanceSlot Whether balanceSlot is needed + * @return The stored balance slot value (actualSlot + 1 if needed, otherwise 0) + */ + function _toStoredBalanceSlot(bytes32 _actualSlot, bool _needBalanceSlot) internal pure returns (bytes32) { + if (!_needBalanceSlot) { + return bytes32(0); // Don't store balanceSlot + } + if (_actualSlot == bytes32(type(uint256).max)) revert InvalidBalanceSlot(); + bytes32 storedSlot; + assembly { + storedSlot := add(_actualSlot, 1) + } + return storedSlot; + } + + /** + * @notice Internal function: Convert stored balanceSlot to actual value (subtracts 1 if non-zero) + * @param _storedSlot The stored balance slot value + * @return The actual balance slot value (storedSlot - 1 if non-zero, otherwise 0) + */ + function _toActualBalanceSlot(bytes32 _storedSlot) internal pure returns (bytes32) { + if (_storedSlot == bytes32(0)) { + return bytes32(0); // No balanceSlot stored + } + bytes32 actualSlot; + assembly { + actualSlot := sub(_storedSlot, 1) + } + return actualSlot; + } + /** * @notice Internal function: Register a single token */ @@ -165,6 +207,7 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, + bool _needBalanceSlot, uint256 _scale ) internal { // Check token address @@ -175,6 +218,9 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar if (tokenRegistry[_tokenID].tokenAddress != address(0)) revert TokenAlreadyRegistered(); if (tokenRegistration[_tokenAddress] != 0) revert TokenAlreadyRegistered(); + // Validate scale is non-zero + if (_scale == 0) revert InvalidScale(); + // Get decimals from contract uint8 decimals = 18; // Default value try IERC20Infos(_tokenAddress).decimals() returns (uint8 v) { @@ -182,10 +228,12 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar } catch { // If call fails, use default value 18 } + // Register token (isActive defaults to false) + // Note: balanceSlot is stored as actualSlot + 1 if needBalanceSlot is true, otherwise 0 tokenRegistry[_tokenID] = TokenInfo({ tokenAddress: _tokenAddress, - balanceSlot: _balanceSlot, + balanceSlot: _toStoredBalanceSlot(_balanceSlot, _needBalanceSlot), isActive: false, decimals: decimals, scale: _scale @@ -200,6 +248,7 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar * @param _tokenID Token ID * @param _tokenAddress New token contract address * @param _balanceSlot New balance storage slot + * @param _needBalanceSlot Whether balanceSlot is needed (if false, stores 0; if true, stores balanceSlot+1) * @param _isActive Whether to activate * @param _scale Scale value */ @@ -207,6 +256,7 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar uint16 _tokenID, address _tokenAddress, bytes32 _balanceSlot, + bool _needBalanceSlot, bool _isActive, uint256 _scale ) external onlyOwner nonReentrant { @@ -228,10 +278,11 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar // If call fails, use default value 18 } // Update registration information + // Note: balanceSlot is stored as actualSlot + 1 if needBalanceSlot is true, otherwise 0 address oldAddress = tokenRegistry[_tokenID].tokenAddress; tokenRegistry[_tokenID] = TokenInfo({ tokenAddress: _tokenAddress, - balanceSlot: _balanceSlot, + balanceSlot: _toStoredBalanceSlot(_balanceSlot, _needBalanceSlot), isActive: _isActive, decimals: decimals, scale: _scale @@ -253,11 +304,14 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar * @notice Remove a token from registry * @param _tokenID Token ID to remove */ - function removeToken(uint16 _tokenID) external onlyOwner nonReentrant { + function removeToken(uint16 _tokenID) external onlyOwner { // Check if token exists address tokenAddress = tokenRegistry[_tokenID].tokenAddress; if (tokenAddress == address(0)) revert TokenNotFound(); + // Check if token is in supported list + if (!supportedTokenSet.contains(uint256(_tokenID))) revert TokenNotFound(); + // Remove from mappings delete tokenRegistry[_tokenID]; delete tokenRegistration[tokenAddress]; @@ -353,6 +407,7 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar * - 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) + * - Note: Uses ceiling division to ensure users receive fair token amounts * @param _tokenID Token ID of the ERC20 token * @param _ethAmount ETH amount (unit: wei) * @return tokenAmount Corresponding token amount (unit: token's smallest unit) @@ -371,10 +426,12 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar 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; + // Calculate token amount with ceiling division: + // tokenAmount = ceil((ethAmount * tokenScale) / ratio) + // Using formula: ceil(a/b) = (a + b - 1) / b + uint256 numerator = _ethAmount * uint256(info.scale); + tokenAmount = (numerator + ratio - 1) / ratio; + if (tokenAmount == 0) revert InvalidPrice(); return tokenAmount; @@ -383,11 +440,16 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar /** * @notice Get token information * @param _tokenID Token ID - * @return TokenInfo structure + * @return TokenInfo structure with actual balanceSlot (automatically -1 from stored value) */ function getTokenInfo(uint16 _tokenID) external view returns (TokenInfo memory) { if (tokenRegistry[_tokenID].tokenAddress == address(0)) revert TokenNotFound(); - return tokenRegistry[_tokenID]; + + TokenInfo memory info = tokenRegistry[_tokenID]; + // Convert stored balanceSlot to actual value + info.balanceSlot = _toActualBalanceSlot(info.balanceSlot); + + return info; } /** @@ -416,7 +478,7 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar 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 + if (_newScale == 0) revert InvalidScale(); tokenRegistry[_tokenID].scale = _newScale; emit TokenScaleUpdated(_tokenID, _newScale); @@ -461,16 +523,13 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar 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 - }); + tokenList[i] = TokenEntry({tokenID: tokenID, tokenAddress: tokenAddress}); } - + return tokenList; } @@ -481,11 +540,11 @@ contract L2TokenRegistry is IL2TokenRegistry, OwnableUpgradeable, ReentrancyGuar 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; } diff --git a/contracts/contracts/test/L2TokenRegistry.t.sol b/contracts/contracts/test/L2TokenRegistry.t.sol index ce74f08f4..8ea747fc2 100644 --- a/contracts/contracts/test/L2TokenRegistry.t.sol +++ b/contracts/contracts/test/L2TokenRegistry.t.sol @@ -88,7 +88,7 @@ contract L2TokenRegistryTest is Test { function test_registerToken_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); assertEq(info.tokenAddress, address(usdc)); @@ -100,36 +100,36 @@ contract L2TokenRegistryTest is Test { 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); + priceOracle.registerToken(0, address(usdc), BALANCE_SLOT_USDC, true, 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); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.expectRevert(bytes4(keccak256("TokenAlreadyRegistered()"))); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdt), BALANCE_SLOT_USDT, true, 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); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.expectRevert(bytes4(keccak256("TokenAlreadyRegistered()"))); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdc), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdc), BALANCE_SLOT_USDT, true, SCALE_USDT); } function test_registerToken_autoFetchesDecimals() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, 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); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, true, SCALE_DAI); info = priceOracle.getTokenInfo(TOKEN_ID_DAI); assertEq(info.decimals, 18); // DAI has 18 decimals @@ -137,7 +137,7 @@ contract L2TokenRegistryTest is Test { function test_registerToken_setsIsActiveToFalse() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); assertFalse(info.isActive); @@ -146,13 +146,13 @@ contract L2TokenRegistryTest is Test { 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); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, 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); + priceOracle.registerToken(TOKEN_ID_USDC, address(0), BALANCE_SLOT_USDC, true, SCALE_USDC); } function test_registerTokens_succeeds() public { @@ -172,13 +172,18 @@ contract L2TokenRegistryTest is Test { balanceSlots[1] = BALANCE_SLOT_USDT; balanceSlots[2] = BALANCE_SLOT_DAI; + bool[] memory needBalanceSlots = new bool[](3); + needBalanceSlots[0] = true; + needBalanceSlots[1] = true; + needBalanceSlots[2] = true; + 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); + priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, needBalanceSlots, scales); assertEq(priceOracle.getTokenInfo(TOKEN_ID_USDC).tokenAddress, address(usdc)); assertEq(priceOracle.getTokenInfo(TOKEN_ID_USDT).tokenAddress, address(usdt)); @@ -189,16 +194,17 @@ contract L2TokenRegistryTest is Test { uint16[] memory tokenIDs = new uint16[](2); address[] memory tokenAddresses = new address[](3); bytes32[] memory balanceSlots = new bytes32[](2); + bool[] memory needBalanceSlots = new bool[](2); uint256[] memory scales = new uint256[](2); vm.expectRevert(bytes4(keccak256("InvalidArrayLength()"))); vm.prank(owner); - priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, scales); + priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, needBalanceSlots, scales); } function test_getTokenIdByAddress_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); uint16 tokenID = priceOracle.getTokenIdByAddress(address(usdc)); assertEq(tokenID, TOKEN_ID_USDC); @@ -209,17 +215,162 @@ contract L2TokenRegistryTest is Test { priceOracle.getTokenIdByAddress(address(usdc)); } + /*////////////////////////////////////////////////////////////// + BalanceSlot Storage Tests + //////////////////////////////////////////////////////////////*/ + + function test_balanceSlot_storage_query_with_minus_one() public { + // Register token with balanceSlot = 9 + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + + // Get balanceSlot through getTokenInfo (should return actual value = 9) + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); + assertEq(info.balanceSlot, BALANCE_SLOT_USDC); + + // Read balanceSlot directly from storage + // tokenRegistry is at slot 151 + // TokenInfo struct layout: + // - slot 0: tokenAddress (20 bytes) + // - slot 1: balanceSlot (32 bytes) + // - slot 2: isActive (1 byte) + decimals (1 byte) + scale (32 bytes packed) + uint256 mappingSlot = 151; + + // Calculate storage location: keccak256(tokenID || mappingSlot) + bytes32 key = keccak256(abi.encode(TOKEN_ID_USDC, mappingSlot)); + + // balanceSlot is stored in key + 1 + bytes32 balanceSlotStorageLocation = bytes32(uint256(key) + 1); + + // Read stored value from storage + bytes32 storedBalanceSlot = vm.load(address(priceOracle), balanceSlotStorageLocation); + + // Stored value should be actualSlot + 1 = 9 + 1 = 10 + assertEq(uint256(storedBalanceSlot), uint256(BALANCE_SLOT_USDC) + 1); + + // Apply -1 to get actual value + bytes32 actualBalanceSlot = bytes32(uint256(storedBalanceSlot) - 1); + + // Verify that manual -1 gives us the same value as getTokenInfo + assertEq(actualBalanceSlot, BALANCE_SLOT_USDC); + assertEq(actualBalanceSlot, info.balanceSlot); + } + + function test_balanceSlot_storage_query_with_slot_zero() public { + // Test with balanceSlot = 0 (edge case) + bytes32 balanceSlot0 = bytes32(uint256(0)); + + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), balanceSlot0, true, SCALE_USDT); + + // Get balanceSlot through getTokenInfo (should return actual value = 0) + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDT); + assertEq(info.balanceSlot, balanceSlot0); + + // Read balanceSlot directly from storage + uint256 mappingSlot = 151; + bytes32 key = keccak256(abi.encode(TOKEN_ID_USDT, mappingSlot)); + bytes32 balanceSlotStorageLocation = bytes32(uint256(key) + 1); + bytes32 storedBalanceSlot = vm.load(address(priceOracle), balanceSlotStorageLocation); + + // Stored value should be actualSlot + 1 = 0 + 1 = 1 + assertEq(uint256(storedBalanceSlot), 1); + + // Apply -1 to get actual value + bytes32 actualBalanceSlot = bytes32(uint256(storedBalanceSlot) - 1); + + // Verify that manual -1 gives us 0 + assertEq(actualBalanceSlot, balanceSlot0); + assertEq(uint256(actualBalanceSlot), 0); + assertEq(actualBalanceSlot, info.balanceSlot); + } + + function test_balanceSlot_storage_query_multiple_tokens() public { + // Register multiple tokens with different balanceSlots + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), bytes32(uint256(9)), true, SCALE_USDC); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), bytes32(uint256(10)), true, SCALE_USDT); + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), bytes32(uint256(11)), true, SCALE_DAI); + + uint256 mappingSlot = 151; + + // Verify USDC: stored=10, actual=9 + bytes32 key = keccak256(abi.encode(TOKEN_ID_USDC, mappingSlot)); + bytes32 storedValue = vm.load(address(priceOracle), bytes32(uint256(key) + 1)); + assertEq(uint256(storedValue), 10); + assertEq(bytes32(uint256(storedValue) - 1), priceOracle.getTokenInfo(TOKEN_ID_USDC).balanceSlot); + + // Verify USDT: stored=11, actual=10 + key = keccak256(abi.encode(TOKEN_ID_USDT, mappingSlot)); + storedValue = vm.load(address(priceOracle), bytes32(uint256(key) + 1)); + assertEq(uint256(storedValue), 11); + assertEq(bytes32(uint256(storedValue) - 1), priceOracle.getTokenInfo(TOKEN_ID_USDT).balanceSlot); + + // Verify DAI: stored=12, actual=11 + key = keccak256(abi.encode(TOKEN_ID_DAI, mappingSlot)); + storedValue = vm.load(address(priceOracle), bytes32(uint256(key) + 1)); + assertEq(uint256(storedValue), 12); + assertEq(bytes32(uint256(storedValue) - 1), priceOracle.getTokenInfo(TOKEN_ID_DAI).balanceSlot); + } + + function test_balanceSlot_storage_query_needBalanceSlot_false() public { + // Test with needBalanceSlot = false (token doesn't need balanceSlot) + bytes32 anySlot = bytes32(uint256(999)); // Value doesn't matter when needBalanceSlot = false + uint16 tokenID = 100; + + vm.prank(owner); + priceOracle.registerToken(tokenID, address(usdc), anySlot, false, SCALE_USDC); + + // Get balanceSlot through getTokenInfo (should return 0 because needBalanceSlot was false) + L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(tokenID); + assertEq(info.balanceSlot, bytes32(0)); + + // Read balanceSlot directly from storage + uint256 mappingSlot = 151; + bytes32 key = keccak256(abi.encode(tokenID, mappingSlot)); + bytes32 balanceSlotStorageLocation = bytes32(uint256(key) + 1); + bytes32 storedBalanceSlot = vm.load(address(priceOracle), balanceSlotStorageLocation); + + // When needBalanceSlot = false, stored value should be 0 (no +1) + assertEq(uint256(storedBalanceSlot), 0); + + // getTokenInfo should return 0 (no -1 conversion needed) + assertEq(info.balanceSlot, bytes32(0)); + } + + function test_balanceSlot_reverts_when_max_uint256() public { + // Test that registering with max uint256 as balanceSlot reverts + bytes32 maxSlot = bytes32(type(uint256).max); + uint16 tokenID = 101; + + vm.expectRevert(bytes4(keccak256("InvalidBalanceSlot()"))); + vm.prank(owner); + priceOracle.registerToken(tokenID, address(usdc), maxSlot, true, SCALE_USDC); + } + + function test_registerToken_reverts_when_scale_is_zero() public { + // Test that registering with scale = 0 reverts + bytes32 balanceSlot = bytes32(uint256(9)); + uint16 tokenID = 102; + + vm.expectRevert(bytes4(keccak256("InvalidScale()"))); + vm.prank(owner); + priceOracle.registerToken(tokenID, address(usdc), balanceSlot, true, 0); + } + /*////////////////////////////////////////////////////////////// Token Update Tests //////////////////////////////////////////////////////////////*/ function test_updateTokenInfo_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); bytes32 newBalanceSlot = bytes32(uint256(99)); vm.prank(owner); - priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), newBalanceSlot, true, SCALE_USDC); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), newBalanceSlot, true, true, SCALE_USDC); L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); assertEq(info.balanceSlot, newBalanceSlot); @@ -229,23 +380,23 @@ contract L2TokenRegistryTest is Test { 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); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, 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); + priceOracle.updateTokenInfo(TOKEN_ID_USDT, address(usdc), BALANCE_SLOT_USDT, true, true, SCALE_USDT); } function test_updateTokenInfo_autoFetchesDecimals() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); // Update to DAI address vm.prank(owner); - priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(dai), BALANCE_SLOT_USDC, true, SCALE_DAI); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(dai), BALANCE_SLOT_USDC, true, true, SCALE_DAI); L2TokenRegistry.TokenInfo memory info = priceOracle.getTokenInfo(TOKEN_ID_USDC); assertEq(info.tokenAddress, address(dai)); @@ -254,10 +405,10 @@ contract L2TokenRegistryTest is Test { function test_deactivateToken_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, true, SCALE_USDC); assertTrue(priceOracle.getTokenInfo(TOKEN_ID_USDC).isActive); @@ -279,7 +430,7 @@ contract L2TokenRegistryTest is Test { function test_updatePriceRatio_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); // Set price: 1 USDC = 0.000001 ETH = 1e12 wei uint256 priceRatio = 1e12; @@ -292,7 +443,7 @@ contract L2TokenRegistryTest is Test { function test_updatePriceRatio_reverts_when_not_allowed() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.expectRevert(bytes4(keccak256("CallerNotAllowed()"))); vm.prank(alice); @@ -301,7 +452,7 @@ contract L2TokenRegistryTest is Test { function test_updatePriceRatio_succeeds_when_allowListDisabled() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); priceOracle.setAllowListEnabled(false); @@ -314,7 +465,7 @@ contract L2TokenRegistryTest is Test { function test_updatePriceRatio_succeeds_when_in_allowList() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); address[] memory users = new address[](1); bool[] memory allowed = new bool[](1); @@ -332,7 +483,7 @@ contract L2TokenRegistryTest is Test { function test_updatePriceRatio_reverts_when_invalid_price() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.expectRevert(bytes4(keccak256("InvalidPrice()"))); vm.prank(owner); @@ -341,9 +492,9 @@ contract L2TokenRegistryTest is Test { function test_batchUpdatePrices_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, SCALE_USDT); uint16[] memory tokenIDs = new uint16[](2); uint256[] memory prices = new uint256[](2); @@ -366,7 +517,7 @@ contract L2TokenRegistryTest is Test { function test_calculateTokenGasPrice_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); // Set price: 1 USDC = 0.000001 ETH = 1e12 wei vm.prank(owner); @@ -382,7 +533,7 @@ contract L2TokenRegistryTest is Test { function test_calculateEthGasPrice_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); // Set price: 1 USDC = 0.000001 ETH = 1e12 wei vm.prank(owner); @@ -401,7 +552,7 @@ contract L2TokenRegistryTest is Test { function test_calculateTokenGasPrice_withDAI() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, true, SCALE_DAI); // Set price: 1 DAI = 0.001 ETH = 1e15 wei vm.prank(owner); @@ -415,6 +566,51 @@ contract L2TokenRegistryTest is Test { assertEq(tokenGasPrice, expectedTokenGasPrice); } + function test_calculateTokenAmount_ceiling_division() public { + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + + // Set price ratio that will result in a remainder + vm.prank(owner); + priceOracle.updatePriceRatio(TOKEN_ID_USDC, 7e11); // Custom ratio for testing + + // Test case 1: Division with remainder + // numerator = 10 * 1e6 = 1e7 + // ratio = 7e11 + // Floor division: 1e7 / 7e11 = 0 (rounds down) + // Ceiling division: ceil(1e7 / 7e11) = 1 (rounds up) + uint256 ethAmount1 = 10; + uint256 tokenAmount1 = priceOracle.calculateTokenAmount(TOKEN_ID_USDC, ethAmount1); + uint256 numerator1 = ethAmount1 * SCALE_USDC; + uint256 expectedCeiling1 = (numerator1 + 7e11 - 1) / 7e11; + assertEq(tokenAmount1, expectedCeiling1); + assertGt(tokenAmount1, numerator1 / 7e11); // Should be greater than floor division + + // Test case 2: Exact division (no remainder) + // numerator = 7e11 * 1e6 = 7e17 + // ratio = 7e11 + // Division: 7e17 / 7e11 = 1e6 + uint256 ethAmount2 = 7e11; + uint256 tokenAmount2 = priceOracle.calculateTokenAmount(TOKEN_ID_USDC, ethAmount2); + assertEq(tokenAmount2, 1e6); + + // Test case 3: Large amount with small remainder + // numerator = 1e15 * 1e6 = 1e21 + // ratio = 7e11 + // Floor: 1e21 / 7e11 = 1428571428571 (approximately 1.43e12) + // Ceiling: ceil(1e21 / 7e11) = 1428571428572 + uint256 ethAmount3 = 1e15; + uint256 tokenAmount3 = priceOracle.calculateTokenAmount(TOKEN_ID_USDC, ethAmount3); + uint256 numerator3 = ethAmount3 * SCALE_USDC; + uint256 expectedCeiling3 = (numerator3 + 7e11 - 1) / 7e11; + assertEq(tokenAmount3, expectedCeiling3); + + // Verify ceiling behavior: result should be greater than floor when there's a remainder + if (numerator3 % 7e11 > 0) { + assertGt(tokenAmount3, numerator3 / 7e11); + } + } + /*////////////////////////////////////////////////////////////// Allow List Tests //////////////////////////////////////////////////////////////*/ @@ -462,12 +658,12 @@ contract L2TokenRegistryTest is Test { function test_isTokenActive_succeeds() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); assertFalse(priceOracle.isTokenActive(TOKEN_ID_USDC)); vm.prank(owner); - priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, true, SCALE_USDC); assertTrue(priceOracle.isTokenActive(TOKEN_ID_USDC)); } @@ -486,7 +682,7 @@ contract L2TokenRegistryTest is Test { function test_isTokenSupported_returns_true_when_registered() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); } @@ -497,15 +693,15 @@ contract L2TokenRegistryTest is Test { function test_getSupportedTokenCount_increments_on_register() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); assertEq(priceOracle.getSupportedTokenCount(), 1); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, SCALE_USDT); assertEq(priceOracle.getSupportedTokenCount(), 2); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, true, SCALE_DAI); assertEq(priceOracle.getSupportedTokenCount(), 3); } @@ -516,11 +712,11 @@ contract L2TokenRegistryTest is Test { function test_getSupportedIDList_returns_all_registered_tokenIDs() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, SCALE_USDT); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, SCALE_DAI); + priceOracle.registerToken(TOKEN_ID_DAI, address(dai), BALANCE_SLOT_DAI, true, SCALE_DAI); uint16[] memory tokenIDs = priceOracle.getSupportedIDList(); assertEq(tokenIDs.length, 3); @@ -548,9 +744,9 @@ contract L2TokenRegistryTest is Test { function test_getSupportedTokenList_returns_all_registered_tokens() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, SCALE_USDT); L2TokenRegistry.TokenEntry[] memory tokenList = priceOracle.getSupportedTokenList(); assertEq(tokenList.length, 2); @@ -576,7 +772,7 @@ contract L2TokenRegistryTest is Test { function test_getSupportedTokenList_includes_correct_tokenAddress() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); L2TokenRegistry.TokenEntry[] memory tokenList = priceOracle.getSupportedTokenList(); assertEq(tokenList.length, 1); @@ -586,7 +782,7 @@ contract L2TokenRegistryTest is Test { function test_registerToken_adds_to_supported_list() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); assertEq(priceOracle.getSupportedTokenCount(), 1); @@ -610,12 +806,17 @@ contract L2TokenRegistryTest is Test { balanceSlots[1] = BALANCE_SLOT_USDT; balanceSlots[2] = BALANCE_SLOT_DAI; + bool[] memory needBalanceSlots = new bool[](3); + needBalanceSlots[0] = true; + needBalanceSlots[1] = true; + needBalanceSlots[2] = true; + scales[0] = SCALE_USDC; scales[1] = SCALE_USDT; scales[2] = SCALE_DAI; vm.prank(owner); - priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, scales); + priceOracle.registerTokens(tokenIDs, tokenAddresses, balanceSlots, needBalanceSlots, scales); assertEq(priceOracle.getSupportedTokenCount(), 3); assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); @@ -625,9 +826,9 @@ contract L2TokenRegistryTest is Test { function test_removeToken_removes_from_supported_list() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, SCALE_USDT); assertEq(priceOracle.getSupportedTokenCount(), 2); assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); @@ -642,9 +843,9 @@ contract L2TokenRegistryTest is Test { function test_removeToken_removes_from_tokenList() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, SCALE_USDT); + priceOracle.registerToken(TOKEN_ID_USDT, address(usdt), BALANCE_SLOT_USDT, true, SCALE_USDT); vm.prank(owner); priceOracle.removeToken(TOKEN_ID_USDC); @@ -661,7 +862,7 @@ contract L2TokenRegistryTest is Test { function test_removeToken_cleans_up_all_mappings() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.prank(owner); priceOracle.updatePriceRatio(TOKEN_ID_USDC, 1e12); @@ -684,7 +885,7 @@ contract L2TokenRegistryTest is Test { function test_removeToken_reverts_when_not_owner() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.expectRevert("Ownable: caller is not the owner"); vm.prank(alice); @@ -697,9 +898,20 @@ contract L2TokenRegistryTest is Test { priceOracle.removeToken(TOKEN_ID_USDC); } + function test_updateTokenScale_reverts_when_scale_is_zero() public { + // First register a token + vm.prank(owner); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); + + // Try to update scale to 0 + vm.expectRevert(bytes4(keccak256("InvalidScale()"))); + vm.prank(owner); + priceOracle.updateTokenScale(TOKEN_ID_USDC, 0); + } + function test_removeToken_emits_TokenRemoved_event() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, SCALE_USDC); vm.expectEmit(true, true, false, false); emit IL2TokenRegistry.TokenRemoved(TOKEN_ID_USDC, address(usdc)); @@ -710,14 +922,14 @@ contract L2TokenRegistryTest is Test { function test_updateTokenInfo_keeps_token_in_supported_list() public { vm.prank(owner); - priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, SCALE_USDC); + priceOracle.registerToken(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, 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); + priceOracle.updateTokenInfo(TOKEN_ID_USDC, address(usdc), BALANCE_SLOT_USDC, true, true, SCALE_USDC); // Token should still be in supported list assertTrue(priceOracle.isTokenSupported(TOKEN_ID_USDC)); diff --git a/contracts/go.mod b/contracts/go.mod index fd82ebd06..b7dc80d3c 100644 --- a/contracts/go.mod +++ b/contracts/go.mod @@ -11,21 +11,62 @@ require ( ) require ( + github.com/VictoriaMetrics/fastcache v1.12.1 // indirect + github.com/bits-and-blooms/bitset v1.20.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/consensys/bavard v0.1.27 // indirect + github.com/consensys/gnark-crypto v0.16.0 // indirect + github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/deckarep/golang-set v1.8.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect + github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect + github.com/ethereum/go-ethereum v1.10.26 // indirect + github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-stack/stack v1.8.1 // indirect + github.com/golang-jwt/jwt/v4 v4.5.0 // indirect + github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect + github.com/google/uuid v1.3.0 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/hashicorp/go-bexpr v0.1.10 // indirect + github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/holiman/bloomfilter/v2 v2.0.3 // indirect github.com/holiman/uint256 v1.2.4 // indirect - github.com/kr/pretty v0.3.1 // indirect + github.com/huin/goupnp v1.3.0 // indirect + github.com/jackpal/go-nat-pmp v1.0.2 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mitchellh/mapstructure v1.4.1 // indirect + github.com/mitchellh/pointerstructure v1.2.0 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/prometheus/tsdb v0.7.1 // indirect + github.com/rivo/uniseg v0.2.0 // indirect + github.com/rjeczalik/notify v0.9.1 // indirect + github.com/rs/cors v1.7.0 // indirect + github.com/scroll-tech/zktrie v0.8.4 // indirect github.com/shirou/gopsutil v3.21.11+incompatible // indirect + github.com/status-im/keycard-go v0.2.0 // indirect + github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect + github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect + github.com/tyler-smith/go-bip39 v1.1.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect golang.org/x/crypto v0.35.0 // indirect + golang.org/x/sync v0.11.0 // indirect golang.org/x/sys v0.30.0 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + golang.org/x/text v0.22.0 // indirect + golang.org/x/time v0.3.0 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect + gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect + gopkg.in/urfave/cli.v1 v1.20.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + rsc.io/tmplfunc v0.0.3 // indirect ) diff --git a/contracts/go.sum b/contracts/go.sum index 4813f6cc5..80f73f61f 100644 --- a/contracts/go.sum +++ b/contracts/go.sum @@ -1,56 +1,249 @@ +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= +github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156 h1:eMwmnE/GDgah4HI848JfFxHt+iPb26b4zyfspmqY0/8= +github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax3seSYIx7SuZdm2G2xzfwmv3TPSk2ucNfQESPXM= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= +github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/btcsuite/btcd/btcec/v2 v2.2.1 h1:xP60mv8fvp+0khmrN0zTdPC3cNm24rfeE6lh2R/Yv3E= github.com/btcsuite/btcd/btcec/v2 v2.2.1/go.mod h1:9/CSmJxmuvqzX9Wh2fXMWToLOHhPd11lSPuIupwTkI8= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cespare/cp v0.1.0 h1:SE+dxFebS7Iik5LK0tsi1k9ZCxEaFX4AjQmoyA+1dJk= +github.com/cespare/cp v0.1.0/go.mod h1:SOGHArjBr4JWaSDEVpWpo/hNg6RoKrls6Oh40hiwW+s= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/consensys/bavard v0.1.27 h1:j6hKUrGAy/H+gpNrpLU3I26n1yc+VMGmd6ID5+gAhOs= +github.com/consensys/bavard v0.1.27/go.mod h1:k/zVjHHC4B+PQy1Pg7fgvG3ALicQw540Crag8qx+dZs= +github.com/consensys/gnark-crypto v0.16.0 h1:8Dl4eYmUWK9WmlP1Bj6je688gBRJCJbT8Mw4KoTAawo= +github.com/consensys/gnark-crypto v0.16.0/go.mod h1:Ke3j06ndtPTVvo++PhGNgvm+lgpLvzbcE2MqljY7diU= +github.com/crate-crypto/go-eth-kzg v1.4.0 h1:WzDGjHk4gFg6YzV0rJOAsTK4z3Qkz5jd4RE3DAvPFkg= +github.com/crate-crypto/go-eth-kzg v1.4.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= +github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 h1:8UrgZ3GkP4i/CLijOJx79Yu+etlyjdBU4sfcs2WYQMs= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= +github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= +github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s= +github.com/ethereum/c-kzg-4844/v2 v2.1.5/go.mod h1:u59hRTTah4Co6i9fDWtiCjTrblJv0UwsqZKCc0GfgUs= +github.com/ethereum/go-ethereum v1.10.26 h1:i/7d9RBBwiXCEuyduBQzJw/mKmnvzsN14jqBmytw72s= +github.com/ethereum/go-ethereum v1.10.26/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= +github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= +github.com/go-kit/kit v0.8.0 h1:Wz+5lgoB0kkuqLEc6NVmwRknTKP6dTGbSqvhZtBI/j0= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0 h1:MP4Eh7ZCb31lleYCFuwm0oe4/YGak+5l1vA2NOE80nA= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= +github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb h1:PBC98N2aIaM3XXiurYmW7fx4GZkL8feAMVq7nEjURHk= +github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= +github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= +github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/holiman/bloomfilter/v2 v2.0.3 h1:73e0e/V0tCydx14a0SCYS/EWCxgwLZ18CZcZKVu0fao= +github.com/holiman/bloomfilter/v2 v2.0.3/go.mod h1:zpoh+gs7qcpqrHr3dB55AMiJwo0iURXE7ZOP9L9hSkA= github.com/holiman/uint256 v1.2.4 h1:jUc4Nk8fm9jZabQuqr2JzednajVmBpC+oiTiXZJEApU= github.com/holiman/uint256 v1.2.4/go.mod h1:EOMSn4q6Nyt9P6efbI3bueV4e1b3dGlUCXeiRV4ng7E= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huin/goupnp v1.3.0 h1:UvLUlWDNpoUdYzb2TCn+MuTWtcjXKSza2n6CBdQ0xXc= +github.com/huin/goupnp v1.3.0/go.mod h1:gnGPsThkYa7bFi/KWmEysQRf48l2dvR5bxr2OFckNX8= github.com/iden3/go-iden3-crypto v0.0.16 h1:zN867xiz6HgErXVIV/6WyteGcOukE9gybYTorBMEdsk= github.com/iden3/go-iden3-crypto v0.0.16/go.mod h1:dLpM4vEPJ3nDHzhWFXDjzkn1qHoBeOT/3UEhXsEsP3E= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7BdWus= +github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leanovate/gopter v0.2.11 h1:vRjThO1EKPb/1NsDXuDrzldR28RLkBflWYcU9CvzWu4= +github.com/leanovate/gopter v0.2.11/go.mod h1:aK3tzZP/C+p1m3SPRE4SYZFGP7jjkuSI4f7Xvpt0S9c= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjUEN1uBnDo34A= +github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/morph-l2/go-ethereum v1.10.14-0.20251031091135-78b17f183b84 h1:FmHKWYMNfIfpNDWO4+ulmmgstBI5Ujt7NWI1g1PzVjQ= github.com/morph-l2/go-ethereum v1.10.14-0.20251031091135-78b17f183b84/go.mod h1:U/Gt6UghgHD7SB8t/rTD9908qFRjvzgIAtXUqEYjtI8= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= +github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rjeczalik/notify v0.9.1 h1:CLCKso/QK1snAlnhNR/CNvNiFU2saUtjV0bx3EwNeCE= +github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= +github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= +github.com/scroll-tech/zktrie v0.8.4 h1:UagmnZ4Z3ITCk+aUq9NQZJNAwnWl4gSxsLb2Nl7IgRE= +github.com/scroll-tech/zktrie v0.8.4/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk= github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI= github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/status-im/keycard-go v0.2.0 h1:QDLFswOQu1r5jsycloeQh3bVU8n/NatHHaZobtDnDzA= +github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw= +github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= +github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4= github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= +github.com/tyler-smith/go-bip39 v1.1.0 h1:5eUemwrMargf3BSLRRCalXT93Ns6pQJIjYQN2nyfOP8= +github.com/tyler-smith/go-bip39 v1.1.0/go.mod h1:gUYDtqQw1JS3ZJ8UWVcGTGqqr6YIN3CWg+kkNaLt55U= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs= golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= +gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce h1:+JknDZhAj8YMt7GC73Ei8pv4MzjDUNPHgQWJdtMAaDU= +gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce/go.mod h1:5AcXVHNjg+BDxry382+8OKon8SEWiKktQR07RKPsv1c= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= +gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= diff --git a/contracts/scripts/oracle-testing/token.go b/contracts/scripts/oracle-testing/token.go index d53193b7f..783e7126e 100644 --- a/contracts/scripts/oracle-testing/token.go +++ b/contracts/scripts/oracle-testing/token.go @@ -126,8 +126,6 @@ func ParseTokenInfoFromStorage( 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) @@ -147,7 +145,7 @@ func ParseTokenInfoFromStorage( return &TokenInfo{ TokenAddress: tokenAddress, - BalanceSlot: balanceSlot, + BalanceSlot: common.BytesToHash(balanceSlotData), IsActive: isActive, Decimals: decimals, Scale: scale, diff --git a/contracts/tasks/token_deploy.ts b/contracts/tasks/token_deploy.ts index b7230eb6c..326b2077f 100644 --- a/contracts/tasks/token_deploy.ts +++ b/contracts/tasks/token_deploy.ts @@ -644,16 +644,28 @@ task("deploy-l2-token-registry") const proxyAdmin = ProxyAdminFactory.attach(taskArgs.proxyadmin) // Upgrade the proxy to new implementation - const upgradeTx = await proxyAdmin.upgradeAndCall( + const upgradeTx = await proxyAdmin.upgrade( taskArgs.proxy, - tokenRegistry.address, - TokenRegistryFactory.interface.encodeFunctionData('initialize', [ - taskArgs.owner // owner - ]) // data + tokenRegistry.address ) await upgradeTx.wait() console.log(`Proxy upgraded to new implementation: ${tokenRegistry.address}`) - + // Check if a call to initialize is needed after upgrading the implementation. + // Read the proxy contract's storage slot to see if already initialized. + const tokenRegistryProxyInstance = TokenRegistryFactory.attach(taskArgs.proxy) + const isInitialized = await tokenRegistryProxyInstance.owner().then(owner => { + // Owner should not be address(0) if initialized. + return owner && owner !== ethers.constants.AddressZero + }).catch(() => false) + + if (!isInitialized) { + console.log(`Proxy not initialized. Calling initialize...`) + const tx = await tokenRegistryProxyInstance.initialize(taskArgs.owner) + await tx.wait() + console.log(`Initialization completed.`) + } else { + console.log(`Proxy already initialized, skipping initialize() call.`) + } proxyAddress = taskArgs.proxy } else { console.log(`\nDeploying new proxy`) @@ -855,6 +867,7 @@ task("deploy-test-tokens-and-register") const tokenIDs: number[] = [] const tokenAddresses: string[] = [] const balanceSlots: string[] = [] + const needBalanceSlots: boolean[] = [] const scales: string[] = [] for (const token of deployedTokens) { @@ -864,7 +877,10 @@ task("deploy-test-tokens-and-register") // 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)) + const balanceSlotValue = ethers.BigNumber.from(token.balanceSlot) + balanceSlots.push(ethers.utils.hexZeroPad(balanceSlotValue.toHexString(), 32)) + // Only set needBalanceSlot to true if balanceSlot is not 0 + needBalanceSlots.push(!balanceSlotValue.isZero()) scales.push(token.scale.toString()) } @@ -878,6 +894,7 @@ task("deploy-test-tokens-and-register") tokenIDs, tokenAddresses, balanceSlots, + needBalanceSlots, scales ) console.log(`\n ✓ Registration transaction sent: ${tx.hash}`) @@ -975,11 +992,14 @@ task("deploy-test-tokens-and-register") 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 balanceSlotValue = ethers.BigNumber.from(token.balanceSlot) + const balanceSlot = ethers.utils.hexZeroPad(balanceSlotValue.toHexString(), 32) + const needBalanceSlot = !balanceSlotValue.isZero() // Only set to true if balanceSlot is not 0 const tx = await tokenRegistry.registerToken( token.tokenID, token.address, balanceSlot, + needBalanceSlot, token.scale ) const receipt = await tx.wait() diff --git a/go.work.sum b/go.work.sum index 7006bf015..6c6aa4270 100644 --- a/go.work.sum +++ b/go.work.sum @@ -158,7 +158,6 @@ github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= -github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= @@ -246,6 +245,7 @@ github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/crate-crypto/go-kzg-4844 v1.0.0 h1:TsSgHwrkTKecKJ4kadtHi4b3xHW5dCFUDFnUp1TsawI= github.com/crate-crypto/go-kzg-4844 v1.0.0/go.mod h1:1kMhvPgI0Ky3yIa+9lFySEBUBXkYxeOi8ZF1sYioxhc= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/curioswitch/go-reassign v0.1.2/go.mod h1:bFJIHgtTM3hRm2sKXSPkbwNjSFyGURQXyn4IXD2qwfQ= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/daixiang0/gci v0.6.3/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= @@ -271,7 +271,6 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/eclipse/paho.mqtt.golang v1.2.0/go.mod h1:H9keYFcgq3Qr5OUJm/JZI/i6U7joQ8SYLhZwfeOo6Ts= -github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.12.0/go.mod h1:ZBTaoJ23lqITozF0M6G4/IragXCQKCnYbmlmtHvwRG0= @@ -294,7 +293,6 @@ github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/garslo/gogen v0.0.0-20170306192744-1d203ffc1f61/go.mod h1:Q0X6pkwTILDlzrGEckF6HKjXe48EgsY/l7K7vhY4MW8= -github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/getkin/kin-openapi v0.61.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= @@ -305,7 +303,6 @@ github.com/go-critic/go-critic v0.6.4/go.mod h1:qL5SOlk7NtY6sJPoVCTKDIgzNOxHkkkO github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -368,7 +365,6 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20230323073829-e72429f035bd/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= @@ -379,7 +375,6 @@ github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1: github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= @@ -393,7 +388,6 @@ github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/ github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= @@ -417,7 +411,6 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= @@ -483,6 +476,7 @@ github.com/klauspost/pgzip v1.0.2-0.20170402124221-0bf5dcad4ada/go.mod h1:Ch1tH6 github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= @@ -520,9 +514,7 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -544,7 +536,6 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/moby/buildkit v0.13.0/go.mod h1:aNmNQKLBFYAOFuzQjR3VA27/FijlvtBD1pjNwTSN37k= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -591,6 +582,7 @@ github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0 github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= @@ -607,7 +599,6 @@ github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqr github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= @@ -619,17 +610,15 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quasilyte/go-ruleguard v0.3.17/go.mod h1:sST5PvaR7yb/Az5ksX8oc88usJ4EGjmJv7cK7y3jyig= github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc= -github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRrjvIXnJho= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= -github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -672,7 +661,6 @@ github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3 github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= -github.com/status-im/keycard-go v0.2.0/go.mod h1:wlp8ZLbsmrF6g6WjugPAx+IzoLrkdf9+mHxBEeo3Hbg= github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -683,7 +671,6 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/sylvia7788/contextcheck v1.0.6/go.mod h1:9XDxwvxyuKD+8N+a7Gs7bfWLityh5t70g/GjdEt2N2M= -github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= @@ -802,7 +789,6 @@ golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -853,7 +839,6 @@ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=