foundry-rs / foundry-rs/foundry
feat(`config`): add `[labels]` section to `foundry.toml`
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
### Component
Other (please describe)
### Describe the feature you would like
By giving alias to frequently interacted contracts in `foundry.toml`, say [labels], could facilitate development even more. Imagine this feature as a combination of two existing feature. The first is giving alias to rpc_endpoints by `[rpc_endpoint]` field in `foundry.toml`; the second is giving alias to addresses by `vm.label` in scripts and tests.
Being able to use the label in cast commands, say `cast send -r eth MAINNET_CONTRACT_I_CARE ...`, could already save some time copy and pasting. It also helps the readability.
A further step could be extending the configured labels to all the tests and scripts as if it's in `function setup()`, saving the time of repeatedly using of `vm.label`
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.