Skip to content

Commit

Permalink
remove amount from tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Sep 21, 2023
1 parent c4ccaf9 commit 32658e1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
3 changes: 1 addition & 2 deletions omnichain/staking/tasks/beneficiary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => {
["3", args.beneficiary]
);
const to = getAddress("tss", hre.network.name);
const value = parseEther(args.amount);
const value = parseEther("0");

const tx = await signer.sendTransaction({ data, to, value });
console.log(`
Expand All @@ -30,5 +30,4 @@ task(
main
)
.addParam("contract", "The address of the contract on ZetaChain")
.addParam("amount", "Amount of tokens to send")
.addPositionalParam("beneficiary", "The address of the beneficiary");
9 changes: 5 additions & 4 deletions omnichain/staking/tasks/unstake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => {

const data = prepareData(args.contract, ["uint8"], ["2"]);
const to = getAddress("tss", hre.network.name);
const value = parseEther(args.amount);
const value = parseEther("0");

const tx = await signer.sendTransaction({ data, to, value });
console.log(`
Expand All @@ -20,6 +20,7 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => {
await trackCCTX(tx.hash);
};

task("unstake", "Unstake tokens", main)
.addParam("contract", "The address of the contract on ZetaChain")
.addParam("amount", "Amount of tokens to unstake");
task("unstake", "Unstake tokens", main).addParam(
"contract",
"The address of the contract on ZetaChain"
);
6 changes: 2 additions & 4 deletions omnichain/staking/tasks/withdraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const main = async (args: any, hre: HardhatRuntimeEnvironment) => {

const data = prepareData(args.contract, ["uint8"], ["4"]);
const to = getAddress("tss", hre.network.name);
const value = parseEther(args.amount);
const value = parseEther("0");

const tx = await signer.sendTransaction({ data, to, value });
console.log(`
Expand All @@ -24,6 +24,4 @@ task(
"set-withdraw-address",
"Set the address on a connected chain to which unstaked tokens will be withdrawn",
main
)
.addParam("contract", "The address of the contract on ZetaChain")
.addParam("amount", "Amount of tokens to send");
).addParam("contract", "The address of the contract on ZetaChain");

0 comments on commit 32658e1

Please sign in to comment.