From 5cbe20183d8f4db098049fa56a3c9165aeabf0f7 Mon Sep 17 00:00:00 2001 From: mrekucci Date: Mon, 19 Dec 2022 09:29:48 -0300 Subject: [PATCH] chore: bump storage-incentives abi to v0.4.0 --- go.mod | 2 +- go.sum | 2 + pkg/config/chain.go | 28 +- pkg/config/mainnet_postagestamp_abi.json | 820 ------------------- pkg/config/mainnet_redistribution_abi.json | 894 --------------------- pkg/config/mainnet_staking_abi.json | 575 ------------- 6 files changed, 11 insertions(+), 2310 deletions(-) delete mode 100644 pkg/config/mainnet_postagestamp_abi.json delete mode 100644 pkg/config/mainnet_redistribution_abi.json delete mode 100644 pkg/config/mainnet_staking_abi.json diff --git a/go.mod b/go.mod index e61e023ea9b..cf357848da1 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/coreos/go-semver v0.3.0 github.com/ethereum/go-ethereum v1.10.18 github.com/ethersphere/go-price-oracle-abi v0.1.0 - github.com/ethersphere/go-storage-incentives-abi v0.4.0-rc5 + github.com/ethersphere/go-storage-incentives-abi v0.4.0 github.com/ethersphere/go-sw3-abi v0.4.0 github.com/ethersphere/langos v1.0.0 github.com/gogo/protobuf v1.3.2 diff --git a/go.sum b/go.sum index 8ccd4b7167c..9628f3e40ae 100644 --- a/go.sum +++ b/go.sum @@ -252,6 +252,8 @@ github.com/ethersphere/go-storage-incentives-abi v0.4.0-rc4 h1:kwykkAyFaBixyodW6 github.com/ethersphere/go-storage-incentives-abi v0.4.0-rc4/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc= github.com/ethersphere/go-storage-incentives-abi v0.4.0-rc5 h1:m/rE8L5K3X/RkAsXmeths52xyN7uJ+Ks8/pKLu/Kx/A= github.com/ethersphere/go-storage-incentives-abi v0.4.0-rc5/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc= +github.com/ethersphere/go-storage-incentives-abi v0.4.0 h1:Z+VIDYxXcgwDMX6yzcquj940+RWzTKAmREZn+yncoe4= +github.com/ethersphere/go-storage-incentives-abi v0.4.0/go.mod h1:SXvJVtM4sEsaSKD0jc1ClpDLw8ErPoROZDme4Wrc/Nc= github.com/ethersphere/go-sw3-abi v0.4.0 h1:T3ANY+ktWrPAwe2U0tZi+DILpkHzto5ym/XwV/Bbz8g= github.com/ethersphere/go-sw3-abi v0.4.0/go.mod h1:BmpsvJ8idQZdYEtWnvxA8POYQ8Rl/NhyCdF0zLMOOJU= github.com/ethersphere/langos v1.0.0 h1:NBtNKzXTTRSue95uOlzPN4py7Aofs0xWPzyj4AI1Vcc= diff --git a/pkg/config/chain.go b/pkg/config/chain.go index 8d11872bf06..22b52861af5 100644 --- a/pkg/config/chain.go +++ b/pkg/config/chain.go @@ -11,18 +11,6 @@ import ( "github.com/ethersphere/go-storage-incentives-abi/abi" ) -// TODO: replace this with proper values once the contracts are deployed to the mainnet. -var ( - //go:embed mainnet_staking_abi.json - MainnetStakingABI string - - //go:embed mainnet_postagestamp_abi.json - MainnetPostageStampABI string - - //go:embed mainnet_redistribution_abi.json - MainnetRedistributionABI string -) - // TODO: consider adding BzzAddress (also as a cmd param) to the ChainConfig and remove the postagecontract.LookupERC20Address function. type ChainConfig struct { @@ -68,20 +56,20 @@ var ( } Mainnet = ChainConfig{ - ChainID: 100, - PostageStampStartBlock: uint64(24180961), + ChainID: abi.MainnetChainID, + PostageStampStartBlock: abi.MainnetPostageStampBlockNumber, NativeTokenSymbol: "ETH", SwarmTokenSymbol: "BZZ", - StakingAddress: common.HexToAddress("0x52e86336210bB8F1FDe11EB8bc664a20AfC0a614"), - PostageStampAddress: common.HexToAddress("0xa9c84e9ccC0A0bC9B8C8E948F24E024bC2607c9A"), - RedistributionAddress: common.HexToAddress("0xECD2CFfE749A0F8F0a4f136E98C49De0Ee527c1F"), + StakingAddress: common.HexToAddress(abi.MainnetStakingAddress), + PostageStampAddress: common.HexToAddress(abi.MainnetPostageStampStampAddress), + RedistributionAddress: common.HexToAddress(abi.MainnetRedistributionAddress), SwapPriceOracleAddress: common.HexToAddress("0x0FDc5429C50e2a39066D8A94F3e2D2476fcc3b85"), CurrentFactoryAddress: common.HexToAddress("0xc2d5a532cf69aa9a1378737d8ccdef884b6e7420"), - StakingABI: MainnetStakingABI, - PostageStampABI: MainnetPostageStampABI, - RedistributionABI: MainnetRedistributionABI, + StakingABI: abi.MainnetStakingABI, + PostageStampABI: abi.MainnetPostageStampStampABI, + RedistributionABI: abi.MainnetRedistributionABI, } ) diff --git a/pkg/config/mainnet_postagestamp_abi.json b/pkg/config/mainnet_postagestamp_abi.json deleted file mode 100644 index 60848925abb..00000000000 --- a/pkg/config/mainnet_postagestamp_abi.json +++ /dev/null @@ -1,820 +0,0 @@ -[ - { - "inputs":[ - { - "internalType":"address", - "name":"_bzzToken", - "type":"address" - } - ], - "stateMutability":"nonpayable", - "type":"constructor" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"batchId", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"totalAmount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"normalisedBalance", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "indexed":false, - "internalType":"uint8", - "name":"depth", - "type":"uint8" - }, - { - "indexed":false, - "internalType":"uint8", - "name":"bucketDepth", - "type":"uint8" - }, - { - "indexed":false, - "internalType":"bool", - "name":"immutableFlag", - "type":"bool" - } - ], - "name":"BatchCreated", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"batchId", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint8", - "name":"newDepth", - "type":"uint8" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"normalisedBalance", - "type":"uint256" - } - ], - "name":"BatchDepthIncrease", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"batchId", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"topupAmount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"normalisedBalance", - "type":"uint256" - } - ], - "name":"BatchTopUp", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"Paused", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"uint256", - "name":"price", - "type":"uint256" - } - ], - "name":"PriceUpdate", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"bytes32", - "name":"previousAdminRole", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"bytes32", - "name":"newAdminRole", - "type":"bytes32" - } - ], - "name":"RoleAdminChanged", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"address", - "name":"account", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"sender", - "type":"address" - } - ], - "name":"RoleGranted", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"address", - "name":"account", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"sender", - "type":"address" - } - ], - "name":"RoleRevoked", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"Unpaused", - "type":"event" - }, - { - "inputs":[], - "name":"DEFAULT_ADMIN_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"DEPTH_ORACLE_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"PAUSER_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"PRICE_ORACLE_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"REDISTRIBUTOR_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "name":"batches", - "outputs":[ - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"uint8", - "name":"depth", - "type":"uint8" - }, - { - "internalType":"bool", - "name":"immutableFlag", - "type":"bool" - }, - { - "internalType":"uint256", - "name":"normalisedBalance", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"bzzToken", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"address", - "name":"_owner", - "type":"address" - }, - { - "internalType":"uint256", - "name":"_initialBalancePerChunk", - "type":"uint256" - }, - { - "internalType":"uint8", - "name":"_depth", - "type":"uint8" - }, - { - "internalType":"uint8", - "name":"_bucketDepth", - "type":"uint8" - }, - { - "internalType":"bytes32", - "name":"_batchId", - "type":"bytes32" - }, - { - "internalType":"bool", - "name":"_immutable", - "type":"bool" - } - ], - "name":"copyBatch", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"address", - "name":"_owner", - "type":"address" - }, - { - "internalType":"uint256", - "name":"_initialBalancePerChunk", - "type":"uint256" - }, - { - "internalType":"uint8", - "name":"_depth", - "type":"uint8" - }, - { - "internalType":"uint8", - "name":"_bucketDepth", - "type":"uint8" - }, - { - "internalType":"bytes32", - "name":"_nonce", - "type":"bytes32" - }, - { - "internalType":"bool", - "name":"_immutable", - "type":"bool" - } - ], - "name":"createBatch", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"currentTotalOutPayment", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"empty", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"uint256", - "name":"limit", - "type":"uint256" - } - ], - "name":"expireLimited", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"expiredBatchesExist", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"firstBatchId", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - } - ], - "name":"getRoleAdmin", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"grantRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"hasRole", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_batchId", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"_newDepth", - "type":"uint8" - } - ], - "name":"increaseDepth", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"lastExpiryBalance", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"lastPrice", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"lastUpdatedBlock", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"minimumBatchDepth", - "outputs":[ - { - "internalType":"uint8", - "name":"", - "type":"uint8" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"pause", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"paused", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"pot", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_batchId", - "type":"bytes32" - } - ], - "name":"remainingBalance", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"renounceRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"revokeRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"uint8", - "name":"min", - "type":"uint8" - } - ], - "name":"setMinimumBatchDepth", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"uint256", - "name":"_price", - "type":"uint256" - } - ], - "name":"setPrice", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes4", - "name":"interfaceId", - "type":"bytes4" - } - ], - "name":"supportsInterface", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_batchId", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"_topupAmountPerChunk", - "type":"uint256" - } - ], - "name":"topUp", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"topupPot", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"totalPot", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"unPause", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"validChunkCount", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"address", - "name":"beneficiary", - "type":"address" - } - ], - "name":"withdraw", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - } -] diff --git a/pkg/config/mainnet_redistribution_abi.json b/pkg/config/mainnet_redistribution_abi.json deleted file mode 100644 index 581745c7444..00000000000 --- a/pkg/config/mainnet_redistribution_abi.json +++ /dev/null @@ -1,894 +0,0 @@ -[ - { - "inputs":[ - { - "internalType":"address", - "name":"staking", - "type":"address" - }, - { - "internalType":"address", - "name":"postageContract", - "type":"address" - }, - { - "internalType":"address", - "name":"oracleContract", - "type":"address" - } - ], - "stateMutability":"nonpayable", - "type":"constructor" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"uint256", - "name":"_count", - "type":"uint256" - } - ], - "name":"CountCommits", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"uint256", - "name":"_count", - "type":"uint256" - } - ], - "name":"CountReveals", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"Paused", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"bytes32", - "name":"previousAdminRole", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"bytes32", - "name":"newAdminRole", - "type":"bytes32" - } - ], - "name":"RoleAdminChanged", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"address", - "name":"account", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"sender", - "type":"address" - } - ], - "name":"RoleGranted", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"address", - "name":"account", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"sender", - "type":"address" - } - ], - "name":"RoleRevoked", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"bytes32", - "name":"hash", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint8", - "name":"depth", - "type":"uint8" - } - ], - "name":"TruthSelected", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"Unpaused", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "components":[ - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"stake", - "type":"uint256" - }, - { - "internalType":"uint256", - "name":"stakeDensity", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"hash", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"depth", - "type":"uint8" - } - ], - "indexed":false, - "internalType":"struct Redistribution.Reveal", - "name":"winner", - "type":"tuple" - } - ], - "name":"WinnerSelected", - "type":"event" - }, - { - "inputs":[], - "name":"DEFAULT_ADMIN_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"OracleContract", - "outputs":[ - { - "internalType":"contract PriceOracle", - "name":"", - "type":"address" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"PAUSER_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"PostageContract", - "outputs":[ - { - "internalType":"contract PostageStamp", - "name":"", - "type":"address" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"Stakes", - "outputs":[ - { - "internalType":"contract StakeRegistry", - "name":"", - "type":"address" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"claim", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_obfuscatedHash", - "type":"bytes32" - }, - { - "internalType":"bytes32", - "name":"_overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"_roundNumber", - "type":"uint256" - } - ], - "name":"commit", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"currentClaimRound", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentCommitRound", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "name":"currentCommits", - "outputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"uint256", - "name":"stake", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"obfuscatedHash", - "type":"bytes32" - }, - { - "internalType":"bool", - "name":"revealed", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentPhaseClaim", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentPhaseCommit", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentPhaseReveal", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentRevealRound", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "name":"currentReveals", - "outputs":[ - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"stake", - "type":"uint256" - }, - { - "internalType":"uint256", - "name":"stakeDensity", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"hash", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"depth", - "type":"uint8" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentRound", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentRoundAnchor", - "outputs":[ - { - "internalType":"bytes32", - "name":"returnVal", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentRoundReveals", - "outputs":[ - { - "components":[ - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"stake", - "type":"uint256" - }, - { - "internalType":"uint256", - "name":"stakeDensity", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"hash", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"depth", - "type":"uint8" - } - ], - "internalType":"struct Redistribution.Reveal[]", - "name":"", - "type":"tuple[]" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"currentSeed", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - } - ], - "name":"getRoleAdmin", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"grantRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"hasRole", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"A", - "type":"bytes32" - }, - { - "internalType":"bytes32", - "name":"B", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"minimum", - "type":"uint8" - } - ], - "name":"inProximity", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"pure", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"depth", - "type":"uint8" - } - ], - "name":"isParticipatingInUpcomingRound", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_overlay", - "type":"bytes32" - } - ], - "name":"isWinner", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"minimumStake", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"nextSeed", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"paused", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"renounceRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_overlay", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"_depth", - "type":"uint8" - }, - { - "internalType":"bytes32", - "name":"_hash", - "type":"bytes32" - }, - { - "internalType":"bytes32", - "name":"_revealNonce", - "type":"bytes32" - } - ], - "name":"reveal", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"revokeRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"roundLength", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes4", - "name":"interfaceId", - "type":"bytes4" - } - ], - "name":"supportsInterface", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"winner", - "outputs":[ - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"stake", - "type":"uint256" - }, - { - "internalType":"uint256", - "name":"stakeDensity", - "type":"uint256" - }, - { - "internalType":"bytes32", - "name":"hash", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"depth", - "type":"uint8" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"_overlay", - "type":"bytes32" - }, - { - "internalType":"uint8", - "name":"_depth", - "type":"uint8" - }, - { - "internalType":"bytes32", - "name":"_hash", - "type":"bytes32" - }, - { - "internalType":"bytes32", - "name":"revealNonce", - "type":"bytes32" - } - ], - "name":"wrapCommit", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"pure", - "type":"function" - } -] diff --git a/pkg/config/mainnet_staking_abi.json b/pkg/config/mainnet_staking_abi.json deleted file mode 100644 index ef8a0e4a3bc..00000000000 --- a/pkg/config/mainnet_staking_abi.json +++ /dev/null @@ -1,575 +0,0 @@ -[ - { - "inputs":[ - { - "internalType":"address", - "name":"_bzzToken", - "type":"address" - }, - { - "internalType":"uint64", - "name":"_NetworkId", - "type":"uint64" - } - ], - "stateMutability":"nonpayable", - "type":"constructor" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"Paused", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"bytes32", - "name":"previousAdminRole", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"bytes32", - "name":"newAdminRole", - "type":"bytes32" - } - ], - "name":"RoleAdminChanged", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"address", - "name":"account", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"sender", - "type":"address" - } - ], - "name":"RoleGranted", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "indexed":true, - "internalType":"address", - "name":"account", - "type":"address" - }, - { - "indexed":true, - "internalType":"address", - "name":"sender", - "type":"address" - } - ], - "name":"RoleRevoked", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"bytes32", - "name":"slashed", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"time", - "type":"uint256" - } - ], - "name":"StakeFrozen", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"bytes32", - "name":"slashed", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"StakeSlashed", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":true, - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"stakeAmount", - "type":"uint256" - }, - { - "indexed":false, - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "indexed":false, - "internalType":"uint256", - "name":"lastUpdatedBlock", - "type":"uint256" - } - ], - "name":"StakeUpdated", - "type":"event" - }, - { - "anonymous":false, - "inputs":[ - { - "indexed":false, - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"Unpaused", - "type":"event" - }, - { - "inputs":[], - "name":"DEFAULT_ADMIN_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"PAUSER_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"REDISTRIBUTOR_ROLE", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"bzzToken", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"address", - "name":"_owner", - "type":"address" - }, - { - "internalType":"bytes32", - "name":"nonce", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"depositStake", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"time", - "type":"uint256" - } - ], - "name":"freezeDeposit", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - } - ], - "name":"getRoleAdmin", - "outputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"grantRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"hasRole", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - } - ], - "name":"lastUpdatedBlockNumberOfOverlay", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - } - ], - "name":"ownerOfOverlay", - "outputs":[ - { - "internalType":"address", - "name":"", - "type":"address" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"pause", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[], - "name":"paused", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"renounceRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"role", - "type":"bytes32" - }, - { - "internalType":"address", - "name":"account", - "type":"address" - } - ], - "name":"revokeRole", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"slashDeposit", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - } - ], - "name":"stakeOfOverlay", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"", - "type":"bytes32" - } - ], - "name":"stakes", - "outputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"stakeAmount", - "type":"uint256" - }, - { - "internalType":"address", - "name":"owner", - "type":"address" - }, - { - "internalType":"uint256", - "name":"lastUpdatedBlockNumber", - "type":"uint256" - }, - { - "internalType":"bool", - "name":"isValue", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes4", - "name":"interfaceId", - "type":"bytes4" - } - ], - "name":"supportsInterface", - "outputs":[ - { - "internalType":"bool", - "name":"", - "type":"bool" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[], - "name":"unPause", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - } - ], - "name":"usableStakeOfOverlay", - "outputs":[ - { - "internalType":"uint256", - "name":"", - "type":"uint256" - } - ], - "stateMutability":"view", - "type":"function" - }, - { - "inputs":[ - { - "internalType":"bytes32", - "name":"overlay", - "type":"bytes32" - }, - { - "internalType":"uint256", - "name":"amount", - "type":"uint256" - } - ], - "name":"withdrawFromStake", - "outputs":[], - "stateMutability":"nonpayable", - "type":"function" - } -]