Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

docs: loading contract from sol file fixed #57

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

Aviksaikat
Copy link
Contributor

@Aviksaikat Aviksaikat commented Oct 31, 2024

Summary

This is not the proper way to load solidity files per alloy=0.5.4.

sol!(
    Counter,
    "artifacts/Counter.sol"
);

Problem

names are not allowed outside of JSON ABI

It should be

sol!(
    "artifacts/Counter.sol"
);

Example

The following snippet worked perfectly

sol!(
    // IUniswapV2Factory,
    "contracts/IUniswapV2Factory.sol"
);

@zerosnacks
Copy link
Member

Thanks @Aviksaikat!

Related: alloy-rs/core#636 (comment) / https://github.com/alloy-rs/core/pull/647/files

@zerosnacks zerosnacks merged commit 77d3c38 into alloy-rs:main Oct 31, 2024
2 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants