-
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
29dd2f4
commit fe043cd
Showing
20 changed files
with
556 additions
and
1 deletion.
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
6 changes: 6 additions & 0 deletions
6
...ocol/scripts/deploys/sepolia/deploymentArgs/0x30ACA5d7e58502585F4653BA6330B24170b109Eb.js
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,6 @@ | ||
// sepolia: NEXUS.PARTNER_ZERO_SACRIFICE=0x30ACA5d7e58502585F4653BA6330B24170b109Eb | ||
// yarn hardhat verify --network sepolia 0x30ACA5d7e58502585F4653BA6330B24170b109Eb --constructor-args scripts/deploys/sepolia/deploymentArgs/0x30ACA5d7e58502585F4653BA6330B24170b109Eb.js | ||
module.exports = [ | ||
"0x73F27cF3329344cF728571826eC844C5518aD679", | ||
"0x81960c465605cddD9772a8653111D4aBE580Ce1e" | ||
]; |
8 changes: 8 additions & 0 deletions
8
...ocol/scripts/deploys/sepolia/deploymentArgs/0x5Ad4Bf5aa9C00eDaa6c8a30c6ac21e5497B6E58f.js
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,8 @@ | ||
// sepolia: NEXUS.SHARD=0x5Ad4Bf5aa9C00eDaa6c8a30c6ac21e5497B6E58f | ||
// yarn hardhat verify --network sepolia 0x5Ad4Bf5aa9C00eDaa6c8a30c6ac21e5497B6E58f --constructor-args scripts/deploys/sepolia/deploymentArgs/0x5Ad4Bf5aa9C00eDaa6c8a30c6ac21e5497B6E58f.js | ||
module.exports = [ | ||
"0x73F27cF3329344cF728571826eC844C5518aD679", | ||
"0xf5968367a8acBe9ffACA4049E40A4C1F78b18952", | ||
"0x81960c465605cddD9772a8653111D4aBE580Ce1e", | ||
"ipfs://QmVBhkqq3qEeQvdCDWSXQGMX7hFDymZvy7X7J4z9GsUAB3/" | ||
]; |
8 changes: 8 additions & 0 deletions
8
...ocol/scripts/deploys/sepolia/deploymentArgs/0x73F27cF3329344cF728571826eC844C5518aD679.js
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,8 @@ | ||
// sepolia: NEXUS.RELIC=0x73F27cF3329344cF728571826eC844C5518aD679 | ||
// yarn hardhat verify --network sepolia 0x73F27cF3329344cF728571826eC844C5518aD679 --constructor-args scripts/deploys/sepolia/deploymentArgs/0x73F27cF3329344cF728571826eC844C5518aD679.js | ||
module.exports = [ | ||
"RELIC", | ||
"REL", | ||
"0xf5968367a8acBe9ffACA4049E40A4C1F78b18952", | ||
"0x81960c465605cddD9772a8653111D4aBE580Ce1e" | ||
]; |
8 changes: 8 additions & 0 deletions
8
...ocol/scripts/deploys/sepolia/deploymentArgs/0xd69D0CC9E0AD59ee30A53455A2E3957d0ebfFFC7.js
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,8 @@ | ||
// sepolia: NEXUS.TEMPLE_SACRIFICE=0xd69D0CC9E0AD59ee30A53455A2E3957d0ebfFFC7 | ||
// yarn hardhat verify --network sepolia 0xd69D0CC9E0AD59ee30A53455A2E3957d0ebfFFC7 --constructor-args scripts/deploys/sepolia/deploymentArgs/0xd69D0CC9E0AD59ee30A53455A2E3957d0ebfFFC7.js | ||
module.exports = [ | ||
"0x73F27cF3329344cF728571826eC844C5518aD679", | ||
"0x64a925B0fA211c44337148C0807f959Bd44b0B67", | ||
"0x81960c465605cddD9772a8653111D4aBE580Ce1e", | ||
"0x81960c465605cddD9772a8653111D4aBE580Ce1e" | ||
]; |
5 changes: 5 additions & 0 deletions
5
...ocol/scripts/deploys/sepolia/deploymentArgs/0xf5968367a8acBe9ffACA4049E40A4C1F78b18952.js
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,5 @@ | ||
// sepolia: NEXUS.NEXUS_COMMON=0xf5968367a8acBe9ffACA4049E40A4C1F78b18952 | ||
// yarn hardhat verify --network sepolia 0xf5968367a8acBe9ffACA4049E40A4C1F78b18952 --constructor-args scripts/deploys/sepolia/deploymentArgs/0xf5968367a8acBe9ffACA4049E40A4C1F78b18952.js | ||
module.exports = [ | ||
"0x81960c465605cddD9772a8653111D4aBE580Ce1e" | ||
]; |
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,28 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { TempleERC20Token__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
} from '../../helpers'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
|
||
const templeFactory = new TempleERC20Token__factory(owner); | ||
await deployAndMine( | ||
'CORE.TEMPLE_TOKEN', | ||
templeFactory, | ||
templeFactory.deploy, | ||
); | ||
} | ||
|
||
// 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,29 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { NexusCommon__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
} from '../../helpers'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
|
||
const nexusCommonFactory= new NexusCommon__factory(owner); | ||
await deployAndMine( | ||
'NEXUS.NEXUS_COMMON', | ||
nexusCommonFactory, | ||
nexusCommonFactory.deploy, | ||
await owner.getAddress() // initial executor | ||
); | ||
} | ||
|
||
// 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,34 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { Relic__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars, | ||
} from '../../helpers'; | ||
import { getDeployedContracts } from "./contract-addresses"; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = getDeployedContracts(); | ||
|
||
const relicFactory= new Relic__factory(owner); | ||
await deployAndMine( | ||
'NEXUS.RELIC', | ||
relicFactory, | ||
relicFactory.deploy, | ||
"RELIC", | ||
"REL", | ||
deployedContracts.NEXUS.NEXUS_COMMON, | ||
await owner.getAddress() // initial executor | ||
); | ||
} | ||
|
||
// 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,35 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { Shard__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars | ||
} from '../../helpers'; | ||
import { getDeployedContracts } from "./contract-addresses"; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = getDeployedContracts(); | ||
|
||
const shardFactory = new Shard__factory(owner); | ||
const uri = 'ipfs://QmVBhkqq3qEeQvdCDWSXQGMX7hFDymZvy7X7J4z9GsUAB3/'; | ||
await deployAndMine( | ||
'NEXUS.SHARD', | ||
shardFactory, | ||
shardFactory.deploy, | ||
deployedContracts.NEXUS.RELIC, | ||
deployedContracts.NEXUS.NEXUS_COMMON, | ||
await owner.getAddress(), // initial executor | ||
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/sepolia/nexus/04-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 } from 'hardhat'; | ||
import { TempleSacrifice__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars | ||
} from '../../helpers'; | ||
import { getDeployedContracts } from "./contract-addresses"; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = getDeployedContracts(); | ||
|
||
const templeSacrifice = new TempleSacrifice__factory(owner); | ||
const executor = await owner.getAddress(); | ||
await deployAndMine( | ||
'NEXUS.TEMPLE_SACRIFICE', | ||
templeSacrifice, | ||
templeSacrifice.deploy, | ||
deployedContracts.NEXUS.RELIC, | ||
deployedContracts.CORE.TEMPLE_TOKEN, | ||
executor, // sacrificed token recipient | ||
executor // initial executor | ||
); | ||
} | ||
|
||
// 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); | ||
}); |
33 changes: 33 additions & 0 deletions
33
protocol/scripts/deploys/sepolia/nexus/05-partner-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,33 @@ | ||
import '@nomiclabs/hardhat-ethers'; | ||
import { ethers } from 'hardhat'; | ||
import { PartnerZeroSacrifice__factory } from '../../../../typechain'; | ||
import { | ||
deployAndMine, | ||
ensureExpectedEnvvars | ||
} from '../../helpers'; | ||
import { getDeployedContracts } from "./contract-addresses"; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = getDeployedContracts(); | ||
|
||
const partnerSacrifice = new PartnerZeroSacrifice__factory(owner); | ||
const executor = await owner.getAddress(); | ||
await deployAndMine( | ||
'NEXUS.PARTNER_ZERO_SACRIFICE', | ||
partnerSacrifice, | ||
partnerSacrifice.deploy, | ||
deployedContracts.NEXUS.RELIC, | ||
executor | ||
); | ||
} | ||
|
||
// 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); | ||
}); |
31 changes: 31 additions & 0 deletions
31
protocol/scripts/deploys/sepolia/nexus/999a-transfer-ownership.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,31 @@ | ||
import { ethers } from 'hardhat'; | ||
import { | ||
ensureExpectedEnvvars, | ||
mine | ||
} from '../../helpers'; | ||
import { connectToContracts, getDeployedContracts } from './contract-addresses'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
|
||
const [owner] = await ethers.getSigners(); | ||
const multisig = getDeployedContracts().CORE.CORE_MULTISIG; | ||
const deployedContracts = connectToContracts(owner); | ||
|
||
await mine(deployedContracts.CORE.TEMPLE_TOKEN.transferOwnership(multisig)); | ||
|
||
await mine(deployedContracts.NEXUS.NEXUS_COMMON.proposeNewExecutor(multisig)); | ||
await mine(deployedContracts.NEXUS.RELIC.proposeNewExecutor(multisig)); | ||
await mine(deployedContracts.NEXUS.SHARD.proposeNewExecutor(multisig)); | ||
await mine(deployedContracts.NEXUS.TEMPLE_SACRIFICE.proposeNewExecutor(multisig)); | ||
await mine(deployedContracts.NEXUS.PARTNER_ZERO_SACRIFICE.proposeNewExecutor(multisig)); | ||
} | ||
|
||
// 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); | ||
}); |
28 changes: 28 additions & 0 deletions
28
protocol/scripts/deploys/sepolia/nexus/999b-accept-ownership.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,28 @@ | ||
import { ethers } from 'hardhat'; | ||
import { | ||
ensureExpectedEnvvars, | ||
mine | ||
} from '../../helpers'; | ||
import { connectToContracts } from './contract-addresses'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
|
||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = connectToContracts(owner); | ||
|
||
await mine(deployedContracts.NEXUS.NEXUS_COMMON.acceptExecutor()); | ||
await mine(deployedContracts.NEXUS.RELIC.acceptExecutor()); | ||
await mine(deployedContracts.NEXUS.SHARD.acceptExecutor()); | ||
await mine(deployedContracts.NEXUS.TEMPLE_SACRIFICE.acceptExecutor()); | ||
await mine(deployedContracts.NEXUS.PARTNER_ZERO_SACRIFICE.acceptExecutor()); | ||
} | ||
|
||
// 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); | ||
}); |
42 changes: 42 additions & 0 deletions
42
protocol/scripts/deploys/sepolia/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,42 @@ | ||
import { ethers } from 'hardhat'; | ||
import { | ||
ensureExpectedEnvvars, | ||
mine | ||
} from '../../helpers'; | ||
import { connectToContracts } from './contract-addresses'; | ||
|
||
async function main() { | ||
ensureExpectedEnvvars(); | ||
|
||
const [owner] = await ethers.getSigners(); | ||
const deployedContracts = connectToContracts(owner); | ||
const relic = deployedContracts.NEXUS.RELIC; | ||
const temple = deployedContracts.CORE.TEMPLE_TOKEN; | ||
|
||
const ownerAddress = await owner.getAddress(); | ||
|
||
// set shard | ||
await mine(relic.setShard(deployedContracts.NEXUS.SHARD.address)); | ||
await mine(relic.setNexusCommon(deployedContracts.NEXUS.NEXUS_COMMON.address)); | ||
|
||
// set Relic minter enclave IDs | ||
const enclaveIds = [1, 2, 3, 4, 5]; | ||
const allow = [true, true, true, true, true]; | ||
await mine(relic.setRelicMinterEnclaveIds(deployedContracts.NEXUS.TEMPLE_SACRIFICE.address, enclaveIds, allow)); | ||
const zeroRarityUri = "ipfs://QmVBhkqq3qEeQvdCDWSXQGMX7hFDymZvy7X7J4z9GsUAB3/"; | ||
await mine(relic.setBaseUriRarity(0, zeroRarityUri)); | ||
|
||
// TESTNET ONLY -- Allow owner to mint Testnet Temple | ||
{ | ||
await mine(temple.addMinter(ownerAddress)); | ||
} | ||
} | ||
|
||
// 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); | ||
}); |
Oops, something went wrong.