Skip to content

Commit

Permalink
fix(holesky): config options for Symbiotic guide
Browse files Browse the repository at this point in the history
Don't use operators.json file but provide the RPC URL using an
enviroment value
  • Loading branch information
thedevbirb committed Oct 24, 2024
1 parent c245181 commit 95816a0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ contract RegisterSymbioticOperator is Script {

function S01_registerIntoBolt() public {
uint256 operatorSk = vm.envUint("OPERATOR_SK");
string memory rpc = vm.envString("OPERATOR_RPC");

address operator = vm.addr(operatorSk);

Expand All @@ -32,10 +33,10 @@ contract RegisterSymbioticOperator is Script {

console.log("Registering Symbiotic operator into Bolt");
console.log("Operator address:", operator);
console.log("Operator RPC:", config.rpc);
console.log("Operator RPC:", rpc);

vm.startBroadcast(operatorSk);
config.symbioticMiddleware.registerOperator(config.rpc);
config.symbioticMiddleware.registerOperator(rpc);
console.log("Successfully registered Symbiotic operator");

vm.stopBroadcast();
Expand Down
23 changes: 13 additions & 10 deletions testnets/holesky/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,17 +519,20 @@ The opt-in process requires the following steps:

After having deposited collateral into a vault you need to register into
Bolt as a Symbiotic operator. We've provided a script to facilitate the
procedure. If you want to use it, please set the operator private key to an
`OPERATOR_SK` environment variable, and then run the following Forge script from
the `bolt-contracts` directory:
procedure. If you want to use it, please follow these steps:

```bash
forge script script/holesky/operators/RegisterSymbioticOperator.s.sol \
--sig "S01_registerIntoBolt" \
--rpc-url $HOLESKY_RPC \
-vvvv \
--broadcast
```
1. set the operator private key to the `OPERATOR_SK` environment variable;
2. set the operator RPC URL which supports the Commitments API to the
`OPERATOR_RPC` environment variable;
3. run the following Forge script from the `bolt-contracts` directory:

```bash
forge script script/holesky/operators/RegisterSymbioticOperator.s.sol \
--sig "S01_registerIntoBolt" \
--rpc-url $HOLESKY_RPC \
-vvvv \
--broadcast
```

To check if your operator is correctly registered, set the operator public key
in the `OPERATOR_PK` environment variable and run the following script:
Expand Down

0 comments on commit 95816a0

Please sign in to comment.