1.0.7 • Published 2 years ago

releasemanager v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

IntercoinContract

System for Deploying Intercoin Smart Contracts, Factories and Instances

Installation

Node

npm install @openzeppelin/contracts-ethereum-package

Deploy

when deploy it is no need to pass parameters in to constructor

Overview

Once installed will be use methods:

Methods (IntercoinContract.sol)

init

initializing after deploy

produceFactory

creating factory possible to create contract instance Emitted event ProducedFactory(address addr) Params: name | type | description --|--|-- contractInstance|address| contract's address which need to clone

Return Values: name | type | description --|--|-- factoryInstance|address| factory's address

registerInstance

Registering contracts creating by factories Params: name | type | description --|--|-- addr|address[]| address of contract instance

Return Values: name | type | description --|--|-- success|bool| true if registered successful

checkInstance

checking contracts created by factory Params: name | type | description --|--|-- addr|address[]| address of contract instance

Return Values: name | type | description --|--|-- success|bool| true if registered successfully before

renounceOwnership

Leaves the contract without owner

Methods (Factory.sol)

init

initializing after deploy

produce

creating factory possible to create contract instance Emitted event Produced(address indexed caller, address indexed addr) Return Values: name | type | description --|--|-- addr|address| contract's address

Lifecycle

  1. owner deploy contract which need to be cloned. got contract address
  2. owner deploy IntercoinContract and call method init()
  3. create factory
    • owner call method produceFactory(<contract address>) at IntercoinContract.
    • emitted event ProducedFactory(<factory address>)
  4. creating contract
    • anyone can call method produce() at newly created factory
    • emitted event Produce(<contract address>)
  5. now user can call init at newly created contract and would to be owner