carlos
1
Hi. I would like to make a call to another contract described in the docs:
https://fuellabs.github.io/sway/v0.42.0/book/blockchain-development/calling_contracts.html
However i get the issue: error: This imported file must be a library. It must start with “library;”
instead of use contract::Contract is use mod contract to import the module, then in abi(contract::Contract,url).
Hello there @carlos
Please attach the output of
$ fuelup show
So we can know the version of the toolchain you are working with.
Thanks
carlos
3
Default host: aarch64-apple-darwin
fuelup home: /Users/.fuelup
installed toolchains
beta-3-aarch64-apple-darwin
latest-aarch64-apple-darwin (default)
active toolchain
latest-aarch64-apple-darwin (default)
forc : 0.42.1
- forc-client
- forc-deploy : 0.42.1
- forc-run : 0.42.1
- forc-doc : 0.42.1
- forc-explore : 0.28.1
- forc-fmt : 0.42.1
- forc-index : 0.18.5
- forc-lsp : 0.42.1
- forc-tx : 0.42.1
- forc-wallet : 0.2.4
fuel-core : 0.18.3
fuel-indexer : 0.18.5
fuels versions
forc : 0.43
forc-wallet : 0.44.0
carlos
4
In the end i split up the contract and abi (which is type library) into two files. However that is not clear from the docs. Now it works!
1 Like
system
Closed
5
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.