Commit graph

5 commits

Author SHA1 Message Date
Steve Degosserie
387c056912
fix: Resolve Foundry build errors and apply code formatting (#241)
## Summary

Fixes the CI build failure in the `task-ts-build` workflow caused by
Foundry v1.4.2's Solar linter not being able to resolve Snowbridge's
context-specific import remappings.

## Problem

The Snowbridge submodule uses context-specific remappings (prefixed with
`:`) for its dependencies:
- `lib/snowbridge/contracts/:openzeppelin/` → OpenZeppelin contracts
- `lib/snowbridge/contracts/:prb/math/` → PRB Math library

Foundry v1.4.2's Solar linter doesn't understand these context-specific
remappings and fails with errors like:
```
error: file openzeppelin/utils/cryptography/MerkleProof.sol not found
error: file prb/math/src/UD60x18.sol not found
```

## Solution

Added global remappings that the linter can understand:
```toml
"openzeppelin/=lib/snowbridge/contracts/lib/openzeppelin-contracts/contracts/",
"prb/math/=lib/snowbridge/contracts/lib/prb-math/",
```

### Why This Works
- The linter can now resolve `openzeppelin/` and `prb/math/` imports
globally
- These global remappings take **lower precedence** than
context-specific ones during compilation
- The compiler still uses the context-specific remappings (with `:`)
when compiling Snowbridge contracts
- The linter uses the global remappings when checking all files

## Changes

### Commit 1: Add global remappings
- `contracts/foundry.toml`: Added 2 global remapping entries

### Commit 2: Apply forge fmt
- Applied automatic formatting via `forge fmt` to ensure code style
consistency
- Multi-line formatting for long import statements and function
signatures
- No functional changes - purely formatting updates

## Testing

 Local build succeeds with `forge build`
 No Snowbridge import resolution errors
 `forge fmt --check` passes with no formatting issues
 Only linting notes/warnings remain (not errors)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-20 11:20:59 +03:00
Facundo Farall
5baa789f52
feat: Relay Validators operator set through Snowbridge (#39)
In this PR:
1. Implement application-specific functionalities in the
`DataHavenServiceManager` contract:
    1. Registering of 3 operator sets: Validators, BSPs and MSPs.
    2. Allowlisted sign up of operators.
    3. Integration with Snowbridge to send message of new validator set.
2. Basic testing of the above functionalities.
3. Tests now use less mocked contracts (especially from EigenLayer).
4. Refactor of `SignUpOperator` script, which now supports the three
kinds of Operator sets.
2025-04-16 15:49:35 +00:00
Facundo Farall
7e0f043d7f
feat: Add script to sign up operator to AVS (#37) 2025-04-11 20:54:20 -03:00
Tobi Demeco
d8d792874c
feat: initial slasher implementation (#10)
This PR:
- Sets up the slasher infrastructure with the base functionality
required (in `ISlasher.sol`, `SlasherBase.sol` and
`SlasherBaseStorage.sol`) and adds the tests for it (in
`SlasherBase.t.sol`).
- Adds an implementation of a more complex slasher (in
`IVetoableSlasher.sol` and `VetoableSlasher.sol`) and tests for it (in
`VetoableSlasher.t.sol`).
- Modifies the `ServiceManagerBase` contract to use the new
`VetoableSlasher` contract to manage slashing.
- Updates mocks and tests to reflect the newly added functionality.

---------

Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
2025-03-27 15:20:15 +00:00
Facundo Farall
a78cb3ce41
feat: 🏗️ Setup basic AVS contract (#4)
* forge install: eigenlayer-contracts

v1.1.1

* fix: 🗑️ Cleanup dependencies from init

* forge install: forge-std

v1.9.6

* forge install: openzeppelin-contracts

v5.2.0

* forge install: openzeppelin-contracts-upgradeable

v5.2.0

* chore: 🙈 Ignore IDE directories

* chore: 🏗️ Modify config in `foundry.toml` based on EigenLayer's example

* feat: 🚧 Add `ServiceManagerBase` contract and dependencies based on eigenlayer-middleware

* feat: 🚧 Naive implementation of missing functions replacing AVSDirectory for AllocationManager

* docs: 📝 Add first draft of contracts diagram

* refactor: 🔥 Remove unnecessary functions and refactor most important ones to the top

* docs: 📝 Update contracts diagram

* docs: 📝 Update contracts diagram

* feat:  Implement basic mocked Service Manager

* test: 🚧 Cleanup and start testing setup for mock ServiceManagerBase

* test: 🤡 Add mocks to setup tests

* test: 🤡 Add deployment of RewardsCoordinator

* test:  Deploy EigenLayer mocked contracts in test

* revert:  Remove proglematic submodules

* revert:  Remove forge-std dependency

* forge install: forge-std

v1.9.6

* forge install: openzeppelin-contracts

v5.2.0

* forge install: openzeppelin-contracts-upgradeable

v5.2.0

* forge install: eigenlayer-contracts

v1.3.0

* revert:  Remove faulty dependency

* forge install: eigenlayer-contracts

v1.3.0

* revert:  remove added dependency

* forge install: eigenlayer-contracts

v1.3.0

* revert:  Remove openzeppelin dependencies from root project

* test: 🚧 Make test run after dependency mayhem

* test:  Add passing createOperatorSets test with empty params

* style: 🎨 Apply forge fmt
2025-03-11 17:16:16 -03:00