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

New eth_getAddressesInBlock method #452

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
13 changes: 13 additions & 0 deletions src/eth/block.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
- name: eth_getAddressesInBlock
summary: Returns the addresses that appear in the block and the index of each transaction they appear in.
params:
- name: Block
required: true
schema:
$ref: '#/components/schemas/BlockNumberOrTag'
result:
name: Addresses in block
schema:
oneOf:
- $ref: '#/components/schemas/notFound'
- $ref: '#/components/schemas/BlockAddresses'
- name: eth_getBlockByHash
summary: Returns information about a block by hash.
params:
Expand Down
54 changes: 54 additions & 0 deletions src/schemas/address.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
BlockAddresses:
type: object
title: Block addresses
description: Addresses that appear in a single block
required:
- addresses
- blockNumber
additionalProperties: false
properties:
addresses:
title: Block addresses
type: array
$ref: '#/components/schemas/AddressBlockAppearances'
blockNumber:
title: Block number
$ref: '#/components/schemas/uint'
AddressBlockAppearances:
type: object
title: Address appearances in a single block
description: An address that appears in one or more locations in a block
required:
- address
- locations
additionalProperties: false
properties:
address:
title: Address
$ref: '#/components/schemas/address'
locations:
title: Locations
$ref: '#/components/schemas/Locations'
Locations:
title: List of locations in a block
type: array
description: Places an address appears in within a block
items:
$ref: '#/components/schemas/Location'
Location:
title: Location in a block
description: A place an address appears in within a block
oneOf:
- title: Transaction index
$ref: '#/components/schemas/uint64'
- title: Block field
$ref: '#/components/schemas/BlockField'
BlockField:
title: Block field
description: A block field. Alloc is a genesis block field.
type: string
enum:
- alloc
- miner
- uncles
- withdrawals
2 changes: 2 additions & 0 deletions tests/eth_getAddressesInBlock/get-addresses-in-block.io

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
alloc
apis
attributesv
bodyv
Expand Down Expand Up @@ -57,3 +58,4 @@ randao
src
https
forkchoiceupdatedresponsev

Loading