Skip to content

Commit

Permalink
Deployment to Holesky with Taiko's real contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Jul 18, 2024
1 parent 2e3a3a8 commit 3033e65
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
DEPLOYMENT_PRIVATE_KEY="..."
ALCHEMY_API_KEY="..."
ETHERSCAN_API_KEY="..."
NETWORK="holesky"
DEPLOY_AS_PRODUCTION=true # With false, the script will deploy mock helpers

# GOVERNANCE PARAMETERS
MIN_VETO_RATIO="300000" # 30%
Expand All @@ -12,9 +14,9 @@ MIN_STD_APPROVALS="5" # How many multisig approvals are required
MIN_EMERGENCY_APPROVALS="10" # How many emergency multisig approvals are required

# TAIKO's PARAMETERS
TOKEN_ADDRESS="0x" # ERC20 token address
TAIKO_L1_ADDRESS="0x" # Address of the TaikoL1 contract
TAIKO_BRIDGE_ADDRESS="0x" # Address of the Taiko Bridge
TOKEN_ADDRESS="0x6490E12d480549D333499236fF2Ba6676C296011" # ERC20 token address
TAIKO_L1_ADDRESS="0x79C9109b764609df928d16fC4a91e9081F7e87DB" # Address of the TaikoL1 contract
TAIKO_BRIDGE_ADDRESS="0xA098b76a3Dd499D3F6D58D8AcCaFC8efBFd06807" # Address of the Taiko Bridge

# OSx BASE CONTRACT ADDRESSES (network dependent, see active_contracts.json on lib/osx)
DAO_FACTORY="0xE640Da5AD169630555A86D9b6b9C145B4961b1EB"
Expand Down
30 changes: 30 additions & 0 deletions DEPLOYMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@

## Holesly

### July 18th 2024

Deployment for internal testing. Targetting Taiko's deployment.

```
Chain ID: 17000
Deploying from: 0x424797Ed6d902E17b9180BFcEF452658e148e0Ab
Using production settings
Factory: 0x30435F686dA174f5B646E75684A0795F6A06d0C8
DAO: 0xcB10AB2E59Ac73e202adE31531462F7a75cfe74C
Voting token: 0x6490E12d480549D333499236fF2Ba6676C296011
Taiko Bridge: 0xA098b76a3Dd499D3F6D58D8AcCaFC8efBFd06807
Plugins
- Multisig plugin: 0x9d2f62109CE2fDb3FaE58f14D2c1CedFdc7939f9
- Emergency multisig plugin: 0x2198F07F02b2D7365C7Df8C488741B43EE076f83
- Optimistic token voting plugin: 0x799A3D93DB762A838F41Dd956857463AC9D245d7
Plugin repositories
- Multisig plugin repository: 0xA16B5FD427EA11f171104945B6360793C801766B
- Emergency multisig plugin repository: 0x5644C0B88a571B35C0AaA2F9378A06F60f04A927
- Optimistic token voting plugin repository: 0x48309dCFc32eBB1CB6DbA9169F8259f35d4fE993
Helpers
- Public key registry 0x054098E107FCd07d1C3D0F97Ba8217CE85AaC3ca
- Delegation wall 0x9A118b78dE4b3c91706f45Bb8686f678d5600500
```

### July 9th 2024

Deployment intended for staging purposes.
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,15 +182,20 @@ $ forge test
5. Set the RPC URL and run the deployment script

```shell
RPC_URL="https://..."
NETWORK="holesky"
forge script --chain "$NETWORK" script/Deploy.s.sol:Deploy --rpc-url "$RPC_URL" --broadcast --verify
RPC_URL="https://eth-holesky.g.alchemy.com/v2/${ALCHEMY_API_KEY}"
forge script --chain "$NETWORK" script/Deploy.s.sol:Deploy --rpc-url "$RPC_URL" --broadcast --verify --via-ir
```

If you get the error `Failed to get EIP-1559 fees`, add `--legacy` to the last command:

```shell
forge script --chain "$NETWORK" script/Deploy.s.sol:Deploy --rpc-url "$RPC_URL" --broadcast --verify --legacy
forge script --chain "$NETWORK" script/Deploy.s.sol:Deploy --rpc-url "$RPC_URL" --broadcast --verify --via-ir --legacy
```

If a some contracts fail to verify on Etherscan, retry with this command:

```shell
forge script --chain "$NETWORK" script/Deploy.s.sol:Deploy --rpc-url "$RPC_URL" --verify --via-ir --legacy --private-key "$DEPLOYMENT_PRIVATE_KEY" --resume
```

### Formatting the code
Expand Down
14 changes: 9 additions & 5 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ contract Deploy is Script {
console.log("Deploying from:", vm.addr(vm.envUint("DEPLOYMENT_PRIVATE_KEY")));

TaikoDaoFactory.DeploymentSettings memory settings;
if (block.chainid == 1) {
settings = getMainnetSettings();
if (vm.envBool("DEPLOY_AS_PRODUCTION")) {
settings = getProductionSettings();
} else {
settings = getTestnetSettings();
settings = getInternalTestingSettings();
}

console.log("");
Expand Down Expand Up @@ -81,7 +81,9 @@ contract Deploy is Script {
console.log("- Delegation wall", address(delegationWall));
}

function getMainnetSettings() internal view returns (TaikoDaoFactory.DeploymentSettings memory settings) {
function getProductionSettings() internal view returns (TaikoDaoFactory.DeploymentSettings memory settings) {
console.log("Using production settings");

settings = TaikoDaoFactory.DeploymentSettings({
// Taiko contract settings
tokenAddress: IVotesUpgradeable(vm.envAddress("TOKEN_ADDRESS")),
Expand Down Expand Up @@ -111,7 +113,9 @@ contract Deploy is Script {
});
}

function getTestnetSettings() internal returns (TaikoDaoFactory.DeploymentSettings memory settings) {
function getInternalTestingSettings() internal returns (TaikoDaoFactory.DeploymentSettings memory settings) {
console.log("Using internal testing settings");

address taikoBridgeAddress = address(0x1234567890);
address[] memory multisigMembers = readMultisigMembers();
address votingToken = createTestToken(multisigMembers, taikoBridgeAddress);
Expand Down

0 comments on commit 3033e65

Please sign in to comment.