VersionContract

https://github.com/zcom-cloud-blockchain/solidity/blob/master/contracts/VersionContract.sol

Overview

The parent class of the contract that corresponds to the interface for handling calls from outside of the contract.

VersionContract image

Because there is a possibility that money will be exchanged when calling the contract interface part, VersionContract also implements the required functionality for this.

Subclass implementation policies

  • Interface implementation

    Subclass of VersionContract will grow in size due to inheritance as the contract version goes up. (The problem of contract bloat due to inheritance)

    It should only called as an interface, when it is invoked, as much as possible, processing is delegated to VersionLogic without handling any logic within the interface.

  • Replacing msg.sender

    Due to the nature of Ethereum, when you call VersionLogic, the msg.sender on the VersionLogic side becomes the implementation contract of VersionContract (such as Someone_v1).

    Therefore, when calling VersionLogic, add the original msg.sender as an additional parameter.

Reference implementation class

results matching ""

    No results matching ""