Skip to content

[revive]: exposing to_account_id to smart contracts #6891

@peterwht

Description

@peterwht

As pallet-revive uses AccountId20, ink! (and other languages) are unable to properly represent Polkadot-native accounts in the smart contract. Currently, there is not a way for a smart contract to access the mapping from AccountId20 -> AccountId32.

By exposing the mapping to_account_id, ink! will be able to represent and use the Polkadot native accounts that call the contract.

One example for a use-case is if an ink! contract wants to calculate the computed origin of an account on a different parachain, before sending an XCM.

Another example is if an ink! contract wants to send an XCM (locally, or cross-chain) that uses some pallet with input based on the calling user, however, the pallet requires an AccountId32.

Metadata

Metadata

Assignees

No one assigned

    Labels

    I10-unconfirmedIssue might be valid, but it's not yet known.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions