diff --git a/.gitleaksignore b/.gitleaksignore index 8a4eb75f..4c704859 100644 --- a/.gitleaksignore +++ b/.gitleaksignore @@ -295,3 +295,21 @@ cd83fb443a1513890a1da1be0389a2b853dcb93d:scripts/deployment/l2/globals_polygon_m 8a01b571ac0a4138882dacf81572de4753f37f1e:scripts/deployment/l2/globals_polygon_mainnet.json:generic-api-key:2 8a01b571ac0a4138882dacf81572de4753f37f1e:scripts/deployment/l2/globals_base_mainnet.json:generic-api-key:1 8a01b571ac0a4138882dacf81572de4753f37f1e:scripts/deployment/l2/globals_base_mainnet.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_arbitrum_one.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_arbitrum_sepolia.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_base_mainnet.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_celo_mainnet.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_gnosis_chiado.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_optimistic_mainnet.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_optimistic_sepolia.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_polygon_amoy.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_polygon_mainnet.json:generic-api-key:1 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_arbitrum_one.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_arbitrum_sepolia.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_base_mainnet.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_celo_mainnet.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_gnosis_chiado.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_optimistic_mainnet.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_optimistic_sepolia.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_polygon_amoy.json:generic-api-key:2 +f6aa0cc9dcfba03dacec45e0ea0af309a72f3600:scripts/deployment/l2/globals_polygon_mainnet.json:generic-api-key:2 diff --git a/abis/0.8.25/StakingFactory.json b/abis/0.8.25/StakingFactory.json index 7b597482..bd31fe01 100644 --- a/abis/0.8.25/StakingFactory.json +++ b/abis/0.8.25/StakingFactory.json @@ -438,8 +438,8 @@ "type": "function" } ], - "bytecode": "0x608060405260016003553480156013575f80fd5b506040516111913803806111918339810160408190526030916062565b60018054336001600160a01b031991821617909155600280549091166001600160a01b0392909216919091179055608d565b5f602082840312156071575f80fd5b81516001600160a01b03811681146086575f80fd5b9392505050565b6110f78061009a5f395ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638da5cb5b11610088578063cf04fb9411610063578063cf04fb94146101ce578063e8dc705a146101e1578063ec2ee1f614610248578063fa2a5b011461025b575f80fd5b80638da5cb5b146101a0578063a6f9dae1146101b3578063affed0e0146101c6575f80fd5b80633ce3778c116100c35780633ce3778c1461014f578063479e372e14610157578063555b8adb1461017a578063830a322a1461018d575f80fd5b8063118e24bd146100e95780631eda94d7146100fe5780632b7ac3f314610124575b5f80fd5b6100fc6100f7366004610ce7565b61026e565b005b61011161010c366004610d1c565b610347565b6040519081526020015b60405180910390f35b600254610137906001600160a01b031681565b6040516001600160a01b03909116815260200161011b565b610111600481565b61016a610165366004610d1c565b610452565b604051901515815260200161011b565b610137610188366004610d3c565b610531565b6100fc61019b366004610d1c565b610605565b600154610137906001600160a01b031681565b6100fc6101c1366004610d1c565b6106ee565b6101115f5481565b6100fc6101dc366004610d1c565b61079e565b6102206101ef366004610d1c565b60046020525f9081526040902080546001909101546001600160a01b0391821691811690600160a01b900460ff1683565b604080516001600160a01b03948516815293909216602084015215159082015260600161011b565b610137610256366004610d78565b610827565b610137610269366004610d1c565b610c48565b6001600160a01b038083165f90815260046020526040902060018101549091163381146102c45760405163521eb56d60e11b81523360048201526001600160a01b03821660248201526044015b60405180910390fd5b600182018054841515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040516001600160a01b038516907f11126b4c1d3b69d7dd553c2f8b2be5f8fabfe22552ceffc3240126fdc087eca09061033990861515815260200190565b60405180910390a250505050565b5f8061035283610452565b9050801561044c57826001600160a01b031663957323616040518163ffffffff1660e01b8152600401602060405180830381865afa158015610396573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ba9190610e34565b6002549092506001600160a01b0316801561044a57604051630e1e19e160e21b81526001600160a01b0385811660048301525f9190831690633878678490602401602060405180830381865afa158015610416573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610e34565b905080841115610448578093505b505b505b50919050565b6001600160a01b038082165f908152600460205260408120805491929091168061047f57505f9392505050565b6001820154600160a01b900460ff1661049b57505f9392505050565b6002546001600160a01b03168015610526576040516369be670b60e01b81526001600160a01b03868116600483015283811660248301528216906369be670b90604401602060405180830381865afa1580156104f9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061051d9190610e4b565b95945050505050565b506001949350505050565b5f8061053c83610c54565b90505f6040518060200161054f90610caf565b601f1982820381018352601f90910116604081905261057c91906001600160a01b03881690602001610e7d565b60408051808303601f1901815282825280516020918201207fff00000000000000000000000000000000000000000000000000000000000000828501523060601b6bffffffffffffffffffffffff191660218501526035840195909552605580840195909552815180840390950185526075909201905282519201919091209150505b92915050565b6001546001600160a01b031633146106455760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b038082165f9081526004602052604090206001015416806106805760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382165f8181526004602052604080822080546001600160a01b0319168155600101805474ffffffffffffffffffffffffffffffffffffffffff19169055517f5e8652b9d1a24d82bfe7a9bfae71e26899d688827382d41f69b1c79342c586aa9190a25050565b6001546001600160a01b0316331461072e5760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b0381166107555760405163d92e233d60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6001546001600160a01b031633146107de5760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b600280546001600160a01b0319166001600160a01b0383169081179091556040517fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee327905f90a250565b5f6001600354111561084c576040516345f5ce8b60e11b815260040160405180910390fd5b60026003556001600160a01b0383166108785760405163d92e233d60e01b815260040160405180910390fd5b826001600160a01b03163b5f036108ad5760405163601c0c2160e01b81526001600160a01b03841660048201526024016102bb565b6004825110156108df5781516004604051631a64813d60e11b81526004016102bb929190918252602082015260400190565b6002546001600160a01b0316801580159061095f5750604051634b19276b60e11b81526001600160a01b0385811660048301528216906396324ed690602401602060405180830381865afa158015610939573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061095d9190610e4b565b155b1561098857604051633df7a39d60e21b81526001600160a01b03851660048201526024016102bb565b5f80549061099582610c54565b90505f604051806020016109a890610caf565b601f1982820381018352601f9091011660408190526109d591906001600160a01b038a1690602001610e7d565b6040516020818303038152906040529050818151826020015ff594506001600160a01b038516610a23576040516329c25ebd60e11b81526001600160a01b03881660048201526024016102bb565b5f80866001600160a01b031688604051610a3d9190610e95565b5f604051808303815f865af19150503d805f8114610a76576040519150601f19603f3d011682016040523d82523d5f602084013e610a7b565b606091505b509150915081610ab957805115610a955780518082602001fd5b604051633c4c93c960e21b81526001600160a01b03881660048201526024016102bb565b6001600160a01b03861615801590610b3e57506040516369be670b60e01b81526001600160a01b0388811660048301528a811660248301528716906369be670b90604401602060405180830381865afa158015610b18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3c9190610e4b565b155b15610b6757604051630a7f26af60e21b81526001600160a01b03881660048201526024016102bb565b604080516060810182526001600160a01b038b8116825233602080840191825260018486018181528d85165f908152600490935295909120845181546001600160a01b0319169085161781559151918101805495519290931674ffffffffffffffffffffffffffffffffffffffffff1990951694909417600160a01b9115159190910217905590610bf9908790610eb4565b5f9081556040516001600160a01b03808d1692908b169133917fc88bd7cfbe8bae024ebb6f3cf291adfd7db2588a07e1c78768ea3c81b992496b91a45050600160035550939695505050505050565b5f6105ff825f54610531565b5f468233610c63600143610ec7565b6040805160208101959095528401929092526001600160a01b031660608301524060808201524260a082015260c001604051602081830303815290604052805190602001209050919050565b6101e780610edb83390190565b80356001600160a01b0381168114610cd2575f80fd5b919050565b8015158114610ce4575f80fd5b50565b5f8060408385031215610cf8575f80fd5b610d0183610cbc565b91506020830135610d1181610cd7565b809150509250929050565b5f60208284031215610d2c575f80fd5b610d3582610cbc565b9392505050565b5f8060408385031215610d4d575f80fd5b610d5683610cbc565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215610d89575f80fd5b610d9283610cbc565b9150602083013567ffffffffffffffff80821115610dae575f80fd5b818501915085601f830112610dc1575f80fd5b813581811115610dd357610dd3610d64565b604051601f8201601f19908116603f01168101908382118183101715610dfb57610dfb610d64565b81604052828152886020848701011115610e13575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f60208284031215610e44575f80fd5b5051919050565b5f60208284031215610e5b575f80fd5b8151610d3581610cd7565b5f81518060208401855e5f93019283525090919050565b5f610e888285610e66565b9283525050602001919050565b5f610d358284610e66565b634e487b7160e01b5f52601160045260245ffd5b808201808211156105ff576105ff610ea0565b818103818111156105ff576105ff610ea056fe6080604052348015600e575f80fd5b506040516101e73803806101e7833981016040819052602b916077565b6001600160a01b03811660515760405163d02c623d60e01b815260040160405180910390fd5b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5560a2565b5f602082840312156086575f80fd5b81516001600160a01b0381168114609b575f80fd5b9392505050565b610138806100af5f395ff3fe608060405260043610610028575f3560e01c806346032dbc14610069578063aaf10f42146100af575b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e54365f80375f80365f845af490503d5f803e80610064573d5ffd5b503d5ff35b348015610074575f80fd5b5061009c7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e81565b6040519081526020015b60405180910390f35b3480156100ba575f80fd5b507f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a656fea2646970667358221220cd2f3d25e9410d8ca6f1f5af516d26b4d6351d087dd182806de06350446497fb64736f6c63430008190033a2646970667358221220c7c877e3bd5012d4b978ad07d61e0409822a9c5c93866ac784dc412bf002521164736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638da5cb5b11610088578063cf04fb9411610063578063cf04fb94146101ce578063e8dc705a146101e1578063ec2ee1f614610248578063fa2a5b011461025b575f80fd5b80638da5cb5b146101a0578063a6f9dae1146101b3578063affed0e0146101c6575f80fd5b80633ce3778c116100c35780633ce3778c1461014f578063479e372e14610157578063555b8adb1461017a578063830a322a1461018d575f80fd5b8063118e24bd146100e95780631eda94d7146100fe5780632b7ac3f314610124575b5f80fd5b6100fc6100f7366004610ce7565b61026e565b005b61011161010c366004610d1c565b610347565b6040519081526020015b60405180910390f35b600254610137906001600160a01b031681565b6040516001600160a01b03909116815260200161011b565b610111600481565b61016a610165366004610d1c565b610452565b604051901515815260200161011b565b610137610188366004610d3c565b610531565b6100fc61019b366004610d1c565b610605565b600154610137906001600160a01b031681565b6100fc6101c1366004610d1c565b6106ee565b6101115f5481565b6100fc6101dc366004610d1c565b61079e565b6102206101ef366004610d1c565b60046020525f9081526040902080546001909101546001600160a01b0391821691811690600160a01b900460ff1683565b604080516001600160a01b03948516815293909216602084015215159082015260600161011b565b610137610256366004610d78565b610827565b610137610269366004610d1c565b610c48565b6001600160a01b038083165f90815260046020526040902060018101549091163381146102c45760405163521eb56d60e11b81523360048201526001600160a01b03821660248201526044015b60405180910390fd5b600182018054841515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040516001600160a01b038516907f11126b4c1d3b69d7dd553c2f8b2be5f8fabfe22552ceffc3240126fdc087eca09061033990861515815260200190565b60405180910390a250505050565b5f8061035283610452565b9050801561044c57826001600160a01b031663957323616040518163ffffffff1660e01b8152600401602060405180830381865afa158015610396573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ba9190610e34565b6002549092506001600160a01b0316801561044a57604051630e1e19e160e21b81526001600160a01b0385811660048301525f9190831690633878678490602401602060405180830381865afa158015610416573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610e34565b905080841115610448578093505b505b505b50919050565b6001600160a01b038082165f908152600460205260408120805491929091168061047f57505f9392505050565b6001820154600160a01b900460ff1661049b57505f9392505050565b6002546001600160a01b03168015610526576040516369be670b60e01b81526001600160a01b03868116600483015283811660248301528216906369be670b90604401602060405180830381865afa1580156104f9573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061051d9190610e4b565b95945050505050565b506001949350505050565b5f8061053c83610c54565b90505f6040518060200161054f90610caf565b601f1982820381018352601f90910116604081905261057c91906001600160a01b03881690602001610e7d565b60408051808303601f1901815282825280516020918201207fff00000000000000000000000000000000000000000000000000000000000000828501523060601b6bffffffffffffffffffffffff191660218501526035840195909552605580840195909552815180840390950185526075909201905282519201919091209150505b92915050565b6001546001600160a01b031633146106455760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b038082165f9081526004602052604090206001015416806106805760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382165f8181526004602052604080822080546001600160a01b0319168155600101805474ffffffffffffffffffffffffffffffffffffffffff19169055517f5e8652b9d1a24d82bfe7a9bfae71e26899d688827382d41f69b1c79342c586aa9190a25050565b6001546001600160a01b0316331461072e5760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b0381166107555760405163d92e233d60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6001546001600160a01b031633146107de5760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b600280546001600160a01b0319166001600160a01b0383169081179091556040517fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee327905f90a250565b5f6001600354111561084c576040516345f5ce8b60e11b815260040160405180910390fd5b60026003556001600160a01b0383166108785760405163d92e233d60e01b815260040160405180910390fd5b826001600160a01b03163b5f036108ad5760405163601c0c2160e01b81526001600160a01b03841660048201526024016102bb565b6004825110156108df5781516004604051631a64813d60e11b81526004016102bb929190918252602082015260400190565b6002546001600160a01b0316801580159061095f5750604051634b19276b60e11b81526001600160a01b0385811660048301528216906396324ed690602401602060405180830381865afa158015610939573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061095d9190610e4b565b155b1561098857604051633df7a39d60e21b81526001600160a01b03851660048201526024016102bb565b5f80549061099582610c54565b90505f604051806020016109a890610caf565b601f1982820381018352601f9091011660408190526109d591906001600160a01b038a1690602001610e7d565b6040516020818303038152906040529050818151826020015ff594506001600160a01b038516610a23576040516329c25ebd60e11b81526001600160a01b03881660048201526024016102bb565b5f80866001600160a01b031688604051610a3d9190610e95565b5f604051808303815f865af19150503d805f8114610a76576040519150601f19603f3d011682016040523d82523d5f602084013e610a7b565b606091505b509150915081610ab957805115610a955780518082602001fd5b604051633c4c93c960e21b81526001600160a01b03881660048201526024016102bb565b6001600160a01b03861615801590610b3e57506040516369be670b60e01b81526001600160a01b0388811660048301528a811660248301528716906369be670b90604401602060405180830381865afa158015610b18573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b3c9190610e4b565b155b15610b6757604051630a7f26af60e21b81526001600160a01b03881660048201526024016102bb565b604080516060810182526001600160a01b038b8116825233602080840191825260018486018181528d85165f908152600490935295909120845181546001600160a01b0319169085161781559151918101805495519290931674ffffffffffffffffffffffffffffffffffffffffff1990951694909417600160a01b9115159190910217905590610bf9908790610eb4565b5f9081556040516001600160a01b03808d1692908b169133917fc88bd7cfbe8bae024ebb6f3cf291adfd7db2588a07e1c78768ea3c81b992496b91a45050600160035550939695505050505050565b5f6105ff825f54610531565b5f468233610c63600143610ec7565b6040805160208101959095528401929092526001600160a01b031660608301524060808201524260a082015260c001604051602081830303815290604052805190602001209050919050565b6101e780610edb83390190565b80356001600160a01b0381168114610cd2575f80fd5b919050565b8015158114610ce4575f80fd5b50565b5f8060408385031215610cf8575f80fd5b610d0183610cbc565b91506020830135610d1181610cd7565b809150509250929050565b5f60208284031215610d2c575f80fd5b610d3582610cbc565b9392505050565b5f8060408385031215610d4d575f80fd5b610d5683610cbc565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215610d89575f80fd5b610d9283610cbc565b9150602083013567ffffffffffffffff80821115610dae575f80fd5b818501915085601f830112610dc1575f80fd5b813581811115610dd357610dd3610d64565b604051601f8201601f19908116603f01168101908382118183101715610dfb57610dfb610d64565b81604052828152886020848701011115610e13575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f60208284031215610e44575f80fd5b5051919050565b5f60208284031215610e5b575f80fd5b8151610d3581610cd7565b5f81518060208401855e5f93019283525090919050565b5f610e888285610e66565b9283525050602001919050565b5f610d358284610e66565b634e487b7160e01b5f52601160045260245ffd5b808201808211156105ff576105ff610ea0565b818103818111156105ff576105ff610ea056fe6080604052348015600e575f80fd5b506040516101e73803806101e7833981016040819052602b916077565b6001600160a01b03811660515760405163d02c623d60e01b815260040160405180910390fd5b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5560a2565b5f602082840312156086575f80fd5b81516001600160a01b0381168114609b575f80fd5b9392505050565b610138806100af5f395ff3fe608060405260043610610028575f3560e01c806346032dbc14610069578063aaf10f42146100af575b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e54365f80375f80365f845af490503d5f803e80610064573d5ffd5b503d5ff35b348015610074575f80fd5b5061009c7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e81565b6040519081526020015b60405180910390f35b3480156100ba575f80fd5b507f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a656fea2646970667358221220cd2f3d25e9410d8ca6f1f5af516d26b4d6351d087dd182806de06350446497fb64736f6c63430008190033a2646970667358221220c7c877e3bd5012d4b978ad07d61e0409822a9c5c93866ac784dc412bf002521164736f6c63430008190033", + "bytecode": "0x608060405260016003553480156013575f80fd5b5060405161118b38038061118b8339810160408190526030916062565b60018054336001600160a01b031991821617909155600280549091166001600160a01b0392909216919091179055608d565b5f602082840312156071575f80fd5b81516001600160a01b03811681146086575f80fd5b9392505050565b6110f18061009a5f395ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638da5cb5b11610088578063cf04fb9411610063578063cf04fb94146101ce578063e8dc705a146101e1578063ec2ee1f614610248578063fa2a5b011461025b575f80fd5b80638da5cb5b146101a0578063a6f9dae1146101b3578063affed0e0146101c6575f80fd5b80633ce3778c116100c35780633ce3778c1461014f578063479e372e14610157578063555b8adb1461017a578063830a322a1461018d575f80fd5b8063118e24bd146100e95780631eda94d7146100fe5780632b7ac3f314610124575b5f80fd5b6100fc6100f7366004610ce1565b61026e565b005b61011161010c366004610d16565b610347565b6040519081526020015b60405180910390f35b600254610137906001600160a01b031681565b6040516001600160a01b03909116815260200161011b565b610111600481565b61016a610165366004610d16565b61045e565b604051901515815260200161011b565b610137610188366004610d36565b61052b565b6100fc61019b366004610d16565b6105ff565b600154610137906001600160a01b031681565b6100fc6101c1366004610d16565b6106e8565b6101115f5481565b6100fc6101dc366004610d16565b610798565b6102206101ef366004610d16565b60046020525f9081526040902080546001909101546001600160a01b0391821691811690600160a01b900460ff1683565b604080516001600160a01b03948516815293909216602084015215159082015260600161011b565b610137610256366004610d72565b610821565b610137610269366004610d16565b610c42565b6001600160a01b038083165f90815260046020526040902060018101549091163381146102c45760405163521eb56d60e11b81523360048201526001600160a01b03821660248201526044015b60405180910390fd5b600182018054841515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040516001600160a01b038516907f11126b4c1d3b69d7dd553c2f8b2be5f8fabfe22552ceffc3240126fdc087eca09061033990861515815260200190565b60405180910390a250505050565b6001600160a01b0381165f90815260046020526040812060010154600160a01b900460ff168015610458576002546001600160a01b031680156103f357604051630e1e19e160e21b81526001600160a01b038581166004830152821690633878678490602401602060405180830381865afa1580156103c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ec9190610e2e565b9250610456565b836001600160a01b031663957323616040518163ffffffff1660e01b8152600401602060405180830381865afa15801561042f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104539190610e2e565b92505b505b50919050565b6001600160a01b0381165f9081526004602052604081206001810154600160a01b900460ff168061049257505f9392505050565b6002546001600160a01b031680156105205782546040516369be670b60e01b81526001600160a01b0387811660048301529182166024820152908216906369be670b90604401602060405180830381865afa1580156104f3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105179190610e45565b95945050505050565b506001949350505050565b5f8061053683610c4e565b90505f6040518060200161054990610ca9565b601f1982820381018352601f90910116604081905261057691906001600160a01b03881690602001610e77565b60408051808303601f1901815282825280516020918201207fff00000000000000000000000000000000000000000000000000000000000000828501523060601b6bffffffffffffffffffffffff191660218501526035840195909552605580840195909552815180840390950185526075909201905282519201919091209150505b92915050565b6001546001600160a01b0316331461063f5760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b038082165f90815260046020526040902060010154168061067a5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382165f8181526004602052604080822080546001600160a01b0319168155600101805474ffffffffffffffffffffffffffffffffffffffffff19169055517f5e8652b9d1a24d82bfe7a9bfae71e26899d688827382d41f69b1c79342c586aa9190a25050565b6001546001600160a01b031633146107285760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b03811661074f5760405163d92e233d60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6001546001600160a01b031633146107d85760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b600280546001600160a01b0319166001600160a01b0383169081179091556040517fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee327905f90a250565b5f60016003541115610846576040516345f5ce8b60e11b815260040160405180910390fd5b60026003556001600160a01b0383166108725760405163d92e233d60e01b815260040160405180910390fd5b826001600160a01b03163b5f036108a75760405163601c0c2160e01b81526001600160a01b03841660048201526024016102bb565b6004825110156108d95781516004604051631a64813d60e11b81526004016102bb929190918252602082015260400190565b6002546001600160a01b031680158015906109595750604051634b19276b60e11b81526001600160a01b0385811660048301528216906396324ed690602401602060405180830381865afa158015610933573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109579190610e45565b155b1561098257604051633df7a39d60e21b81526001600160a01b03851660048201526024016102bb565b5f80549061098f82610c4e565b90505f604051806020016109a290610ca9565b601f1982820381018352601f9091011660408190526109cf91906001600160a01b038a1690602001610e77565b6040516020818303038152906040529050818151826020015ff594506001600160a01b038516610a1d576040516329c25ebd60e11b81526001600160a01b03881660048201526024016102bb565b5f80866001600160a01b031688604051610a379190610e8f565b5f604051808303815f865af19150503d805f8114610a70576040519150601f19603f3d011682016040523d82523d5f602084013e610a75565b606091505b509150915081610ab357805115610a8f5780518082602001fd5b604051633c4c93c960e21b81526001600160a01b03881660048201526024016102bb565b6001600160a01b03861615801590610b3857506040516369be670b60e01b81526001600160a01b0388811660048301528a811660248301528716906369be670b90604401602060405180830381865afa158015610b12573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b369190610e45565b155b15610b6157604051630a7f26af60e21b81526001600160a01b03881660048201526024016102bb565b604080516060810182526001600160a01b038b8116825233602080840191825260018486018181528d85165f908152600490935295909120845181546001600160a01b0319169085161781559151918101805495519290931674ffffffffffffffffffffffffffffffffffffffffff1990951694909417600160a01b9115159190910217905590610bf3908790610eae565b5f9081556040516001600160a01b03808d1692908b169133917fc88bd7cfbe8bae024ebb6f3cf291adfd7db2588a07e1c78768ea3c81b992496b91a45050600160035550939695505050505050565b5f6105f9825f5461052b565b5f468233610c5d600143610ec1565b6040805160208101959095528401929092526001600160a01b031660608301524060808201524260a082015260c001604051602081830303815290604052805190602001209050919050565b6101e780610ed583390190565b80356001600160a01b0381168114610ccc575f80fd5b919050565b8015158114610cde575f80fd5b50565b5f8060408385031215610cf2575f80fd5b610cfb83610cb6565b91506020830135610d0b81610cd1565b809150509250929050565b5f60208284031215610d26575f80fd5b610d2f82610cb6565b9392505050565b5f8060408385031215610d47575f80fd5b610d5083610cb6565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215610d83575f80fd5b610d8c83610cb6565b9150602083013567ffffffffffffffff80821115610da8575f80fd5b818501915085601f830112610dbb575f80fd5b813581811115610dcd57610dcd610d5e565b604051601f8201601f19908116603f01168101908382118183101715610df557610df5610d5e565b81604052828152886020848701011115610e0d575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f60208284031215610e3e575f80fd5b5051919050565b5f60208284031215610e55575f80fd5b8151610d2f81610cd1565b5f81518060208401855e5f93019283525090919050565b5f610e828285610e60565b9283525050602001919050565b5f610d2f8284610e60565b634e487b7160e01b5f52601160045260245ffd5b808201808211156105f9576105f9610e9a565b818103818111156105f9576105f9610e9a56fe6080604052348015600e575f80fd5b506040516101e73803806101e7833981016040819052602b916077565b6001600160a01b03811660515760405163d02c623d60e01b815260040160405180910390fd5b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5560a2565b5f602082840312156086575f80fd5b81516001600160a01b0381168114609b575f80fd5b9392505050565b610138806100af5f395ff3fe608060405260043610610028575f3560e01c806346032dbc14610069578063aaf10f42146100af575b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e54365f80375f80365f845af490503d5f803e80610064573d5ffd5b503d5ff35b348015610074575f80fd5b5061009c7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e81565b6040519081526020015b60405180910390f35b3480156100ba575f80fd5b507f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a656fea2646970667358221220cd2f3d25e9410d8ca6f1f5af516d26b4d6351d087dd182806de06350446497fb64736f6c63430008190033a26469706673582212209a2b8899eff7db77f389f3bc8db3f5d03ac4169347fce9e27d153c5738c0afcd64736f6c63430008190033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638da5cb5b11610088578063cf04fb9411610063578063cf04fb94146101ce578063e8dc705a146101e1578063ec2ee1f614610248578063fa2a5b011461025b575f80fd5b80638da5cb5b146101a0578063a6f9dae1146101b3578063affed0e0146101c6575f80fd5b80633ce3778c116100c35780633ce3778c1461014f578063479e372e14610157578063555b8adb1461017a578063830a322a1461018d575f80fd5b8063118e24bd146100e95780631eda94d7146100fe5780632b7ac3f314610124575b5f80fd5b6100fc6100f7366004610ce1565b61026e565b005b61011161010c366004610d16565b610347565b6040519081526020015b60405180910390f35b600254610137906001600160a01b031681565b6040516001600160a01b03909116815260200161011b565b610111600481565b61016a610165366004610d16565b61045e565b604051901515815260200161011b565b610137610188366004610d36565b61052b565b6100fc61019b366004610d16565b6105ff565b600154610137906001600160a01b031681565b6100fc6101c1366004610d16565b6106e8565b6101115f5481565b6100fc6101dc366004610d16565b610798565b6102206101ef366004610d16565b60046020525f9081526040902080546001909101546001600160a01b0391821691811690600160a01b900460ff1683565b604080516001600160a01b03948516815293909216602084015215159082015260600161011b565b610137610256366004610d72565b610821565b610137610269366004610d16565b610c42565b6001600160a01b038083165f90815260046020526040902060018101549091163381146102c45760405163521eb56d60e11b81523360048201526001600160a01b03821660248201526044015b60405180910390fd5b600182018054841515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff9091161790556040516001600160a01b038516907f11126b4c1d3b69d7dd553c2f8b2be5f8fabfe22552ceffc3240126fdc087eca09061033990861515815260200190565b60405180910390a250505050565b6001600160a01b0381165f90815260046020526040812060010154600160a01b900460ff168015610458576002546001600160a01b031680156103f357604051630e1e19e160e21b81526001600160a01b038581166004830152821690633878678490602401602060405180830381865afa1580156103c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103ec9190610e2e565b9250610456565b836001600160a01b031663957323616040518163ffffffff1660e01b8152600401602060405180830381865afa15801561042f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104539190610e2e565b92505b505b50919050565b6001600160a01b0381165f9081526004602052604081206001810154600160a01b900460ff168061049257505f9392505050565b6002546001600160a01b031680156105205782546040516369be670b60e01b81526001600160a01b0387811660048301529182166024820152908216906369be670b90604401602060405180830381865afa1580156104f3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105179190610e45565b95945050505050565b506001949350505050565b5f8061053683610c4e565b90505f6040518060200161054990610ca9565b601f1982820381018352601f90910116604081905261057691906001600160a01b03881690602001610e77565b60408051808303601f1901815282825280516020918201207fff00000000000000000000000000000000000000000000000000000000000000828501523060601b6bffffffffffffffffffffffff191660218501526035840195909552605580840195909552815180840390950185526075909201905282519201919091209150505b92915050565b6001546001600160a01b0316331461063f5760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b038082165f90815260046020526040902060010154168061067a5760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b0382165f8181526004602052604080822080546001600160a01b0319168155600101805474ffffffffffffffffffffffffffffffffffffffffff19169055517f5e8652b9d1a24d82bfe7a9bfae71e26899d688827382d41f69b1c79342c586aa9190a25050565b6001546001600160a01b031633146107285760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b6001600160a01b03811661074f5760405163d92e233d60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6001546001600160a01b031633146107d85760015460405163521eb56d60e11b81523360048201526001600160a01b0390911660248201526044016102bb565b600280546001600160a01b0319166001600160a01b0383169081179091556040517fd24015cc99cc1700cafca3042840a1d8ac1e3964fd2e0e37ea29c654056ee327905f90a250565b5f60016003541115610846576040516345f5ce8b60e11b815260040160405180910390fd5b60026003556001600160a01b0383166108725760405163d92e233d60e01b815260040160405180910390fd5b826001600160a01b03163b5f036108a75760405163601c0c2160e01b81526001600160a01b03841660048201526024016102bb565b6004825110156108d95781516004604051631a64813d60e11b81526004016102bb929190918252602082015260400190565b6002546001600160a01b031680158015906109595750604051634b19276b60e11b81526001600160a01b0385811660048301528216906396324ed690602401602060405180830381865afa158015610933573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109579190610e45565b155b1561098257604051633df7a39d60e21b81526001600160a01b03851660048201526024016102bb565b5f80549061098f82610c4e565b90505f604051806020016109a290610ca9565b601f1982820381018352601f9091011660408190526109cf91906001600160a01b038a1690602001610e77565b6040516020818303038152906040529050818151826020015ff594506001600160a01b038516610a1d576040516329c25ebd60e11b81526001600160a01b03881660048201526024016102bb565b5f80866001600160a01b031688604051610a379190610e8f565b5f604051808303815f865af19150503d805f8114610a70576040519150601f19603f3d011682016040523d82523d5f602084013e610a75565b606091505b509150915081610ab357805115610a8f5780518082602001fd5b604051633c4c93c960e21b81526001600160a01b03881660048201526024016102bb565b6001600160a01b03861615801590610b3857506040516369be670b60e01b81526001600160a01b0388811660048301528a811660248301528716906369be670b90604401602060405180830381865afa158015610b12573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b369190610e45565b155b15610b6157604051630a7f26af60e21b81526001600160a01b03881660048201526024016102bb565b604080516060810182526001600160a01b038b8116825233602080840191825260018486018181528d85165f908152600490935295909120845181546001600160a01b0319169085161781559151918101805495519290931674ffffffffffffffffffffffffffffffffffffffffff1990951694909417600160a01b9115159190910217905590610bf3908790610eae565b5f9081556040516001600160a01b03808d1692908b169133917fc88bd7cfbe8bae024ebb6f3cf291adfd7db2588a07e1c78768ea3c81b992496b91a45050600160035550939695505050505050565b5f6105f9825f5461052b565b5f468233610c5d600143610ec1565b6040805160208101959095528401929092526001600160a01b031660608301524060808201524260a082015260c001604051602081830303815290604052805190602001209050919050565b6101e780610ed583390190565b80356001600160a01b0381168114610ccc575f80fd5b919050565b8015158114610cde575f80fd5b50565b5f8060408385031215610cf2575f80fd5b610cfb83610cb6565b91506020830135610d0b81610cd1565b809150509250929050565b5f60208284031215610d26575f80fd5b610d2f82610cb6565b9392505050565b5f8060408385031215610d47575f80fd5b610d5083610cb6565b946020939093013593505050565b634e487b7160e01b5f52604160045260245ffd5b5f8060408385031215610d83575f80fd5b610d8c83610cb6565b9150602083013567ffffffffffffffff80821115610da8575f80fd5b818501915085601f830112610dbb575f80fd5b813581811115610dcd57610dcd610d5e565b604051601f8201601f19908116603f01168101908382118183101715610df557610df5610d5e565b81604052828152886020848701011115610e0d575f80fd5b826020860160208301375f6020848301015280955050505050509250929050565b5f60208284031215610e3e575f80fd5b5051919050565b5f60208284031215610e55575f80fd5b8151610d2f81610cd1565b5f81518060208401855e5f93019283525090919050565b5f610e828285610e60565b9283525050602001919050565b5f610d2f8284610e60565b634e487b7160e01b5f52601160045260245ffd5b808201808211156105f9576105f9610e9a565b818103818111156105f9576105f9610e9a56fe6080604052348015600e575f80fd5b506040516101e73803806101e7833981016040819052602b916077565b6001600160a01b03811660515760405163d02c623d60e01b815260040160405180910390fd5b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5560a2565b5f602082840312156086575f80fd5b81516001600160a01b0381168114609b575f80fd5b9392505050565b610138806100af5f395ff3fe608060405260043610610028575f3560e01c806346032dbc14610069578063aaf10f42146100af575b7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e54365f80375f80365f845af490503d5f803e80610064573d5ffd5b503d5ff35b348015610074575f80fd5b5061009c7f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e81565b6040519081526020015b60405180910390f35b3480156100ba575f80fd5b507f9e5e169c1098011e4e5940a3ec1797686b2a8294a9b77a4c676b121bdc0ebb5e5460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a656fea2646970667358221220cd2f3d25e9410d8ca6f1f5af516d26b4d6351d087dd182806de06350446497fb64736f6c63430008190033a26469706673582212209a2b8899eff7db77f389f3bc8db3f5d03ac4169347fce9e27d153c5738c0afcd64736f6c63430008190033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/abis/0.8.25/StakingVerifier.json b/abis/0.8.25/StakingVerifier.json index 3b36f347..cb535fa2 100644 --- a/abis/0.8.25/StakingVerifier.json +++ b/abis/0.8.25/StakingVerifier.json @@ -22,7 +22,7 @@ }, { "internalType": "uint256", - "name": "_rewardsPerSecondLimit", + "name": "_minStakingDepositLimit", "type": "uint256" }, { @@ -34,6 +34,11 @@ "internalType": "uint256", "name": "_numServicesLimit", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_apyLimit", + "type": "uint256" } ], "stateMutability": "nonpayable", @@ -138,7 +143,7 @@ { "indexed": false, "internalType": "uint256", - "name": "rewardsPerSecondLimit", + "name": "minStakingDepositLimit", "type": "uint256" }, { @@ -150,19 +155,45 @@ { "indexed": false, "internalType": "uint256", - "name": "_numServicesLimit", + "name": "numServicesLimit", "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "emissionsLimit", + "name": "apyLimit", "type": "uint256" } ], "name": "StakingLimitsUpdated", "type": "event" }, + { + "inputs": [], + "name": "ONE_YEAR", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "apyLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -180,7 +211,7 @@ "inputs": [ { "internalType": "uint256", - "name": "_rewardsPerSecondLimit", + "name": "_minStakingDepositLimit", "type": "uint256" }, { @@ -192,31 +223,23 @@ "internalType": "uint256", "name": "_numServicesLimit", "type": "uint256" - } - ], - "name": "changeStakingLimits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "emissionsLimit", - "outputs": [ + }, { "internalType": "uint256", - "name": "", + "name": "_apyLimit", "type": "uint256" } ], - "stateMutability": "view", + "name": "changeStakingLimits", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "instance", "type": "address" } ], @@ -224,7 +247,7 @@ "outputs": [ { "internalType": "uint256", - "name": "", + "name": "amount", "type": "uint256" } ], @@ -265,7 +288,7 @@ }, { "inputs": [], - "name": "numServicesLimit", + "name": "minStakingDepositLimit", "outputs": [ { "internalType": "uint256", @@ -278,12 +301,12 @@ }, { "inputs": [], - "name": "olas", + "name": "numServicesLimit", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -291,7 +314,7 @@ }, { "inputs": [], - "name": "owner", + "name": "olas", "outputs": [ { "internalType": "address", @@ -304,12 +327,12 @@ }, { "inputs": [], - "name": "rewardsPerSecondLimit", + "name": "owner", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", @@ -434,8 +457,8 @@ "type": "function" } ], - "bytecode": "0x60e060405234801561000f575f80fd5b5060405161111038038061111083398101604081905261002e91610113565b6001600160a01b038616158061004b57506001600160a01b038516155b156100695760405163d92e233d60e01b815260040160405180910390fd5b821580610074575081155b8061007d575080155b1561009b57604051637c946ed760e01b815260040160405180910390fd5b600480546001600160a01b031916331790556001600160a01b0386811660805285811660a052841660c0525f83905560018290556002819055806100df838561016e565b6100e9919061016e565b60035550610197945050505050565b80516001600160a01b038116811461010e575f80fd5b919050565b5f805f805f8060c08789031215610128575f80fd5b610131876100f8565b955061013f602088016100f8565b945061014d604088016100f8565b9350606087015192506080870151915060a087015190509295509295509295565b808202811582820484141761019157634e487b7160e01b5f52601160045260245ffd5b92915050565b60805160a05160c051610f336101dd5f395f81816101bf015281816107c101526108a301525f8181610287015261055f01525f818161011d01526107520152610f335ff3fe608060405234801561000f575f80fd5b5060043610610114575f3560e01c80638da5cb5b116100ad578063a6f9dae11161007d578063c78c050e11610063578063c78c050e1461027a578063cbcf252a14610282578063fcf7684e146102a9575f80fd5b8063a6f9dae114610254578063c446841814610267575f80fd5b80638da5cb5b1461021257806396324ed6146102255780639ac28fa0146102385780639ce0588514610241575f80fd5b806328714051116100e857806328714051146101ba57806338786784146101e1578063517c0a8f146101f657806369be670b146101ff575f80fd5b806231d115146101185780630bea55ed1461015c5780630d93650c146101715780631aa402f0146101a3575b5f80fd5b61013f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61016f61016a366004610c85565b6102bd565b005b61019361017f366004610d50565b60056020525f908152604090205460ff1681565b6040519015158152602001610153565b6101ac60035481565b604051908152602001610153565b61013f7f000000000000000000000000000000000000000000000000000000000000000081565b6101ac6101ef366004610d50565b5060035490565b6101ac60025481565b61019361020d366004610d72565b610456565b60045461013f906001600160a01b031681565b610193610233366004610d50565b6108fe565b6101ac60015481565b61016f61024f366004610da9565b610938565b61016f610262366004610d50565b610a1b565b61016f610275366004610dd2565b610ae4565b6101ac5f5481565b61013f7f000000000000000000000000000000000000000000000000000000000000000081565b60045461019390600160a01b900460ff1681565b6004546001600160a01b03163314610305576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044015b60405180910390fd5b8251158061031557508151835114155b1561034057825182516040516308151c1160e41b8152600481019290925260248201526044016102fc565b6004805460ff60a01b1916600160a01b831515021790555f5b8351811015610415575f6001600160a01b031684828151811061037e5761037e610deb565b60200260200101516001600160a01b0316036103ad5760405163d92e233d60e01b815260040160405180910390fd5b8281815181106103bf576103bf610deb565b602002602001015160055f8684815181106103dc576103dc610deb565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff1916911515919091179055600101610359565b507fa75993bdbe9ad771324babfee934d208587d3321632d15aa92547ee71226354183838360405161044993929190610dff565b60405180910390a1505050565b6004545f90600160a01b900460ff16801561048957506001600160a01b0382165f9081526005602052604090205460ff16155b1561049557505f6108f8565b826001600160a01b03163b5f036104ad57505f6108f8565b60408051600481526024810182526020810180516001600160e01b03166365e7929560e11b17905290515f9081906001600160a01b038716906104f1908590610e92565b5f60405180830381855afa9150503d805f8114610529576040519150601f19603f3d011682016040523d82523d5f602084013e61052e565b606091505b5091509150818015610541575080516020145b156105a8575f8180602001905181019061055b9190610ea8565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316146105a2575f9450505050506108f8565b506105b3565b5f93505050506108f8565b5f866001600160a01b031663eacdaabc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106149190610ec3565b90505f5481111561062b575f9450505050506108f8565b5f876001600160a01b03166316a751726040518163ffffffff1660e01b8152600401602060405180830381865afa158015610668573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061068c9190610ec3565b90506002548111156106a5575f955050505050506108f8565b60408051600481526024810182526020810180516001600160e01b03166372f702f360e01b17905290515f91906001600160a01b038b16906106e8908390610e92565b5f60405180830381855afa9150503d805f8114610720576040519150601f19603f3d011682016040523d82523d5f602084013e610725565b606091505b50909650945085156107ac57845160200361079d578480602001905181019061074e9190610ea8565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610798575f9750505050505050506108f8565b6107ac565b5f9750505050505050506108f8565b6001600160a01b038216158015906107ec57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615155b156108ec5760408051600481526024810182526020810180516001600160e01b0316632871405160e01b17905290519097506001600160a01b038b1690610834908990610e92565b5f60405180830381855afa9150503d805f811461086c576040519150601f19603f3d011682016040523d82523d5f602084013e610871565b606091505b509096509450858015610885575084516020145b1561079d575f8580602001905181019061089f9190610ea8565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316146108ea575f985050505050505050506108f8565b505b60019750505050505050505b92915050565b6004545f90600160a01b900460ff161561093057506001600160a01b03165f9081526005602052604090205460ff1690565b506001919050565b6004546001600160a01b0316331461097b576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044016102fc565b821580610986575081155b8061098f575080155b156109ad57604051637c946ed760e01b815260040160405180910390fd5b5f83905560018290556002819055806109c68385610eda565b6109d09190610eda565b6003819055604080518581526020810185905290810183905260608101919091527faf40dfd820e3c4d9869867d01bef72bc7355b89f888bde8f0e24025202b0d74590608001610449565b6004546001600160a01b03163314610a5c576004805460405163521eb56d60e11b815233928101929092526001600160a01b031660248201526044016102fc565b6001600160a01b038116610a835760405163d92e233d60e01b815260040160405180910390fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6004546001600160a01b03163314610b27576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044016102fc565b60048054821515600160a01b0260ff60a01b199091161790556040517fdc17e046a4e55c5445deae0e2503d60b1ce5ecce83a0dc62c9066bbc7f39db5690610b7490831515815260200190565b60405180910390a150565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610bbc57610bbc610b7f565b604052919050565b5f67ffffffffffffffff821115610bdd57610bdd610b7f565b5060051b60200190565b6001600160a01b0381168114610bfb575f80fd5b50565b80358015158114610c0d575f80fd5b919050565b5f82601f830112610c21575f80fd5b81356020610c36610c3183610bc4565b610b93565b8083825260208201915060208460051b870101935086841115610c57575f80fd5b602086015b84811015610c7a57610c6d81610bfe565b8352918301918301610c5c565b509695505050505050565b5f805f60608486031215610c97575f80fd5b833567ffffffffffffffff80821115610cae575f80fd5b818601915086601f830112610cc1575f80fd5b81356020610cd1610c3183610bc4565b82815260059290921b8401810191818101908a841115610cef575f80fd5b948201945b83861015610d16578535610d0781610be7565b82529482019490820190610cf4565b97505087013592505080821115610d2b575f80fd5b50610d3886828701610c12565b925050610d4760408501610bfe565b90509250925092565b5f60208284031215610d60575f80fd5b8135610d6b81610be7565b9392505050565b5f8060408385031215610d83575f80fd5b8235610d8e81610be7565b91506020830135610d9e81610be7565b809150509250929050565b5f805f60608486031215610dbb575f80fd5b505081359360208301359350604090920135919050565b5f60208284031215610de2575f80fd5b610d6b82610bfe565b634e487b7160e01b5f52603260045260245ffd5b606080825284519082018190525f906020906080840190828801845b82811015610e405781516001600160a01b031684529284019290840190600101610e1b565b505050838103828501528551808252868301918301905f5b81811015610e76578351151583529284019291840191600101610e58565b505085151560408601529250610e8a915050565b949350505050565b5f82518060208501845e5f920191825250919050565b5f60208284031215610eb8575f80fd5b8151610d6b81610be7565b5f60208284031215610ed3575f80fd5b5051919050565b80820281158282048414176108f857634e487b7160e01b5f52601160045260245ffdfea26469706673582212208933ee8226784fa65f3039186c4694256c4f04d99d1ca1452b60e57ea9427bd864736f6c63430008190033", - "deployedBytecode": "0x608060405234801561000f575f80fd5b5060043610610114575f3560e01c80638da5cb5b116100ad578063a6f9dae11161007d578063c78c050e11610063578063c78c050e1461027a578063cbcf252a14610282578063fcf7684e146102a9575f80fd5b8063a6f9dae114610254578063c446841814610267575f80fd5b80638da5cb5b1461021257806396324ed6146102255780639ac28fa0146102385780639ce0588514610241575f80fd5b806328714051116100e857806328714051146101ba57806338786784146101e1578063517c0a8f146101f657806369be670b146101ff575f80fd5b806231d115146101185780630bea55ed1461015c5780630d93650c146101715780631aa402f0146101a3575b5f80fd5b61013f7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b61016f61016a366004610c85565b6102bd565b005b61019361017f366004610d50565b60056020525f908152604090205460ff1681565b6040519015158152602001610153565b6101ac60035481565b604051908152602001610153565b61013f7f000000000000000000000000000000000000000000000000000000000000000081565b6101ac6101ef366004610d50565b5060035490565b6101ac60025481565b61019361020d366004610d72565b610456565b60045461013f906001600160a01b031681565b610193610233366004610d50565b6108fe565b6101ac60015481565b61016f61024f366004610da9565b610938565b61016f610262366004610d50565b610a1b565b61016f610275366004610dd2565b610ae4565b6101ac5f5481565b61013f7f000000000000000000000000000000000000000000000000000000000000000081565b60045461019390600160a01b900460ff1681565b6004546001600160a01b03163314610305576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044015b60405180910390fd5b8251158061031557508151835114155b1561034057825182516040516308151c1160e41b8152600481019290925260248201526044016102fc565b6004805460ff60a01b1916600160a01b831515021790555f5b8351811015610415575f6001600160a01b031684828151811061037e5761037e610deb565b60200260200101516001600160a01b0316036103ad5760405163d92e233d60e01b815260040160405180910390fd5b8281815181106103bf576103bf610deb565b602002602001015160055f8684815181106103dc576103dc610deb565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff1916911515919091179055600101610359565b507fa75993bdbe9ad771324babfee934d208587d3321632d15aa92547ee71226354183838360405161044993929190610dff565b60405180910390a1505050565b6004545f90600160a01b900460ff16801561048957506001600160a01b0382165f9081526005602052604090205460ff16155b1561049557505f6108f8565b826001600160a01b03163b5f036104ad57505f6108f8565b60408051600481526024810182526020810180516001600160e01b03166365e7929560e11b17905290515f9081906001600160a01b038716906104f1908590610e92565b5f60405180830381855afa9150503d805f8114610529576040519150601f19603f3d011682016040523d82523d5f602084013e61052e565b606091505b5091509150818015610541575080516020145b156105a8575f8180602001905181019061055b9190610ea8565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316146105a2575f9450505050506108f8565b506105b3565b5f93505050506108f8565b5f866001600160a01b031663eacdaabc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105f0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106149190610ec3565b90505f5481111561062b575f9450505050506108f8565b5f876001600160a01b03166316a751726040518163ffffffff1660e01b8152600401602060405180830381865afa158015610668573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061068c9190610ec3565b90506002548111156106a5575f955050505050506108f8565b60408051600481526024810182526020810180516001600160e01b03166372f702f360e01b17905290515f91906001600160a01b038b16906106e8908390610e92565b5f60405180830381855afa9150503d805f8114610720576040519150601f19603f3d011682016040523d82523d5f602084013e610725565b606091505b50909650945085156107ac57845160200361079d578480602001905181019061074e9190610ea8565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610798575f9750505050505050506108f8565b6107ac565b5f9750505050505050506108f8565b6001600160a01b038216158015906107ec57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615155b156108ec5760408051600481526024810182526020810180516001600160e01b0316632871405160e01b17905290519097506001600160a01b038b1690610834908990610e92565b5f60405180830381855afa9150503d805f811461086c576040519150601f19603f3d011682016040523d82523d5f602084013e610871565b606091505b509096509450858015610885575084516020145b1561079d575f8580602001905181019061089f9190610ea8565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316146108ea575f985050505050505050506108f8565b505b60019750505050505050505b92915050565b6004545f90600160a01b900460ff161561093057506001600160a01b03165f9081526005602052604090205460ff1690565b506001919050565b6004546001600160a01b0316331461097b576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044016102fc565b821580610986575081155b8061098f575080155b156109ad57604051637c946ed760e01b815260040160405180910390fd5b5f83905560018290556002819055806109c68385610eda565b6109d09190610eda565b6003819055604080518581526020810185905290810183905260608101919091527faf40dfd820e3c4d9869867d01bef72bc7355b89f888bde8f0e24025202b0d74590608001610449565b6004546001600160a01b03163314610a5c576004805460405163521eb56d60e11b815233928101929092526001600160a01b031660248201526044016102fc565b6001600160a01b038116610a835760405163d92e233d60e01b815260040160405180910390fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6004546001600160a01b03163314610b27576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044016102fc565b60048054821515600160a01b0260ff60a01b199091161790556040517fdc17e046a4e55c5445deae0e2503d60b1ce5ecce83a0dc62c9066bbc7f39db5690610b7490831515815260200190565b60405180910390a150565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610bbc57610bbc610b7f565b604052919050565b5f67ffffffffffffffff821115610bdd57610bdd610b7f565b5060051b60200190565b6001600160a01b0381168114610bfb575f80fd5b50565b80358015158114610c0d575f80fd5b919050565b5f82601f830112610c21575f80fd5b81356020610c36610c3183610bc4565b610b93565b8083825260208201915060208460051b870101935086841115610c57575f80fd5b602086015b84811015610c7a57610c6d81610bfe565b8352918301918301610c5c565b509695505050505050565b5f805f60608486031215610c97575f80fd5b833567ffffffffffffffff80821115610cae575f80fd5b818601915086601f830112610cc1575f80fd5b81356020610cd1610c3183610bc4565b82815260059290921b8401810191818101908a841115610cef575f80fd5b948201945b83861015610d16578535610d0781610be7565b82529482019490820190610cf4565b97505087013592505080821115610d2b575f80fd5b50610d3886828701610c12565b925050610d4760408501610bfe565b90509250925092565b5f60208284031215610d60575f80fd5b8135610d6b81610be7565b9392505050565b5f8060408385031215610d83575f80fd5b8235610d8e81610be7565b91506020830135610d9e81610be7565b809150509250929050565b5f805f60608486031215610dbb575f80fd5b505081359360208301359350604090920135919050565b5f60208284031215610de2575f80fd5b610d6b82610bfe565b634e487b7160e01b5f52603260045260245ffd5b606080825284519082018190525f906020906080840190828801845b82811015610e405781516001600160a01b031684529284019290840190600101610e1b565b505050838103828501528551808252868301918301905f5b81811015610e76578351151583529284019291840191600101610e58565b505085151560408601529250610e8a915050565b949350505050565b5f82518060208501845e5f920191825250919050565b5f60208284031215610eb8575f80fd5b8151610d6b81610be7565b5f60208284031215610ed3575f80fd5b5051919050565b80820281158282048414176108f857634e487b7160e01b5f52601160045260245ffdfea26469706673582212208933ee8226784fa65f3039186c4694256c4f04d99d1ca1452b60e57ea9427bd864736f6c63430008190033", + "bytecode": "0x60e060405234801561000f575f80fd5b506040516112be3803806112be83398101604081905261002e91610102565b6001600160a01b038716158061004b57506001600160a01b038616155b156100695760405163d92e233d60e01b815260040160405180910390fd5b831580610074575082155b8061007d575081155b80610086575080155b156100a457604051637c946ed760e01b815260040160405180910390fd5b600480546001600160a01b031916331790556001600160a01b0396871660805294861660a0529290941660c0525f55600192909255600291909155600355610167565b80516001600160a01b03811681146100fd575f80fd5b919050565b5f805f805f805f60e0888a031215610118575f80fd5b610121886100e7565b965061012f602089016100e7565b955061013d604089016100e7565b9450606088015193506080880151925060a0880151915060c0880151905092959891949750929550565b60805160a05160c0516111116101ad5f395f81816101ee01528181610a590152610b3b01525f81816102aa01526106c801525f818161013701526109e401526111115ff3fe608060405234801561000f575f80fd5b506004361061012e575f3560e01c806369be670b116100ad578063a3ba9aef1161007d578063c446841811610063578063c446841814610292578063cbcf252a146102a5578063fcf7684e146102cc575f80fd5b8063a3ba9aef14610276578063a6f9dae11461027f575f80fd5b806369be670b146102345780638da5cb5b1461024757806396324ed61461025a5780639ac28fa01461026d575f80fd5b806316d3bfbb1161010257806330030a48116100e857806330030a48146102105780633878678414610218578063517c0a8f1461022b575f80fd5b806316d3bfbb146101d057806328714051146101e9575f80fd5b806231d1151461013257806305236024146101765780630bea55ed1461018b5780630d93650c1461019e575b5f80fd5b6101597f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610189610184366004610d38565b6102e0565b005b610189610199366004610e6d565b6103c4565b6101c06101ac366004610f38565b60056020525f908152604090205460ff1681565b604051901515815260200161016d565b6101db6301e1338081565b60405190815260200161016d565b6101597f000000000000000000000000000000000000000000000000000000000000000081565b6101db5f5481565b6101db610226366004610f38565b610558565b6101db60025481565b6101c0610242366004610f5a565b6105bf565b600454610159906001600160a01b031681565b6101c0610268366004610f38565b610b9a565b6101db60015481565b6101db60035481565b61018961028d366004610f38565b610bd4565b6101896102a0366004610f91565b610c9d565b6101597f000000000000000000000000000000000000000000000000000000000000000081565b6004546101c090600160a01b900460ff1681565b6004546001600160a01b03163314610328576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044015b60405180910390fd5b831580610333575082155b8061033c575081155b80610345575080155b1561036357604051637c946ed760e01b815260040160405180910390fd5b5f8490556001839055600282905560038190556040805185815260208101859052908101839052606081018290527faf40dfd820e3c4d9869867d01bef72bc7355b89f888bde8f0e24025202b0d7459060800160405180910390a150505050565b6004546001600160a01b03163314610407576004805460405163521eb56d60e11b81526001600160a01b039091169181019190915233602482015260440161031f565b8251158061041757508151835114155b1561044257825182516040516308151c1160e41b81526004810192909252602482015260440161031f565b6004805460ff60a01b1916600160a01b831515021790555f5b8351811015610517575f6001600160a01b031684828151811061048057610480610faa565b60200260200101516001600160a01b0316036104af5760405163d92e233d60e01b815260040160405180910390fd5b8281815181106104c1576104c1610faa565b602002602001015160055f8684815181106104de576104de610faa565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff191691151591909117905560010161045b565b507fa75993bdbe9ad771324babfee934d208587d3321632d15aa92547ee71226354183838360405161054b93929190610fbe565b60405180910390a1505050565b5f816001600160a01b031663957323616040518163ffffffff1660e01b8152600401602060405180830381865afa158015610595573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b99190611051565b92915050565b6004545f90600160a01b900460ff1680156105f257506001600160a01b0382165f9081526005602052604090205460ff16155b156105fe57505f6105b9565b826001600160a01b03163b5f0361061657505f6105b9565b60408051600481526024810182526020810180516001600160e01b03166365e7929560e11b17905290515f9081906001600160a01b0387169061065a908590611068565b5f60405180830381855afa9150503d805f8114610692576040519150601f19603f3d011682016040523d82523d5f602084013e610697565b606091505b50915091508180156106aa575080516020145b15610711575f818060200190518101906106c4919061107e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161461070b575f9450505050506105b9565b5061071c565b5f93505050506105b9565b5f866001600160a01b031663e77cdcc96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610759573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077d9190611051565b90505f54811115610794575f9450505050506105b9565b5f6301e13380886001600160a01b031663eacdaabc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107d6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fa9190611051565b6108049190611099565b90505f8261081a83670de0b6b3a7640000611099565b61082491906110bc565b905060035481111561083e575f96505050505050506105b9565b5f896001600160a01b0316631f7794086040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089f9190611051565b90506001548111156108ba575f9750505050505050506105b9565b5f8a6001600160a01b03166316a751726040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091b9190611051565b9050600254811115610937575f985050505050505050506105b9565b60408051600481526024810182526020810180516001600160e01b03166372f702f360e01b17905290515f91906001600160a01b038e169061097a908390611068565b5f60405180830381855afa9150503d805f81146109b2576040519150601f19603f3d011682016040523d82523d5f602084013e6109b7565b606091505b5090995097508815610a44578751602003610a3257878060200190518101906109e0919061107e565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610a2d575f9a50505050505050505050506105b9565b610a44565b5f9a50505050505050505050506105b9565b6001600160a01b03821615801590610a8457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615155b15610b875760408051600481526024810182526020810180516001600160e01b0316632871405160e01b1790529051909a506001600160a01b038e1690610acc908c90611068565b5f60405180830381855afa9150503d805f8114610b04576040519150601f19603f3d011682016040523d82523d5f602084013e610b09565b606091505b509099509750888015610b1d575087516020145b15610a32575f88806020019051810190610b37919061107e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614610b85575f9b5050505050505050505050506105b9565b505b5060019c9b505050505050505050505050565b6004545f90600160a01b900460ff1615610bcc57506001600160a01b03165f9081526005602052604090205460ff1690565b506001919050565b6004546001600160a01b03163314610c15576004805460405163521eb56d60e11b815233928101929092526001600160a01b0316602482015260440161031f565b6001600160a01b038116610c3c5760405163d92e233d60e01b815260040160405180910390fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6004546001600160a01b03163314610ce0576004805460405163521eb56d60e11b81526001600160a01b039091169181019190915233602482015260440161031f565b60048054821515600160a01b0260ff60a01b199091161790556040517fdc17e046a4e55c5445deae0e2503d60b1ce5ecce83a0dc62c9066bbc7f39db5690610d2d90831515815260200190565b60405180910390a150565b5f805f8060808587031215610d4b575f80fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610da457610da4610d67565b604052919050565b5f67ffffffffffffffff821115610dc557610dc5610d67565b5060051b60200190565b6001600160a01b0381168114610de3575f80fd5b50565b80358015158114610df5575f80fd5b919050565b5f82601f830112610e09575f80fd5b81356020610e1e610e1983610dac565b610d7b565b8083825260208201915060208460051b870101935086841115610e3f575f80fd5b602086015b84811015610e6257610e5581610de6565b8352918301918301610e44565b509695505050505050565b5f805f60608486031215610e7f575f80fd5b833567ffffffffffffffff80821115610e96575f80fd5b818601915086601f830112610ea9575f80fd5b81356020610eb9610e1983610dac565b82815260059290921b8401810191818101908a841115610ed7575f80fd5b948201945b83861015610efe578535610eef81610dcf565b82529482019490820190610edc565b97505087013592505080821115610f13575f80fd5b50610f2086828701610dfa565b925050610f2f60408501610de6565b90509250925092565b5f60208284031215610f48575f80fd5b8135610f5381610dcf565b9392505050565b5f8060408385031215610f6b575f80fd5b8235610f7681610dcf565b91506020830135610f8681610dcf565b809150509250929050565b5f60208284031215610fa1575f80fd5b610f5382610de6565b634e487b7160e01b5f52603260045260245ffd5b606080825284519082018190525f906020906080840190828801845b82811015610fff5781516001600160a01b031684529284019290840190600101610fda565b505050838103828501528551808252868301918301905f5b81811015611035578351151583529284019291840191600101611017565b505085151560408601529250611049915050565b949350505050565b5f60208284031215611061575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b5f6020828403121561108e575f80fd5b8151610f5381610dcf565b80820281158282048414176105b957634e487b7160e01b5f52601160045260245ffd5b5f826110d657634e487b7160e01b5f52601260045260245ffd5b50049056fea264697066735822122046f7297398a99ef60f0b00e73475165ebb545a6aa56c8252953995010aa7f10c64736f6c63430008190033", + "deployedBytecode": "0x608060405234801561000f575f80fd5b506004361061012e575f3560e01c806369be670b116100ad578063a3ba9aef1161007d578063c446841811610063578063c446841814610292578063cbcf252a146102a5578063fcf7684e146102cc575f80fd5b8063a3ba9aef14610276578063a6f9dae11461027f575f80fd5b806369be670b146102345780638da5cb5b1461024757806396324ed61461025a5780639ac28fa01461026d575f80fd5b806316d3bfbb1161010257806330030a48116100e857806330030a48146102105780633878678414610218578063517c0a8f1461022b575f80fd5b806316d3bfbb146101d057806328714051146101e9575f80fd5b806231d1151461013257806305236024146101765780630bea55ed1461018b5780630d93650c1461019e575b5f80fd5b6101597f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b610189610184366004610d38565b6102e0565b005b610189610199366004610e6d565b6103c4565b6101c06101ac366004610f38565b60056020525f908152604090205460ff1681565b604051901515815260200161016d565b6101db6301e1338081565b60405190815260200161016d565b6101597f000000000000000000000000000000000000000000000000000000000000000081565b6101db5f5481565b6101db610226366004610f38565b610558565b6101db60025481565b6101c0610242366004610f5a565b6105bf565b600454610159906001600160a01b031681565b6101c0610268366004610f38565b610b9a565b6101db60015481565b6101db60035481565b61018961028d366004610f38565b610bd4565b6101896102a0366004610f91565b610c9d565b6101597f000000000000000000000000000000000000000000000000000000000000000081565b6004546101c090600160a01b900460ff1681565b6004546001600160a01b03163314610328576004805460405163521eb56d60e11b81526001600160a01b03909116918101919091523360248201526044015b60405180910390fd5b831580610333575082155b8061033c575081155b80610345575080155b1561036357604051637c946ed760e01b815260040160405180910390fd5b5f8490556001839055600282905560038190556040805185815260208101859052908101839052606081018290527faf40dfd820e3c4d9869867d01bef72bc7355b89f888bde8f0e24025202b0d7459060800160405180910390a150505050565b6004546001600160a01b03163314610407576004805460405163521eb56d60e11b81526001600160a01b039091169181019190915233602482015260440161031f565b8251158061041757508151835114155b1561044257825182516040516308151c1160e41b81526004810192909252602482015260440161031f565b6004805460ff60a01b1916600160a01b831515021790555f5b8351811015610517575f6001600160a01b031684828151811061048057610480610faa565b60200260200101516001600160a01b0316036104af5760405163d92e233d60e01b815260040160405180910390fd5b8281815181106104c1576104c1610faa565b602002602001015160055f8684815181106104de576104de610faa565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff191691151591909117905560010161045b565b507fa75993bdbe9ad771324babfee934d208587d3321632d15aa92547ee71226354183838360405161054b93929190610fbe565b60405180910390a1505050565b5f816001600160a01b031663957323616040518163ffffffff1660e01b8152600401602060405180830381865afa158015610595573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105b99190611051565b92915050565b6004545f90600160a01b900460ff1680156105f257506001600160a01b0382165f9081526005602052604090205460ff16155b156105fe57505f6105b9565b826001600160a01b03163b5f0361061657505f6105b9565b60408051600481526024810182526020810180516001600160e01b03166365e7929560e11b17905290515f9081906001600160a01b0387169061065a908590611068565b5f60405180830381855afa9150503d805f8114610692576040519150601f19603f3d011682016040523d82523d5f602084013e610697565b606091505b50915091508180156106aa575080516020145b15610711575f818060200190518101906106c4919061107e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161461070b575f9450505050506105b9565b5061071c565b5f93505050506105b9565b5f866001600160a01b031663e77cdcc96040518163ffffffff1660e01b8152600401602060405180830381865afa158015610759573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061077d9190611051565b90505f54811115610794575f9450505050506105b9565b5f6301e13380886001600160a01b031663eacdaabc6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107d6573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fa9190611051565b6108049190611099565b90505f8261081a83670de0b6b3a7640000611099565b61082491906110bc565b905060035481111561083e575f96505050505050506105b9565b5f896001600160a01b0316631f7794086040518163ffffffff1660e01b8152600401602060405180830381865afa15801561087b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089f9190611051565b90506001548111156108ba575f9750505050505050506105b9565b5f8a6001600160a01b03166316a751726040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091b9190611051565b9050600254811115610937575f985050505050505050506105b9565b60408051600481526024810182526020810180516001600160e01b03166372f702f360e01b17905290515f91906001600160a01b038e169061097a908390611068565b5f60405180830381855afa9150503d805f81146109b2576040519150601f19603f3d011682016040523d82523d5f602084013e6109b7565b606091505b5090995097508815610a44578751602003610a3257878060200190518101906109e0919061107e565b91507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614610a2d575f9a50505050505050505050506105b9565b610a44565b5f9a50505050505050505050506105b9565b6001600160a01b03821615801590610a8457507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031615155b15610b875760408051600481526024810182526020810180516001600160e01b0316632871405160e01b1790529051909a506001600160a01b038e1690610acc908c90611068565b5f60405180830381855afa9150503d805f8114610b04576040519150601f19603f3d011682016040523d82523d5f602084013e610b09565b606091505b509099509750888015610b1d575087516020145b15610a32575f88806020019051810190610b37919061107e565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614610b85575f9b5050505050505050505050506105b9565b505b5060019c9b505050505050505050505050565b6004545f90600160a01b900460ff1615610bcc57506001600160a01b03165f9081526005602052604090205460ff1690565b506001919050565b6004546001600160a01b03163314610c15576004805460405163521eb56d60e11b815233928101929092526001600160a01b0316602482015260440161031f565b6001600160a01b038116610c3c5760405163d92e233d60e01b815260040160405180910390fd5b600480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f4ffd725fc4a22075e9ec71c59edf9c38cdeb588a91b24fc5b61388c5be41282b905f90a250565b6004546001600160a01b03163314610ce0576004805460405163521eb56d60e11b81526001600160a01b039091169181019190915233602482015260440161031f565b60048054821515600160a01b0260ff60a01b199091161790556040517fdc17e046a4e55c5445deae0e2503d60b1ce5ecce83a0dc62c9066bbc7f39db5690610d2d90831515815260200190565b60405180910390a150565b5f805f8060808587031215610d4b575f80fd5b5050823594602084013594506040840135936060013592509050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610da457610da4610d67565b604052919050565b5f67ffffffffffffffff821115610dc557610dc5610d67565b5060051b60200190565b6001600160a01b0381168114610de3575f80fd5b50565b80358015158114610df5575f80fd5b919050565b5f82601f830112610e09575f80fd5b81356020610e1e610e1983610dac565b610d7b565b8083825260208201915060208460051b870101935086841115610e3f575f80fd5b602086015b84811015610e6257610e5581610de6565b8352918301918301610e44565b509695505050505050565b5f805f60608486031215610e7f575f80fd5b833567ffffffffffffffff80821115610e96575f80fd5b818601915086601f830112610ea9575f80fd5b81356020610eb9610e1983610dac565b82815260059290921b8401810191818101908a841115610ed7575f80fd5b948201945b83861015610efe578535610eef81610dcf565b82529482019490820190610edc565b97505087013592505080821115610f13575f80fd5b50610f2086828701610dfa565b925050610f2f60408501610de6565b90509250925092565b5f60208284031215610f48575f80fd5b8135610f5381610dcf565b9392505050565b5f8060408385031215610f6b575f80fd5b8235610f7681610dcf565b91506020830135610f8681610dcf565b809150509250929050565b5f60208284031215610fa1575f80fd5b610f5382610de6565b634e487b7160e01b5f52603260045260245ffd5b606080825284519082018190525f906020906080840190828801845b82811015610fff5781516001600160a01b031684529284019290840190600101610fda565b505050838103828501528551808252868301918301905f5b81811015611035578351151583529284019291840191600101611017565b505085151560408601529250611049915050565b949350505050565b5f60208284031215611061575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b5f6020828403121561108e575f80fd5b8151610f5381610dcf565b80820281158282048414176105b957634e487b7160e01b5f52601160045260245ffd5b5f826110d657634e487b7160e01b5f52601260045260245ffd5b50049056fea264697066735822122046f7297398a99ef60f0b00e73475165ebb545a6aa56c8252953995010aa7f10c64736f6c63430008190033", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/audits/internal6/README.md b/audits/internal6/README.md index cf7b97d1..cd32d6ba 100644 --- a/audits/internal6/README.md +++ b/audits/internal6/README.md @@ -118,6 +118,93 @@ contracts/staking/StakingProxy.sol It is necessary to carry out tests with the option to move this function to implementation. Perhaps this will solve the problem with proxy recognition on the side gnosisscan. ``` +[x] noted + +#### Notes: StakingVerifier (commit 261c597388426e4e3a412123f50ee4dbe5e9fa8f) +``` + some of the code just follows the same path ("fake if/elese") - since the path can't be changed it just wastes gas. + StakingFactory: + + /// @dev Verifies a service staking contract instance. + /// @param instance Service staking proxy instance. + /// @return True, if verification is successful. + function verifyInstance(address instance) public view returns (bool) { + // Get proxy instance params + InstanceParams storage instanceParams = mapInstanceParams[instance]; + address implementation = instanceParams.implementation; + + // Check that the implementation corresponds to the proxy instance + if (implementation == address(0)) { + return false; + } + + // Check for the instance being active + if (!instanceParams.isEnabled) { + return false; + } + + // Provide additional checks, if needed + address localVerifier = verifier; + if (localVerifier != address(0)) { + return IStakingVerifier(localVerifier).verifyInstance(instance, implementation); + } + + return true; + } + + /// @dev Verifies staking proxy instance and gets emissions amount. + /// @param instance Staking proxy instance. + /// @return amount Emissions amount. + function verifyInstanceAndGetEmissionsAmount(address instance) external view returns (uint256 amount) { + // Verify the proxy instance + bool success = verifyInstance(instance); + + if (success) { + // If there is a verifier, get the emissions amount + address localVerifier = verifier; + if (localVerifier != address(0)) { + // Get the max possible emissions amount + amount = IStakingVerifier(localVerifier).getEmissionsAmountLimit(instance); + } else { + // Get the proxy instance emissions amount + amount = IStaking(instance).emissionsAmount(); + } + } + } + + verifyInstanceAndGetEmissionsAmount: + 1. verifyInstance(instance) + 1.1. if localVerifier != address(0) + 1.2. IStakingVerifier(localVerifier).verifyInstance(instance, implementation); + 1.3. verifyInstance(address instance, address implementation) external view returns (bool) + if (apy > apyLimit) { + return false; + } and etc + if success (apy checking is success!) then + 2. if (localVerifier != address(0)) { + 2.1. amount = IStakingVerifier(localVerifier).getEmissionsAmountLimit(instance); + getEmissionsAmountLimit(instance) + -> + amount = IStaking(instance).emissionsAmount(); + + so, + if (success) { + // If there is a verifier, get the emissions amount + address localVerifier = verifier; + if (localVerifier != address(0)) { + // Get the max possible emissions amount + amount = IStakingVerifier(localVerifier).getEmissionsAmountLimit(instance); + } else { + // Get the proxy instance emissions amount + amount = IStaking(instance).emissionsAmount(); + } + } + always equal: + if (success) { + amount = IStaking(instance).emissionsAmount(); + } + because the current code always produces this result. +``` [x] noted. No code base replacement required. ### Catch up on changes. 15.07.24 diff --git a/contracts/staking/StakingFactory.sol b/contracts/staking/StakingFactory.sol index ee490474..641882fa 100644 --- a/contracts/staking/StakingFactory.sol +++ b/contracts/staking/StakingFactory.sol @@ -177,6 +177,9 @@ contract StakingFactory { } /// @dev Creates a service staking contract instance. + /// @notice Once the staking instance is created and verified, it is considered valid for its lifetime, or until + /// deliberately restricted / removed. If the DAO changes staking parameters, the outdated staking + /// parameters of instances are respected as they were validated before that. /// @param implementation Service staking blanc implementation address. /// @param initPayload Initialization payload. function createStakingInstance( @@ -296,29 +299,22 @@ contract StakingFactory { emit InstanceRemoved(instance); } - + /// @dev Verifies a service staking contract instance. /// @param instance Service staking proxy instance. /// @return True, if verification is successful. - function verifyInstance(address instance) public view returns (bool) { - // Get proxy instance params + function verifyInstance(address instance) external view returns (bool) { InstanceParams storage instanceParams = mapInstanceParams[instance]; - address implementation = instanceParams.implementation; - - // Check that the implementation corresponds to the proxy instance - if (implementation == address(0)) { - return false; - } - // Check for the instance being active - if (!instanceParams.isEnabled) { + bool isEnabled = instanceParams.isEnabled; + if (!isEnabled) { return false; } // Provide additional checks, if needed address localVerifier = verifier; if (localVerifier != address(0)) { - return IStakingVerifier(localVerifier).verifyInstance(instance, implementation); + return IStakingVerifier(localVerifier).verifyInstance(instance, instanceParams.implementation); } return true; @@ -328,22 +324,21 @@ contract StakingFactory { /// @param instance Staking proxy instance. /// @return amount Emissions amount. function verifyInstanceAndGetEmissionsAmount(address instance) external view returns (uint256 amount) { - // Verify the proxy instance - bool success = verifyInstance(instance); - - if (success) { - // Get the proxy instance emissions amount - amount = IStaking(instance).emissionsAmount(); - - // If there is a verifier, adjust the amount + // Check if the proxy instance is enabled, since this proves that + // the proxy instance has been created by this factory and verified at the creation time + // An already verified proxy instance should not be re-verified + // DAO governance might have changed verification rules in the mean-time which would render the instance unusable + bool isEnabled = mapInstanceParams[instance].isEnabled; + + if (isEnabled) { + // If there is a verifier, get the emissions amount address localVerifier = verifier; if (localVerifier != address(0)) { // Get the max possible emissions amount - uint256 maxEmissions = IStakingVerifier(localVerifier).getEmissionsAmountLimit(instance); - // Limit excessive emissions amount - if (amount > maxEmissions) { - amount = maxEmissions; - } + amount = IStakingVerifier(localVerifier).getEmissionsAmountLimit(instance); + } else { + // Get the proxy instance emissions amount + amount = IStaking(instance).emissionsAmount(); } } } diff --git a/contracts/staking/StakingVerifier.sol b/contracts/staking/StakingVerifier.sol index 7b275050..b9549abd 100644 --- a/contracts/staking/StakingVerifier.sol +++ b/contracts/staking/StakingVerifier.sol @@ -11,6 +11,14 @@ interface IStaking { /// @return Maximum number of services. function maxNumServices() external view returns (uint256); + /// @dev Gets time for emissions. + /// @return Time for emissions. + function timeForEmissions() external view returns (uint256); + + /// @dev Gets emissions amount. + /// @return Emissions amount. + function emissionsAmount() external view returns (uint256); + /// @dev Gets service staking token. /// @return Service staking token address. function stakingToken() external view returns (address); @@ -22,6 +30,10 @@ interface IStaking { /// @dev Gets service registry token utility address. /// @return Service registry token utility address. function serviceRegistryTokenUtility() external view returns(address); + + /// @dev Minimum service staking deposit value required for staking. + /// @return Minimum service staking deposit. + function minStakingDeposit() external view returns(uint256); } /// @dev Provided zero address. @@ -52,9 +64,11 @@ contract StakingVerifier { event OwnerUpdated(address indexed owner); event SetImplementationsCheck(bool setCheck); event ImplementationsWhitelistUpdated(address[] implementations, bool[] statuses, bool setCheck); - event StakingLimitsUpdated(uint256 rewardsPerSecondLimit, uint256 timeForEmissionsLimit, uint256 _numServicesLimit, - uint256 emissionsLimit); + event StakingLimitsUpdated(uint256 minStakingDepositLimit, uint256 timeForEmissionsLimit, uint256 numServicesLimit, + uint256 apyLimit); + // One year constant + uint256 public constant ONE_YEAR = 1 days * 365; // OLAS token address address public immutable olas; // Service registry address @@ -62,14 +76,14 @@ contract StakingVerifier { // Service registry token utility address public immutable serviceRegistryTokenUtility; - // Rewards per second limit - uint256 public rewardsPerSecondLimit; + // Minimum staking deposit limit + uint256 public minStakingDepositLimit; // Time for emissions limit uint256 public timeForEmissionsLimit; // Limit for the number of services uint256 public numServicesLimit; - // Emissions per service limit - uint256 public emissionsLimit; + // APY limit in 1e18 format + uint256 public apyLimit; // Contract owner address address public owner; // Flag to check for the implementation address whitelisting status @@ -82,16 +96,18 @@ contract StakingVerifier { /// @param _olas OLAS token address. /// @param _serviceRegistry Service registry address. /// @param _serviceRegistryTokenUtility Service registry token utility address. - /// @param _rewardsPerSecondLimit Rewards per second limit. + /// @param _minStakingDepositLimit Minimum staking deposit limit. /// @param _timeForEmissionsLimit Time for emissions limit. /// @param _numServicesLimit Limit for the number of services. + /// @param _apyLimit APY limit in 1e18 format. constructor( address _olas, address _serviceRegistry, address _serviceRegistryTokenUtility, - uint256 _rewardsPerSecondLimit, + uint256 _minStakingDepositLimit, uint256 _timeForEmissionsLimit, - uint256 _numServicesLimit + uint256 _numServicesLimit, + uint256 _apyLimit ) { // Zero address check if (_olas == address(0) || _serviceRegistry == address(0)) { @@ -99,7 +115,7 @@ contract StakingVerifier { } // Zero values check - if (_rewardsPerSecondLimit == 0 || _timeForEmissionsLimit == 0 || _numServicesLimit == 0) { + if (_minStakingDepositLimit == 0 || _timeForEmissionsLimit == 0 || _numServicesLimit == 0 || _apyLimit == 0) { revert ZeroValue(); } @@ -107,10 +123,10 @@ contract StakingVerifier { olas = _olas; serviceRegistry = _serviceRegistry; serviceRegistryTokenUtility = _serviceRegistryTokenUtility; - rewardsPerSecondLimit = _rewardsPerSecondLimit; + minStakingDepositLimit = _minStakingDepositLimit; timeForEmissionsLimit = _timeForEmissionsLimit; numServicesLimit = _numServicesLimit; - emissionsLimit = _rewardsPerSecondLimit * _timeForEmissionsLimit * _numServicesLimit; + apyLimit = _apyLimit; } /// @dev Changes the owner address. @@ -225,10 +241,29 @@ contract StakingVerifier { return false; } - // Check for the staking parameters - // This is a must have parameter for all staking contracts - uint256 rewardsPerSecond = IStaking(instance).rewardsPerSecond(); - if (rewardsPerSecond > rewardsPerSecondLimit) { + // Check for minimum staking deposit + // This lets the verifier limit the max stake per slot for risk mitigation + uint256 minStakingDeposit = IStaking(instance).minStakingDeposit(); + if (minStakingDeposit > minStakingDepositLimit) { + return false; + } + + // Calculate rewards per year + uint256 rewardsPerYear = IStaking(instance).rewardsPerSecond() * ONE_YEAR; + // Calculate current APY in 1e18 format + uint256 apy = (rewardsPerYear * 1e18) / minStakingDeposit; + + // Check for APY + // This lets the verifier limit the max APY a staking contract offers + // The DAO can this way express an upper bound on the APY staking contracts can offer + if (apy > apyLimit) { + return false; + } + + // Check for time for emissions + // This lets the verifier enforce an upper bound on the emissions length for risk mitigation + uint256 timeForEmissions = IStaking(instance).timeForEmissions(); + if (timeForEmissions > timeForEmissionsLimit) { return false; } @@ -279,13 +314,15 @@ contract StakingVerifier { } /// @dev Changes staking parameter limits. - /// @param _rewardsPerSecondLimit Rewards per second limit. + /// @param _minStakingDepositLimit Minimum staking deposit limit. /// @param _timeForEmissionsLimit Time for emissions limit. /// @param _numServicesLimit Limit for the number of services. + /// @param _apyLimit APY limit in 1e18 format. function changeStakingLimits( - uint256 _rewardsPerSecondLimit, + uint256 _minStakingDepositLimit, uint256 _timeForEmissionsLimit, - uint256 _numServicesLimit + uint256 _numServicesLimit, + uint256 _apyLimit ) external { // Check the contract ownership if (owner != msg.sender) { @@ -293,22 +330,23 @@ contract StakingVerifier { } // Zero values check - if (_rewardsPerSecondLimit == 0 || _timeForEmissionsLimit == 0 || _numServicesLimit == 0) { + if (_minStakingDepositLimit == 0 || _timeForEmissionsLimit == 0 || _numServicesLimit == 0 || _apyLimit == 0) { revert ZeroValue(); } - rewardsPerSecondLimit = _rewardsPerSecondLimit; + minStakingDepositLimit = _minStakingDepositLimit; timeForEmissionsLimit = _timeForEmissionsLimit; numServicesLimit = _numServicesLimit; - emissionsLimit = _rewardsPerSecondLimit * _timeForEmissionsLimit * _numServicesLimit; + apyLimit = _apyLimit; - emit StakingLimitsUpdated(_rewardsPerSecondLimit, _timeForEmissionsLimit, _numServicesLimit, emissionsLimit); + emit StakingLimitsUpdated(_minStakingDepositLimit, _timeForEmissionsLimit, _numServicesLimit, _apyLimit); } /// @dev Gets emissions amount limit for a specific staking proxy instance. - /// @notice The address field is reserved for the proxy instance, if needed in the next verifier version. - /// @return Emissions amount limit. - function getEmissionsAmountLimit(address) external view returns (uint256) { - return emissionsLimit; + /// @param instance Staking proxy instance. + /// @return amount Emissions amount limit. + function getEmissionsAmountLimit(address instance) external view returns (uint256 amount) { + // Get calculated emissions amount from the instance + amount = IStaking(instance).emissionsAmount(); } } \ No newline at end of file diff --git a/contracts/test/MockStaking.sol b/contracts/test/MockStaking.sol index 9304c05e..0330854c 100644 --- a/contracts/test/MockStaking.sol +++ b/contracts/test/MockStaking.sol @@ -8,6 +8,7 @@ contract MockStaking { uint256 public timeForEmissions; uint256 public maxNumServices; uint256 public emissionsAmount; + uint256 public minStakingDeposit; address public token; address public serviceRegistry; address public serviceRegistryTokenUtility; @@ -15,10 +16,11 @@ contract MockStaking { function initialize(address _token, address _serviceRegistry, address _serviceRegistryTokenUtility) external { serviceId = 2; - rewardsPerSecond = 0.0001 ether; + rewardsPerSecond = 549768518519; timeForEmissions = 100; maxNumServices = 10; emissionsAmount = rewardsPerSecond * maxNumServices * timeForEmissions; + minStakingDeposit = 10 ether; token = _token; serviceRegistry = _serviceRegistry; if (_serviceRegistryTokenUtility == address(0)) { @@ -49,6 +51,10 @@ contract MockStaking { emissionsAmount = rewardsPerSecond * maxNumServices * timeForEmissions; } + function setStakingDeposit(uint256 stakingDeposit) external { + minStakingDeposit = stakingDeposit; + } + function stake(uint256) external {} function unstake(uint256) external {} diff --git a/package.json b/package.json index 762cfe03..93f5a4a1 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "chai": "^4.3.10", "eslint": "^8.52.0", "ethers": "^5.7.2", - "hardhat": "^2.22.4", + "hardhat": "^2.22.6", "hardhat-contract-sizer": "^2.10.0", "hardhat-deploy": "^0.11.43", "hardhat-deploy-ethers": "^0.3.0-beta.13", diff --git a/scripts/deployment/l2/deploy_19_service_staking_verifier.js b/scripts/deployment/l2/deploy_19_service_staking_verifier.js index 8a9cbc90..7321528e 100644 --- a/scripts/deployment/l2/deploy_19_service_staking_verifier.js +++ b/scripts/deployment/l2/deploy_19_service_staking_verifier.js @@ -13,9 +13,10 @@ async function main() { const providerName = parsedData.providerName; const gasPriceInGwei = parsedData.gasPriceInGwei; const olasAddress = parsedData.olasAddress; - const rewardsPerSecondLimit = parsedData.rewardsPerSecondLimit; + const minStakingDepositLimit = parsedData.minStakingDepositLimit; const timeForEmissionsLimit = parsedData.timeForEmissionsLimit; const numServicesLimit = parsedData.numServicesLimit; + const apyLimit = parsedData.apyLimit; const serviceRegistryAddress = parsedData.serviceRegistryAddress; const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress; @@ -52,7 +53,7 @@ async function main() { console.log("You are signing the following transaction: StakingVerifier.connect(EOA).deploy()"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const stakingVerifier = await StakingVerifier.connect(EOA).deploy(olasAddress, serviceRegistryAddress, - serviceRegistryTokenUtilityAddress, rewardsPerSecondLimit, timeForEmissionsLimit, numServicesLimit, { gasPrice }); + serviceRegistryTokenUtilityAddress, minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, apyLimit, { gasPrice }); const result = await stakingVerifier.deployed(); // Transaction details diff --git a/scripts/deployment/l2/globals_arbitrum_one.json b/scripts/deployment/l2/globals_arbitrum_one.json index 0ccaa05b..5cd2cabd 100644 --- a/scripts/deployment/l2/globals_arbitrum_one.json +++ b/scripts/deployment/l2/globals_arbitrum_one.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"arbitrumOne","networkURL":"https://arb1.arbitrum.io/rpc","gasPriceInGwei":"2","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"0x4d30F68F5AA342d296d4deE4bB1Cacca912dA70F","serviceRegistryAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","gnosisSafeMultisigImplementationAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","gnosisSafeSameAddressMultisigImplementationAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","operatorWhitelistAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","serviceRegistryTokenUtilityAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","serviceManagerTokenAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","olasAddress":"0x064F8B858C2A603e1b106a2039f5446D32dc81c1","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","stakingTokenAddress":"","stakingNativeTokenAddress":"","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0xE3607b00E75f6405248323A9417ff6b39B244b50","activityChecker":""}} \ No newline at end of file +{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"arbitrumOne","networkURL":"https://arb1.arbitrum.io/rpc","gasPriceInGwei":"2","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"0x4d30F68F5AA342d296d4deE4bB1Cacca912dA70F","serviceRegistryAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","gnosisSafeMultisigImplementationAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","gnosisSafeSameAddressMultisigImplementationAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","operatorWhitelistAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","serviceRegistryTokenUtilityAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","serviceManagerTokenAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","olasAddress":"0x064F8B858C2A603e1b106a2039f5446D32dc81c1","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","stakingTokenAddress":"","stakingNativeTokenAddress":"","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0xE3607b00E75f6405248323A9417ff6b39B244b50","activityChecker":""}} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_arbitrum_sepolia.json b/scripts/deployment/l2/globals_arbitrum_sepolia.json index 722b283e..7da393f9 100644 --- a/scripts/deployment/l2/globals_arbitrum_sepolia.json +++ b/scripts/deployment/l2/globals_arbitrum_sepolia.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"arbitrumSepolia","networkURL":"https://sepolia-rollup.arbitrum.io/rpc","gasPriceInGwei":"1","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry","serviceRegistrySymbol":"AUTONOLAS-SERVICE-V1","bridgeMediatorAddress":"0x45d995F302D0B5cF52ec0eDD3945321Eb0f84ee6","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","gnosisSafeMultisigImplementationAddress":"0x19936159B528C66750992C3cBcEd2e71cF4E4824","gnosisSafeSameAddressMultisigImplementationAddress":"0x10100e74b7F706222F8A7C0be9FC7Ae1717Ad8B2","operatorWhitelistAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","serviceRegistryTokenUtilityAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","serviceManagerTokenAddress":"0x5BA58970c2Ae16Cf6218783018100aF2dCcFc915","olasAddress":"0x2AeD71638128A3811F5e5971a397fFe6A8587caa","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","stakingTokenAddress":"0xea930a028793FeBE9F6A2CFb62c95620dB91da71","stakingNativeTokenAddress":"0xA9D794548486D15BfbCe2b8b5F5518b739fa8A4b","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0x661E609d03bb63819f2F47b9202E15e1826f5B5f","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"0x9385d4E53c72a858C451D41f58Fcb8C070bDd18A","stakingFactoryAddress":"0xd64Cf67500b7d15A41E02DDeb40F3A73CB533eB5","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0x661E609d03bb63819f2F47b9202E15e1826f5B5f"},"stakingTokenInstanceAddress":"0x5a7b2c6f38ee2f3203273dd3dd67942144b804fb","stakingNativeTokenInstanceAddress":"0xba779d56271d80eb2e9b52f174f9f2e0ffb19109"} \ No newline at end of file +{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"arbitrumSepolia","networkURL":"https://sepolia-rollup.arbitrum.io/rpc","gasPriceInGwei":"1","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry","serviceRegistrySymbol":"AUTONOLAS-SERVICE-V1","bridgeMediatorAddress":"0x45d995F302D0B5cF52ec0eDD3945321Eb0f84ee6","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","gnosisSafeMultisigImplementationAddress":"0x19936159B528C66750992C3cBcEd2e71cF4E4824","gnosisSafeSameAddressMultisigImplementationAddress":"0x10100e74b7F706222F8A7C0be9FC7Ae1717Ad8B2","operatorWhitelistAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","serviceRegistryTokenUtilityAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","serviceManagerTokenAddress":"0x5BA58970c2Ae16Cf6218783018100aF2dCcFc915","olasAddress":"0x2AeD71638128A3811F5e5971a397fFe6A8587caa","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","stakingTokenAddress":"0xea930a028793FeBE9F6A2CFb62c95620dB91da71","stakingNativeTokenAddress":"0xA9D794548486D15BfbCe2b8b5F5518b739fa8A4b","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0x661E609d03bb63819f2F47b9202E15e1826f5B5f","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"0x9385d4E53c72a858C451D41f58Fcb8C070bDd18A","stakingFactoryAddress":"0xd64Cf67500b7d15A41E02DDeb40F3A73CB533eB5","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0x661E609d03bb63819f2F47b9202E15e1826f5B5f"},"stakingTokenInstanceAddress":"0x5a7b2c6f38ee2f3203273dd3dd67942144b804fb","stakingNativeTokenInstanceAddress":"0xba779d56271d80eb2e9b52f174f9f2e0ffb19109"} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_base_mainnet.json b/scripts/deployment/l2/globals_base_mainnet.json index a41c5982..0135df7f 100644 --- a/scripts/deployment/l2/globals_base_mainnet.json +++ b/scripts/deployment/l2/globals_base_mainnet.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"base","networkURL":"https://mainnet.base.org","gasPriceInGwei":"2","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"","olasAddress":"","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","operatorWhitelistAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","serviceRegistryTokenUtilityAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","serviceManagerTokenAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","gnosisSafeMultisigImplementationAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","gnosisSafeSameAddressMultisigImplementationAddress":"0xFbBEc0C8b13B38a9aC0499694A69a10204c5E2aB","stakingTokenAddress":"","stakingNativeTokenAddress":"","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","activityChecker":""}} \ No newline at end of file +{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"base","networkURL":"https://mainnet.base.org","gasPriceInGwei":"2","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"","olasAddress":"","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","operatorWhitelistAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","serviceRegistryTokenUtilityAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","serviceManagerTokenAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","gnosisSafeMultisigImplementationAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","gnosisSafeSameAddressMultisigImplementationAddress":"0xFbBEc0C8b13B38a9aC0499694A69a10204c5E2aB","stakingTokenAddress":"","stakingNativeTokenAddress":"","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","activityChecker":""}} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_celo_mainnet.json b/scripts/deployment/l2/globals_celo_mainnet.json index c1dd7279..1cd88cbb 100644 --- a/scripts/deployment/l2/globals_celo_mainnet.json +++ b/scripts/deployment/l2/globals_celo_mainnet.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"celo","networkURL":"https://forno.celo.org","gasPriceInGwei":"10","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"","olasAddress":"","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","operatorWhitelistAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","serviceRegistryTokenUtilityAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","serviceManagerTokenAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","gnosisSafeMultisigImplementationAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","gnosisSafeSameAddressMultisigImplementationAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","stakingTokenAddress":"0x43d28764bB39936185c84906983fB57A8A905a4F","stakingNativeTokenAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0xB575dd20281c63288428DD58e5f579CC7d6aae4d","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"0x0000000000000000000000000000000000000000","stakingFactoryAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0xE3607b00E75f6405248323A9417ff6b39B244b50","activityChecker":"0xB575dd20281c63288428DD58e5f579CC7d6aae4d"},"stakingTokenInstanceAddress":"0x83839b36d41bdb44abfb6a52ef5549de9bbbb046"} \ No newline at end of file +{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"celo","networkURL":"https://forno.celo.org","gasPriceInGwei":"10","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"","olasAddress":"","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","operatorWhitelistAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","serviceRegistryTokenUtilityAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","serviceManagerTokenAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","gnosisSafeMultisigImplementationAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","gnosisSafeSameAddressMultisigImplementationAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","stakingTokenAddress":"0x43d28764bB39936185c84906983fB57A8A905a4F","stakingNativeTokenAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0xB575dd20281c63288428DD58e5f579CC7d6aae4d","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"0x0000000000000000000000000000000000000000","stakingFactoryAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0xE3607b00E75f6405248323A9417ff6b39B244b50","activityChecker":"0xB575dd20281c63288428DD58e5f579CC7d6aae4d"},"stakingTokenInstanceAddress":"0x83839b36d41bdb44abfb6a52ef5549de9bbbb046"} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_gnosis_chiado.json b/scripts/deployment/l2/globals_gnosis_chiado.json index cb1f1938..fd75c680 100644 --- a/scripts/deployment/l2/globals_gnosis_chiado.json +++ b/scripts/deployment/l2/globals_gnosis_chiado.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"chiado","networkURL":"https://rpc.chiadochain.net","gasPriceInGwei":"3","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","AMBContractProxyForeignAddress":"0x87A19d769D875964E9Cd41dDBfc397B2543764E6","bridgeMediatorOriginalAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","bridgeMediatorAddress":"0x0a50009D55Ed5700ac8FF713709d5Ad5fa843896","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","serviceManagerAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","gnosisSafeMultisigImplementationAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","gnosisSafeSameAddressMultisigImplementationAddress":"0xE16adc7777B7C2a0d35033bd3504C028AB28EE8b","operatorWhitelistAddress":"0x6f7661F52fE1919996d0A4F68D09B344093a349d","serviceRegistryTokenUtilityAddress":"0xc2c7E40674f1C7Bb99eFe5680Efd79842502bED4","serviceManagerTokenAddress":"0xc965a32185590Eb5a5fffDba29E96126b7650eDe","olasAddress":"0x9b03e7D8B3c3ea3B56431baD5f9aA16070E10cE2","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","stakingNativeTokenAddress":"0xEC029Ed450FB91A88420f80B8940C7691841Bf2f","stakingTokenAddress":"0x00c3B912FF54B2a7E37D495a496f025D51fb8058","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0xa2AA89938805836077aB0724f335142da7A27085","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"0x63b0f322837a7160B7E3d95C60aAaeB4EF1aECcb","stakingFactoryAddress":"0x164192772C363DD391d1fb3D396cd1d9FB10def1","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"86400","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0x42E06C095e6CB15e16F9cB6E90Cc65077fEAbE5B"},"stakingTokenInstanceAddress":"0x3c55f970d62d70dda9c3f9c7664e6f89010685ca","stakingNativeTokenInstanceAddress":"0x4ba3dec73202d925edb794b85a04969552320910"} \ No newline at end of file +{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"chiado","networkURL":"https://rpc.chiadochain.net","gasPriceInGwei":"3","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","AMBContractProxyForeignAddress":"0x87A19d769D875964E9Cd41dDBfc397B2543764E6","bridgeMediatorOriginalAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","bridgeMediatorAddress":"0x0a50009D55Ed5700ac8FF713709d5Ad5fa843896","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","serviceManagerAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","gnosisSafeMultisigImplementationAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","gnosisSafeSameAddressMultisigImplementationAddress":"0xE16adc7777B7C2a0d35033bd3504C028AB28EE8b","operatorWhitelistAddress":"0x6f7661F52fE1919996d0A4F68D09B344093a349d","serviceRegistryTokenUtilityAddress":"0xc2c7E40674f1C7Bb99eFe5680Efd79842502bED4","serviceManagerTokenAddress":"0xc965a32185590Eb5a5fffDba29E96126b7650eDe","olasAddress":"0x9b03e7D8B3c3ea3B56431baD5f9aA16070E10cE2","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","stakingNativeTokenAddress":"0xEC029Ed450FB91A88420f80B8940C7691841Bf2f","stakingTokenAddress":"0x00c3B912FF54B2a7E37D495a496f025D51fb8058","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0xa2AA89938805836077aB0724f335142da7A27085","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"0x63b0f322837a7160B7E3d95C60aAaeB4EF1aECcb","stakingFactoryAddress":"0x164192772C363DD391d1fb3D396cd1d9FB10def1","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"86400","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0x42E06C095e6CB15e16F9cB6E90Cc65077fEAbE5B"},"stakingTokenInstanceAddress":"0x3c55f970d62d70dda9c3f9c7664e6f89010685ca","stakingNativeTokenInstanceAddress":"0x4ba3dec73202d925edb794b85a04969552320910"} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_gnosis_mainnet.json b/scripts/deployment/l2/globals_gnosis_mainnet.json index 18a8534a..03159cd3 100644 --- a/scripts/deployment/l2/globals_gnosis_mainnet.json +++ b/scripts/deployment/l2/globals_gnosis_mainnet.json @@ -26,9 +26,10 @@ "stakingTokenAddress":"", "livenessRatio":"700000000000000", "stakingActivityCheckerAddress":"", - "rewardsPerSecondLimit":"1000000000000000", + "minStakingDepositLimit":"1000000000000000000000", "timeForEmissionsLimit":"2592000", "numServicesLimit":"100", + "apyLimit":"1000000000000000000", "stakingVerifierAddress":"", "stakingFactoryAddress":"", "stakingParams": diff --git a/scripts/deployment/l2/globals_optimistic_mainnet.json b/scripts/deployment/l2/globals_optimistic_mainnet.json index 4c068410..29f5e36e 100644 --- a/scripts/deployment/l2/globals_optimistic_mainnet.json +++ b/scripts/deployment/l2/globals_optimistic_mainnet.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"optimistic","networkURL":"https://mainnet.optimism.io","gasPriceInGwei":"2","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"","olasAddress":"","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","operatorWhitelistAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","serviceRegistryTokenUtilityAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","serviceManagerTokenAddress":"0xFbBEc0C8b13B38a9aC0499694A69a10204c5E2aB","gnosisSafeMultisigImplementationAddress":"0xE43d4F4103b623B61E095E8bEA34e1bc8979e168","gnosisSafeSameAddressMultisigImplementationAddress":"0xb09CcF0Dbf0C178806Aaee28956c74bd66d21f73","stakingTokenAddress":"","stakingNativeTokenAddress":"","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","activityChecker":""}} \ No newline at end of file +{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"optimistic","networkURL":"https://mainnet.optimism.io","gasPriceInGwei":"2","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","bridgeMediatorAddress":"","olasAddress":"","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","operatorWhitelistAddress":"0x63e66d7ad413C01A7b49C7FF4e3Bb765C4E4bd1b","serviceRegistryTokenUtilityAddress":"0xBb7e1D6Cb6F243D6bdE81CE92a9f2aFF7Fbe7eac","serviceManagerTokenAddress":"0xFbBEc0C8b13B38a9aC0499694A69a10204c5E2aB","gnosisSafeMultisigImplementationAddress":"0xE43d4F4103b623B61E095E8bEA34e1bc8979e168","gnosisSafeSameAddressMultisigImplementationAddress":"0xb09CcF0Dbf0C178806Aaee28956c74bd66d21f73","stakingTokenAddress":"","stakingNativeTokenAddress":"","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","activityChecker":""}} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_optimistic_sepolia.json b/scripts/deployment/l2/globals_optimistic_sepolia.json index 94568b11..1b5abb02 100644 --- a/scripts/deployment/l2/globals_optimistic_sepolia.json +++ b/scripts/deployment/l2/globals_optimistic_sepolia.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"optimisticSepolia","networkURL":"https://sepolia.optimism.io","gasPriceInGwei":"2","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry","serviceRegistrySymbol":"AUTONOLAS-SERVICE-V1","bridgeMediatorAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","olasAddress":"0x01B8b6384298D4848E3BE63D4C9D17830EeE488A","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","operatorWhitelistAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","serviceRegistryTokenUtilityAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","serviceManagerTokenAddress":"0x5BA58970c2Ae16Cf6218783018100aF2dCcFc915","gnosisSafeMultisigImplementationAddress":"0x19936159B528C66750992C3cBcEd2e71cF4E4824","gnosisSafeSameAddressMultisigImplementationAddress":"0x10100e74b7F706222F8A7C0be9FC7Ae1717Ad8B2","stakingTokenAddress":"0x57f3703D281Fd7b3896969086Cf14Aa6Ace99d92","stakingNativeTokenAddress":"0x87ecEccEDA41A6dF29FFC780c028510b3198DC74","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0xf91962bEEF99cc53adD71Aa035CBEFF9Ec062728","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"0x357da3967BaB7aed076cC9eE150ef2980A6ccD44","stakingFactoryAddress":"0x3ac32cE492d2bDaf11C8f43Edc16FCa9b4b65675","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0xf91962bEEF99cc53adD71Aa035CBEFF9Ec062728"},"stakingTokenInstanceAddress":"0xCae661c929EC23e695e904d871C8D623f83bAC38","stakingNativeTokenInstanceAddress":"0xaa2d979ff7890aef3c436cefd9a486bee88363b0"} \ No newline at end of file +{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"optimisticSepolia","networkURL":"https://sepolia.optimism.io","gasPriceInGwei":"2","gnosisSafeAddress":"0x69f4D1788e39c87893C980c06EdF4b7f686e2938","gnosisSafeProxyFactoryAddress":"0xC22834581EbC8527d974F8a1c97E1bEA4EF910BC","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry","serviceRegistrySymbol":"AUTONOLAS-SERVICE-V1","bridgeMediatorAddress":"0x670Ac235EE13C0B2a5065282bBB0c61cfB354592","olasAddress":"0x01B8b6384298D4848E3BE63D4C9D17830EeE488A","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","operatorWhitelistAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","serviceRegistryTokenUtilityAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","serviceManagerTokenAddress":"0x5BA58970c2Ae16Cf6218783018100aF2dCcFc915","gnosisSafeMultisigImplementationAddress":"0x19936159B528C66750992C3cBcEd2e71cF4E4824","gnosisSafeSameAddressMultisigImplementationAddress":"0x10100e74b7F706222F8A7C0be9FC7Ae1717Ad8B2","stakingTokenAddress":"0x57f3703D281Fd7b3896969086Cf14Aa6Ace99d92","stakingNativeTokenAddress":"0x87ecEccEDA41A6dF29FFC780c028510b3198DC74","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0xf91962bEEF99cc53adD71Aa035CBEFF9Ec062728","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"0x357da3967BaB7aed076cC9eE150ef2980A6ccD44","stakingFactoryAddress":"0x3ac32cE492d2bDaf11C8f43Edc16FCa9b4b65675","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0xf91962bEEF99cc53adD71Aa035CBEFF9Ec062728"},"stakingTokenInstanceAddress":"0xCae661c929EC23e695e904d871C8D623f83bAC38","stakingNativeTokenInstanceAddress":"0xaa2d979ff7890aef3c436cefd9a486bee88363b0"} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_polygon_amoy.json b/scripts/deployment/l2/globals_polygon_amoy.json index 5d22b6f4..0491b763 100644 --- a/scripts/deployment/l2/globals_polygon_amoy.json +++ b/scripts/deployment/l2/globals_polygon_amoy.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"polygonAmoy","networkURL":"https://polygon-amoy.g.alchemy.com/v2/","gasPriceInGwei":"40","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","fxRootAddress":"","bridgeMediatorAddress":"","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","serviceManagerAddress":"","gnosisSafeMultisigImplementationAddress":"0x19936159B528C66750992C3cBcEd2e71cF4E4824","gnosisSafeSameAddressMultisigImplementationAddress":"0x10100e74b7F706222F8A7C0be9FC7Ae1717Ad8B2","operatorWhitelistAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","serviceRegistryTokenUtilityAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","serviceManagerTokenAddress":"0x5BA58970c2Ae16Cf6218783018100aF2dCcFc915","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","olasAddress":"0xeCD870085AA3bab4aE12F675811122da4173C6a9","stakingTokenAddress":"0x945550dECe7E40ae70C6ebf5699637927eAF13E9","stakingNativeTokenAddress":"0x34235f9D447f9F54167e2Ac7A0F4283cB3fAD669","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0x94676070018ff7D09BC32DAc6bb01Ae67282b8E8","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"0x6f7661F52fE1919996d0A4F68D09B344093a349d","stakingFactoryAddress":"0xc2c7E40674f1C7Bb99eFe5680Efd79842502bED4","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0x94676070018ff7D09BC32DAc6bb01Ae67282b8E8"},"stakingTokenInstanceAddress":"0xa28327f6b308f1a04e565025400311f48275c0fc","stakingNativeTokenInstanceAddress":"0xd76bc6aa871643a0aa87f5985f1e7ffda7b19eea"} \ No newline at end of file +{"contractVerification":true,"useLedger":false,"derivationPath":"m/44'/60'/2'/0/0","providerName":"polygonAmoy","networkURL":"https://polygon-amoy.g.alchemy.com/v2/","gasPriceInGwei":"40","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","fxRootAddress":"","bridgeMediatorAddress":"","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","serviceRegistryAddress":"0x31D3202d8744B16A120117A053459DDFAE93c855","serviceManagerAddress":"","gnosisSafeMultisigImplementationAddress":"0x19936159B528C66750992C3cBcEd2e71cF4E4824","gnosisSafeSameAddressMultisigImplementationAddress":"0x10100e74b7F706222F8A7C0be9FC7Ae1717Ad8B2","operatorWhitelistAddress":"0x29086141ecdc310058fc23273F8ef7881d20C2f7","serviceRegistryTokenUtilityAddress":"0xeB49bE5DF00F74bd240DE4535DDe6Bc89CEfb994","serviceManagerTokenAddress":"0x5BA58970c2Ae16Cf6218783018100aF2dCcFc915","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","olasAddress":"0xeCD870085AA3bab4aE12F675811122da4173C6a9","stakingTokenAddress":"0x945550dECe7E40ae70C6ebf5699637927eAF13E9","stakingNativeTokenAddress":"0x34235f9D447f9F54167e2Ac7A0F4283cB3fAD669","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"0x94676070018ff7D09BC32DAc6bb01Ae67282b8E8","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"0x6f7661F52fE1919996d0A4F68D09B344093a349d","stakingFactoryAddress":"0xc2c7E40674f1C7Bb99eFe5680Efd79842502bED4","stakingParams":{"metadataHash":"0x0000000000000000000000000000000000000000000000000000000000000001","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["12"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0x31D3202d8744B16A120117A053459DDFAE93c855","activityChecker":"0x94676070018ff7D09BC32DAc6bb01Ae67282b8E8"},"stakingTokenInstanceAddress":"0xa28327f6b308f1a04e565025400311f48275c0fc","stakingNativeTokenInstanceAddress":"0xd76bc6aa871643a0aa87f5985f1e7ffda7b19eea"} \ No newline at end of file diff --git a/scripts/deployment/l2/globals_polygon_mainnet.json b/scripts/deployment/l2/globals_polygon_mainnet.json index 774011dc..3276dad1 100644 --- a/scripts/deployment/l2/globals_polygon_mainnet.json +++ b/scripts/deployment/l2/globals_polygon_mainnet.json @@ -1 +1 @@ -{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"polygon","networkURL":"https://polygon-mainnet.g.alchemy.com/v2/","gasPriceInGwei":"100","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","fxRootAddress":"0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2","bridgeMediatorAddress":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","serviceRegistryAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","serviceManagerAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","gnosisSafeMultisigImplementationAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","gnosisSafeSameAddressMultisigImplementationAddress":"0xd8BCC126ff31d2582018715d5291A508530587b0","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","olasAddress":"0xFEF5d947472e72Efbb2E388c730B7428406F2F95","operatorWhitelistAddress":"0x526E064cB694E8f5B7DB299158e17F33055B3943","serviceRegistryTokenUtilityAddress":"0xa45E64d13A30a51b91ae0eb182e88a40e9b18eD8","serviceManagerTokenAddress":"0x04b0007b2aFb398015B76e5f22993a1fddF83644","stakingTokenAddress":"","stakingNativeTokenAddress":"","rewardsPerSecondLimit":"1000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0xE3607b00E75f6405248323A9417ff6b39B244b50","activityChecker":""}} \ No newline at end of file +{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"polygon","networkURL":"https://polygon-mainnet.g.alchemy.com/v2/","gasPriceInGwei":"100","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","gnosisSafeAddress":"0xd9Db270c1B5E3Bd161E8c8503c55cEABeE709552","gnosisSafeProxyFactoryAddress":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","fxRootAddress":"0xfe5e5D361b2ad62c541bAb87C45a0B9B018389a2","bridgeMediatorAddress":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","baseURI":"https://gateway.autonolas.tech/ipfs/","serviceRegistryName":"Service Registry L2","serviceRegistrySymbol":"AUTONOLAS-SERVICE-L2-V1","serviceRegistryAddress":"0xE3607b00E75f6405248323A9417ff6b39B244b50","serviceManagerAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","gnosisSafeMultisigImplementationAddress":"0x3d77596beb0f130a4415df3D2D8232B3d3D31e44","gnosisSafeSameAddressMultisigImplementationAddress":"0xd8BCC126ff31d2582018715d5291A508530587b0","multisigProxyHash130":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","olasAddress":"0xFEF5d947472e72Efbb2E388c730B7428406F2F95","operatorWhitelistAddress":"0x526E064cB694E8f5B7DB299158e17F33055B3943","serviceRegistryTokenUtilityAddress":"0xa45E64d13A30a51b91ae0eb182e88a40e9b18eD8","serviceManagerTokenAddress":"0x04b0007b2aFb398015B76e5f22993a1fddF83644","stakingTokenAddress":"","stakingNativeTokenAddress":"","minStakingDepositLimit":"1000000000000000000000","timeForEmissionsLimit":"2592000","numServicesLimit":"100","apyLimit":"1000000000000000000","stakingVerifierAddress":"","stakingFactoryAddress":"","livenessRatio":"700000000000000","stakingActivityCheckerAddress":"","stakingParams":{"metadataHash":"","maxNumServices":"100","rewardsPerSecond":"1000000000000000","minStakingDeposit":"50000000000000000000","minNumStakingPeriods":"3","maxNumInactivityPeriods":"3","livenessPeriod":"86400","timeForEmissions":"2592000","numAgentInstances":"1","agentIds":["14"],"threshold":"0","configHash":"0x0000000000000000000000000000000000000000000000000000000000000000","proxyHash":"0xb89c1b3bdf2cf8827818646bce9a8f6e372885f8c55e5c07acbd307cb133b000","serviceRegistry":"0xE3607b00E75f6405248323A9417ff6b39B244b50","activityChecker":""}} \ No newline at end of file diff --git a/scripts/deployment/l2/verify_19_service_staking_verifier.js b/scripts/deployment/l2/verify_19_service_staking_verifier.js index e7fdd4c8..07c7275f 100644 --- a/scripts/deployment/l2/verify_19_service_staking_verifier.js +++ b/scripts/deployment/l2/verify_19_service_staking_verifier.js @@ -3,9 +3,10 @@ const globalsFile = "globals.json"; const dataFromJSON = fs.readFileSync(globalsFile, "utf8"); const parsedData = JSON.parse(dataFromJSON); const olasAddress = parsedData.olasAddress; -const rewardsPerSecondLimit = parsedData.rewardsPerSecondLimit; +const minStakingDepositLimit = parsedData.minStakingDepositLimit; const timeForEmissionsLimit = parsedData.timeForEmissionsLimit; const numServicesLimit = parsedData.numServicesLimit; +const apyLimit = parsedData.apyLimit; const serviceRegistryAddress = parsedData.serviceRegistryAddress; const serviceRegistryTokenUtilityAddress = parsedData.serviceRegistryTokenUtilityAddress; @@ -13,7 +14,8 @@ module.exports = [ olasAddress, serviceRegistryAddress, serviceRegistryTokenUtilityAddress, - rewardsPerSecondLimit, + minStakingDepositLimit, timeForEmissionsLimit, - numServicesLimit + numServicesLimit, + apyLimit ]; \ No newline at end of file diff --git a/test/ServiceStaking.t.sol b/test/ServiceStaking.t.sol index 4a8159b9..60e64c15 100644 --- a/test/ServiceStaking.t.sol +++ b/test/ServiceStaking.t.sol @@ -50,8 +50,8 @@ contract BaseSetup is Test { uint256 internal largeApproval = 1_000_000_000 ether; uint256 internal oneYear = 365 * 24 * 3600; uint32 internal threshold = 1; - uint96 internal regBond = 1000; - uint256 internal regDeposit = 1000; + uint96 internal regBond = 10 ether; + uint256 internal regDeposit = 10 ether; uint256 internal numDays = 10; bytes32 internal unitHash = 0x9999999999999999999999999999999999999999999999999999999999999999; @@ -61,9 +61,11 @@ contract BaseSetup is Test { // Maximum number of staking services uint256 internal maxNumServices = 10; // Rewards per second - uint256 internal rewardsPerSecond = 0.0001 ether; + uint256 internal rewardsPerSecond = 549768518519; // Minimum service staking deposit value required for staking uint256 internal minStakingDeposit = regDeposit; + // APY limit + uint256 internal apyLimit = 2 ether; // Min number of staking periods before the service can be unstaked uint256 internal minNumStakingPeriods = 3; // Max number of accumulated inactivity periods after which the service is evicted @@ -118,7 +120,7 @@ contract BaseSetup is Test { // Deploy service staking verifier stakingVerifier = new StakingVerifier(address(token), address(serviceRegistry), - address(serviceRegistryTokenUtility), rewardsPerSecond, timeForEmissions, maxNumServices); + address(serviceRegistryTokenUtility), minStakingDeposit, timeForEmissions, maxNumServices, apyLimit); // Deploy service staking factory stakingFactory = new StakingFactory(address(0)); diff --git a/test/ServiceStakingFactory.js b/test/ServiceStakingFactory.js index ea04ea35..7eba3041 100644 --- a/test/ServiceStakingFactory.js +++ b/test/ServiceStakingFactory.js @@ -10,9 +10,10 @@ describe("StakingFactory", function () { let signers; let deployer; const AddressZero = ethers.constants.AddressZero; - const rewardsPerSecondLimit = "1" + "0".repeat(15); + const minStakingDepositLimit = ethers.utils.parseEther("10"); const timeForEmissionsLimit = 100; const numServicesLimit = 100; + const apyLimit = ethers.utils.parseEther("2"); beforeEach(async function () { signers = await ethers.getSigners(); @@ -28,7 +29,7 @@ describe("StakingFactory", function () { const StakingVerifier = await ethers.getContractFactory("StakingVerifier"); stakingVerifier = await StakingVerifier.deploy(token.address, signers[1].address, signers[2].address, - rewardsPerSecondLimit, timeForEmissionsLimit, numServicesLimit); + minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, apyLimit); await stakingVerifier.deployed(); const StakingFactory = await ethers.getContractFactory("StakingFactory"); @@ -61,24 +62,29 @@ describe("StakingFactory", function () { const StakingVerifier = await ethers.getContractFactory("StakingVerifier"); await expect( - StakingVerifier.deploy(AddressZero, AddressZero, AddressZero, 0, 0, 0) + StakingVerifier.deploy(AddressZero, AddressZero, AddressZero, 0, 0, 0, 0) ).to.be.revertedWithCustomError(StakingVerifier, "ZeroAddress"); await expect( - StakingVerifier.deploy(token.address, AddressZero, AddressZero, 0, 0, 0) + StakingVerifier.deploy(token.address, AddressZero, AddressZero, 0, 0, 0, 0) ).to.be.revertedWithCustomError(StakingVerifier, "ZeroAddress"); await expect( - StakingVerifier.deploy(token.address, signers[1].address, AddressZero, 0, 0, 0) + StakingVerifier.deploy(token.address, signers[1].address, AddressZero, 0, 0, 0, 0) ).to.be.revertedWithCustomError(StakingVerifier, "ZeroValue"); await expect( - StakingVerifier.deploy(token.address, signers[1].address, AddressZero, rewardsPerSecondLimit, 0, 0) + StakingVerifier.deploy(token.address, signers[1].address, AddressZero, minStakingDepositLimit, 0, 0, 0) ).to.be.revertedWithCustomError(StakingVerifier, "ZeroValue"); await expect( - StakingVerifier.deploy(token.address, signers[1].address, AddressZero, rewardsPerSecondLimit, - timeForEmissionsLimit, 0) + StakingVerifier.deploy(token.address, signers[1].address, AddressZero, minStakingDepositLimit, + timeForEmissionsLimit, 0, 0) + ).to.be.revertedWithCustomError(StakingVerifier, "ZeroValue"); + + await expect( + StakingVerifier.deploy(token.address, signers[1].address, AddressZero, minStakingDepositLimit, + timeForEmissionsLimit, numServicesLimit, 0) ).to.be.revertedWithCustomError(StakingVerifier, "ZeroValue"); }); @@ -252,18 +258,21 @@ describe("StakingFactory", function () { // Try to change the staking param limits not by the owner await expect( - stakingVerifier.connect(signers[1]).changeStakingLimits(0, 0, 0) + stakingVerifier.connect(signers[1]).changeStakingLimits(0, 0, 0, 0) ).to.be.revertedWithCustomError(stakingVerifier, "OwnerOnly"); // Try to change the staking param limits with the zero value await expect( - stakingVerifier.changeStakingLimits(0, 0, 0) + stakingVerifier.changeStakingLimits(0, 0, 0, 0) ).to.be.revertedWithCustomError(stakingVerifier, "ZeroValue"); await expect( - stakingVerifier.changeStakingLimits(rewardsPerSecondLimit, 0, 0) + stakingVerifier.changeStakingLimits(minStakingDepositLimit, 0, 0, 0) ).to.be.revertedWithCustomError(stakingVerifier, "ZeroValue"); await expect( - stakingVerifier.changeStakingLimits(rewardsPerSecondLimit, timeForEmissionsLimit, 0) + stakingVerifier.changeStakingLimits(minStakingDepositLimit, timeForEmissionsLimit, 0, 0) + ).to.be.revertedWithCustomError(stakingVerifier, "ZeroValue"); + await expect( + stakingVerifier.changeStakingLimits(minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, 0) ).to.be.revertedWithCustomError(stakingVerifier, "ZeroValue"); // Try to set instance activity not by instance deployer @@ -304,23 +313,40 @@ describe("StakingFactory", function () { await stakingFactory.createStakingInstance(staking.address, initPayload); // Change rewards per second limit parameter - await stakingVerifier.changeStakingLimits(1, timeForEmissionsLimit, numServicesLimit); + await stakingVerifier.changeStakingLimits(1, timeForEmissionsLimit, numServicesLimit, apyLimit); // Now the initialization will fail since the rewards per second limit is too low await expect( stakingFactory.createStakingInstance(staking.address, initPayload) ).to.be.revertedWithCustomError(stakingFactory, "UnverifiedProxy"); + // Change emissions time limit + await stakingVerifier.changeStakingLimits(minStakingDepositLimit, 1, numServicesLimit, apyLimit); + + // Now the initialization will fail since the emissions time limit is too low + await expect( + stakingFactory.createStakingInstance(staking.address, initPayload) + ).to.be.revertedWithCustomError(stakingFactory, "UnverifiedProxy"); + // Change number of services limit - await stakingVerifier.changeStakingLimits(rewardsPerSecondLimit, timeForEmissionsLimit, 1); + await stakingVerifier.changeStakingLimits(minStakingDepositLimit, timeForEmissionsLimit, 1, apyLimit); // Now the initialization will fail since the services number limit is too low await expect( stakingFactory.createStakingInstance(staking.address, initPayload) ).to.be.revertedWithCustomError(stakingFactory, "UnverifiedProxy"); - // Change verifier staking limits to default - await stakingVerifier.changeStakingLimits(rewardsPerSecondLimit, timeForEmissionsLimit, numServicesLimit); + // Change APY limit + await stakingVerifier.changeStakingLimits(minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, 1); + + // Now the initialization will fail since the staking contract APY is too high + await expect( + stakingFactory.createStakingInstance(staking.address, initPayload) + ).to.be.revertedWithCustomError(stakingFactory, "UnverifiedProxy"); + + // Change verifier staking limits to defaults + await stakingVerifier.changeStakingLimits(minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, + apyLimit); // Calculate proxy address let tx = await stakingFactory.createStakingInstance(staking.address, initPayload); @@ -328,24 +354,11 @@ describe("StakingFactory", function () { // Get staking contract instance address from the event const proxyAddress = "0x" + res.logs[0].topics[2].slice(26); - // Get the emissions amount - let amount = await stakingFactory.verifyInstanceAndGetEmissionsAmount(proxyAddress); - expect(amount).to.gt(0); - const proxyInstance = await ethers.getContractAt("MockStaking", proxyAddress); - // Change the emissions time - await proxyInstance.setTimeForEmissions(timeForEmissionsLimit * 100000000); - // Limit the emissions amount - amount = await stakingFactory.verifyInstanceAndGetEmissionsAmount(proxyAddress); - expect(amount).to.gt(0); - - // Change the number of services to be bigger than the limit - await proxyInstance.setNumServices(numServicesLimit * 100); - - // The verification is not going to pass now - amount = await stakingFactory.verifyInstanceAndGetEmissionsAmount(proxyAddress); - expect(amount).to.equal(0); + // Get the emissions amount + let amount = await stakingFactory.verifyInstanceAndGetEmissionsAmount(proxyAddress); + expect(amount).to.equal(await proxyInstance.emissionsAmount()); // Remove the verifier await stakingFactory.changeVerifier(AddressZero); @@ -372,7 +385,7 @@ describe("StakingFactory", function () { // Deploy a verifier with the different service registry address let wrongVerifier = await StakingVerifier.deploy(token.address, signers[2].address, signers[3].address, - rewardsPerSecondLimit, timeForEmissionsLimit, numServicesLimit); + minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, apyLimit); await wrongVerifier.deployed(); // Set the new verifier @@ -389,7 +402,7 @@ describe("StakingFactory", function () { // Deploy a new verifier with a wrong service registry token utility wrongVerifier = await StakingVerifier.deploy(token.address, signers[1].address, signers[3].address, - rewardsPerSecondLimit, timeForEmissionsLimit, numServicesLimit); + minStakingDepositLimit, timeForEmissionsLimit, numServicesLimit, apyLimit); await wrongVerifier.deployed(); // Set the new verifier diff --git a/yarn.lock b/yarn.lock index 0ed95702..b66c7aa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -686,53 +686,53 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@nomicfoundation/edr-darwin-arm64@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.3.8.tgz#09de1f03c0336670fce959f376f0fe9137545836" - integrity sha512-eB0leCexS8sQEmfyD72cdvLj9djkBzQGP4wSQw6SNf2I4Sw4Cnzb3d45caG2FqFFjbvfqL0t+badUUIceqQuMw== - -"@nomicfoundation/edr-darwin-x64@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.3.8.tgz#c3ca237c74ed3b6fb800fd7f1de7174f4ad24f72" - integrity sha512-JksVCS1N5ClwVF14EvO25HCQ+Laljh/KRfHERMVAC9ZwPbTuAd/9BtKvToCBi29uCHWqsXMI4lxCApYQv2nznw== - -"@nomicfoundation/edr-linux-arm64-gnu@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.3.8.tgz#08bd367789e745f4e78a8a87368fc470eea8a7de" - integrity sha512-raCE+fOeNXhVBLUo87cgsHSGvYYRB6arih4eG6B9KGACWK5Veebtm9xtKeiD8YCsdUlUfat6F7ibpeNm91fpsA== - -"@nomicfoundation/edr-linux-arm64-musl@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.3.8.tgz#9cab5cbec0052cb5812c6c66c463d28a756cd916" - integrity sha512-PwiDp4wBZWMCIy29eKkv8moTKRrpiSDlrc+GQMSZLhOAm8T33JKKXPwD/2EbplbhCygJDGXZdtEKl9x9PaH66A== - -"@nomicfoundation/edr-linux-x64-gnu@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.3.8.tgz#d4a11b6ebcd1b29d7431d185c6df3e65a2cd4bde" - integrity sha512-6AcvA/XKoipGap5jJmQ9Y6yT7Uf39D9lu2hBcDCXnXbMcXaDGw4mn1/L4R63D+9VGZyu1PqlcJixCUZlGGIWlg== - -"@nomicfoundation/edr-linux-x64-musl@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.3.8.tgz#b8eef960d06380a365866ddd1e97ecb7fbf6bd70" - integrity sha512-cxb0sEmZjlwhYWO28sPsV64VDx31ekskhC1IsDXU1p9ntjHSJRmW4KEIqJ2O3QwJap/kLKfMS6TckvY10gjc6w== - -"@nomicfoundation/edr-win32-x64-msvc@0.3.8": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.3.8.tgz#ac7061aeb07cc847c429513080b76bb05297a869" - integrity sha512-yVuVPqRRNLZk7TbBMkKw7lzCvI8XO8fNTPTYxymGadjr9rEGRuNTU1yBXjfJ59I1jJU/X2TSkRk1OFX0P5tpZQ== - -"@nomicfoundation/edr@^0.3.7": - version "0.3.8" - resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.3.8.tgz#28fe7ae4f462ae74a16cd1a714ff7b1cd9c22b4c" - integrity sha512-u2UJ5QpznSHVkZRh6ePWoeVb6kmPrrqh08gCnZ9FHlJV9CITqlrTQHJkacd+INH31jx88pTAJnxePE4XAiH5qg== - dependencies: - "@nomicfoundation/edr-darwin-arm64" "0.3.8" - "@nomicfoundation/edr-darwin-x64" "0.3.8" - "@nomicfoundation/edr-linux-arm64-gnu" "0.3.8" - "@nomicfoundation/edr-linux-arm64-musl" "0.3.8" - "@nomicfoundation/edr-linux-x64-gnu" "0.3.8" - "@nomicfoundation/edr-linux-x64-musl" "0.3.8" - "@nomicfoundation/edr-win32-x64-msvc" "0.3.8" +"@nomicfoundation/edr-darwin-arm64@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-arm64/-/edr-darwin-arm64-0.4.2.tgz#2ff98535f272c9f2a7d06eeda93fe7b207a348a4" + integrity sha512-S+hhepupfqpBvMa9M1PVS08sVjGXsLnjyAsjhrrsjsNuTHVLhKzhkguvBD5g4If5skrwgOaVqpag4wnQbd15kQ== + +"@nomicfoundation/edr-darwin-x64@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-darwin-x64/-/edr-darwin-x64-0.4.2.tgz#001dcd0e7fa4c52046d283b0dc61e63a60c614dd" + integrity sha512-/zM94AUrXz6CmcsecRNHJ50jABDUFafmGc4iBmkfX/mTp4tVZj7XTyIogrQIt0FnTaeb4CgZoLap2+8tW/Uldg== + +"@nomicfoundation/edr-linux-arm64-gnu@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-gnu/-/edr-linux-arm64-gnu-0.4.2.tgz#6d19f8265c8ffb22e29bc5bbbb5d1913fe4b306b" + integrity sha512-TV3Pr2tFvvmCfPCi9PaCGLtqn+oLaPKfL2NWpnoCeFFdzDQXi2L930yP1oUPY5RXd78NLdVHMkEkbhb2b6Wuvg== + +"@nomicfoundation/edr-linux-arm64-musl@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-arm64-musl/-/edr-linux-arm64-musl-0.4.2.tgz#0b01aa405fdc8048c7a8e95c737f29b437536a30" + integrity sha512-PALwrLBk1M9rolXyhSX8xdhe5jL0qf/PgiCIF7W7lUyVKrI/I0oiU0EHDk/Xw7yi2UJg4WRyhhZoHYa0g4g8Qg== + +"@nomicfoundation/edr-linux-x64-gnu@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-gnu/-/edr-linux-x64-gnu-0.4.2.tgz#10959fd4db9b333d3e0559cb893e109611889af0" + integrity sha512-5svkftypDjAZ1LxV1onojlaqPRxrTEjJLkrUwLL+Fao5ZMe7aTnk5QQ1Jv76gW6WYZnMXNgjPhRcnw3oSNrqFA== + +"@nomicfoundation/edr-linux-x64-musl@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-linux-x64-musl/-/edr-linux-x64-musl-0.4.2.tgz#8de64a2dfd869dad930dd0eb9572a0593d382379" + integrity sha512-qiMlXQTggdH9zfOB4Eil4rQ95z8s7QdLJcOfz5Aym12qJNkCyF9hi4cc4dDCWA0CdI3x3oLbuf8qb81SF8R45w== + +"@nomicfoundation/edr-win32-x64-msvc@0.4.2": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.4.2.tgz#13ad4bab9fd68853930e1a3d87c78d69d1d0e2ef" + integrity sha512-hDkAb0iaMmGYwBY/rA1oCX8VpsezfQcHPEPIEGXEcWC3WbnOgIZo0Qkpu/g0OMtFOJSQlWLXvKZuV7blhnrQag== + +"@nomicfoundation/edr@^0.4.1": + version "0.4.2" + resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.4.2.tgz#9d7550182d4f75d7510e265ebd3474c4f6fcb62a" + integrity sha512-U7v0HuZHfrsl/5FpUzuB2FYA0+FUglHHwiO6NhvLtNYKMZcPzdS6iUriMp/7GWs0SVxW3bAht9GinZPxdhVwWg== + dependencies: + "@nomicfoundation/edr-darwin-arm64" "0.4.2" + "@nomicfoundation/edr-darwin-x64" "0.4.2" + "@nomicfoundation/edr-linux-arm64-gnu" "0.4.2" + "@nomicfoundation/edr-linux-arm64-musl" "0.4.2" + "@nomicfoundation/edr-linux-x64-gnu" "0.4.2" + "@nomicfoundation/edr-linux-x64-musl" "0.4.2" + "@nomicfoundation/edr-win32-x64-msvc" "0.4.2" "@nomicfoundation/ethereumjs-common@4.0.4": version "4.0.4" @@ -1704,16 +1704,16 @@ command-exists@^1.2.8: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - commander@^10.0.0: version "10.0.1" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== +commander@^8.1.0: + version "8.3.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" + integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== + commander@^9.3.0: version "9.5.0" resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" @@ -2410,17 +2410,6 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha512-UvSPKyhMn6LEd/WpUaV9C9t3zATuqoqfWc3QdPhPLb58prN9tqYPlPWi8Krxi44loBoUzlobqZ3+8tGpxxSzwA== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - fs-extra@^10.0.0, fs-extra@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" @@ -2620,7 +2609,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -2704,14 +2693,14 @@ hardhat-tracer@^2.6.0: debug "^4.3.4" ethers "^5.6.1" -hardhat@^2.22.4: - version "2.22.4" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.4.tgz#766227b6cefca5dbf4fd15ab5b5a68138fa13baf" - integrity sha512-09qcXJFBHQUaraJkYNr7XlmwjOj27xBB0SL2rYS024hTj9tPMbp26AFjlf5quBMO9SR4AJFg+4qWahcYcvXBuQ== +hardhat@^2.22.6: + version "2.22.6" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.6.tgz#d73caece246cd8219a1815554dabc31d400fa035" + integrity sha512-abFEnd9QACwEtSvZZGSmzvw7N3zhQN1cDKz5SLHAupfG24qTHofCjqvD5kT5Wwsq5XOL0ON1Mq5rr4v0XX5ciw== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/edr" "^0.3.7" + "@nomicfoundation/edr" "^0.4.1" "@nomicfoundation/ethereumjs-common" "4.0.4" "@nomicfoundation/ethereumjs-tx" "5.0.4" "@nomicfoundation/ethereumjs-util" "9.0.4" @@ -2745,7 +2734,7 @@ hardhat@^2.22.4: raw-body "^2.4.1" resolve "1.17.0" semver "^6.3.0" - solc "0.7.3" + solc "0.8.26" source-map-support "^0.5.13" stacktrace-parser "^0.1.10" tsort "0.0.1" @@ -3072,13 +3061,6 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw== - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -3121,13 +3103,6 @@ kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw== - optionalDependencies: - graceful-fs "^4.1.9" - levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -3861,7 +3836,7 @@ require-directory@^2.1.1: resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== -require-from-string@^2.0.0, require-from-string@^2.0.2: +require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== @@ -3902,13 +3877,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^2.2.8: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -4120,18 +4088,16 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -solc@0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" - integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== +solc@0.8.26: + version "0.8.26" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.26.tgz#afc78078953f6ab3e727c338a2fefcd80dd5b01a" + integrity sha512-yiPQNVf5rBFHwN6SIf3TUUvVAFKcQqmSUFeq+fb6pNRCo0ZCgpYOZDi3BVoezCPIAcKrVYd/qXlBLUP9wVrZ9g== dependencies: command-exists "^1.2.8" - commander "3.0.2" + commander "^8.1.0" follow-redirects "^1.12.1" - fs-extra "^0.30.0" js-sha3 "0.8.0" memorystream "^0.3.1" - require-from-string "^2.0.0" semver "^5.5.0" tmp "0.0.33"