Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide visual representation of the contract's relationships #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ If transfersEnabled == false, tokens cannot be transferred by the users, however
// Allows tokens to be transferred if true or frozen if false
function enableTransfers(bool _transfersEnabled) onlyController

## Contract schema

The contracts provided by this project adopt this relationships indicated in the diagram below.

![UML schema](./doc/schema.png "Contract schema")


## Applications

Expand Down
Binary file added doc/schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions doc/uml-schema.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Diagram generated from https://yuml.me/diagram/plain/class/draw

[Owned|+owner: address|Owner(); onlyOwner; changeOwner() onlyOwner]

[TokenController|proxyPayment();onTransfer();onApprove()]

[Controlled|+controller: address|Controlled(); onlyController; changeController() onlyController]

[MiniMeTokenFactory| createCloneToken()]

[MiniMeToken|+name: string; +decimals: uint8; +symbol: string; +version: string; +parentToken: MiniMeToken; +parentSnapShotBlock: uint; +creationBlock: uint; + transfersEnabled: bool; +tokenFactory: MiniMeTokenFactory; | MiniMeToken(); transfer() : bool; transferFrom() : bool; doTransfer() : bool; balanceOf() : uint256 constant ; approve() : bool; allowance() : uint256 constant; approveAndCall() : bool ; balanceOfAt() : uint constant; totalSupplyAt() : uint constant ; createCloneToken() : address ; generateTokens() : bool onlyController ; destroyTokens() : bool onlyController ; enableTransfers() onlyController ; claimTokens() : onlyController | ClaimedTokens(_token _controller _amount) ; Transfer(_from _to _amount); NewCloneToken(_cloneToken _snapshotBlock); Approval(_owner _spender _amount)]-^[Controlled]

[MyCampaign|+totalCollected : uint256|MyCampaign(); finalizeFunding(); setVault() : onlyOwner]-^[Owned]
[MyCampaign]-^[TokenController]

[ApproveAndCallFallBack| receiveApproval()]