@intercoin/releasemanager
v2.2.1
Published
Smart contracts and code relating to the Intercoin ITR Token
Downloads
9
Readme
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
- owner deploy contract which need to be cloned. got
contract address
- owner deploy IntercoinContract and call method init()
- create factory
- owner call method produceFactory(<
contract address
>) at IntercoinContract. - emitted event ProducedFactory(<
factory address
>)
- owner call method produceFactory(<
- creating contract
- anyone can call method produce() at newly created factory
- emitted event Produce(<
contract address
>)
- now user can call init at newly created contract and would to be owner