Skip to content

Filter.fromRpc

Converts a Filter.Rpc to an Filter.Filter.

Imports

Named
import { Filter } from 'ox'

Examples

import { Filter } from 'ox'
 
const filter = Filter.fromRpc({
  address: '0xd3cda913deb6f67967b99d671a681250403edf27',
  fromBlock: 'latest',
  toBlock: '0x010f2c',
  topics: [
    '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
    null,
    '0x0000000000000000000000000c04d9e9278ec5e4d424476d3ebec70cb5d648d1',
  ],
})
{
address: '0xd3cda913deb6f67967b99d671a681250403edf27',
fromBlock: 'latest',
toBlock: 69420n,
topics: [
'0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
null,
'0x0000000000000000000000000c04d9e9278ec5e4d424476d3ebec70cb5d648d1',
],
}

Definition

function fromRpc(
  filter: Rpc,
): Filter

Source: src/Filter.ts

Parameters

filter

The RPC filter to convert.

Return Type

An instantiated Filter.Filter.

Filter