Consider adding contract-dependency ids to forc-run transaction automatically
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 3
Description
We have `[contract-dependencies]` section in forc.toml which can be used to declare dependencies of type contract, to other contracts or scripts.
We currently need the contract-id to be specified by the user of `forc-run`, this is because script transactions require the contracts (their ids more specifaclly) that they will be interacting with to be added to the transaction. Since there is no way forc can understand which contract ids are needed to be added automatically, we require this input from the user.
We can look for scripts' `[contract-dependencies]` section for this automatic detection. This will enable forc to reason about contract ids that the script will interact with. So if you have a `script_a` with the following manifest file:
```toml
[contract-dependencies]
contract_a = { path = "../contract_a" }
```
Once you run `forc-run` for the `script_a`, forc can understand the relation and add the contract id of `contract_a` to the transaction without needing the user to specify it manually.
Thoughts cc @FuelLabs/tooling @Braqzen @lostman
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.