Closed xermicus closed 1 year ago
This should also include:
solang --importpath
solang --importmap
Solang.toml
is not a bad idea. Foundry uses foundry.toml
, we should also look at what Foundy/Truffle/Anvil offer. Ideally we would have some more subcommands like solang test
at some point in the future.
Another configuration possibility: Initial and max heap size
Regarding the substrate target configuration
, @xermicus and I reached the conclusion that it would be best to leave the current configuration options as is. What a user currently can do is specify address-length
and value-length
in bytes and the compiler would generate wasm
code accordingly.
The reason we reached that conclusion is that all parachains we know of using the ink contracts pallet use the same configurations of AccountID32
and balance = u128
. Here are some famous examples:
Acala: source code defining address length balance as u128 (16 bytes)
Astar: address length Balance length
Phala: Address length Balance length
More than the address length
and value length
, we also thought of another configuration: hash length
. After a bit of research, we also found that to be constant across all chains as defined in contract_metadata
Problem statement
It came to our attention that the compiler needs a lot of information that is not available in the source code. E.g.:
This is getting cumbersome. The idea we had is to have a simple "project configuration" TOML file for solang, similar to what the
Cargo.toml
file does. It could even be nameSolang.toml
. Next to what we require to compile the contract it could contain some more information, e.g. which version of solang is required, license, ...Deliverables
solang new
command which automatically creates a project in the specified folder: