41 lines
1.3 KiB
JavaScript
41 lines
1.3 KiB
JavaScript
const base = require("../scripts/base");
|
|
const ERC721Staking = artifacts.require("stake/ERC721Staking");
|
|
|
|
module.exports = async function (deployer, network, accounts) {
|
|
await deployer.deploy(ERC721Staking);
|
|
const stakeInstance = await ERC721Staking.deployed();
|
|
if (stakeInstance) {
|
|
console.log("ERC721Staking successfully deployed.");
|
|
console.log("address: " + stakeInstance.address);
|
|
}
|
|
base.updateArray({
|
|
name: "ERC721Staking",
|
|
type: "logic",
|
|
json: "assets/contracts/ERC721Staking.json",
|
|
address: stakeInstance.address,
|
|
network,
|
|
});
|
|
|
|
const nfts = [
|
|
"0xae37bb7BcA26Bab9a11D8BaE8fdB97f63b82c189",
|
|
"0xEbC170185ad614C05Af38C820020b70E458717F5",
|
|
"0x2d3Afa678F777Df6b59186A54E5427c3527C637c",
|
|
];
|
|
for (let i = 0; i < nfts.length; i++) {
|
|
await stakeInstance.updateERC721Support(nfts[i], true);
|
|
console.log(`success add erc721 support for ${nfts[i]}`);
|
|
}
|
|
const DAYSECONDS = 24 * 60 * 60;
|
|
const periods = [
|
|
30 * DAYSECONDS, // 1 month 2592000
|
|
91 * DAYSECONDS, // 3 months 7862400
|
|
182 * DAYSECONDS, // 6 months 15724800
|
|
365 * DAYSECONDS, // 1 year 31536000
|
|
730 * 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]}`);
|
|
}
|
|
};
|