-
Notifications
You must be signed in to change notification settings - Fork 170
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
Showing
4 changed files
with
38 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts } = hre; | ||
const { deploy } = deployments; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
await deploy("XVS", { | ||
from: deployer, | ||
args: [deployer], | ||
log: true, | ||
autoMine: true, | ||
}); | ||
}; | ||
|
||
func.tags = ["xvs"]; | ||
|
||
export default func; |
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
20 changes: 10 additions & 10 deletions
20
deploy/008-configure-vaults.ts → deploy/009-configure-vaults.ts
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 |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import { ethers } from 'hardhat'; | ||
import { DeployFunction } from 'hardhat-deploy/types'; | ||
import { HardhatRuntimeEnvironment } from 'hardhat/types'; | ||
import { ethers } from "hardhat"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { getNamedAccounts } = hre; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
const accessControlManager = await ethers.getContract('AccessControlManager'); | ||
const xvsVault = await ethers.getContract('XVSVault'); | ||
const xvs = await ethers.getContract('XVS'); | ||
const accessControlManager = await ethers.getContract("AccessControlManager"); | ||
const xvsVault = await ethers.getContract("XVSVault"); | ||
const xvs = await ethers.getContract("XVS"); | ||
|
||
const tx = await accessControlManager.giveCallPermission( | ||
ethers.constants.AddressZero, | ||
'add(address,uint256,address,uint256,uint256)', | ||
"add(address,uint256,address,uint256,uint256)", | ||
deployer, | ||
); | ||
await tx.wait(); | ||
|
||
// Add token pool to xvs vault | ||
const allocPoint = 100; | ||
const token = xvs.address; | ||
const rewardToken = xvs.address; | ||
const rewardPerBlock = '61805555555555555'; | ||
const rewardPerBlock = "61805555555555555"; | ||
const lockPeriod = 604800; | ||
|
||
await xvsVault.add(rewardToken, allocPoint, token, rewardPerBlock, lockPeriod); | ||
}; | ||
|
||
func.tags = ['xvs-vault']; | ||
func.tags = ["xvs-vault"]; | ||
|
||
export default func; |