Skip to content

Commit

Permalink
more beaconchain filter examples
Browse files Browse the repository at this point in the history
  • Loading branch information
fracek committed Dec 4, 2024
1 parent 9c74036 commit 6cf8127
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/v2/networks/beaconchain/filter/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ export type TransactionFilter = {
- `create`: filter by whether the transaction is a create transaction.
- `includeBlob`: also return all blobs included in the transaction.

**Examples**

- All blobs included in a transaction to a specific contract.

```ts
const filter = [{
transactions: [{
to: "0xff00000000000000000000000000000000074248",
includeBlob: true,
}],
}];
```

### Blobs

A blob and its content.
Expand All @@ -86,6 +99,18 @@ export type BlobFilter = {

- `includeTransaction`: also return the transaction that included the blob.

**Examples**

- All blobs posted to the network together with the transaction that posted them.

```ts
const filter = [{
blobs: [{
includeTransaction: true,
}],
}];
```

### Validators

Validators and their historical balances.
Expand Down Expand Up @@ -113,3 +138,17 @@ export type ValidatorFilter = {

- `validatorIndex`: filter by the validator index.
- `status`: filter by validator status.

**Examples**

- All validators that exited, both slashed and unlashed.

```ts
const filter = [{
validators: [{
status: "exited_unslashed"
}, {
status: "exited_slashed"
}],
}];
```

0 comments on commit 6cf8127

Please sign in to comment.