alloy-rs/core

[Feature] Expose ABI bytes from sol macro generated code

Closed this issue · 1 comments

Component

contract

Describe the feature you would like

When using the sol! macro with an ABI, the generated code actually already contains the abi bytes but its included using const _ = .... It would be useful to be able to access ABIs at runtime for things like dynamically generating table schemas.

const _: &'static [u8] = ::core::include_bytes!("/Users/erikreppel/dev/zora-core/crates/zora-contracts/src/abis/ZoraERC721Drop.json");

Additional context

image

The file is included for it to be caught by the build system (cargo) so that the file recompiles if any changes are made to the source file.

You can just include the file yourself separately.