mirror of
https://github.com/gitgig-io/ragnar.git
synced 2026-01-11 12:37:54 -05:00
23 lines
680 B
TypeScript
23 lines
680 B
TypeScript
import { ethers } from "hardhat";
|
|
|
|
const { CONTRACT_ADDR, PLATFORM_ID, REPO_ID, ISSUE_ID, TOKEN_CONTRACT } = process.env;
|
|
|
|
async function main() {
|
|
const [_owner, _custodian, finance, _notary] = await ethers.getSigners();
|
|
|
|
const factory = await ethers.getContractFactory("Bounties");
|
|
const contract = factory.attach(CONTRACT_ADDR);
|
|
|
|
console.log('sweeping...');
|
|
const txn = await contract.connect(finance).sweepBounty(PLATFORM_ID, REPO_ID, ISSUE_ID, [TOKEN_CONTRACT]);
|
|
|
|
console.log(txn);
|
|
}
|
|
|
|
// 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;
|
|
});
|