Skip to content

Commit

Permalink
Merge pull request #29 from valory-xyz/feat/deploy
Browse files Browse the repository at this point in the history
Feat/deploy
  • Loading branch information
DavidMinarsch authored Jun 30, 2022
2 parents 52e7aa6 + 5fe1beb commit 9e24b4b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 7 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ The finalized contract ABIs for deployment and their number of optimization pass
## Audits
The audit is provided as development matures. The latest audit report can be found here: [audits](https://github.com/valory-xyz/autonolas-governance/blob/main/audits).

## Deployed Protocol
The list of addresses can be found [here](https://github.com/valory-xyz/autonolas-governance/blob/main/docs/mainnet_addresses.json).


## Acknowledgements
The Autonolas `OLAS` contract was inspired and based on in parts by the following sources:
Expand Down
1 change: 1 addition & 0 deletions docs/mainnet_addresses.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"olasAddress":"0x0001A500A6B18995B03f44bb040A5fFc28E45CB0","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","veOLASAddress":"0x7e01A500805f8A52Fad229b3015AD130A332B7b3","governorAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","buOLASAddress":"0xb09CcF0Dbf0C178806Aaee28956c74bd66d21f73","saleAddress":"0xD1155408D58293BE0743225bcDe28b9FD0C12378"}
11 changes: 10 additions & 1 deletion scripts/deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ This folder contains the scripts to deploy Autonolas governance. These scripts c
- Please note: if you encounter the `Unknown Error 0x6b0c`, then it is likely because the ledger is not connected or logged in.

## Steps to engage
Make sure the project is installed with the `yarn install` command as described in the main [README](https://github.com/valory-xyz/autonolas-governance/blob/main/README.md)
Make sure the project is installed with the
```
yarn install
```
command and compiled with the
```
npx hardhat compile
```
command as described in the [main readme](https://github.com/valory-xyz/autonolas-governance/blob/main/README.md).


Create a `globals.json` file in the root folder, or copy it from the file with pre-defined parameters (i.e., `scripts/deployment/globals_goerli.json` for the goerli testnet).

Expand Down
6 changes: 3 additions & 3 deletions scripts/deployment/deploy_04.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function main() {

// Transaction signing and execution
console.log("3. Brutforce salt for vanity address OLAS (deployAddress + bytecode)");
const olasSalt = ethers.utils.id(olasSaltString);
const olasSalt = olasSaltString;

console.log("4. EOA to deploy OLAS contract via deploymentFactory (becoming its owner and minter)");
const factory = await ethers.getContractAt("DeploymentFactory", parsedData.deploymentFactory);
Expand All @@ -40,7 +40,7 @@ async function main() {

// Transaction details
console.log("Contract deployment: OLAS via create2()");
console.log("Contract address:", olas.address);
console.log("Contract address:", olasAddress);
console.log("Transaction:", result.hash);

// Verification of ownership and values
Expand All @@ -50,7 +50,7 @@ async function main() {
// Contract verification
if (parsedData.contractVerification) {
const execSync = require("child_process").execSync;
execSync("npx hardhat verify --network " + providerName + " " + olas.address, { encoding: "utf-8" });
execSync("npx hardhat verify --network " + providerName + " " + olasAddress, { encoding: "utf-8" });
}

// Writing updated parameters back to the JSON file
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployment/deploy_07.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function main() {

// Transaction signing and execution
console.log("6. Brutforce salt for vanity address veOLAS (deployAddress + OLAS address + bytecode)");
const veSalt = ethers.utils.id(veOlasSaltString);
const veSalt = veOlasSaltString;

console.log("7. EOA to deploy veOLAS contract via deploymentFactory pointed to OLAS");
const factory = await ethers.getContractAt("DeploymentFactory", parsedData.deploymentFactory);
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployment/deploy_18.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async function main() {
const timelock = await ethers.getContractAt("Timelock", parsedData.timelockAddress);
const adminRole = ethers.utils.id("TIMELOCK_ADMIN_ROLE");
console.log("You are signing the following transaction: timelock.connect(EOA).renounceRole(adminRole, await EOA.getAddress())");
result = await timelock.connect(EOA).renounceRole(adminRole, await EOA.getAddress());
result = await timelock.connect(EOA).renounceRole(adminRole, deployer);
// Transaction details
console.log("Contract call: Timelock");
console.log("Contract address:", timelock.address);
Expand Down
2 changes: 1 addition & 1 deletion scripts/deployment/globals_mainnet.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"contractVerification":true,"useLedger":true,"valoryMultisig":"0x87cc0d34f6111c8A7A4Bdf758a9a715A3675f941","derivationPath":"m/44'/60'/2'/0/0","CM":"0x04C06323Fe3D53Deb7364c0055E1F68458Cc2570","providerName":"mainnet","olasSaltString":"0x0001a5","timelockMinDelay":"13091","veOlasSaltString":"0x7e01a5","initialVotingDelay":"13091","initialVotingPeriod":"19636","initialProposalThreshold":"5000000000000000000000","quorum":"3","initSupply":"526500000000000000000000000","timelockSupply":"100000000000000000000000000","saleSupply":"301500000000000000000000000","valorySupply":"125000000000000000000000000","GnosisSafeL2":"0x3E5c63644E683549055b9Be8653de26E0B4CD36E","GnosisSafeProxyFactory":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","MultiSendCallOnly":"0x40A2aCCbd92BCA938b02010E17A5b8929b49130D"}
{"contractVerification":true,"useLedger":true,"valoryMultisig":"0x87cc0d34f6111c8A7A4Bdf758a9a715A3675f941","derivationPath":"m/44'/60'/2'/0/0","CM":"0x04C06323Fe3D53Deb7364c0055E1F68458Cc2570","providerName":"mainnet","olasSaltString":"0xeb2a22b27c7ad5eee424fd90b376c745e60f914e25fe2b399268300038939d65","timelockMinDelay":"13091","veOlasSaltString":"0xeb2a22b27c7ad5eee424fd90b376c745e60f914e8c4b6f56e64f24010eba714f","initialVotingDelay":"13091","initialVotingPeriod":"19636","initialProposalThreshold":"5000000000000000000000","quorum":"3","initSupply":"526500000000000000000000000","timelockSupply":"100000000000000000000000000","saleSupply":"292874580000000000000000000","valorySupply":"133625420000000000000000000","GnosisSafeL2":"0x3E5c63644E683549055b9Be8653de26E0B4CD36E","GnosisSafeProxyFactory":"0xa6B71E26C5e0845f74c812102Ca7114b6a896AB2","MultiSendCallOnly":"0x40A2aCCbd92BCA938b02010E17A5b8929b49130D","deploymentFactory":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","olasAddress":"0x0001A500A6B18995B03f44bb040A5fFc28E45CB0","timelockAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","veOLASAddress":"0x7e01A500805f8A52Fad229b3015AD130A332B7b3","governorAddress":"0x34C895f302D0b5cf52ec0Edd3945321EB0f83dd5","buOLASAddress":"0xb09CcF0Dbf0C178806Aaee28956c74bd66d21f73","saleAddress":"0xD1155408D58293BE0743225bcDe28b9FD0C12378"}

0 comments on commit 9e24b4b

Please sign in to comment.