Skip to content

Conversation

@leruaa
Copy link
Contributor

@leruaa leruaa commented Jan 22, 2024

Motivation

I needed to encode constructor args to create a contract creation tx, and saw #482.

Solution

In sol-types

  • Adding SolConstructor trait
  • Handle constructor in function::expand() (creating a constructorCall struct that impl SolConstructor)

In json-abi

  • impl ToSol for Constructor
  • Adding AbiFunctionKw::Constructor variant
  • Update fixtures in "tests/abi"

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

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.

LGTM, thanks!

@DaniPopes DaniPopes merged commit a315b0d into alloy-rs:main Jan 23, 2024
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