Skip to content
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

Add eth_executionAddress endpoint #84

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2333,3 +2333,8 @@ func toHexSlice(b [][]byte) []string {
}
return r
}

// ExecutionAddress returns the execution addresseses available in the Kettle.
func (s *TransactionAPI) ExecutionAddress(ctx context.Context) ([]common.Address, error) {
return s.b.AccountManager().Accounts(), nil
}
11 changes: 11 additions & 0 deletions suave/e2e/workflow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,17 @@ func TestE2EPrecompile_Call(t *testing.T) {
require.Error(t, err)
}

func TestE2EExecutionAddressEndpoint(t *testing.T) {
// this end-to-end tests ensures that we can call eth_executionAddress endpoint in a MEVM node
// and return the correct execution address list
fr := newFramework(t, WithExecutionNode())
defer fr.Close()

var addrs []common.Address
require.NoError(t, fr.suethSrv.RPCNode().Call(&addrs, "eth_executionAddress"))
require.NotEmpty(t, addrs)
}

type clientWrapper struct {
t *testing.T

Expand Down
Loading