-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[revive]: exposing to_account_id to smart contracts #6891
Copy link
Copy link
Closed
Labels
I10-unconfirmedIssue might be valid, but it's not yet known.Issue might be valid, but it's not yet known.
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
I10-unconfirmedIssue might be valid, but it's not yet known.Issue might be valid, but it's not yet known.