Skip to content

Commit

Permalink
Remove interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkushinDaniil committed Jan 1, 2025
1 parent 276aedd commit c78d536
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 179 deletions.
15 changes: 2 additions & 13 deletions l1/eth_subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,13 @@ import (
"github.com/ethereum/go-ethereum/rpc"
)

//go:generate mockgen -destination=../mocks/mock_getter.go -package=mocks github.com/NethermindEth/juno/l1 IPAddressGetter
type IPAddressGetter interface {
GetIPAddresses(*bind.CallOpts) ([]string, error)
}

//go:generate mockgen -destination=../mocks/mock_watcher.go -package=mocks github.com/NethermindEth/juno/l1 IPWatcher
type IPWatcher interface {
WatchIPAdded(*bind.WatchOpts, chan<- *contract.IPAddressRegistryIPAdded) (event.Subscription, error)
WatchIPRemoved(*bind.WatchOpts, chan<- *contract.IPAddressRegistryIPRemoved) (event.Subscription, error)
}

type EthSubscriber struct {
ethClient *ethclient.Client
client *rpc.Client
filterer *contract.StarknetFilterer
listener EventListener
ipAddressRegistry IPAddressGetter
ipAddressRegistryFilterer IPWatcher
ipAddressRegistry *contract.IPAddressRegistry
ipAddressRegistryFilterer *contract.IPAddressRegistryFilterer
}

var _ Subscriber = (*EthSubscriber)(nil)
Expand Down
37 changes: 0 additions & 37 deletions l1/eth_subscriber_test.go

This file was deleted.

56 changes: 0 additions & 56 deletions mocks/mock_getter.go

This file was deleted.

73 changes: 0 additions & 73 deletions mocks/mock_watcher.go

This file was deleted.

0 comments on commit c78d536

Please sign in to comment.