Skip to content

Commit

Permalink
feat(contracts): testing + documenting deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Oct 16, 2024
1 parent cc8b5bf commit 5cf7fef
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bolt-contracts/config/holesky/deployments.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"symbiotic": {
"network": "0x0",
"network": "0xAdFC41729fF447974cE27DdFa358A0f2096c3F39",
"operatorRegistry": "0xAdFC41729fF447974cE27DdFa358A0f2096c3F39",
"networkOptInService": "0xF5AFc9FA3Ca63a07E529DDbB6eae55C665cCa83E",
"vaultFactory": "0x5035c15F3cb4364CF2cF35ca53E3d6FC45FC8899"
Expand Down
File renamed without changes.
15 changes: 14 additions & 1 deletion bolt-contracts/docs/deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

**This should only be done once with the `V1` contracts. For upgrades, refer to the [upgrading doc](./upgrading.md).**

## Configuration

There are 2 JSON configuration files:
- [`config/holesky/deployments.json`](../config/holesky/deployments.json): contains deployment addresses of EigenLayer ([here](https://github.com/Layr-Labs/eigenlayer-contracts/blob/dev/README.md#deployments)) and Symbiotic ([here](https://docs.symbiotic.fi/deployments)).
- [`config/holesky/parameters.json`](../config/holesky/parameters.json): contains the launch parameters for `BoltParameters`.


## Deploy Script
Make sure we have a full compilation for the Foundry Upgrades Toolkit:
```bash
forge clean && forge build
```

Run the following script to test deployment on an Anvil fork:
```bash
anvil --fork-url $HOLESKY_RPC
Expand All @@ -11,4 +24,4 @@ forge script script/holesky/Deploy.s.sol --rpc-url http://127.0.0.1:8545 --priva
Run the following script to deploy Bolt V1:
```bash
forge script script/holesky/Deploy.s.sol --rpc-url $HOLESKY_RPC --private-key $PRIVATE_KEY --broadcast -vvvv
```
```
2 changes: 1 addition & 1 deletion bolt-contracts/script/holesky/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ contract DeployBolt is Script {
symbioticNetwork: vm.parseJsonAddress(json, ".symbiotic.network"),
symbioticOperatorRegistry: vm.parseJsonAddress(json, ".symbiotic.operatorRegistry"),
symbioticOperatorNetOptIn: vm.parseJsonAddress(json, ".symbiotic.networkOptInService"),
symbioticVaultFactory: vm.parseJsonAddress(json, ".symbiotic.vaultRegistry"),
symbioticVaultFactory: vm.parseJsonAddress(json, ".symbiotic.vaultFactory"),
eigenLayerAVSDirectory: vm.parseJsonAddress(json, ".eigenLayer.avsDirectory"),
eigenLayerDelegationManager: vm.parseJsonAddress(json, ".eigenLayer.delegationManager"),
eigenLayerStrategyManager: vm.parseJsonAddress(json, ".eigenLayer.strategyManager")
Expand Down
2 changes: 1 addition & 1 deletion bolt-contracts/test/Utils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {BoltConfig} from "../src/lib/Config.sol";
contract Utils is Test {
function readParameters() public view returns (BoltConfig.Parameters memory) {
string memory root = vm.projectRoot();
string memory path = string.concat(root, "/config/config.test.json");
string memory path = string.concat(root, "/config/test/parameters.json");
string memory json = vm.readFile(path);

uint48 epochDuration = uint48(vm.parseJsonUint(json, ".epochDuration"));
Expand Down

0 comments on commit 5cf7fef

Please sign in to comment.