From e2ebcc9966f3d474884db358b4f0ffc440f11f41 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Wed, 29 Sep 2021 00:28:17 +0200 Subject: [PATCH] graphql: add storage slots to access list (#23650) Fixes #23640 --- graphql/graphql.go | 6 +++--- graphql/schema.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/graphql/graphql.go b/graphql/graphql.go index 4dd96c4b9db1..0da9faa95bc5 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -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 } @@ -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 diff --git a/graphql/schema.go b/graphql/schema.go index 811c11f6cd06..dfd094a42043 100644 --- a/graphql/schema.go +++ b/graphql/schema.go @@ -72,7 +72,7 @@ const schema string = ` #EIP-2718 type AccessTuple{ address: Address! - storageKeys : [Bytes32!] + storageKeys : [Bytes32!]! } # Transaction is an Ethereum transaction.