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

feat: implement anvil_ time-related API endpoints #420

Closed
itegulov opened this issue Nov 25, 2024 · 0 comments · Fixed by #421
Closed

feat: implement anvil_ time-related API endpoints #420

itegulov opened this issue Nov 25, 2024 · 0 comments · Fixed by #421
Assignees

Comments

@itegulov
Copy link
Contributor

itegulov commented Nov 25, 2024

We need to implement three time-related API endpoints:

#[rpc(name = "anvil_setTime")]
fn set_time(&self, timestamp: Numeric) -> RpcResult<i128>;

#[rpc(name = "anvil_increaseTime")]
fn increase_time(&self, seconds: Numeric) -> RpcResult<u64>;

#[rpc(name = "anvil_setNextBlockTimestamp")]
fn set_next_block_timestamp(&self, timestamp: Numeric) -> RpcResult<()>;

The implementations should be almost identical to the matching evm_ ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant