Skip to content

Commit

Permalink
feat(contracts/script): fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mempirate committed Oct 20, 2024
1 parent 675cf09 commit 069e7f1
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions bolt-contracts/config/holesky/deployments.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"bolt": {
"validators": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"
"validators": "0x05275a4799cd1B07D81319390fC62Bc7BDbDf269"
},
"symbiotic": {
"network": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
Expand All @@ -9,7 +9,7 @@
"vaultFactory": "0x18C659a269a7172eF78BBC19Fe47ad2237Be0590",
"networkRegistry": "0xac5acD8A105C8305fb980734a5AD920b5920106A",
"networkMiddlewareService": "0x683F470440964E353b389391CdDDf8df381C282f",
"middleware": "0x61B626A562d39439Ab60fCbF19678Dac036D1209",
"middleware": "",
"supportedVaults": [
"0x1df2fbfcD600ADd561013f44B2D055E2e974f605",
"0xf427d00c34609053d97167352061DD2F0F27F853"
Expand All @@ -19,7 +19,7 @@
"avsDirectory": "0x055733000064333CaDDbC92763c58BF0192fFeBf",
"delegationManager": "0xA44151489861Fe9e3055d95adC98FbD462B948e7",
"strategyManager": "0xdfB5f6CE42aAA7830E94ECFCcAd411beF4d4D5b6",
"middleware": "0x2575d6D30767149c99589cce743656fA3866ca2e",
"middleware": "",
"supportedStrategies": [
"0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3",
"0x3A8fBdf9e77DFc25d09741f51d3E181b25d0c4E0",
Expand Down
2 changes: 1 addition & 1 deletion bolt-contracts/config/holesky/validators.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"maxCommittedGasLimit": 10000000,
"authorizedOperator": "0x",
"authorizedOperator": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"pubkeys": [
"0xad02df40e24e8534dc4c175163f7a034f99f2e81c43b7ea19904006cb05d001b5301d3444f1812b101803b7f72e340fa",
"0xa4c0a8b5dd70d0fe8f05580143bea4c40badb176c2b0c20001cddf897a11bb832137fa4050af1d0420a7dc27568697df"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ contract RegisterAVS is Script {
string memory path = string.concat(root, "/config/holesky/deployments.json");
string memory json = vm.readFile(path);

return vm.parseJsonAddress(json, ".eigenLayer.networkMiddleware");
return vm.parseJsonAddress(json, ".eigenLayer.middleware");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ contract SymbioticHelper is Script {
string memory path = string.concat(root, "/config/holesky/deployments.json");
string memory json = vm.readFile(path);

return vm.parseJsonAddress(json, ".symbiotic.networkMiddleware");
return vm.parseJsonAddress(json, ".symbiotic.middleware");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import {Script, console} from "forge-std/Script.sol";
import {IAVSDirectory} from "@eigenlayer/src/contracts/interfaces/IAVSDirectory.sol";
import {ISignatureUtils} from "@eigenlayer/src/contracts/interfaces/ISignatureUtils.sol";

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

import {BoltEigenLayerMiddlewareV1} from "../../../src/contracts/BoltEigenLayerMiddlewareV1.sol";
import {IBoltMiddlewareV1} from "../../../src/interfaces/IBoltMiddlewareV1.sol";

contract RegisterEigenLayerOperator is Script {
struct OperatorConfig {
Expand All @@ -28,8 +32,6 @@ contract RegisterEigenLayerOperator is Script {
console.log("Operator address:", operator);
console.log("Operator RPC:", config.rpc);

vm.startBroadcast(operatorSk);

bytes32 digest = avsDirectory.calculateOperatorAVSRegistrationDigestHash({
operator: operator,
avs: address(middleware),
Expand All @@ -43,7 +45,10 @@ contract RegisterEigenLayerOperator is Script {
ISignatureUtils.SignatureWithSaltAndExpiry memory operatorSignature =
ISignatureUtils.SignatureWithSaltAndExpiry(rawSignature, config.salt, config.expiry);

vm.startBroadcast(operatorSk);

middleware.registerOperator(config.rpc, operatorSignature);
console.log("Successfully registered EigenLayer operator");

vm.stopBroadcast();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ contract RegisterSymbioticOperator is Script {

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

vm.stopBroadcast();
}
Expand Down

0 comments on commit 069e7f1

Please sign in to comment.