diff --git a/contracts/validator/contract_v2/migrate/test/.env.example b/contracts/validator/contract_v2/migrate/test/.env.example index 3da6401efc2b..ab9a4e2a7fe2 100644 --- a/contracts/validator/contract_v2/migrate/test/.env.example +++ b/contracts/validator/contract_v2/migrate/test/.env.example @@ -1,6 +1,6 @@ -M1_PRIVATE_KEY=0x0000 -M2_PRIVATE_KEY=0x -M3_PRIVATE_KEY=0x -M4_PRIVATE_KEY=0x -M5_PRIVATE_KEY=0x +O1_PRIVATE_KEY=0x0000 +O2_PRIVATE_KEY=0x +O3_PRIVATE_KEY=0x +O4_PRIVATE_KEY=0x +O5_PRIVATE_KEY=0x RPC_URL=https://devnetstats.apothem.network/devnet \ No newline at end of file diff --git a/contracts/validator/contract_v2/migrate/test/scripts/constant.js b/contracts/validator/contract_v2/migrate/test/scripts/constant.js index e8659c48daaf..aab742b2f5c7 100644 --- a/contracts/validator/contract_v2/migrate/test/scripts/constant.js +++ b/contracts/validator/contract_v2/migrate/test/scripts/constant.js @@ -2,11 +2,11 @@ const { createPublicClient, http, createWalletClient } = require("viem"); const { privateKeyToAccount } = require("viem/accounts"); const validatorABI = require("../abi/validatorABI.json"); require("dotenv").config(); -const m1PrivateKey = process.env.M1_PRIVATE_KEY; -const m2PrivateKey = process.env.M2_PRIVATE_KEY; -const m3PrivateKey = process.env.M3_PRIVATE_KEY; -const m4PrivateKey = process.env.M4_PRIVATE_KEY; -const m5PrivateKey = process.env.M5_PRIVATE_KEY; +const o1PrivateKey = process.env.O1_PRIVATE_KEY; +const o2PrivateKey = process.env.O2_PRIVATE_KEY; +const o3PrivateKey = process.env.O3_PRIVATE_KEY; +const o4PrivateKey = process.env.O4_PRIVATE_KEY; +const o5PrivateKey = process.env.O5_PRIVATE_KEY; const rpcUrl = process.env.RPC_URL; const xdc = { @@ -24,11 +24,11 @@ const xdc = { }, }; -const masternode1 = privateKeyToAccount(m1PrivateKey); -const masternode2 = privateKeyToAccount(m2PrivateKey); -const masternode3 = privateKeyToAccount(m3PrivateKey); -const masternode4 = privateKeyToAccount(m4PrivateKey); -const masternode5 = privateKeyToAccount(m5PrivateKey); +const onwer1 = privateKeyToAccount(o1PrivateKey); +const onwer2 = privateKeyToAccount(o2PrivateKey); +const onwer3 = privateKeyToAccount(o3PrivateKey); +const onwe4 = privateKeyToAccount(o4PrivateKey); +const onwe5 = privateKeyToAccount(o5PrivateKey); const publicClient = createPublicClient({ chain: xdc, @@ -56,9 +56,9 @@ module.exports = { walletClient, validator, expect, - masternode1, - masternode2, - masternode3, - masternode4, - masternode5, + onwer1, + onwer2, + onwer3, + onwe4, + onwe5, }; diff --git a/contracts/validator/contract_v2/migrate/test/scripts/testKycInvalidFlow.js b/contracts/validator/contract_v2/migrate/test/scripts/testKycInvalidFlow.js index 5f30266e1e9f..71b035803ea5 100644 --- a/contracts/validator/contract_v2/migrate/test/scripts/testKycInvalidFlow.js +++ b/contracts/validator/contract_v2/migrate/test/scripts/testKycInvalidFlow.js @@ -3,11 +3,11 @@ const { validator, publicClient, expect, - masternode1, - masternode2, - masternode3, - masternode4, - masternode5, + onwer1, + onwer2, + onwer3, + onwe4, + onwe5, } = require("./constant"); const { generatePrivateKey, privateKeyToAccount } = require("viem/accounts"); @@ -22,13 +22,13 @@ async function run() { functionName: "propose", args: [newCandidate.address], value: minCandidateCap, - account: masternode1, + account: onwer1, }); await walletClient.sendTransaction({ to: newCandidate.address, value: minCandidateCap, - account: masternode1, + account: onwer1, }); await walletClient.writeContract({ @@ -63,26 +63,26 @@ async function run() { await walletClient.writeContract({ ...validator, functionName: "voteInvalidKYC", - args: [masternode1.address], - account: masternode2, + args: [onwer1.address], + account: onwer2, }); await walletClient.writeContract({ ...validator, functionName: "voteInvalidKYC", - args: [masternode1.address], - account: masternode3, + args: [onwer1.address], + account: onwer3, }); await walletClient.writeContract({ ...validator, functionName: "voteInvalidKYC", - args: [masternode1.address], - account: masternode4, + args: [onwer1.address], + account: onwe4, }); await walletClient.writeContract({ ...validator, functionName: "voteInvalidKYC", - args: [masternode1.address], - account: masternode5, + args: [onwer1.address], + account: onwe5, }); const pendingKYC2 = await publicClient.readContract({ diff --git a/contracts/validator/contract_v2/migrate/test/scripts/testMainWorkFlow.js b/contracts/validator/contract_v2/migrate/test/scripts/testMainWorkFlow.js index 182f46ac4b58..8497ecb66ade 100644 --- a/contracts/validator/contract_v2/migrate/test/scripts/testMainWorkFlow.js +++ b/contracts/validator/contract_v2/migrate/test/scripts/testMainWorkFlow.js @@ -3,7 +3,7 @@ const { publicClient, validator, expect, - masternode1, + onwer1, } = require("./constant"); const { generatePrivateKey, privateKeyToAccount } = require("viem/accounts"); @@ -19,7 +19,7 @@ async function run() { functionName: "propose", args: [newCandidate.address], value: minCandidateCap, - account: masternode1, + account: onwer1, }); const candidates = await publicClient.readContract({ ...validator, @@ -34,7 +34,7 @@ async function run() { ...validator, functionName: "resign", args: [newCandidate.address], - account: masternode1, + account: onwer1, }); expect( @@ -47,7 +47,7 @@ async function run() { functionName: "propose", args: [newCandidate.address], value: minCandidateCap, - account: masternode1, + account: onwer1, }); await walletClient.writeContract({ @@ -55,7 +55,7 @@ async function run() { functionName: "vote", args: [newCandidate.address], value: minVoterCap, - account: masternode1, + account: onwer1, }); const validatorsState = await publicClient.readContract({ @@ -70,7 +70,7 @@ async function run() { ...validator, functionName: "unvote", args: [newCandidate.address, minVoterCap], - account: masternode1, + account: onwer1, }); const validatorsState2 = await publicClient.readContract({