Operator Management
This guide covers steps to deploy AVS Governance hook contract for Operator Management
Prerequisites
AVS contracts
Access to AVS governance multisig
1
2
3
Register AVSLogic with AttestationCenter
After deployment, you must call the setAvsGovernanceLogic function on the AvsGovernance , providing the address of the AvsGovernanceLogic contract as a parameter, as shown in the below example.
Script to execute setAvsGovernanceLogic function
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
/*______ __ __ __ __
/ \ / | / | / | / |
/$$$$$$ | _$$ |_ $$ |____ ______ _______ _$$ |_ $$/ _______
$$ | $$ |/ $$ | $$ \ / \ / \ / $$ | / | / |
$$ | $$ |$$$$$$/ $$$$$$$ |/$$$$$$ |$$$$$$$ |$$$$$$/ $$ |/$$$$$$$/
$$ | $$ | $$ | __ $$ | $$ |$$ $$ |$$ | $$ | $$ | __ $$ |$$ |
$$ \__$$ | $$ |/ |$$ | $$ |$$$$$$$$/ $$ | $$ | $$ |/ |$$ |$$ \_____
$$ $$/ $$ $$/ $$ | $$ |$$ |$$ | $$ | $$ $$/ $$ |$$ |
$$$$$$/ $$$$/ $$/ $$/ $$$$$$$/ $$/ $$/ $$$$/ $$/ $$$$$$$/
*/
/**
* @author Othentic Labs LTD.
* @notice Terms of Service: https://www.othentic.xyz/terms-of-service
*/
import {Script, console} from "forge-std/Script.sol";
import "../src/IAvsGocernance.sol";
import "../src/AvsGovernanceLogic.sol";
// forge script AvsGovernanceLogicScript --rpc-url $L1_RPC --private-key $PRIVATE_KEY
// --broadcast -vvvv --verify --etherscan-api-key $L1_ETHERSCAN_API_KEY --chain
// $L1_CHAIN --verifier-url $L1_VERIFIER_URL --sig="run(address)" $ATTESTATION_CENTER_ADDRESS
contract AvsGovernanceLogicScript is Script {
function setUp() public {}
function run(address avsGovernance) public {
vm.broadcast();
AvsGovernanceLogic avsGovernanceLogic = new AvsGovernanceLogic(avsGovernance);
IAvsGovernance(avsGovernance).setAvsGovernanceLogic(address(avsGovernanceLogic));
}
}
Note that only the AVS Governance Multisig is authorized to call this function.
Last updated