Unverified Commit 42bc1944 authored by Martin Holst Swende's avatar Martin Holst Swende Committed by GitHub

graphql: add storage slots to access list (#23650)

Fixes #23640
parent a541fbea
...@@ -158,14 +158,14 @@ func (l *Log) Data(ctx context.Context) hexutil.Bytes { ...@@ -158,14 +158,14 @@ func (l *Log) Data(ctx context.Context) hexutil.Bytes {
// AccessTuple represents EIP-2930 // AccessTuple represents EIP-2930
type AccessTuple struct { type AccessTuple struct {
address common.Address address common.Address
storageKeys *[]common.Hash storageKeys []common.Hash
} }
func (at *AccessTuple) Address(ctx context.Context) common.Address { func (at *AccessTuple) Address(ctx context.Context) common.Address {
return at.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 return at.storageKeys
} }
...@@ -442,7 +442,7 @@ func (t *Transaction) AccessList(ctx context.Context) (*[]*AccessTuple, error) { ...@@ -442,7 +442,7 @@ func (t *Transaction) AccessList(ctx context.Context) (*[]*AccessTuple, error) {
for _, al := range accessList { for _, al := range accessList {
ret = append(ret, &AccessTuple{ ret = append(ret, &AccessTuple{
address: al.Address, address: al.Address,
storageKeys: &al.StorageKeys, storageKeys: al.StorageKeys,
}) })
} }
return &ret, nil return &ret, nil
......
...@@ -72,7 +72,7 @@ const schema string = ` ...@@ -72,7 +72,7 @@ const schema string = `
#EIP-2718 #EIP-2718
type AccessTuple{ type AccessTuple{
address: Address! address: Address!
storageKeys : [Bytes32!] storageKeys : [Bytes32!]!
} }
# Transaction is an Ethereum transaction. # Transaction is an Ethereum transaction.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment