parent
a15f137247
commit
700ae42c9f
|
@ -4,6 +4,7 @@ node_modules
|
|||
cache
|
||||
artifacts
|
||||
frontend/src/hardhat
|
||||
types
|
||||
|
||||
lib-cov
|
||||
*.seed
|
||||
|
|
|
@ -3,7 +3,6 @@ import {DeployFunction} from 'hardhat-deploy/types';
|
|||
const {deployments, getNamedAccounts} = require('hardhat');
|
||||
|
||||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
||||
// code here
|
||||
const { deploy, execute, read, log } = deployments;
|
||||
const { deployer } = await getNamedAccounts();
|
||||
|
||||
|
@ -14,16 +13,3 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|||
});
|
||||
};
|
||||
export default func;
|
||||
|
||||
// module.exports = async ({
|
||||
// getNamedAccounts,
|
||||
// deployments,
|
||||
// getChainId,
|
||||
// getUnnamedAccounts,
|
||||
// }) => {
|
||||
// const { deploy } = deployments;
|
||||
// const { deployer } = await getNamedAccounts();
|
||||
|
||||
// // the following will only deploy "GenericMetaTxProcessor" if the contract was never deployed or if the code changed since last deployment
|
||||
|
||||
// };
|
||||
|
|
|
@ -94,5 +94,9 @@ const config: HardhatUserConfig = {
|
|||
},
|
||||
],
|
||||
},
|
||||
typechain: {
|
||||
outDir: "types",
|
||||
target: "ethers-v5",
|
||||
}
|
||||
};
|
||||
export default config;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
import { ethers } from "hardhat";
|
||||
import { Signer } from "ethers";
|
||||
import { expect } from "chai";
|
||||
|
||||
import { Bridge } from "../types/Bridge"
|
||||
|
||||
describe("Bridge", function () {
|
||||
let accounts: Signer[];
|
||||
let bridge: Bridge;
|
||||
|
||||
beforeEach(async function () {
|
||||
accounts = await ethers.getSigners();
|
||||
});
|
||||
|
||||
it("should deploy bridge contract", async function () {
|
||||
let deployerAddress = accounts[0].getAddress();
|
||||
const bridgeFactory = await ethers.getContractFactory(
|
||||
"Bridge"
|
||||
);
|
||||
const _bridge = await bridgeFactory.deploy("1", [], "1", "0", "0") as Bridge;
|
||||
expect(_bridge).to.have.property('deployTransaction');
|
||||
bridge = _bridge;
|
||||
});
|
||||
});
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"outDir": "dist",
|
||||
"resolveJsonModule": true
|
||||
},
|
||||
"include": ["./scripts", "./test", "./deploy"]
|
||||
}
|
Loading…
Reference in New Issue