evm_getdatetoblock
Convert a specific date to the closest corresponding block on a blockchain. Query supported chains like Ethereum, Polygon, and BSC using Unix timestamps or date strings.
Instructions
Find the closest block to a specific date on a blockchain.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
chain | No | The chain to query | eth |
date | Yes | Unix date in milliseconds or a datestring (format in seconds or datestring accepted by momentjs) |