Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to v2 #329

Merged
merged 7 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/actions/pool_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default class PoolActions {
const nodeStake = await contract.methods.nodeStake().call();
const nodesCount = +await contract.methods.getNodesCount().call();
const token = await contract.methods.token().call();
const owner = await contract.methods.owner().call();
// const maxTotalStake = await contract.methods.maxTotalStake().call();
// const minStakeValue = await contract.methods.minStakeValue().call();
let service;
Expand All @@ -51,7 +52,7 @@ export default class PoolActions {
} catch (error) {
}
// console.log(id, active ? 'active' : ' ', name, address, this.web3.utils.fromWei(nodeStake, 'ether'), nodesCount, this.web3.utils.fromWei(totalStake, 'ether'), token, service, this.web3.utils.fromWei(maxTotalStake), this.web3.utils.fromWei(minStakeValue));
console.log(id, active ? 'active' : ' ', name, address, this.web3.utils.fromWei(nodeStake, 'ether'), nodesCount, this.web3.utils.fromWei(totalStake, 'ether'), token, service);
console.log(id, active ? 'active' : ' ', name, address, this.web3.utils.fromWei(nodeStake, 'ether'), nodesCount, this.web3.utils.fromWei(totalStake, 'ether'), token, service, owner);
}
} else {
console.log('No pools found');
Expand Down
8 changes: 7 additions & 1 deletion src/tasks/pooling.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export default class PoolingTask extends TaskBase {
await this.unstake(options[0], options[1]);
} else if (command === 'setPaused') {
await this.setPaused(options[0]);
} else if (command === 'confirm') {
console.log(await this.confirm(options[0]));
} else {
console.error('Unknown sub-command, see yarn task pooling help');
process.exit(1);
Expand Down Expand Up @@ -118,7 +120,11 @@ export default class PoolingTask extends TaskBase {
if (!paused) {
return;
}
return this.multisigActions.setPaused(paused);
return this.multisigActions.setPaused(paused === 'true');
}

async confirm(tx) {
return this.multisigActions.confirmTransaction(tx);
}

help() {
Expand Down
Loading