generated from proofoftom/buidler-waffle-typechain-quasar
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move cancel script from tasks to cli
- Loading branch information
Showing
2 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Cancel the current round | ||
* | ||
* Sample usage: | ||
* HARDHAT_NETWORK=localhost yarn ts-node cli/cancelRound.ts <ClrFund address> | ||
*/ | ||
import { ethers, network } from 'hardhat' | ||
import { program } from 'commander' | ||
|
||
program | ||
.description('Cancel the current round') | ||
.argument('clrfund', 'The ClrFund contract address') | ||
.parse() | ||
|
||
async function main(args: any) { | ||
const [deployer] = await ethers.getSigners() | ||
console.log('deployer', deployer.address) | ||
console.log('network', network.name) | ||
|
||
const clrfundContract = await ethers.getContractAt( | ||
'ClrFund', | ||
args[0], | ||
deployer | ||
) | ||
|
||
const cancelTx = await clrfundContract.cancelCurrentRound() | ||
await cancelTx.wait() | ||
console.log('Cancel transaction hash: ', cancelTx.hash) | ||
} | ||
|
||
main(program.args) | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error) | ||
process.exit(1) | ||
}) |
This file was deleted.
Oops, something went wrong.