foundry-rs / starknet-foundry

Blazing fast toolkit for developing Starknet contracts.
https://foundry-rs.github.io/starknet-foundry/
MIT License
325 stars 177 forks source link

Typesafe contract `declare` #1531

Open Arcticae opened 10 months ago

Arcticae commented 10 months ago

We should consider native name providing solutions with declare, like providing the full path to the contract module, and possibly referring to a generated constant (like a NAME for example).

This task should result in a POC if possible

EDIT: We should wait for scarb plugins in order to implement this cleanly (we need class hashes to match with the real ones) Also blocked by the fact that the constant is declared with cfg(test) so in tests it wouldn't be possible to use the contract from deps

Arcticae commented 9 months ago

Artifacts with module info was merged https://github.com/software-mansion/scarb/pull/1082