Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Oct 25, 2024
1 parent 79945f9 commit 4218aba
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 236 deletions.
2 changes: 1 addition & 1 deletion contracts/bindings/AVSDirectory/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/BLSApkRegistry/binding.go

Large diffs are not rendered by default.

213 changes: 5 additions & 208 deletions contracts/bindings/DelegationManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/EigenDAServiceManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/EjectionManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/IndexRegistry/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/MockRollup/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/OperatorStateRetriever/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/RegistryCoordinator/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/StakeRegistry/binding.go

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions core/meterer/meterer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ func setup(_ *testing.M) {

logger = logging.NewNoopLogger()
config := meterer.Config{
// PricePerSymbol: 2,
// MinNumSymbols: 3,
// GlobalSymbolsPerSecond: 1009,
// ReservationWindow: 1,
ChainReadTimeout: 3 * time.Second,
}

Expand Down
30 changes: 20 additions & 10 deletions disperser/apiserver/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"testing"
"time"

commonaws "github.com/Layr-Labs/eigenda/common/aws"
"github.com/Layr-Labs/eigenda/core/auth"
"github.com/Layr-Labs/eigenda/core/meterer"
"github.com/Layr-Labs/eigenda/core/mock"
Expand Down Expand Up @@ -651,18 +650,29 @@ func newTestServer(transactor core.Writer) *apiserver.DispersalServer {

mockState := &mock.MockOnchainPaymentState{}

clientConfig := commonaws.ClientConfig{
Region: "us-east-1",
AccessKey: "localstack",
SecretAccessKey: "localstack",
EndpointURL: fmt.Sprintf("http://0.0.0.0:4566"),
table_names := []string{"reservations-apiserver-test", "ondemand-apiserver-test", "global-apiserver-test"}

err = meterer.CreateReservationTable(awsConfig, table_names[0])
if err != nil {
teardown()
panic("failed to create reservation table")
}
err = meterer.CreateOnDemandTable(awsConfig, table_names[1])
if err != nil {
teardown()
panic("failed to create ondemand table")
}
err = meterer.CreateGlobalReservationTable(awsConfig, table_names[2])
if err != nil {
teardown()
panic("failed to create global reservation table")
}

store, err := meterer.NewOffchainStore(
clientConfig,
"reservations",
"ondemand",
"global",
awsConfig,
table_names[0],
table_names[1],
table_names[2],
logger,
)
if err != nil {
Expand Down
26 changes: 21 additions & 5 deletions test/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (

clientsmock "github.com/Layr-Labs/eigenda/api/clients/mock"
commonaws "github.com/Layr-Labs/eigenda/common/aws"
commondynamodb "github.com/Layr-Labs/eigenda/common/aws/dynamodb"
"github.com/Layr-Labs/eigenda/core/meterer"
"github.com/Layr-Labs/eigenda/disperser/apiserver"
dispatcher "github.com/Layr-Labs/eigenda/disperser/batcher/grpc"
Expand Down Expand Up @@ -76,7 +75,6 @@ var (

dockertestPool *dockertest.Pool
dockertestResource *dockertest.Resource
dynamoClient *commondynamodb.Client
clientConfig commonaws.ClientConfig

deployLocalStack bool
Expand Down Expand Up @@ -261,11 +259,29 @@ func mustMakeDisperser(t *testing.T, cst core.IndexedChainState, store disperser
EndpointURL: fmt.Sprintf("http://0.0.0.0:%s", localStackPort),
}

table_names := []string{"reservations-integration-test", "ondemand-integration-test", "global-integration-test"}

err = meterer.CreateReservationTable(clientConfig, table_names[0])
if err != nil {
teardown()
panic("failed to create reservation table")
}
err = meterer.CreateOnDemandTable(clientConfig, table_names[1])
if err != nil {
teardown()
panic("failed to create ondemand table")
}
err = meterer.CreateGlobalReservationTable(clientConfig, table_names[2])
if err != nil {
teardown()
panic("failed to create global reservation table")
}

offchainStore, err := meterer.NewOffchainStore(
clientConfig,
"reservations",
"ondemand",
"global",
table_names[0],
table_names[1],
table_names[2],
logging.NewNoopLogger(),
)
if err != nil {
Expand Down

0 comments on commit 4218aba

Please sign in to comment.