Skip to content

chore(lib): validate inputs before locking #2148

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/contracts/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ var (

// GetAddresses returns the contract addresses for the given network.
func GetAddresses(ctx context.Context, network netconf.ID) (Addresses, error) {
ver, err := version(ctx, network)
if err != nil {
return Addresses{}, err
}

addrsCache.mu.Lock()
defer addrsCache.mu.Unlock()

Expand All @@ -122,11 +127,6 @@ func GetAddresses(ctx context.Context, network netconf.ID) (Addresses, error) {
return addrs, nil
}

ver, err := version(ctx, network)
if err != nil {
return Addresses{}, err
}

addrs = Addresses{
Create3Factory: create3Factory(network),
AVS: avs(network),
Expand Down
Loading