diff --git a/bolt-contracts/config/holesky/operator.json b/bolt-contracts/config/holesky/operators/eigenlayer/registerIntoBoltAVS.json similarity index 68% rename from bolt-contracts/config/holesky/operator.json rename to bolt-contracts/config/holesky/operators/eigenlayer/registerIntoBoltAVS.json index 7e1d43c10..dd38cee99 100644 --- a/bolt-contracts/config/holesky/operator.json +++ b/bolt-contracts/config/holesky/operators/eigenlayer/registerIntoBoltAVS.json @@ -1,6 +1,5 @@ { "rpc": ":", - "salt": "0x0000000000000000000_salt_value_0000000000000000000000000000000000", - "expiry": "0x00000000000000000_expiry_value_0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + "salt": "0x0000000000000000000_salt_value_000000000000000000000000000000000", + "expiry": "0x00000000000000000_expiry_value_000000000000000000000000000000000" } - diff --git a/bolt-contracts/script/holesky/operators/RegisterEigenLayerOperator.s.sol b/bolt-contracts/script/holesky/operators/RegisterEigenLayerOperator.s.sol index 109f70c73..c67b7ef06 100644 --- a/bolt-contracts/script/holesky/operators/RegisterEigenLayerOperator.s.sol +++ b/bolt-contracts/script/holesky/operators/RegisterEigenLayerOperator.s.sol @@ -45,7 +45,7 @@ contract RegisterEigenLayerOperator is Script { BoltEigenLayerMiddlewareV1 middleware = _readMiddleware(); IAVSDirectory avsDirectory = _readAvsDirectory(); - OperatorConfig memory config = _readConfig("config/holesky/operator.json"); + OperatorConfig memory config = _readConfig("config/holesky/operators/eigenlayer/registerIntoBoltAVS.json"); console.log("Registering EigenLayer operator"); console.log("Operator address:", operator); diff --git a/testnets/holesky/README.md b/testnets/holesky/README.md index 6089342c1..524d64335 100644 --- a/testnets/holesky/README.md +++ b/testnets/holesky/README.md @@ -563,9 +563,36 @@ forge script script/holesky/operators/RegisterEigenLayerOperator.s.sol \ After having deposited collateral into a strategy you need to register into the Bolt AVS. 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: +use it, please set follow these steps: + +1. configure the operator details in this JSON file + + ```bash + $EDITOR ./config/holesky/operators/eigenlayer/registerIntoBoltAVS.json + ``` + + In there you'll need to set the the following fields: + + - `rpc` -- the RPC URL of your operator which supports the Commitments API + - `salt` -- an unique 32 bytes value to avoid replay attacks. To generate it on + both Linux and MacOS you can run: + + ```bash + echo -n "0x"; head -c 32 /dev/urandom | hexdump -e '32/1 "%02x" "\n"' + ``` + + - `expiry` -- the timestamp of the signature expiry in seconds. To generate it + on both Linux and MacOS run the following command, replacing + `` with the desired timestamp: + + ```bash + echo -n "0x"; printf "%064x\n" + ``` + +2. set the operator private key to an `OPERATOR_SK` environment + variable; +3. run the following Forge script from the `bolt-contracts` + directory: ```bash forge script script/holesky/operators/RegisterEigenLayerOperator.s.sol \