Skip to content

Commit

Permalink
chore: update readme and config
Browse files Browse the repository at this point in the history
  • Loading branch information
blockgroot committed Jun 25, 2024
1 parent 3dd9a69 commit f7879f1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,38 @@ forge test --gas-report
forge coverage
```

# Upgrades via Multisig tx
## Single Contract Upgrade

To upgrade a single contract, replace `contractName` with the desired contract name [here](https://github.com/stader-labs/ethx/blob/main/scripts/safe-scripts/upgrade.ts#L7):

```bash
npx hardhat run scripts/safe-scripts/upgrade.ts --network <network>
```

## Individual Proposals for All Contracts

To upgrade all contracts in individual proposals:

```bash
npx hardhat run scripts/safe-scripts/upgradeAll.ts --network <network>
```
## Single Proposal for All Contracts

To upgrade all contracts in a single proposal:

```bash
npx hardhat run scripts/safe-scripts/upgradeAllBatch.ts --network <network>
```

`NOTE:`

1. **Lost Network Files**:
If network files are lost under `.openzeppelin`, uncomment force import in the scripts.

2. **Upgrade Checks**:
Both `UpgradeAll` and `UpgradeAllBatch` scripts check the on-chain and local code before preparing the upgrade. If the deployed bytecode and compiled bytecode match exactly, the upgrade will be skipped for that particular contract.

# Integration

Check the Integration guide [here](https://github.com/stader-labs/ethx/blob/mainnet_V0/INTEGRATION.md)
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const config: HardhatUserConfig = {
accounts: [process.env.OWNER_PRIVATE_KEY_TESTNET ?? ethers.Wallet.createRandom().privateKey],
},
mainnet: {
url: process.env.PROVIDER_URL_MAINNET ?? "",
url: process.env.PROVIDER_URL_MAINNET ?? "https://ethereum.blockpi.network/v1/rpc/public",
accounts: [process.env.OWNER_PRIVATE_KEY_MAINNET ?? ethers.Wallet.createRandom().privateKey],
},
arbitrum: {
Expand Down

0 comments on commit f7879f1

Please sign in to comment.