-
Notifications
You must be signed in to change notification settings - Fork 73
Update Solidity ABI compatibility related docs #418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
## MetaMask Compatibility | ||
|
||
:::caution | ||
This section has not yet been written for ink! v6. | ||
|
||
TODO @davidsemakula | ||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Belongs/exists in background/solidity-metamask-compat.md
We added a new subcommand: | ||
|
||
```bash | ||
$ cargo contract build ---metadata <ink|solidity> | ||
``` | ||
|
||
Please see [#1930](https://github.com/use-ink/cargo-contract/pull/1930) for more information. | ||
You can learn more [here](../basics/metadata/solidity-format.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs page has a lot more info than PR
`CallBuilder` also allows you to call contracts that are Solidity ABI encoded. | ||
This enables interoperability between Solidity, ink!, and other Solidity ABI encoded contracts! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: CPL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Updates documentation for Solidity ABI compatibility in ink! v6, reorganizing sections and refining wording to reflect the new abi
field and metadata formats.
- Introduce a dedicated “Solidity ABI compatible ink! contracts” section in the migration guide.
- Remove outdated placeholders and TODOs, and split long paragraphs for improved readability.
- Tweak phrasing in ABI overview and Metamask compatibility docs for clarity.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
versioned_docs/version-v6/faq/migrating-from-ink-5-to-6.md | Added abi field docs, reorganized features, and updated headings. |
versioned_docs/version-v6/basics/metadata/solidity-format.md | Removed the unfinished MetaMask compatibility section and TODO. |
versioned_docs/version-v6/basics/cross-contract-calling.md | Split the CallBuilder description into two sentences for readability. |
versioned_docs/version-v6/basics/abi/overview.md | Refined wording around selector and encoding specifications. |
versioned_docs/version-v6/background/solidity-metamask-compat.md | Emphasized “semantically” equivalent for Option/Result mapping note. |
Comments suppressed due to low confidence (1)
versioned_docs/version-v6/faq/migrating-from-ink-5-to-6.md:294
- The snippet has an extra double quote in
abi = "all""
. It should beabi = "all"
to correctly represent the option.
The other option is `abi = "all""`. In this mode, the generated contract
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I am curious to hear how we could provide good devex for devs that build a sol abi ink! contract. More specifically, a resource that helps them understand what they can't use and what they could / should in stead.
The implication of supporting Solidity ABI encoding is that all types used as | ||
constructor/message argument and return types, and event argument types must | ||
define a mapping to an equivalent Solidity ABI type. | ||
You won't be able to use Rust types for which no mapping to a Solidity ABI type is defined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we envision developers finding out which types are sol compatible or not? With the below error only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #418 (comment)
The next paragraph in this section links to the docs mentioned in that comment.
Co-authored-by: Daan van der Plas <[email protected]>
See https://use.ink/docs/v6/background/solidity-metamask-compatibility/ It includes:
|
No description provided.