-
Notifications
You must be signed in to change notification settings - Fork 370
Open
Description
Following some of the discussion on Twitter: https://twitter.com/EledraNguyen/status/1587640345701281792
Motivation
There should be an easy way to detect what interfaces a cosmwasm contract implements (similar to EIP-165). There are several situations both on-chain and off-chain for such feature:
- An indexer wants to categorize different types of contract.
- A multichain application (wallet, marketplace, etc.) that already support ERC-165 from EVM chain wants to render different UX for different type of contracts.
- A contract wants different ways to interact with other contracts depending on their types.
Implementation
We propose to add an optional map containing supported interfaces in the ContractVersion
struct for these values.
The supported interface value should be a string of pre-defined format: :
For example: ["crates.io:cw721","crates.io:cw2"]
Notes
There is no way to enforce the string format or forcing the contract to have actual implementation of the declared interfaces. Thus, this variable is entirely optional for both the implementor as well as the caller.
Metadata
Metadata
Assignees
Labels
No labels