Skip to content

Commit

Permalink
[Contract] Upgrade version
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKim20 committed Apr 24, 2024
1 parent 2c22a61 commit cd77a44
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
4 changes: 2 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dms-bridge-contracts",
"version": "1.2.3",
"version": "1.3.0",
"description": "Smart Contracts of DMS Bridge",
"files": [
"**/*.sol"
Expand Down Expand Up @@ -43,7 +43,7 @@
"chai-http": "^4.3.7",
"dotenv": "^10.0.0",
"ethereum-waffle": "^4.0.10",
"ethers": "npm:boa-ethers2@^5.7.9",
"ethers": "^5.7.0",
"hardhat": "^2.12.7",
"hardhat-gas-reporter": "^1.0.7",
"loyalty-tokens": "^1.1.0",
Expand Down
7 changes: 0 additions & 7 deletions packages/validator/test/02-Bridge.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ import { BridgeScheduler } from "../src/scheduler/BridgeScheduler";

chai.use(solidity);

interface IShopData {
shopId: string;
name: string;
currency: string;
wallet: Wallet;
}

describe("Test for Bridge", () => {
const config = new Config();
config.readFromFile(path.resolve(process.cwd(), "config", "config_test.yaml"));
Expand Down
13 changes: 6 additions & 7 deletions packages/validator/test/helper/Deployments.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "@openzeppelin/hardhat-upgrades";
import { ethers, upgrades } from "hardhat";

import { BaseContract, Wallet } from "ethers";

Expand Down Expand Up @@ -38,7 +37,7 @@ export class Deployments {
this.network = network;
this.deployments = new Map<string, IDeployedContract>();

const raws = HardhatAccount.keys.map((m) => new Wallet(m, ethers.provider));
const raws = HardhatAccount.keys.map((m) => new Wallet(m, hre.ethers.provider));
const [
deployer,
fee,
Expand Down Expand Up @@ -117,7 +116,7 @@ async function deployToken(accounts: IAccount, deployment: Deployments) {
console.log(`Deploy ${contractName}...`);

await hre.changeNetwork(deployment.network);
const factory = await ethers.getContractFactory("TestLYT");
const factory = await hre.ethers.getContractFactory("TestLYT");
const contract = (await factory.connect(accounts.deployer).deploy(accounts.deployer.address)) as TestLYT;
await contract.deployed();
await contract.deployTransaction.wait();
Expand Down Expand Up @@ -145,8 +144,8 @@ async function deployBridgeValidator(accounts: IAccount, deployment: Deployments
console.log(`Deploy ${contractName}...`);

await hre.changeNetwork(deployment.network);
const factory = await ethers.getContractFactory("BridgeValidator");
const contract = (await upgrades.deployProxy(
const factory = await hre.ethers.getContractFactory("BridgeValidator");
const contract = (await hre.upgrades.deployProxy(
factory.connect(accounts.deployer),
[accounts.bridgeValidators.map((m) => m.address), 3],
{
Expand All @@ -170,8 +169,8 @@ async function deployBridge(accounts: IAccount, deployment: Deployments) {
}

await hre.changeNetwork(deployment.network);
const factory = await ethers.getContractFactory("Bridge");
const contract = (await upgrades.deployProxy(
const factory = await hre.ethers.getContractFactory("Bridge");
const contract = (await hre.upgrades.deployProxy(
factory.connect(accounts.deployer),
[await deployment.getContractAddress("BridgeValidator"), accounts.fee.address],
{
Expand Down

0 comments on commit cd77a44

Please sign in to comment.