SNIP: A standard interface for manage modular Own Dapp
Simple Summary
A standard interface for manage modular Own Dapp.
Abstract
This SNRC is a system for manageing modular Own Dapps. Manages all Own Dapps without a limit on the number. Here, Own Dapp refers to a code logic that is declared. Own Dapps can share storage among themselves.
Motivation
Provide a single smart contract address to support multiple Own Dapps.
This proposal can be based on the Standard Account Interface SNIP-5, allowing each user to truly own their Own Dapp (e.g., Own NFT market, dex, inheritance, asset management, etc.).
Shared storage for Own Dapps and reusable logic, offering stronger composability.
Provide the ability to enable or disable one or more Own Dapps.
Own Dapps can be developed progressively, allowing your to grow continuously.
Modularly manages Own Dapps, and adding new Own Dapps does not require upgrading the smart contract.
Direct support for some of the currently declared Dapp smart contracts.
Storage among different Own Dapps
flowchart TD
subgraph Own Dapp Manager
DataB
DataA
DataC
DataBC
ContractA-->LogicA
end
subgraph DAPP B
LogicB
end
subgraph DAPP C
LogicC
end
ContractA --> LogicB
LogicB--> DataB
LogicB--> DataBC
ContractA --> LogicC
LogicC--> DataC
LogicC--> DataBC
LogicA--> DataAExternal accounts call Own Dapp logic
Specification
Interface
An interface is a set of function signatures with concrete type parameters, usually represented by a trait. These are meant to be implemented as external by contracts complying with such interface. For example:
Event
Implementation
Example implementations are available at
Security Considerations
An own dapp cannot use a constructor function and should adopt an init function
An own dapp does not necessarily need to be deployed but must be declared.
Shared storage should be carefully considered as it might lead to storage conflicts.
Whenever one or more own dapps are added or removed, and also when all dapps are added, the contract must emit an event.
All own dapp source code can be verified.
Copyright
Copyright and related rights waived via MIT.
Last updated