diff --git a/scripts/deployment/README.md b/scripts/deployment/README.md index 0531c38..4f48bc1 100644 --- a/scripts/deployment/README.md +++ b/scripts/deployment/README.md @@ -31,14 +31,16 @@ Parameters of the `globals.json` file: liveness (activity). In other words, it's the minimum number of transactions the service multisig needs to perform in order to pass the liveness check. To check this `rewardsPerSecond* livenessPeriod/1e18` should approximate the number of txs required per livenessPeriod. Assuming the number of required tx-s per day is 10, the liveness ratio can be checked by means of [this formula](https://www.wolframalpha.com/input?i=%28115740740740740+*+60+*+60+*+24%29+%2F+10%5E18); -- `mechActivityCheckerAddress`: a mech activity checker contract address that is currently deployed using `agentMechAddress` - and `livenessRatio` values; +- `stakingActivityCheckerAddress`: a basic activity checker contract address that uses only the `livenessRatio` value; +- `singleMechActivityCheckerAddress`: a mech activity checker contract address that uses `agentMechAddress` and `livenessRatio` values; +- `mechActivityCheckerAddress`: a mech activity checker contract address that uses deliveries of `mechMarketplaceAddress` and `livenessRatio` values; +- `requesterActivityCheckerAddress`: a mech activity checker contract address that uses requests of `mechMarketplaceAddress` and `livenessRatio` values; - `stakingTokenAddress`: a staking token implementation address all the instances are created with when deploying a proxy staking contract; - `stakingFactoryAddress`: a staking proxy factory that creates each proxy staking contract; - `stakingParams`: a set of staking contract parameters used to initiate each staking proxy contract. See [here](https://github.com/valory-xyz/autonolas-registries/blob/main/docs/StakingSmartContracts.pdf) for more details. The script file name identifies the number of deployment steps taken from / to the number in the file name. For example: -- `deploy_01_mech_activity_checker.js` will complete step 1. +- `deploy_01_staking_token_instance.js` will complete step 1. Export network-related API keys defined in `hardhat.config.js` file that correspond to the required network. diff --git a/scripts/deployment/deploy_02_staking_token_instance.js b/scripts/deployment/deploy_01_staking_token_instance.js similarity index 96% rename from scripts/deployment/deploy_02_staking_token_instance.js rename to scripts/deployment/deploy_01_staking_token_instance.js index 0e00d8c..2980092 100644 --- a/scripts/deployment/deploy_02_staking_token_instance.js +++ b/scripts/deployment/deploy_01_staking_token_instance.js @@ -51,7 +51,7 @@ async function main() { const stakingToken = await ethers.getContractAt("StakingToken", stakingTokenAddress); // Transaction signing and execution - console.log("21. EOA to deploy StakingTokenInstance via the StakingFactory"); + console.log("1. EOA to deploy StakingTokenInstance via the StakingFactory"); console.log("You are signing the following transaction: StakingFactory.connect(EOA).createStakingInstance()"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const initPayload = stakingToken.interface.encodeFunctionData("initialize", [stakingParams, @@ -77,7 +77,7 @@ async function main() { // Contract verification if (parsedData.contractVerification) { const execSync = require("child_process").execSync; - execSync("npx hardhat verify --constructor-args scripts/deployment/verify_02_staking_token_instance.js --network " + providerName + " " + stakingTokenInstanceAddress, { encoding: "utf-8" }); + execSync("npx hardhat verify --constructor-args scripts/deployment/verify_01_staking_token_instance.js --network " + providerName + " " + stakingTokenInstanceAddress, { encoding: "utf-8" }); } } diff --git a/scripts/deployment/deploy_03_staking_native_token_instance.js b/scripts/deployment/deploy_02_staking_native_token_instance.js similarity index 95% rename from scripts/deployment/deploy_03_staking_native_token_instance.js rename to scripts/deployment/deploy_02_staking_native_token_instance.js index e575452..5a08851 100644 --- a/scripts/deployment/deploy_03_staking_native_token_instance.js +++ b/scripts/deployment/deploy_02_staking_native_token_instance.js @@ -49,7 +49,7 @@ async function main() { const stakingNativeToken = await ethers.getContractAt("StakingNativeToken", stakingNativeTokenAddress); // Transaction signing and execution - console.log("22. EOA to deploy StakingNativeTokenInstance via the StakingFactory"); + console.log("2. EOA to deploy StakingNativeTokenInstance via the StakingFactory"); console.log("You are signing the following transaction: StakingFactory.connect(EOA).createStakingInstance()"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const initPayload = stakingNativeToken.interface.encodeFunctionData("initialize", [stakingParams]); @@ -73,7 +73,7 @@ async function main() { // Contract verification if (parsedData.contractVerification) { const execSync = require("child_process").execSync; - execSync("npx hardhat verify --constructor-args scripts/deployment/verify_03_staking_native_token_instance.js --network " + providerName + " " + stakingNativeTokenInstanceAddress, { encoding: "utf-8" }); + execSync("npx hardhat verify --constructor-args scripts/deployment/verify_02_staking_native_token_instance.js --network " + providerName + " " + stakingNativeTokenInstanceAddress, { encoding: "utf-8" }); } } diff --git a/scripts/deployment/deploy_00_basic_service_staking_activity_checker.js b/scripts/deployment/deploy_03_basic_staking_activity_checker.js similarity index 96% rename from scripts/deployment/deploy_00_basic_service_staking_activity_checker.js rename to scripts/deployment/deploy_03_basic_staking_activity_checker.js index a79ed98..37b0694 100644 --- a/scripts/deployment/deploy_00_basic_service_staking_activity_checker.js +++ b/scripts/deployment/deploy_03_basic_staking_activity_checker.js @@ -53,7 +53,7 @@ async function main() { console.log("EOA is:", deployer); // Transaction signing and execution - console.log("0. EOA to deploy StakingActivityChecker"); + console.log("3. EOA to deploy StakingActivityChecker"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const StakingActivityChecker = await ethers.getContractFactory("StakingActivityChecker"); console.log("You are signing the following transaction: StakingActivityChecker.connect(EOA).deploy()"); @@ -74,7 +74,7 @@ async function main() { // Contract verification if (parsedData.contractVerification) { const execSync = require("child_process").execSync; - execSync("npx hardhat verify --constructor-args scripts/deployment/verify_00_basic_service_staking_activity_checker.js --network " + providerName + " " + stakingActivityChecker.address, { encoding: "utf-8" }); + execSync("npx hardhat verify --constructor-args scripts/deployment/verify_03_basic_service_staking_activity_checker.js --network " + providerName + " " + stakingActivityChecker.address, { encoding: "utf-8" }); } } diff --git a/scripts/deployment/deploy_05_single_mech_activity_checker.js b/scripts/deployment/deploy_04_single_mech_activity_checker.js similarity index 95% rename from scripts/deployment/deploy_05_single_mech_activity_checker.js rename to scripts/deployment/deploy_04_single_mech_activity_checker.js index dab1465..5c8dc61 100644 --- a/scripts/deployment/deploy_05_single_mech_activity_checker.js +++ b/scripts/deployment/deploy_04_single_mech_activity_checker.js @@ -43,7 +43,7 @@ async function main() { console.log("EOA is:", deployer); // Transaction signing and execution - console.log("5. EOA to deploy SingleMechActivityChecker"); + console.log("4. EOA to deploy SingleMechActivityChecker"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const SingleMechActivityChecker = await ethers.getContractFactory("SingleMechActivityChecker"); console.log("You are signing the following transaction: SingleMechActivityChecker.connect(EOA).deploy()"); @@ -65,7 +65,7 @@ async function main() { // Contract verification if (parsedData.contractVerification) { const execSync = require("child_process").execSync; - execSync("npx hardhat verify --constructor-args scripts/deployment/verify_05_single_mech_activity_checker.js --network " + providerName + " " + singleMechActivityChecker.address, { encoding: "utf-8" }); + execSync("npx hardhat verify --constructor-args scripts/deployment/verify_04_single_mech_activity_checker.js --network " + providerName + " " + singleMechActivityChecker.address, { encoding: "utf-8" }); } } diff --git a/scripts/deployment/deploy_01_mech_activity_checker.js b/scripts/deployment/deploy_05_mech_activity_checker.js similarity index 96% rename from scripts/deployment/deploy_01_mech_activity_checker.js rename to scripts/deployment/deploy_05_mech_activity_checker.js index 5543c4b..9608f9e 100644 --- a/scripts/deployment/deploy_01_mech_activity_checker.js +++ b/scripts/deployment/deploy_05_mech_activity_checker.js @@ -43,7 +43,7 @@ async function main() { console.log("EOA is:", deployer); // Transaction signing and execution - console.log("1. EOA to deploy MechActivityChecker"); + console.log("5. EOA to deploy MechActivityChecker"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const MechActivityChecker = await ethers.getContractFactory("MechActivityChecker"); console.log("You are signing the following transaction: MechActivityChecker.connect(EOA).deploy()"); @@ -65,7 +65,7 @@ async function main() { // Contract verification if (parsedData.contractVerification) { const execSync = require("child_process").execSync; - execSync("npx hardhat verify --constructor-args scripts/deployment/verify_01_mech_activity_checker.js --network " + providerName + " " + mechActivityChecker.address, { encoding: "utf-8" }); + execSync("npx hardhat verify --constructor-args scripts/deployment/verify_05_mech_activity_checker.js --network " + providerName + " " + mechActivityChecker.address, { encoding: "utf-8" }); } } diff --git a/scripts/deployment/deploy_04_requester_activity_checker.js b/scripts/deployment/deploy_06_requester_activity_checker.js similarity index 95% rename from scripts/deployment/deploy_04_requester_activity_checker.js rename to scripts/deployment/deploy_06_requester_activity_checker.js index a2d798a..8bd28c3 100644 --- a/scripts/deployment/deploy_04_requester_activity_checker.js +++ b/scripts/deployment/deploy_06_requester_activity_checker.js @@ -43,7 +43,7 @@ async function main() { console.log("EOA is:", deployer); // Transaction signing and execution - console.log("4. EOA to deploy RequesterActivityChecker"); + console.log("6. EOA to deploy RequesterActivityChecker"); const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei"); const RequesterActivityChecker = await ethers.getContractFactory("RequesterActivityChecker"); console.log("You are signing the following transaction: RequesterActivityChecker.connect(EOA).deploy()"); @@ -65,7 +65,7 @@ async function main() { // Contract verification if (parsedData.contractVerification) { const execSync = require("child_process").execSync; - execSync("npx hardhat verify --constructor-args scripts/deployment/verify_04_requester_activity_checker.js --network " + providerName + " " + requesterActivityChecker.address, { encoding: "utf-8" }); + execSync("npx hardhat verify --constructor-args scripts/deployment/verify_06_requester_activity_checker.js --network " + providerName + " " + requesterActivityChecker.address, { encoding: "utf-8" }); } } diff --git a/scripts/deployment/verify_02_staking_token_instance.js b/scripts/deployment/verify_01_staking_token_instance.js similarity index 100% rename from scripts/deployment/verify_02_staking_token_instance.js rename to scripts/deployment/verify_01_staking_token_instance.js diff --git a/scripts/deployment/verify_03_staking_native_token_instance.js b/scripts/deployment/verify_02_staking_native_token_instance.js similarity index 100% rename from scripts/deployment/verify_03_staking_native_token_instance.js rename to scripts/deployment/verify_02_staking_native_token_instance.js diff --git a/scripts/deployment/verify_00_basic_service_staking_activity_checker.js b/scripts/deployment/verify_03_basic_service_staking_activity_checker.js similarity index 100% rename from scripts/deployment/verify_00_basic_service_staking_activity_checker.js rename to scripts/deployment/verify_03_basic_service_staking_activity_checker.js diff --git a/scripts/deployment/verify_05_single_mech_activity_checker.js b/scripts/deployment/verify_04_single_mech_activity_checker.js similarity index 100% rename from scripts/deployment/verify_05_single_mech_activity_checker.js rename to scripts/deployment/verify_04_single_mech_activity_checker.js diff --git a/scripts/deployment/verify_01_mech_activity_checker.js b/scripts/deployment/verify_05_mech_activity_checker.js similarity index 100% rename from scripts/deployment/verify_01_mech_activity_checker.js rename to scripts/deployment/verify_05_mech_activity_checker.js diff --git a/scripts/deployment/verify_04_requester_activity_checker.js b/scripts/deployment/verify_06_requester_activity_checker.js similarity index 100% rename from scripts/deployment/verify_04_requester_activity_checker.js rename to scripts/deployment/verify_06_requester_activity_checker.js