Skip to content
This repository was archived by the owner on Dec 27, 2022. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions modules/contracts/deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { EtherSymbol, Zero } from "@ethersproject/constants";
import { formatEther, parseEther } from "@ethersproject/units";
import { deployments, ethers, getNamedAccounts, getChainId, network } from "hardhat";
import { DeployFunction } from "hardhat-deploy/types";
import { BIG_GAS_LIMIT } from "../src.ts/services/ethService";

import { registerTransfer } from "../src.ts/utils";
import { logger } from "../src.ts/constants";
Expand Down Expand Up @@ -40,20 +41,22 @@ const func: DeployFunction = async () => {
),
);
log.info(`Deploying ${name} with args [${processedArgs.join(", ")}]`);
log.info("await deployments.deploy(name");
await deployments.deploy(name, {
from: deployer,
args: processedArgs,
/*
gasLimit: deployTx.gasLimit && BigNumber.from(deployTx.gasLimit).lt(MIN_GAS_LIMIT)
? MIN_GAS_LIMIT
: undefined,
*/
gasLimit: BIG_GAS_LIMIT,
});
log.info("await deployments.get");
const deployment = await deployments.get(name);
log.info("if !deployment.transactionHash");
if (!deployment.transactionHash) {
throw new Error(`Failed to deploy ${name}`);
}

log.info("await ethers.provider.getTransaction");
const tx = await ethers.provider.getTransaction(deployment.transactionHash!);
log.info("ethers.provider.getTransactionReceipt");
const receipt = await ethers.provider.getTransactionReceipt(deployment.transactionHash!);
log.info(`Sent transaction to deploy ${name}, txHash: ${deployment.transactionHash}`);
log.info(
Expand Down
4 changes: 2 additions & 2 deletions modules/contracts/src.ts/tasks/registerTransfer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { deployments } from "hardhat";
import { alice } from "../constants";
import { getContract, registerTransfer } from "../utils";

describe("registerTransfer", function() {
describe("registerTransfer", function () {
this.timeout(120_000);
let registry: Contract;

Expand All @@ -15,7 +15,7 @@ describe("registerTransfer", function() {
registry = await getContract("TransferRegistry", alice);
});

it("should registry a new transfer", async () => {
it("should register a new transfer", async () => {
expect(registry.address).to.be.a("string");
await expect(registerTransfer(TransferNames.HashlockTransfer, alice.address)).to.be.fulfilled;
});
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
},
"homepage": "https://github.com/connext/vector#readme",
"devDependencies": {
"@types/uuid": "^8.3.0",
"@typescript-eslint/eslint-plugin": "4.16.1",
"@typescript-eslint/parser": "4.16.1",
"cypress": "^6.5.0",
Expand Down