Skip to content

feat: add network generic to sol-macro#557

Merged
DaniPopes merged 2 commits intomainfrom
onbjerg/sol-macro-network
Mar 7, 2024
Merged

feat: add network generic to sol-macro#557
DaniPopes merged 2 commits intomainfrom
onbjerg/sol-macro-network

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
@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