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 contract bindings #38

Merged
merged 5 commits into from
Jan 30, 2025
Merged

feat: add contract bindings #38

merged 5 commits into from
Jan 30, 2025

Conversation

merklefruit
Copy link
Contributor

@merklefruit merklefruit commented Jan 28, 2025

  • added bindings to contracts based on ABI artifacts
  • json generated with "forge inspect x abi"

ABIs can be refreshed by using the just abigen command

@merklefruit
Copy link
Contributor Author

merklefruit commented Jan 28, 2025

📚 $\text{Stack Overview}$

Pulls submitted in this stack:

This comment was automatically generated by st.

@merklefruit merklefruit requested a review from mempirate January 28, 2025 15:14
@merklefruit merklefruit changed the title feat: add contract bindings" feat: add contract bindings Jan 28, 2025
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you like the ABI workflow more than just the contract interface in the macros? I guess it's less error prone

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like it because there's a single source of truth and no copy pasting interfaces manually, otherwise no strong opinion

Base automatically changed from nico/feat/openapi to main January 28, 2025 17:13
@mempirate
Copy link
Contributor

I like this, can we add a just command to re-generate the ABI based on the contracts?

Copy link
Contributor

@mempirate mempirate left a comment

Choose a reason for hiding this comment

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

LGTM, one request

@@ -35,7 +35,7 @@ axum = "0.8.1"
sqlx = { version = "0.8", features = ["runtime-tokio", "tls-native-tls", "postgres", "chrono"] }

# ethereum
alloy = { version = "0.9.1", features = ["consensus", "rpc-types", "reqwest"] }
alloy = { version = "0.9.1", features = ["full", "rpc-types", "reqwest"] }
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need full? I think it's good practice to only pull in what you need

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, 7668af1

@merklefruit merklefruit requested a review from mempirate January 29, 2025 09:05
@merklefruit merklefruit merged commit b8d5386 into main Jan 30, 2025
1 of 3 checks passed
@merklefruit merklefruit deleted the nico/feat/bindings branch January 30, 2025 14:07
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.

3 participants