Skip to content

Power-ID/ContractFactory_Separation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Contract Structure for Factory Pattern

This collection of smart contracts consists of different parts aiming separate contract code and their factories from the interfaces in contracts which are using them. With this structure we avoid massive and in the end undeployable contracts.

contract Main

Holds the main logic and interacts with the actual contract instances.

contract ChildFactoryInterface

Provides an interface to the ChildFactory contract and enables the Main contract to create instances of the Child contract.

contract ChildInterface

Provides an interface to the Child contract and enables the Main contract to access the functions inside the Child instances.

contract Child

The actual child code is here.

contract ChildFactory

Creates instances of the Child contract and stores its addresses.

About

Contract Structure to avoid massive contracts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published