update stake period
This commit is contained in:
parent
1ae205b4a1
commit
b8c5591e5b
30
init_scripts/update_stake.js
Normal file
30
init_scripts/update_stake.js
Normal file
@ -0,0 +1,30 @@
|
||||
const stake = artifacts.require("market/ERC721Staking");
|
||||
const config = require("../config/config");
|
||||
const base = require("../scripts/base");
|
||||
|
||||
module.exports = async function main(callback) {
|
||||
try {
|
||||
const stakeInstance = await stake.deployed();
|
||||
|
||||
console.log("ERC721Staking successfully deployed.");
|
||||
console.log("address: " + stakeInstance.address);
|
||||
|
||||
const DAYSECONDS = 24 * 60 * 60;
|
||||
const periods = [
|
||||
// 30 * DAYSECONDS, // 1 month 2592000
|
||||
90 * DAYSECONDS, // 3 months 7862400
|
||||
180 * DAYSECONDS, // 6 months 15724800
|
||||
360 * DAYSECONDS, // 1 year 31536000
|
||||
720 * DAYSECONDS, // 2 years 63072000
|
||||
];
|
||||
for (let i = 0; i < periods.length; i++) {
|
||||
await stakeInstance.updatePeriods(periods[i], true);
|
||||
console.log(`success add period ${periods[i]}`);
|
||||
}
|
||||
|
||||
callback(0);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
callback(1);
|
||||
}
|
||||
};
|
@ -27,6 +27,7 @@
|
||||
"candy_deploy:test": "truffle migrate --network arbitrum_testnet -f 17 --to 17 --compile-none",
|
||||
"candy_deploy:one": "truffle migrate --network arbitrum_one -f 17 --to 17 --compile-none",
|
||||
"stake_deploy:one": "truffle migrate --network arbitrum_one -f 9 --to 9 --compile-none",
|
||||
"update:stake": "npx truffle exec --network arbitrum_one ./init_scripts/update_stake.js",
|
||||
"size": "truffle run contract-size"
|
||||
},
|
||||
"author": "",
|
||||
|
Loading…
x
Reference in New Issue
Block a user