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: add network generic to sol-macro #557

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

onbjerg
Copy link
Member

@onbjerg onbjerg commented Mar 7, 2024

Motivation

sol! needs to be adjusted to work with alloy-rs/alloy#190

Solution

Adds network and transport generics to the generated code, which requires the new provider from alloy-rs/alloy#190

I'd like some extensive reviewing of this as I'm not too experienced with proc macros

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@onbjerg onbjerg requested a review from DaniPopes as a code owner March 7, 2024 22:09
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Looks fine, can you test by patching to this branch on your PR? There's a test in alloy-contract

address: alloy_sol_types::private::Address,
provider: P,
network: ::core::marker::PhantomData<N>,
transport: ::core::marker::PhantomData<T>,
Copy link
Member

Choose a reason for hiding this comment

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

should be one field and starting with underscore to silence unused warnings

Copy link
Member Author

Choose a reason for hiding this comment

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

got it

@onbjerg
Copy link
Member Author

onbjerg commented Mar 7, 2024

Looks fine, can you test by patching to this branch on your PR? There's a test in alloy-contract

I did! 😄

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

great , thank u mr on bjerg

@DaniPopes DaniPopes merged commit 85797f1 into main Mar 7, 2024
21 checks passed
@DaniPopes DaniPopes deleted the onbjerg/sol-macro-network branch March 7, 2024 23:04
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 this pull request may close these issues.

2 participants