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(macro): support embedding abi as literal json #79

Merged
merged 6 commits into from
Jan 21, 2025
Merged

Conversation

kariy
Copy link
Member

@kariy kariy commented Jan 19, 2025

Allow embedding the ABI JSON array directly into the macro call as one of the way of passing the ABI. There's no breaking changes because the old behaviours are still preserved.

Usage example:

abigen!(MyContract, [
  {
  "type": "function",
  "name": "foo",
  "inputs": [],
  "outputs": [
    {
      "type": "core::bool"
    }
  ],
  "state_mutability": "view"
}]);

@kariy kariy requested a review from glihm January 19, 2025 19:10
Copy link
Collaborator

@glihm glihm left a comment

Choose a reason for hiding this comment

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

Thanks for this feature @kariy. 🙏

@glihm glihm merged commit d83de93 into main Jan 21, 2025
3 checks passed
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