-
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.
* Tests for Light Quest * Tests LightQuest & Controller * Deploy LightQuest on test fork * Reduce protocol fee ratio to 4% * Fork test re-deploy * Deploy Light Quest contracts
- Loading branch information
Showing
20 changed files
with
6,418 additions
and
15 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
Large diffs are not rendered by default.
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
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,102 @@ | ||
export { }; | ||
const hre = require("hardhat"); | ||
|
||
const ethers = hre.ethers; | ||
|
||
const network = hre.network.name; | ||
|
||
const { | ||
GAUGE_CONTROLLER, | ||
CONVEX_VOTER_ADDRESS | ||
} = require('./utils/constant'); | ||
|
||
const params_path = () => { | ||
if (network === 'fork') { | ||
return './utils/fork_params' | ||
} | ||
else { | ||
return './utils/main_params' | ||
} | ||
} | ||
|
||
const param_file_path = params_path(); | ||
|
||
const { | ||
CHEST_ADDRESS | ||
} = require(param_file_path); | ||
|
||
async function main() { | ||
|
||
const deployer = (await hre.ethers.getSigners())[0]; | ||
|
||
const LightQuestBoard = await ethers.getContractFactory("LightQuestBoard"); | ||
const MultiMerkleDistributor = await ethers.getContractFactory("MultiMerkleDistributor"); | ||
|
||
|
||
console.log('Deploying LightQuestBoard ...') | ||
|
||
const board = await LightQuestBoard.deploy( | ||
GAUGE_CONTROLLER, | ||
CONVEX_VOTER_ADDRESS, | ||
CHEST_ADDRESS | ||
) | ||
await board.deployed() | ||
|
||
console.log('LightQuestBoard : ', board.address) | ||
|
||
await board.deployTransaction.wait(15); | ||
|
||
console.log() | ||
console.log('Deploying Distributor ...') | ||
|
||
const distributor = await MultiMerkleDistributor.deploy( | ||
board.address | ||
) | ||
await distributor.deployed() | ||
|
||
console.log('Distributor : ', distributor.address) | ||
|
||
await distributor.deployTransaction.wait(15); | ||
|
||
console.log() | ||
console.log('Initiate Distributor ...') | ||
|
||
let tx; | ||
|
||
tx = await board.connect(deployer).initiateDistributor(distributor.address) | ||
await tx.wait(10) | ||
|
||
console.log() | ||
console.log('Approve Manager ...') | ||
|
||
tx = await board.connect(deployer).approveManager(deployer.address) | ||
await tx.wait(10) | ||
/*tx = await chest.connect(deployer).approveManager(deployer.address) | ||
await tx.wait(10)*/ | ||
|
||
|
||
if(network === 'mainnet') { | ||
await hre.run("verify:verify", { | ||
address: distributor.address, | ||
constructorArguments: [ | ||
board.address | ||
], | ||
}); | ||
|
||
await hre.run("verify:verify", { | ||
address: board.address, | ||
constructorArguments: [ | ||
GAUGE_CONTROLLER, | ||
CONVEX_VOTER_ADDRESS, | ||
CHEST_ADDRESS | ||
], | ||
}); | ||
} | ||
} | ||
|
||
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,52 @@ | ||
export { }; | ||
const hre = require("hardhat"); | ||
|
||
const ethers = hre.ethers; | ||
|
||
const network = hre.network.name; | ||
|
||
const { | ||
GAUGE_CONTROLLER_BALANCER, | ||
AURA_VOTER_ADDRESS | ||
} = require('./utils/constant'); | ||
|
||
const { | ||
CHEST_ADDRESS | ||
} = require('./utils/main_params'); | ||
|
||
async function main() { | ||
|
||
const deployer = (await hre.ethers.getSigners())[0]; | ||
|
||
const LightQuestBoard = await ethers.getContractFactory("LightQuestBoard"); | ||
|
||
console.log('Deploying LightQuestBoard ...') | ||
|
||
const board = await LightQuestBoard.deploy( | ||
GAUGE_CONTROLLER_BALANCER, | ||
AURA_VOTER_ADDRESS, | ||
CHEST_ADDRESS | ||
) | ||
await board.deployed() | ||
|
||
console.log('LightQuestBoard : ', board.address) | ||
|
||
await board.deployTransaction.wait(15); | ||
|
||
|
||
await hre.run("verify:verify", { | ||
address: board.address, | ||
constructorArguments: [ | ||
GAUGE_CONTROLLER_BALANCER, | ||
AURA_VOTER_ADDRESS, | ||
CHEST_ADDRESS | ||
], | ||
}); | ||
} | ||
|
||
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,52 @@ | ||
export { }; | ||
const hre = require("hardhat"); | ||
|
||
const ethers = hre.ethers; | ||
|
||
const network = hre.network.name; | ||
|
||
const { | ||
GAUGE_CONTROLLER, | ||
CONVEX_VOTER_ADDRESS | ||
} = require('./utils/constant'); | ||
|
||
const { | ||
CHEST_ADDRESS | ||
} = require('./utils/main_params'); | ||
|
||
async function main() { | ||
|
||
const deployer = (await hre.ethers.getSigners())[0]; | ||
|
||
const LightQuestBoard = await ethers.getContractFactory("LightQuestBoard"); | ||
|
||
console.log('Deploying LightQuestBoard ...') | ||
|
||
const board = await LightQuestBoard.deploy( | ||
GAUGE_CONTROLLER, | ||
CONVEX_VOTER_ADDRESS, | ||
CHEST_ADDRESS | ||
) | ||
await board.deployed() | ||
|
||
console.log('LightQuestBoard : ', board.address) | ||
|
||
await board.deployTransaction.wait(15); | ||
|
||
|
||
await hre.run("verify:verify", { | ||
address: board.address, | ||
constructorArguments: [ | ||
GAUGE_CONTROLLER, | ||
CONVEX_VOTER_ADDRESS, | ||
CHEST_ADDRESS | ||
], | ||
}); | ||
} | ||
|
||
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,43 @@ | ||
export { }; | ||
const hre = require("hardhat"); | ||
|
||
const ethers = hre.ethers; | ||
|
||
const network = hre.network.name; | ||
|
||
|
||
const { | ||
LIGHT_BOARD_AURA_ADDRESS | ||
} = require('./utils/main_params'); | ||
|
||
async function main() { | ||
|
||
const deployer = (await hre.ethers.getSigners())[0]; | ||
|
||
const MultiMerkleDistributor = await ethers.getContractFactory("MultiMerkleDistributor"); | ||
console.log('Deploying Light Distributor ...') | ||
|
||
const distributor = await MultiMerkleDistributor.deploy( | ||
LIGHT_BOARD_AURA_ADDRESS | ||
) | ||
await distributor.deployed() | ||
|
||
console.log('Light Distributor : ', distributor.address) | ||
|
||
await distributor.deployTransaction.wait(15); | ||
|
||
|
||
await hre.run("verify:verify", { | ||
address: distributor.address, | ||
constructorArguments: [ | ||
LIGHT_BOARD_AURA_ADDRESS | ||
], | ||
}); | ||
} | ||
|
||
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,43 @@ | ||
export { }; | ||
const hre = require("hardhat"); | ||
|
||
const ethers = hre.ethers; | ||
|
||
const network = hre.network.name; | ||
|
||
|
||
const { | ||
LIGHT_BOARD_CONVEX_ADDRESS | ||
} = require('./utils/main_params'); | ||
|
||
async function main() { | ||
|
||
const deployer = (await hre.ethers.getSigners())[0]; | ||
|
||
const MultiMerkleDistributor = await ethers.getContractFactory("MultiMerkleDistributor"); | ||
console.log('Deploying Light Distributor ...') | ||
|
||
const distributor = await MultiMerkleDistributor.deploy( | ||
LIGHT_BOARD_CONVEX_ADDRESS | ||
) | ||
await distributor.deployed() | ||
|
||
console.log('Light Distributor : ', distributor.address) | ||
|
||
await distributor.deployTransaction.wait(15); | ||
|
||
|
||
await hre.run("verify:verify", { | ||
address: distributor.address, | ||
constructorArguments: [ | ||
LIGHT_BOARD_CONVEX_ADDRESS | ||
], | ||
}); | ||
} | ||
|
||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
Oops, something went wrong.