From f74396b3d2d349742ff4c0c5f42df8dcad5fefe2 Mon Sep 17 00:00:00 2001 From: shreyas Date: Thu, 4 Aug 2022 13:19:22 +0530 Subject: [PATCH 1/6] Deployment scripts for REXForce --- scripts/bounty.ts | 24 ++++++++++++++++++++++++ scripts/captain.ts | 24 ++++++++++++++++++++++++ scripts/deploy.ts | 39 +++++++++++++++++++++------------------ 3 files changed, 69 insertions(+), 18 deletions(-) create mode 100644 scripts/bounty.ts create mode 100644 scripts/captain.ts diff --git a/scripts/bounty.ts b/scripts/bounty.ts new file mode 100644 index 0000000..146b2b8 --- /dev/null +++ b/scripts/bounty.ts @@ -0,0 +1,24 @@ +import { ethers } from "hardhat"; + +async function main() { + const captainContractAddress = "0x0000000000000000000000000000000000000000"; + const ricAddress = "0x0000000000000000000000000000000000000000"; + const tellor = ""; + const host = "0x0000000000000000000000000000000000000000"; + const cfa = "0x0000000000000000000000000000000000000000"; + const registrationKey = "0x0000000000000000000000000000000000000000"; + + const Bounty = await ethers.getContractFactory("RexBounty"); + const bounty = await Bounty.deploy(captainContractAddress, ricAddress, tellor, host, cfa, registrationKey); + + await bounty.deployed(); + + console.log("RexCaptain deployed to:", bounty.address); +} + +// We recommend this pattern to be able to use async/await everywhere +// and properly handle errors. +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/scripts/captain.ts b/scripts/captain.ts new file mode 100644 index 0000000..06e6d8a --- /dev/null +++ b/scripts/captain.ts @@ -0,0 +1,24 @@ +import { ethers } from "hardhat"; + +async function main() { + const ricAddress = "0x0000000000000000000000000000000000000000"; + const name = "Mike"; + const email = ""; + const _host = "0x0000000000000000000000000000000000000000"; + const _cfa = "0x0000000000000000000000000000000000000000"; + const _registrationKey = "0x0000000000000000000000000000000000000000"; + + const Captain = await ethers.getContractFactory("RexCaptain"); + const captain = await Captain.deploy(ricAddress, name, email, _host, _cfa, _registrationKey); + + await captain.deployed(); + + console.log("RexCaptain deployed to:", captain.address); +} + +// We recommend this pattern to be able to use async/await everywhere +// and properly handle errors. +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); diff --git a/scripts/deploy.ts b/scripts/deploy.ts index 490acf4..788a3fb 100644 --- a/scripts/deploy.ts +++ b/scripts/deploy.ts @@ -1,30 +1,33 @@ -// We require the Hardhat Runtime Environment explicitly here. This is optional -// but useful for running the script in a standalone fashion through `node