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

Fixes #23640
This commit is contained in:
Martin Holst Swende 2021-09-29 00:28:17 +02:00 committed by GitHub
parent a541fbea18
commit 42bc1944a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -72,7 +72,7 @@ const schema string = `
#EIP-2718
type AccessTuple{
address: Address!
storageKeys : [Bytes32!]
storageKeys : [Bytes32!]!
}
# Transaction is an Ethereum transaction.