From a964278f1c6b7aff4e39cd01b8659620d2e5898e Mon Sep 17 00:00:00 2001 From: Zhivko Angelov Date: Fri, 8 Apr 2022 20:08:01 +0300 Subject: [PATCH] Deployment on RSK Testnet --- README.md | 16 ++++++++++++++-- hardhat.config.js | 9 +++++---- scripts/deploy/protocol.js | 2 +- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bf98d74..514c0ee 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Repo for the smart contracts -#### Development +### Development Clone the repository and install all dependencies @@ -24,7 +24,7 @@ Run sanity check $ npm run test ``` -Useful scripts +### Useful scripts (localhost) ``` Deploy protocol with initial data @@ -36,3 +36,15 @@ $ npm run script:dev:mint-tokens Deploy contracts only $ npm run script:dev:deploy-protocol ``` + +### Useful scripts (RSK TestNet) +``` +Configure private key in hardhat.config.js: networks.rskTestNet.accounts + +Deploy protocol on RSK TestNet +$ npx hardhat run --network rskTestNet scripts/dev/deploy-protocol.js + +Create tokens +$ npx hardhat run --network rskTestNet scripts/dev/mint-tokens.js + +``` diff --git a/hardhat.config.js b/hardhat.config.js index ab6807c..7504c57 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -25,15 +25,16 @@ module.exports = { defaultNetwork: "localhost", networks: { hardhat: { - // mining: { - // auto: true, - // interval: 1, - // }, }, localhost: { url: "http://localhost:8545", chainId: 31337, }, + rskTestNet: { + url: "https://public-node.testnet.rsk.co", + chainId: 31, + accounts: ["private key"] // Replace with your private key here + } }, mocha: { timeout: 40000, diff --git a/scripts/deploy/protocol.js b/scripts/deploy/protocol.js index 051b17f..4b2de2f 100644 --- a/scripts/deploy/protocol.js +++ b/scripts/deploy/protocol.js @@ -2,7 +2,7 @@ const hre = require("hardhat"); const ProtocolHelper = require("../helpers/Protocol"); -const WRBTC_ADDRESS = null; +const WRBTC_ADDRESS = ""; async function main() { const { VerificationRegistry, PondFactory, wrbtcAddress } = await ProtocolHelper.deploy({