This is the parent class of the contract that implements contract logic.

Versions (Image)

Although VersionLogic contract itself does almost nothing, in addition to CNSController, and the CNS address are utilized to make access control easier when implementing Logic contracts.

Subclass implementation policies

  • Controlling caller access

    Each Logic implementation must control caller access using ContractNameService# isVersionContract ().

    (In the above figure, it is necessary to restrict the caller to the contract registered as "Someone" to CNS.)

  • Contract inheritance policy

    When upgrading to the next version do not extend from the previous version.

    This is to deal with the problem of logic enlargement due to inheritance. Each version should be separate, to reduce the size of individual contracts.

Reference implementation class

results matching ""

    No results matching ""