fix: added current timestamp to commit time
This commit is contained in:
parent
3d9e479da0
commit
b699623610
|
@ -20,3 +20,4 @@ __pycache__
|
|||
|
||||
.secret.json
|
||||
TODO
|
||||
accounts.json
|
|
@ -96,6 +96,7 @@ class Actions {
|
|||
}
|
||||
|
||||
async addProject(params) {
|
||||
params.commitTime = Math.floor(Date.now() / 1000) + params.commitTime;
|
||||
let text = `await LiquidPledging.methods.addProject(\"${params.name}\", \"${params.url}\", \"${params.account}\", ${params.parentProject}, ${params.commitTime}, \"${params.plugin}\").send({gas: 2000000, gasPrice: web3.utils.toWei(${params.gasPrice}, "gwei")})`
|
||||
return doAction(text, async () => {
|
||||
const toSend = this.contracts.LiquidPledging.methods.addProject(params.name, params.url, params.account, params.parentProject, params.commitTime, params.plugin);
|
||||
|
@ -178,6 +179,7 @@ class Actions {
|
|||
}
|
||||
|
||||
async addGiver(params) {
|
||||
params.commitTime = Math.floor(Date.now() / 1000) + params.commitTime;
|
||||
let text = `await LiquidPledging.methods.addGiver(\"${params.name}\", \"${params.url}\", ${params.commitTime}, \"${params.plugin}\").send({gas: 2000000, gasPrice: web3.utils.toWei(${params.gasPrice}, "gwei")})`
|
||||
return doAction(text, async () => {
|
||||
const toSend = this.contracts.LiquidPledging.methods.addGiver(params.name, params.url, params.commitTime, params.plugin);
|
||||
|
|
|
@ -155,7 +155,7 @@ const menus = {
|
|||
{
|
||||
type: 'input',
|
||||
name: 'commitTime',
|
||||
message: 'Time in seconds after which the project owner can access funds',
|
||||
message: 'Seconds from now which any project funded by this project can access funds',
|
||||
default: 86400,
|
||||
filter: Number
|
||||
},
|
||||
|
@ -238,7 +238,7 @@ const menus = {
|
|||
{
|
||||
type: 'input',
|
||||
name: 'commitTime',
|
||||
message: 'commit time',
|
||||
message: 'Seconds from now which the project owner can access any funds pledged by this funder',
|
||||
default: 86400,
|
||||
filter: Number
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue