2020-10-30 17:35:11 +00:00
|
|
|
const {expect} = require("chai");
|
|
|
|
const hre = require("hardhat");
|
|
|
|
const {ethers} = hre;
|
|
|
|
|
2020-11-04 17:09:34 +00:00
|
|
|
async function addETHBGemJoinMapping(userWallet, instaMapping, instaMaster) {
|
2020-10-30 17:35:11 +00:00
|
|
|
await userWallet.sendTransaction({
|
|
|
|
to: hre.network.config.InstaMaster,
|
|
|
|
value: ethers.utils.parseEther("0.1"),
|
|
|
|
});
|
|
|
|
|
|
|
|
await hre.network.provider.request({
|
|
|
|
method: "hardhat_impersonateAccount",
|
|
|
|
params: [await instaMaster.getAddress()],
|
|
|
|
});
|
|
|
|
|
|
|
|
const ethBGemJoin = "0x08638eF1A205bE6762A8b935F5da9b700Cf7322c";
|
|
|
|
await expect(
|
|
|
|
instaMapping.connect(instaMaster).addGemJoinMapping([ethBGemJoin])
|
|
|
|
).to.emit(instaMapping, "LogAddGemJoinMapping");
|
2020-11-04 17:09:34 +00:00
|
|
|
|
|
|
|
await hre.network.provider.request({
|
|
|
|
method: "hardhat_stopImpersonatingAccount",
|
|
|
|
params: [await instaMaster.getAddress()],
|
|
|
|
});
|
2020-10-30 17:35:11 +00:00
|
|
|
}
|
|
|
|
|
2020-11-04 17:09:34 +00:00
|
|
|
module.exports = addETHBGemJoinMapping;
|