console.log(`mint ${lockedAmount} deployed to ${deployer.address}`); }
// We recommend this pattern to be able to use async/await everywhere // and properly handle errors. main().catch(error => { console.error(error); process.exitCode = 1; });
在本地链上执行脚本,命令如下:
1
npx hardhat run scripts/deploy_MyToken.ts --network localhost
E:\projects\hardhat-base-2.11-ts>tenderly export init v Choose the name for the exported network: hardhat The network [1;32mhardhat[0m is already configured. If you want to set up the network again, rerun this command with the [1;32m--re-init[0m flag.
E:\projects\hardhat-base-2.11-ts>tenderly export 0x7ed6b8e9f9a61db8a4f4e5e853f2342c2aeb7ac033923afbadfe2d74717f1c0a --debug Trying OpenZeppelin config path: networks.js unable to fetch config Couldn't read OpenZeppelin config file couldn't read new OpenzeppelinConfig config file Trying buidler config path: buidler.config.js unable to fetch config Couldn't read Buidler config file couldn't read new Buidler config file Trying hardhat config path: hardhat.config.js unable to fetch config Couldn't read Hardhat config file Trying hardhat ts config path: hardhat.config.ts Making request Got response with body Collecting network information...
Collecting transaction information...
Collecting contracts... Trying Hardhat config path: E:\projects\hardhat-base-2.11-ts\hardhat.config.js Trying Hardhat config path: E:\projects\hardhat-base-2.11-ts\hardhat.config.ts [ ] Making request [========= ] Got response with body Successfully exported transaction with hash [1;32m0x7ed6b8e9f9a61db8a4f4e5e853f2342c2aeb7ac033923afbadfe2d74717f1c0a[0m Using contracts: • [1;32mMyToken[0m with address [1;32m0xd9f9304329451dd31908bc61c0f87e2aa90aacd6[0m You can view your transaction at [1;32mhttps://dashboard.tenderly.co/Lowell/project/local-transactions/8e577220-7683-4a82-ac8b-2711622e0bba[0m