-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeploy-test-tokens.js
More file actions
35 lines (28 loc) · 1.23 KB
/
deploy-test-tokens.js
File metadata and controls
35 lines (28 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
const { ethers, upgrades } = require("hardhat");
const { getAddressSaver } = require("../utilities/helpers");
const path = require("path");
const { test } = require("mocha");
async function main() {
const [deployer] = await ethers.getSigners();
const network = (await ethers.getDefaultProvider().getNetwork()).name;
const addressesPath = path.join(__dirname, "./deploymentAddresses.json");
const saveAddress = getAddressSaver(addressesPath, network, true);
const TestToken = (await ethers.getContractFactory("TestToken")).connect(deployer);
const usdcDecimals = 6;
const wbtcDecimals = 8;
const wethDecimals = 18;
const testUSDC = await TestToken.deploy(usdcDecimals, "TEST_USDC", "TUSDC");
await testUSDC.deployed();
const testWBTC = await TestToken.deploy(wbtcDecimals, "TEST_WBTC", "TWBTC");
await testWBTC.deployed();
const testWETH = await TestToken.deploy(wethDecimals, "TEST_WETH", "TWETH");
await testWETH.deployed();
console.log(`TEST USDC at ${testUSDC.address}`);
console.log(`TEST WBTC at ${testWBTC.address}`);
console.log(`TEST WETH at ${testWETH.address}`);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
exports.deployTestToken = main