- Notifications
You must be signed in to change notification settings - Fork 477
Closed
Labels
A-ink_env[ink_env] work item[ink_env] work itemA-ink_metadata[ink_metadata] Work item[ink_metadata] Work itemOpenZeppelin
Description
In this section of our ARCHITECTURE.md we explain what the Environment trait in ink! is used for. The DefaultEnvironment which ink! uses is defined here.
Right now, we don't persist which Environment implementation the contract uses anywhere. This means someone can deploy a contract with types that are different from those a chain uses to that chain. In #1694 we will investigate the criticality of this issue. But whatever turns out there, we should have a feature that warns contract developers about this. It is a serious oversight.
ToDo
- Persist the
Environmenttypes andMAX_EVENT_TOPICSvalue to the metadata. Will have to be a new fieldenvironment. - Make sure the schema and formal definition under
metadata/is up to date. - Create a follow-up PR to
ink-docsto also update the documentation on metadata there. - Talk to @statictype about where to create a follow-up issue for the UI to validate that the chain's types match the environment denoted in the metadata. Either
polkadot-js/apior bothpolkadot-js/appsand Contracts UI. I'm not sure where this validation should happen. - Create a follow-up issue for
cargo-contractto validate that the chain's types match the environment denoted in the metadata.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-ink_env[ink_env] work item[ink_env] work itemA-ink_metadata[ink_metadata] Work item[ink_metadata] Work itemOpenZeppelin