Skip to content

Commit

Permalink
feat: handle slashing events and previous tests work
Browse files Browse the repository at this point in the history
  • Loading branch information
gpsanant committed Oct 29, 2024
1 parent 9c65c20 commit 752d11a
Show file tree
Hide file tree
Showing 4 changed files with 392 additions and 248 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,17 @@ lint:
test:
./scripts/goTest.sh -v -p 1 -parallel 1 ./...

# Run tests in a specific test file
# Usage: make test-file FILE=path/to/your_test_file.go
.PHONY: test-file
test-file:
@if [ -z "$(FILE)" ]; then \
echo "Error: FILE variable is not set."; \
echo "Usage: make test-file FILE=path/to/your_test_file.go"; \
exit 1; \
fi
./scripts/goTest.sh -v -p 1 -parallel 1 $(FILE)

.PHONY: staticcheck
staticcheck:
staticcheck ./...
Expand Down
7 changes: 6 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package config
import (
"errors"
"fmt"
"github.com/spf13/viper"
"strings"

"github.com/spf13/viper"
)

type EnvScope string
Expand Down Expand Up @@ -138,6 +139,7 @@ type ContractAddresses struct {
StrategyManager string
DelegationManager string
AvsDirectory string
AllocationManager string
}

func (c *Config) GetContractsMapForChain() *ContractAddresses {
Expand All @@ -148,6 +150,7 @@ func (c *Config) GetContractsMapForChain() *ContractAddresses {
StrategyManager: "0xf9fbf2e35d8803273e214c99bf15174139f4e67a",
DelegationManager: "0x75dfe5b44c2e530568001400d3f704bc8ae350cc",
AvsDirectory: "0x141d6995556135d4997b2ff72eb443be300353bc",
AllocationManager: "0x16D3F63d18549f035Bc69b553006684B69cE8148",
}
} else if c.Chain == Chain_Holesky {
return &ContractAddresses{
Expand All @@ -156,6 +159,7 @@ func (c *Config) GetContractsMapForChain() *ContractAddresses {
StrategyManager: "0xdfb5f6ce42aaa7830e94ecfccad411bef4d4d5b6",
DelegationManager: "0xa44151489861fe9e3055d95adc98fbd462b948e7",
AvsDirectory: "0x055733000064333caddbc92763c58bf0192ffebf",
AllocationManager: "0x16D3F63d18549f035Bc69b553006684B69cE8148",
}
} else if c.Chain == Chain_Mainnet {
return &ContractAddresses{
Expand All @@ -164,6 +168,7 @@ func (c *Config) GetContractsMapForChain() *ContractAddresses {
StrategyManager: "0x858646372cc42e1a627fce94aa7a7033e7cf075a",
DelegationManager: "0x39053d51b77dc0d36036fc1fcc8cb819df8ef37a",
AvsDirectory: "0x135dda560e946695d6f155dacafc6f1f25c1f5af",
AllocationManager: "0x16D3F63d18549f035Bc69b553006684B69cE8148",
}
} else {
return nil
Expand Down
Loading

0 comments on commit 752d11a

Please sign in to comment.