Skip to content

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

davidsemakula
Copy link
Collaborator

No description provided.

@davidsemakula davidsemakula requested review from Daanvdplas and removed request for ascjones June 15, 2025 20:30
Comment on lines -76 to -82
## MetaMask Compatibility

:::caution
This section has not yet been written for ink! v6.

TODO @davidsemakula
:::
Copy link
Collaborator Author

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).
Copy link
Collaborator Author

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

Comment on lines +331 to +332
`CallBuilder` also allows you to call contracts that are Solidity ABI encoded.
This enables interoperability between Solidity, ink!, and other Solidity ABI encoded contracts!
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: CPL

@Daanvdplas Daanvdplas requested a review from Copilot June 16, 2025 10:11
Copy link

@Copilot Copilot AI left a 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 be abi = "all" to correctly represent the option.
The other option is `abi = "all""`. In this mode, the generated contract

Co-authored-by: Copilot <[email protected]>
Copy link
Contributor

@Daanvdplas Daanvdplas left a 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.
Copy link
Contributor

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?

Copy link
Collaborator Author

@davidsemakula davidsemakula Jun 17, 2025

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]>
@davidsemakula
Copy link
Collaborator Author

See https://use.ink/docs/v6/background/solidity-metamask-compatibility/

It includes:

@davidsemakula davidsemakula requested a review from Daanvdplas June 17, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants