You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solang uses contract-metadata for contract metadata generation but this crate does not define anything for the abi itself. So, solang includes some code for the abi generation. This code has been updated to match the latest abi metadata format already, but once again it is out of date.
What would be ideal if there was some code which could be shared between ink and solang for metadata generation:
messages, constructors, events
storage
types
For types, it would be useful if there is a way of creating:
primitives
account, string, byte string
enums
composit structurs: structs, array, slice, Result
function pointers (both function with and without account, i.e. function internal and function external in solidity
mappings
This would require an implementation of the type registry.
Solang does contain an implementation of this, but it is:
out of date
if even updated, as some point it would be out of date again
could use improvement
built by looking at metadata generated by ink!, so it may contain mistakes due misunderstanding
use-ink/cargo-contract#659
These are my current attempts to reuse crates that rely on cargo-metadata for solang,
I think the most difficult part would be unable to register non-rust types within the registry. Ink can do it because it uses macro that expand native rust data structures. But the same strategy may not be feasible for non-rust projects. Hope these feeback are useful for going forward.
Relates to hyperledger-solang/solang#666.
@seanyoung Could you detail what you would need from us?
The text was updated successfully, but these errors were encountered: