-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f038cf3
commit 54f9bc1
Showing
9 changed files
with
75 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { ethers } = require("hardhat"); | ||
const hre = require("hardhat"); | ||
const { getTimeout, deployRewardPoolV2 } = require("../../utils/utils"); | ||
|
||
async function main() { | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
// ........................ ENV ENV ENV ................ | ||
const AZUR = process.env.AZUR; | ||
const NAME = process.env.NAME; | ||
const SYMBOL = process.env.SYMBOL; | ||
const UNSTAKEPERIOD = process.env.UNSTAKEPERIOD; | ||
// ........................ ENV ENV ENV ................ | ||
|
||
console.log("Deployer wallet:", deployer.address); | ||
|
||
const chainId = await hre.network.provider.send("eth_chainId"); | ||
const timeout = getTimeout(chainId); | ||
|
||
const rewardPoolV2 = await deployRewardPoolV2(AZUR, deployer, NAME, SYMBOL, UNSTAKEPERIOD); | ||
|
||
await timeout(); | ||
console.log("RewardPoolV2:", await rewardPoolV2.getAddress()); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const { ethers } = require("hardhat"); | ||
const hre = require("hardhat"); | ||
const { getTimeout } = require("../../utils/utils"); | ||
|
||
async function main() { | ||
const [deployer] = await ethers.getSigners(); | ||
|
||
// ........................ ENV ENV ENV ................ | ||
const REWARD_POOL_V2_ADDRESS = process.env.REWARD_POOL_V2_ADDRESS; | ||
// ........................ ENV ENV ENV ................ | ||
|
||
console.log("Deployer wallet:", deployer.address); | ||
console.log("Upgrading RewardPoolV2:", REWARD_POOL_V2_ADDRESS); | ||
|
||
const chainId = await hre.network.provider.send("eth_chainId"); | ||
const timeout = getTimeout(chainId); | ||
|
||
const RewardPoolV2 = await ethers.getContractFactory("RewardPoolV2"); | ||
await upgrades.upgradeProxy(REWARD_POOL_V2_ADDRESS, RewardPoolV2); | ||
await timeout(); | ||
|
||
const rewardPoolV2ImplAddress = await upgrades.erc1967.getImplementationAddress(REWARD_POOL_V2_ADDRESS); | ||
console.log("RewardPoolV2 new implementation address:", rewardPoolV2ImplAddress); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch((error) => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters