From c7c282de08d6df6fd2799c3799423b8770c47a87 Mon Sep 17 00:00:00 2001 From: kanshi <46557+kanshi@users.noreply.github.com> Date: Thu, 11 Apr 2024 14:13:47 +0200 Subject: [PATCH] Add sepolia to hardhat, fix policy naming --- hardhat.config.ts | 4 ++++ operations/registrator-deploy-dev-sepolia.hcl | 4 ++-- operations/registrator-deploy-live-sepolia.hcl | 4 ++-- operations/registrator-deploy-stage-sepolia.hcl | 4 ++-- operations/registrator-operator-scripts-dev-sepolia.hcl | 5 ++--- package.json | 2 +- scripts/operator-scripts.ts | 2 -- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index 180dac0..9b71d2f 100755 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -23,6 +23,10 @@ const config = { accounts: [], timeout: 1800000 }, + sepolia: { + url: "https://ethereum-sepolia.publicnode.com", + accounts: [], + }, localhost: { timeout: 18000000 } diff --git a/operations/registrator-deploy-dev-sepolia.hcl b/operations/registrator-deploy-dev-sepolia.hcl index ecb3262..81dc17d 100644 --- a/operations/registrator-deploy-dev-sepolia.hcl +++ b/operations/registrator-deploy-dev-sepolia.hcl @@ -11,14 +11,14 @@ job "registrator-deploy-dev-sepolia" { config { network_mode = "host" - image = "ghcr.io/ator-development/registrator:0.2.1" + image = "ghcr.io/ator-development/registrator:0.2.2" entrypoint = ["npx"] command = "hardhat" args = ["run", "--network", "sepolia", "scripts/deploy.ts"] } vault { - policies = ["registrator-dev-sepolia"] + policies = ["registrator-sepolia-dev"] } template { diff --git a/operations/registrator-deploy-live-sepolia.hcl b/operations/registrator-deploy-live-sepolia.hcl index 095a53c..eaab3c2 100644 --- a/operations/registrator-deploy-live-sepolia.hcl +++ b/operations/registrator-deploy-live-sepolia.hcl @@ -11,14 +11,14 @@ job "registrator-deploy-live-sepolia" { config { network_mode = "host" - image = "ghcr.io/ator-development/registrator:0.2.1" + image = "ghcr.io/ator-development/registrator:0.2.2" entrypoint = ["npx"] command = "hardhat" args = ["run", "--network", "sepolia", "scripts/deploy.ts"] } vault { - policies = ["registrator-live-sepolia"] + policies = ["registrator-sepolia-live"] } template { diff --git a/operations/registrator-deploy-stage-sepolia.hcl b/operations/registrator-deploy-stage-sepolia.hcl index 035a311..1f17232 100644 --- a/operations/registrator-deploy-stage-sepolia.hcl +++ b/operations/registrator-deploy-stage-sepolia.hcl @@ -11,14 +11,14 @@ job "registrator-deploy-stage-sepolia" { config { network_mode = "host" - image = "ghcr.io/ator-development/registrator:0.2.1" + image = "ghcr.io/ator-development/registrator:0.2.2" entrypoint = ["npx"] command = "hardhat" args = ["run", "--network", "sepolia", "scripts/deploy.ts"] } vault { - policies = ["registrator-stage-sepolia"] + policies = ["registrator-sepolia-stage"] } template { diff --git a/operations/registrator-operator-scripts-dev-sepolia.hcl b/operations/registrator-operator-scripts-dev-sepolia.hcl index 95295a7..1b51b85 100644 --- a/operations/registrator-operator-scripts-dev-sepolia.hcl +++ b/operations/registrator-operator-scripts-dev-sepolia.hcl @@ -11,14 +11,14 @@ job "registrator-operator-scripts-dev-sepolia" { config { network_mode = "host" - image = "ghcr.io/ator-development/registrator:0.2.1" + image = "ghcr.io/ator-development/registrator:0.2.2" entrypoint = ["npx"] command = "hardhat" args = ["run", "--network", "sepolia", "scripts/operator-scripts.ts"] } vault { - policies = ["registrator-dev-sepolia"] + policies = ["registrator-sepolia-dev"] } template { @@ -27,7 +27,6 @@ job "registrator-operator-scripts-dev-sepolia" { CONSUL_TOKEN="{{.Data.data.CONSUL_TOKEN}}" JSON_RPC="{{.Data.data.JSON_RPC}}" REGISTRATOR_OPERATOR_ADDRESS="{{.Data.data.REGISTRATOR_OPERATOR_ADDRESS}}" - REGISTRATOR_RECEIVER_ADDRESS="{{.Data.data.REGISTRATOR_RECEIVER_ADDRESS}}" {{end}} EOH destination = "secrets/file.env" diff --git a/package.json b/package.json index 4c66c1c..cf2b6d6 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "facility", - "version": "0.2.1", + "version": "0.2.2", "description": "Routines necessary to claim reward tokens", "main": "index.js", "scripts": { diff --git a/scripts/operator-scripts.ts b/scripts/operator-scripts.ts index 186d0ea..9e330fa 100644 --- a/scripts/operator-scripts.ts +++ b/scripts/operator-scripts.ts @@ -41,8 +41,6 @@ async function main() { const operator = new ethers.Wallet(operatorAddress, provider) console.log(`Operator ${operator.address}`) - // const receiverAddress = process.env.REGISTRATOR_RECEIVER_ADDRESS || '0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65' // Hardhat #4 - const registratorContract = new ethers.Contract(registratorAddress, abi, operator.provider) const registrator = registratorContract.connect(operator)