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

graphql: add storage slots to access list #23650

Merged
merged 2 commits into from Sep 28, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions graphql/graphql.go
Expand Up @@ -158,14 +158,14 @@ func (l *Log) Data(ctx context.Context) hexutil.Bytes {
// AccessTuple represents EIP-2930
type AccessTuple struct {
address common.Address
storageKeys *[]common.Hash
storageKeys []common.Hash
}

func (at *AccessTuple) Address(ctx context.Context) common.Address {
return at.address
}

func (at *AccessTuple) StorageKeys(ctx context.Context) *[]common.Hash {
func (at *AccessTuple) StorageKeys(ctx context.Context) []common.Hash {
return at.storageKeys
}

Expand Down Expand Up @@ -442,7 +442,7 @@ func (t *Transaction) AccessList(ctx context.Context) (*[]*AccessTuple, error) {
for _, al := range accessList {
ret = append(ret, &AccessTuple{
address: al.Address,
storageKeys: &al.StorageKeys,
storageKeys: al.StorageKeys,
})
}
return &ret, nil
Expand Down
2 changes: 1 addition & 1 deletion graphql/schema.go
Expand Up @@ -72,7 +72,7 @@ const schema string = `
#EIP-2718
type AccessTuple{
address: Address!
storageKeys : [Bytes32!]
storageKeys : [Bytes32!]!
}

# Transaction is an Ethereum transaction.
Expand Down