Contract Management System

Custom purpose

Contract Management System A smart contract offering a solution for handling a network of interacting contracts and contract version control.


No parameters

Exposed methods

  1. upgradeContract: sets new contractAddress for contractIdentifier
  2. rollbackContract: rollbacks the contract for the given contract identifier to the provided version.
  3. activeContracts: gets the active document per provided address
  4. owner: gets the contract owner address
  5. existsManagedContract: gets if exists contractIdentifier for contract address
  6. getActiveContractAddress: gets activeContract for the provided contractIdentifier
  7. transferOwnership: transfers contract ownership to a new owner address
  8. managedContracts

We will define an example network formed by a: Shop contract: processes purchases from purchasers Storage contract: stores products information Contracts are defined in contracts/Example

####Set up 1.Deploy ContractManagementSystem 2.Deploy Shop contract with manager constructor argument set to CMS address 3.Deploy Storage contract with manager constructor argument set to CMS address 4.Upgrade the contracts in CMS following this pseudocode: const SHOP_ID = 1, STORAGE_ID = 2; ContractManagementSystem.upgradeContract(SHOP_ID, shopAddr); ContractManagementSystem.upgradeContract(STORAGE_ID, storageId);

####Features After you set up your network you have the posibility to upgrade contracts in any particular orders and the interaction between them will not be affected. For example lets say we developed a discount feature in the shop contract. After deployment we will upgrade it using CMS contract and it will still interact with Storage contract without any problems."

Reviewed by Modex
Buy Contract Test Contract

Create an account or login to purchase this smart contract