Skip to content

Commit

Permalink
build: Seperate deploy scripts for Ojo and MockOjo
Browse files Browse the repository at this point in the history
  • Loading branch information
rbajollari committed Nov 28, 2023
1 parent 81516ec commit 9708934
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
18 changes: 18 additions & 0 deletions scripts/deployMockOjo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { ethers } from "hardhat";

async function main() {
const ojoContractddress = "";

const MockOjo = await ethers.getContractFactory("MockOjoContract");
const mockOjo = await MockOjo.deploy(ojoContractddress);
await mockOjo.waitForDeployment();

console.log(
`MockOjo deployed to ${await mockOjo.getAddress()}`,
);
}

main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
13 changes: 3 additions & 10 deletions scripts/deploy.ts → scripts/deployOjo.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
import { ethers } from "hardhat";

async function main() {
const axelarGatewayAddress = "0xe432150cce91c13a887f7D836923d5597adD8E31"; // Goerli Testnet Address
const axelarGasReceiverAddress = "0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6"; // Goerli Testnet Address
const axelarGatewayAddress = "0xe432150cce91c13a887f7D836923d5597adD8E31";
const axelarGasReceiverAddress = "0xbE406F0189A0B4cf3A05C286473D23791Dd44Cc6";
const ojoChain = "";
const ojoAddress = "";
const resolveWindow = 1800

const Ojo = await ethers.getContractFactory("Ojo");
const ojo = await Ojo.deploy(axelarGatewayAddress, axelarGasReceiverAddress, ojoChain, ojoAddress, resolveWindow);
await ojo.waitForDeployment();
const ojoContractddress = await ojo.getAddress();

const MockOjo = await ethers.getContractFactory("MockOjoContract");
const mockOjo = await MockOjo.deploy(ojoContractddress);
await mockOjo.waitForDeployment();
const mockOjoContractddress = await mockOjo.getAddress();

console.log(
`Ojo deployed to ${ojoContractddress}\n`,
`MockOjo deployed to ${mockOjoContractddress}`
`Ojo deployed to ${await ojo.getAddress()}\n`,
);
}

Expand Down

0 comments on commit 9708934

Please sign in to comment.