diff --git a/web/src/contracts.js b/web/src/contracts.js index 9b50b59..db58e95 100644 --- a/web/src/contracts.js +++ b/web/src/contracts.js @@ -8,9 +8,15 @@ import RocketNodeManager from "./generated/contracts/RocketNodeManager.json"; import RocketRewardsPool from "./generated/contracts/RocketRewardsPool.json"; import RocketStorageK from "./generated/contracts/RocketStorage.json"; +// This names, locates, and defines the interface to the contracts we use. +// The address can change during a rocketpool upgrade. The first `address` is the latest address. +// But we hang onto the old addresses for things like searching all event logs. const contracts = { RocketMerkleDistributorMainnet: { - address: "0x7eccbbd05830edf593d30005b8f69e965af4d59f", + address: [ + "0x5cE71E603B138F7e65029Cc1918C0566ed0dBD4B", + "0x7eccbbd05830edf593d30005b8f69e965af4d59f", + ], abi: RocketMerkleDistributorMainnet.abi, }, RocketMinipoolBase: { @@ -21,14 +27,18 @@ const contracts = { }, RocketMinipoolManager: { address: [ - "0x6d010C43d4e96D74C422f2e27370AF48711B49bF", // latest + "0x09fbCE43e4021a3F69C4599FF00362b83edA501E", + "0x6d010C43d4e96D74C422f2e27370AF48711B49bF", "0x84d11b65e026f7aa08f5497dd3593fb083410b71", "0x6293b8abc1f36afb22406be5f96d893072a8cf3a", ], abi: RocketMinipoolManager.abi, }, RocketNetworkPrices: { - address: "0x751826b107672360b764327631cc5764515ffc37", + address: [ + "0x25E54Bf48369b8FB25bB79d3a3Ff7F3BA448E382", + "0x751826b107672360b764327631cc5764515ffc37", + ], abi: RocketNetworkPrices.abi, }, RocketNodeDistributorInterface: { @@ -36,11 +46,15 @@ const contracts = { abi: RocketNodeDistributorInterface.abi, }, RocketNodeManager: { - address: "0x89F478E6Cc24f052103628f36598D4C14Da3D287", + address: [ + "0x2b52479F6ea009907e46fc43e91064D1b92Fdc86", + "0x89F478E6Cc24f052103628f36598D4C14Da3D287", + ], abi: RocketNodeManager.abi, }, RocketRewardsPool: { address: [ + "0xEE4d2A71cF479e0D3d0c3c2C923dbfEB57E73111", "0xA805d68b61956BC92d556F2bE6d18747adAeEe82", "0x594Fb75D3dc2DFa0150Ad03F99F97817747dd4E1", ], diff --git a/web/src/generated/contracts/RocketMerkleDistributorMainnet.json b/web/src/generated/contracts/RocketMerkleDistributorMainnet.json index 4f472ed..778f5e0 100644 --- a/web/src/generated/contracts/RocketMerkleDistributorMainnet.json +++ b/web/src/generated/contracts/RocketMerkleDistributorMainnet.json @@ -114,6 +114,32 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "claimOutstandingEth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + } + ], + "name": "getOutstandingEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { diff --git a/web/src/generated/contracts/RocketMinipoolManager.json b/web/src/generated/contracts/RocketMinipoolManager.json index 5aece2c..b22c5a0 100644 --- a/web/src/generated/contracts/RocketMinipoolManager.json +++ b/web/src/generated/contracts/RocketMinipoolManager.json @@ -12,6 +12,50 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minipool", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "BeginBondReduction", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minipool", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "member", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "CancelReductionVoted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -63,34 +107,110 @@ "type": "event" }, { - "inputs": [], - "name": "version", + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minipool", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "ReductionCancelled", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_salt", + "type": "uint256" + } + ], + "name": "createMinipool", "outputs": [ { - "internalType": "uint8", + "internalType": "contract RocketMinipoolInterface", "name": "", - "type": "uint8" + "type": "address" } ], - "stateMutability": "view", + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "getMinipoolCount", - "outputs": [ + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + }, { "internalType": "uint256", - "name": "", + "name": "_salt", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "_validatorPubkey", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "_bondAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_currentBalance", "type": "uint256" } ], - "stateMutability": "view", + "name": "createVacantMinipool", + "outputs": [ + { + "internalType": "contract RocketMinipoolInterface", + "name": "", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + } + ], + "name": "decrementNodeStakingMinipoolCount", + "outputs": [], + "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "getStakingMinipoolCount", + "name": "destroyMinipool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getActiveMinipoolCount", "outputs": [ { "internalType": "uint256", @@ -114,9 +234,47 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getMinipoolAt", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_pubkey", + "type": "bytes" + } + ], + "name": "getMinipoolByPubkey", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], - "name": "getActiveMinipoolCount", + "name": "getMinipoolCount", "outputs": [ { "internalType": "uint256", @@ -131,12 +289,12 @@ "inputs": [ { "internalType": "uint256", - "name": "offset", + "name": "_offset", "type": "uint256" }, { "internalType": "uint256", - "name": "limit", + "name": "_limit", "type": "uint256" } ], @@ -174,22 +332,17 @@ { "inputs": [ { - "internalType": "uint256", - "name": "offset", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "limit", - "type": "uint256" + "internalType": "address", + "name": "_minipoolAddress", + "type": "address" } ], - "name": "getPrelaunchMinipools", + "name": "getMinipoolDepositType", "outputs": [ { - "internalType": "address[]", + "internalType": "enum MinipoolDeposit", "name": "", - "type": "address[]" + "type": "uint8" } ], "stateMutability": "view", @@ -198,19 +351,38 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_index", - "type": "uint256" + "internalType": "address", + "name": "_minipoolAddress", + "type": "address" } ], - "name": "getMinipoolAt", + "name": "getMinipoolDestroyed", "outputs": [ { - "internalType": "address", + "internalType": "bool", "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_minipoolAddress", "type": "address" } ], + "name": "getMinipoolExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], "stateMutability": "view", "type": "function" }, @@ -218,16 +390,16 @@ "inputs": [ { "internalType": "address", - "name": "_nodeAddress", + "name": "_minipoolAddress", "type": "address" } ], - "name": "getNodeMinipoolCount", + "name": "getMinipoolPubkey", "outputs": [ { - "internalType": "uint256", + "internalType": "bytes", "name": "", - "type": "uint256" + "type": "bytes" } ], "stateMutability": "view", @@ -237,21 +409,40 @@ "inputs": [ { "internalType": "address", - "name": "_nodeAddress", + "name": "_minipoolAddress", "type": "address" } ], - "name": "getNodeActiveMinipoolCount", + "name": "getMinipoolRPLSlashed", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_minipoolAddress", + "type": "address" + } + ], + "name": "getMinipoolWithdrawalCredentials", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "pure", + "type": "function" + }, { "inputs": [ { @@ -260,7 +451,7 @@ "type": "address" } ], - "name": "getNodeFinalisedMinipoolCount", + "name": "getNodeActiveMinipoolCount", "outputs": [ { "internalType": "uint256", @@ -279,7 +470,7 @@ "type": "address" } ], - "name": "getNodeStakingMinipoolCount", + "name": "getNodeFinalisedMinipoolCount", "outputs": [ { "internalType": "uint256", @@ -322,7 +513,7 @@ "type": "address" } ], - "name": "getNodeValidatingMinipoolCount", + "name": "getNodeMinipoolCount", "outputs": [ { "internalType": "uint256", @@ -339,19 +530,14 @@ "internalType": "address", "name": "_nodeAddress", "type": "address" - }, - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" } ], - "name": "getNodeValidatingMinipoolAt", + "name": "getNodeStakingMinipoolCount", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -360,17 +546,22 @@ { "inputs": [ { - "internalType": "bytes", - "name": "_pubkey", - "type": "bytes" + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_depositSize", + "type": "uint256" } ], - "name": "getMinipoolByPubkey", + "name": "getNodeStakingMinipoolCountBySize", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -380,16 +571,21 @@ "inputs": [ { "internalType": "address", - "name": "_minipoolAddress", + "name": "_nodeAddress", "type": "address" + }, + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" } ], - "name": "getMinipoolExists", + "name": "getNodeValidatingMinipoolAt", "outputs": [ { - "internalType": "bool", + "internalType": "address", "name": "", - "type": "bool" + "type": "address" } ], "stateMutability": "view", @@ -399,16 +595,16 @@ "inputs": [ { "internalType": "address", - "name": "_minipoolAddress", + "name": "_nodeAddress", "type": "address" } ], - "name": "getMinipoolDestroyed", + "name": "getNodeValidatingMinipoolCount", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", @@ -417,17 +613,35 @@ { "inputs": [ { - "internalType": "address", - "name": "_minipoolAddress", - "type": "address" + "internalType": "uint256", + "name": "_offset", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_limit", + "type": "uint256" } ], - "name": "getMinipoolPubkey", + "name": "getPrelaunchMinipools", "outputs": [ { - "internalType": "bytes", + "internalType": "address[]", "name": "", - "type": "bytes" + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStakingMinipoolCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -435,21 +649,34 @@ }, { "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getVacantMinipoolAt", + "outputs": [ { "internalType": "address", - "name": "_minipoolAddress", + "name": "", "type": "address" } ], - "name": "getMinipoolWithdrawalCredentials", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVacantMinipoolCount", "outputs": [ { - "internalType": "bytes", + "internalType": "uint256", "name": "", - "type": "bytes" + "type": "uint256" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" }, { @@ -460,7 +687,7 @@ "type": "address" } ], - "name": "incrementNodeStakingMinipoolCount", + "name": "incrementNodeFinalisedMinipoolCount", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -473,7 +700,14 @@ "type": "address" } ], - "name": "decrementNodeStakingMinipoolCount", + "name": "incrementNodeStakingMinipoolCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "removeVacantMinipool", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -481,12 +715,12 @@ { "inputs": [ { - "internalType": "address", - "name": "_nodeAddress", - "type": "address" + "internalType": "bytes", + "name": "_pubkey", + "type": "bytes" } ], - "name": "incrementNodeFinalisedMinipoolCount", + "name": "setMinipoolPubkey", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -497,32 +731,9 @@ "internalType": "address", "name": "_nodeAddress", "type": "address" - }, - { - "internalType": "enum MinipoolDeposit", - "name": "_depositType", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "_salt", - "type": "uint256" - } - ], - "name": "createMinipool", - "outputs": [ - { - "internalType": "contract RocketMinipoolInterface", - "name": "", - "type": "address" } ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "destroyMinipool", + "name": "tryDistribute", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -530,27 +741,42 @@ { "inputs": [ { - "internalType": "bytes", - "name": "_pubkey", - "type": "bytes" + "internalType": "uint256", + "name": "_previousBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newBond", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_previousFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_newFee", + "type": "uint256" } ], - "name": "setMinipoolPubkey", + "name": "updateNodeStakingMinipoolCount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "getMinipoolBytecode", + "name": "version", "outputs": [ { - "internalType": "bytes", + "internalType": "uint8", "name": "", - "type": "bytes" + "type": "uint8" } ], - "stateMutability": "pure", + "stateMutability": "view", "type": "function" } ] diff --git a/web/src/generated/contracts/RocketNetworkPrices.json b/web/src/generated/contracts/RocketNetworkPrices.json index 248c615..a543553 100644 --- a/web/src/generated/contracts/RocketNetworkPrices.json +++ b/web/src/generated/contracts/RocketNetworkPrices.json @@ -27,6 +27,12 @@ "name": "block", "type": "uint256" }, + { + "indexed": false, + "internalType": "uint256", + "name": "slotTimestamp", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", @@ -47,11 +53,17 @@ "anonymous": false, "inputs": [ { - "indexed": false, + "indexed": true, "internalType": "uint256", "name": "block", "type": "uint256" }, + { + "indexed": false, + "internalType": "uint256", + "name": "slotTimestamp", + "type": "uint256" + }, { "indexed": false, "internalType": "uint256", @@ -75,6 +87,11 @@ "name": "_block", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_slotTimestamp", + "type": "uint256" + }, { "internalType": "uint256", "name": "_rplPrice", @@ -86,19 +103,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "getLatestReportableBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getPricesBlock", @@ -132,6 +136,11 @@ "name": "_block", "type": "uint256" }, + { + "internalType": "uint256", + "name": "_slotTimestamp", + "type": "uint256" + }, { "internalType": "uint256", "name": "_rplPrice", diff --git a/web/src/generated/contracts/RocketNodeManager.json b/web/src/generated/contracts/RocketNodeManager.json index f63adfb..093ccaa 100644 --- a/web/src/generated/contracts/RocketNodeManager.json +++ b/web/src/generated/contracts/RocketNodeManager.json @@ -12,6 +12,50 @@ "stateMutability": "nonpayable", "type": "constructor" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "node", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "withdrawalAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "NodeRPLWithdrawalAddressSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "node", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "time", + "type": "uint256" + } + ], + "name": "NodeRPLWithdrawalAddressUnset", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -88,6 +132,19 @@ "name": "NodeTimezoneLocationSet", "type": "event" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + } + ], + "name": "confirmRPLWithdrawalAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -383,6 +440,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + } + ], + "name": "getNodePendingRPLWithdrawalAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -402,6 +478,44 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + } + ], + "name": "getNodeRPLWithdrawalAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + } + ], + "name": "getNodeRPLWithdrawalAddressIsSet", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -560,6 +674,29 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRPLWithdrawalAddress", + "type": "address" + }, + { + "internalType": "bool", + "name": "_confirm", + "type": "bool" + } + ], + "name": "setRPLWithdrawalAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -604,6 +741,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeAddress", + "type": "address" + } + ], + "name": "unsetRPLWithdrawalAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "version", diff --git a/web/src/generated/contracts/RocketRewardsPool.json b/web/src/generated/contracts/RocketRewardsPool.json index 767c87e..2fe8686 100644 --- a/web/src/generated/contracts/RocketRewardsPool.json +++ b/web/src/generated/contracts/RocketRewardsPool.json @@ -264,6 +264,25 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_interval", + "type": "uint256" + } + ], + "name": "getClaimIntervalExecutionAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -488,6 +507,87 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_trustedNodeAddress", + "type": "address" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rewardIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "consensusBlock", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "merkleTreeCID", + "type": "string" + }, + { + "internalType": "uint256", + "name": "intervalsPassed", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "treasuryRPL", + "type": "uint256" + }, + { + "internalType": "uint256[]", + "name": "trustedNodeRPL", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "nodeRPL", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "nodeETH", + "type": "uint256[]" + }, + { + "internalType": "uint256", + "name": "userETH", + "type": "uint256" + } + ], + "internalType": "struct RewardSubmission", + "name": "_submission", + "type": "tuple" + } + ], + "name": "getSubmissionFromNodeExists", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ {