-
Notifications
You must be signed in to change notification settings - Fork 29
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
171357e
commit 757c3d6
Showing
12 changed files
with
226 additions
and
18 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
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,36 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { Relic__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
} from '../../helpers'; | ||
|
||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const initialRescuer = ""; | ||
const initialExecutor = ""; | ||
|
||
const relicFactory = new Relic__factory(owner); | ||
await deployAndMine( | ||
'RELIC', | ||
relicFactory, | ||
relicFactory.deploy, | ||
'RELIC', | ||
'REL', | ||
initialRescuer, | ||
initialExecutor | ||
); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
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,37 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers, network } from 'hardhat'; | ||
import { Shard__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
DEPLOYED_CONTRACTS | ||
} from '../../helpers'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const initialRescuer = ""; | ||
const initialExecutor = ""; | ||
const relicAddress = DEPLOYED_CONTRACTS[network.name].RELIC;; | ||
const uri = ""; | ||
|
||
const shardFactory = new Shard__factory(owner); | ||
await deployAndMine( | ||
'SHARD', | ||
shardFactory, | ||
shardFactory.deploy, | ||
relicAddress, | ||
initialRescuer, | ||
initialExecutor, | ||
uri | ||
); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
35 changes: 35 additions & 0 deletions
35
protocol/scripts/deploys/mainnet/nexus/03-temple-sacrifice.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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers, network } from 'hardhat'; | ||
import { TempleSacrifice__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
DEPLOYED_CONTRACTS | ||
} from '../../helpers'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
|
||
const relicAddress = DEPLOYED_CONTRACTS[network.name].RELIC; | ||
const templeTokenAddress = DEPLOYED_CONTRACTS[network.name].TEMPLE;; | ||
|
||
const templeSacrificeFactory = new TempleSacrifice__factory(owner); | ||
await deployAndMine( | ||
'TEMPLE_SACRIFICE', | ||
templeSacrificeFactory, | ||
templeSacrificeFactory.deploy, | ||
relicAddress, | ||
templeTokenAddress | ||
); | ||
} | ||
|
||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
40 changes: 40 additions & 0 deletions
40
protocol/scripts/deploys/mainnet/nexus/99a-relic-post-deployment.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ethers, network } from 'hardhat'; | ||
import { | ||
ensureExpectedEnvvars, | ||
mine | ||
} from '../../helpers'; | ||
import { Relic__factory } from '../../../../typechain'; | ||
import { DEPLOYED_CONTRACTS } from '../../helpers'; | ||
|
||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
|
||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = DEPLOYED_CONTRACTS[network.name]; | ||
const relic = Relic__factory.connect(deployedContracts.RELIC, owner); | ||
|
||
// set shard | ||
const shardAddress = deployedContracts.SHARD; | ||
{ | ||
await mine(relic.setShard(shardAddress)); | ||
} | ||
// set relic minter (temple sacrifice) | ||
const templeSacrificeAddress = deployedContracts.TEMPLE_SACRIFICE; | ||
{ | ||
await mine(relic.setRelicMinter(templeSacrificeAddress, true)); | ||
} | ||
// set xp controller | ||
{ | ||
|
||
} | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
27 changes: 27 additions & 0 deletions
27
protocol/scripts/deploys/mainnet/nexus/99b-shard-post-deployment.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { ethers, network } from 'hardhat'; | ||
import { | ||
ensureExpectedEnvvars, | ||
mine | ||
} from '../../helpers'; | ||
import { TempleERC20Token__factory, Shard__factory } from '../../../../typechain'; | ||
import { DEPLOYED_CONTRACTS } from '../../helpers'; | ||
|
||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
|
||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = DEPLOYED_CONTRACTS[network.name]; | ||
const shard = Shard__factory.connect(deployedContracts.SHARD, owner); | ||
|
||
|
||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |
44 changes: 44 additions & 0 deletions
44
protocol/scripts/deploys/mainnet/nexus/99c-temple-sacrifice-post-deployment.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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { ethers, network } from 'hardhat'; | ||
import { | ||
ensureExpectedEnvvars, | ||
mine, | ||
toAtto | ||
} from '../../helpers'; | ||
import { TempleSacrifice__factory } from '../../../../typechain'; | ||
import { DEPLOYED_CONTRACTS } from '../../helpers'; | ||
|
||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
|
||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = DEPLOYED_CONTRACTS[network.name]; | ||
const templeSacrifice = TempleSacrifice__factory.connect(deployedContracts.TEMPLE_SACRIFICE, owner); | ||
|
||
// set sacrificed temple recipient | ||
{ | ||
await mine(templeSacrifice.setSacrificedTempleRecipient('')); | ||
} | ||
// set price params | ||
{ | ||
const priceParams = { | ||
minimumPrice: toAtto(40), | ||
maximumPrice: toAtto(100), | ||
priceMaxPeriod: 365 * 24 * 60 * 60 | ||
} | ||
await mine(templeSacrifice.setPriceParams(priceParams)); | ||
} | ||
// set origin time | ||
{ | ||
|
||
} | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main() | ||
.then(() => process.exit(0)) | ||
.catch(error => { | ||
console.error(error); | ||
process.exit(1); | ||
}); |