You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Environment types and MAX_EVENT_TOPICS value to the metadata. Will have to be a new field environment.
Make sure the schema and formal definition under metadata/ is up to date.
Create a follow-up PR to ink-docs to 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/api or both polkadot-js/apps and Contracts UI. I'm not sure where this validation should happen.
Create a follow-up issue for cargo-contract to validate that the chain's types match the environment denoted in the metadata.
The text was updated successfully, but these errors were encountered:
In this section of our
ARCHITECTURE.md
we explain what theEnvironment
trait in ink! is used for. TheDefaultEnvironment
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
Environment
types andMAX_EVENT_TOPICS
value to the metadata. Will have to be a new fieldenvironment
.metadata/
is up to date.ink-docs
to also update the documentation on metadata there.polkadot-js/api
or bothpolkadot-js/apps
and Contracts UI. I'm not sure where this validation should happen.cargo-contract
to validate that the chain's types match the environment denoted in the metadata.The text was updated successfully, but these errors were encountered: