-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: updates for live testnet deployment (#52)
* feat: avs metadata for testnet deployment * chore: update contracts * fix!: contract and test updates from holesky deployment and testing * feat: scripts for testnet contract deployment and holesky test * feat: core deployment script fixes * fix: add via-ir to foundry toml * fix!: updating all avs contracts and adding deployment scripts wip * fix!: using ecdsa contracts * fix: fix local test with contract amendments * fix: holesky test fixes * fix!: debugging final bug in avs registration wip * chore(clippy): fmt * fix: tangle avs tests now completely work * chore: cleanup and formatting * chore: remove unnecessary files
- Loading branch information
Showing
17 changed files
with
1,326 additions
and
693 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
src = "src" | ||
out = "out" | ||
libs = ["lib"] | ||
solc_version = "0.8.20" | ||
solc_version = "0.8.20" | ||
via_ir = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.12; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {TangleServiceManager} from "../src/TangleServiceManager.sol"; | ||
import {ECDSAStakeRegistry} from "../src/ECDSAStakeRegistry.sol"; | ||
import {StrategyParams, Quorum} from "../src/ECDSAStakeRegistryStorage.sol"; | ||
import {IStrategy} from "../src/interfaces/vendored/IStrategy.sol"; | ||
|
||
contract InitializeContracts is Script { | ||
function setUp() public {} | ||
|
||
function run() public { | ||
// Load private key from environment | ||
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY"); | ||
vm.startBroadcast(deployerPrivateKey); | ||
|
||
address tangleServiceManagerAddr = 0x5aBc6138DD384a1b059f1fcBaD73E03c31170C14; | ||
address ecdsaStakeRegistryAddr = 0x131b803Bece581281A2E33d7E693DfA70aB85D06; | ||
|
||
// Initialize TangleServiceManager | ||
TangleServiceManager tangleServiceManager = TangleServiceManager(tangleServiceManagerAddr); | ||
tangleServiceManager.initialize(msg.sender); | ||
|
||
// Initialize ECDSAStakeRegistry | ||
ECDSAStakeRegistry ecdsaStakeRegistry = ECDSAStakeRegistry(ecdsaStakeRegistryAddr); | ||
|
||
// Create a quorum configuration with the WETH strategy | ||
IStrategy[] memory strategies = new IStrategy[](1); | ||
uint96[] memory weights = new uint96[](1); | ||
|
||
// WETH Strategy on Holesky | ||
strategies[0] = IStrategy(0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9); | ||
weights[0] = 10000; // 100% weight | ||
|
||
StrategyParams[] memory strategyParams = new StrategyParams[](1); | ||
strategyParams[0] = StrategyParams(strategies[0], weights[0]); | ||
|
||
Quorum memory quorum = Quorum(strategyParams); | ||
|
||
// Initialize with a 50% threshold (5000 basis points) | ||
ecdsaStakeRegistry.initialize(tangleServiceManagerAddr, 5000, quorum); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
use thiserror::Error; | ||
|
||
/// Represents errors that can occur in the Tangle AVS | ||
#[derive(Debug, Error)] | ||
pub enum Error { | ||
#[error("EigenLayer registration error: {0}")] | ||
EigenLayerRegistrationError(String), | ||
|
||
#[error("Tangle registration error: {0}")] | ||
TangleRegistrationError(String), | ||
|
||
#[error("Signer error: {0}")] | ||
SignerError(String), | ||
|
||
#[error("Transaction error: {0}")] | ||
TransactionError(String), | ||
|
||
#[error("Other error: {0}")] | ||
OtherError(String), | ||
|
||
#[error("Invalid URL error: {0}")] | ||
InvalidUrl(String), | ||
|
||
#[error("HTTP request error: {0}")] | ||
HttpRequestError(String), | ||
|
||
#[error("JSON error: {0}")] | ||
JsonError(String), | ||
|
||
#[error("Invalid session key length")] | ||
SessionKeyError, | ||
|
||
#[error("Environment variable error: {0}")] | ||
EnvironmentVariableError(String), | ||
|
||
#[error("Job error: {0}")] | ||
JobError(String), | ||
|
||
#[error("Command error: {0}")] | ||
CommandError(String), | ||
|
||
#[error("UTF-8 conversion error: {0}")] | ||
Utf8Error(String), | ||
|
||
#[error("IO error: {0}")] | ||
IoError(String), | ||
} | ||
|
||
impl From<String> for Error { | ||
fn from(s: String) -> Self { | ||
Error::OtherError(s) | ||
} | ||
} |
Oops, something went wrong.