Closed erikreppel closed 4 months ago
contract
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.
sol!
const _ = ...
const _: &'static [u8] = ::core::include_bytes!("/Users/erikreppel/dev/zora-core/crates/zora-contracts/src/abis/ZoraERC721Drop.json");
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.
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 usingconst _ = ...
. It would be useful to be able to access ABIs at runtime for things like dynamically generating table schemas.Additional context