From 1f78e6874b2c2af94a50c9e0fde16d6260022e08 Mon Sep 17 00:00:00 2001 From: Uladzislau Hubar Date: Fri, 23 Aug 2024 15:44:52 +0700 Subject: [PATCH] Updated unit tests --- abi/ParanetIncentivesPoolFactory.json | 5 ++ abi/ParanetNeuroIncentivesPool.json | 69 +++++++++++++++++++-------- test/v2/integration/Paranet.test.ts | 1 + test/v2/unit/Paranet.test.ts | 1 + 4 files changed, 57 insertions(+), 19 deletions(-) diff --git a/abi/ParanetIncentivesPoolFactory.json b/abi/ParanetIncentivesPoolFactory.json index c276757b..ef433cee 100644 --- a/abi/ParanetIncentivesPoolFactory.json +++ b/abi/ParanetIncentivesPoolFactory.json @@ -75,6 +75,11 @@ }, { "inputs": [ + { + "internalType": "bool", + "name": "isNativeReward", + "type": "bool" + }, { "internalType": "address", "name": "paranetKAStorageContract", diff --git a/abi/ParanetNeuroIncentivesPool.json b/abi/ParanetNeuroIncentivesPool.json index 288bf3eb..283ee154 100644 --- a/abi/ParanetNeuroIncentivesPool.json +++ b/abi/ParanetNeuroIncentivesPool.json @@ -6,6 +6,11 @@ "name": "hubAddress", "type": "address" }, + { + "internalType": "address", + "name": "rewardTokenAddress", + "type": "address" + }, { "internalType": "address", "name": "paranetsRegistryAddress", @@ -81,19 +86,19 @@ "anonymous": false, "inputs": [ { - "indexed": false, - "internalType": "uint256", - "name": "oldMultiplier", - "type": "uint256" + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "newMultiplier", + "name": "amount", "type": "uint256" } ], - "name": "NeuroEmissionMultiplierUpdateFinalized", + "name": "NativeNeuroRewardDeposit", "type": "event" }, { @@ -110,34 +115,34 @@ "internalType": "uint256", "name": "newMultiplier", "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "timestamp", - "type": "uint256" } ], - "name": "NeuroEmissionMultiplierUpdateInitiated", + "name": "NeuroEmissionMultiplierUpdateFinalized", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "oldMultiplier", + "type": "uint256" }, { "indexed": false, "internalType": "uint256", - "name": "amount", + "name": "newMultiplier", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "timestamp", "type": "uint256" } ], - "name": "NeuroRewardDeposit", + "name": "NeuroEmissionMultiplierUpdateInitiated", "type": "event" }, { @@ -715,6 +720,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "isNativeNeuro", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -924,6 +942,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "token", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "totalMinersClaimedNeuro", diff --git a/test/v2/integration/Paranet.test.ts b/test/v2/integration/Paranet.test.ts index 9ed9a413..d601b798 100644 --- a/test/v2/integration/Paranet.test.ts +++ b/test/v2/integration/Paranet.test.ts @@ -123,6 +123,7 @@ describe('@v2 @integration Paranet', function () { await tx1.wait(); const tx2 = await ParanetIncentivesPoolFactory.connect(operator).deployNeuroIncentivesPool( + true, ContentAssetStorage.address, paranetKATokenId, tracToNeuroEmissionMultiplier, diff --git a/test/v2/unit/Paranet.test.ts b/test/v2/unit/Paranet.test.ts index 9a2b8b4d..95f55249 100644 --- a/test/v2/unit/Paranet.test.ts +++ b/test/v2/unit/Paranet.test.ts @@ -960,6 +960,7 @@ describe('@v2 @unit ParanetKnowledgeMinersRegistry contract', function () { paranetDescription, ); await ParanetIncentivesPoolFactory.connect(accounts[100 + number]).deployNeuroIncentivesPool( + true, paranetKAStorageContract, paranetKATokenId, tracToNeuroEmissionMultiplier,