Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

feat: add support for js tracer to geth trace, fix different return types #2064

Merged
merged 3 commits into from
Jan 31, 2023

Conversation

Vid201
Copy link
Contributor

@Vid201 Vid201 commented Jan 19, 2023

Motivation

Geth debug tracing API accepts custom JavaScript tracers.

Solution

Added support for the additional tracer.

Tracing API returns different things based on the used tracer type.

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty, only a few nits

ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
ethers-core/src/types/trace/geth.rs Outdated Show resolved Hide resolved
@Vid201 Vid201 force-pushed the feat/geth_js_tracer branch from a241b94 to 9a716e4 Compare January 29, 2023 18:40
@Vid201
Copy link
Contributor Author

Vid201 commented Jan 29, 2023

ty, only a few nits

@mattsse Made the changes, thanks for the review

@Vid201 Vid201 requested a review from mattsse January 29, 2023 18:42
Copy link
Owner

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@gakonst gakonst merged commit 7e7f904 into gakonst:master Jan 31, 2023
#[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]
pub struct CallFrame {
#[serde(rename = "type")]
pub typ: String,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vid201 Why use typ instead of type ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KuTuGu AFAIK type is a keyword in Rust and cannot be used for variable/property name.

@Vid201 Vid201 deleted the feat/geth_js_tracer branch June 15, 2023 21:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants