Class

ERC20Distribution

ERC20Distribution(options)

Constructor

# new ERC20Distribution(options)

ERC20 Token Distribution Contract Object

Parameters:
Name Type Description
options ERC20Distribution~Options

View Source models/ERC20/ERC20Distribution.js, line 15

Methods

# deploy(params) → {Promise.<(*|undefined)>}

Deploy the Contract

Parameters:
Name Type Description
params Object
callback function

View Source models/ERC20/ERC20Distribution.js, line 152

No Token Address Provided

Error
Promise.<(*|undefined)>

# async erc20() → {Promise.<Address>}

Get ERC20 Address of the Token Contract managed

View Source models/ERC20/ERC20Distribution.js, line 33

Promise.<Address>

# getERC20Contract()

View Source models/ERC20/ERC20Distribution.js, line 165

ERC20Contract|undefined

# getTokenAmount(params) → {Promise.<number>}

Get Token Amount of ERC20 Address

Parameters:
Name Type Description
params Object
address Address

View Source models/ERC20/ERC20Distribution.js, line 44

Token Amount

Promise.<number>

# safeGuardAllTokens(params) → {Promise.<boolean>}

(Admin only) Get All tokens from the Distribution Contract

Parameters:
Name Type Description
params Object
address Address

Address to transfer the ERC20 tokens to

View Source models/ERC20/ERC20Distribution.js, line 66

Success True if operation was successful

Promise.<boolean>

# setInitialDistribution(params) → {Promise.<boolean>}

(Admin only) Set Initial Distribution (Call the amount of times necessary)

Parameters:
Name Type Description
params Object
address Address

Address of the recipient

tokenAmount Integer

Token amount for this tranche

unlockTime Integer

Time to when this tokens unlock

View Source models/ERC20/ERC20Distribution.js, line 94

Success True if operation was successful

Promise.<boolean>

# setTGEDate(params) → {Promise.<boolean>}

(Admin only) Set the Token Generation Event

Parameters:
Name Type Description
params Object
time Integer

Time to set the TGE to (Token Generation Event)

View Source models/ERC20/ERC20Distribution.js, line 79

Success True if operation was successful

Promise.<boolean>

# setTokenAddress(params) → {Promise.<boolean>}

(Admin only) Set Token address

Parameters:
Name Type Description
params Object
address Address

ERC20 Address

View Source models/ERC20/ERC20Distribution.js, line 53

Success True if operation was successful

Promise.<boolean>

# triggerTokenSend(params) → {Promise.<boolean>}

Trigger Token - should be called every month

Parameters:
Name Type Description
params Object

View Source models/ERC20/ERC20Distribution.js, line 112

Success True if operation was successful

Promise.<boolean>

Type Definitions

Object

# Options

Properties:
Name Type Attributes Default Description
test Boolean
localtest Boolean

ganache local blockchain

web3Connection Web3Connection <optional>
Web3Connection

created from params: 'test', 'localtest' and optional 'web3Connection' string and 'privateKey'

contractAddress string <optional>

View Source models/ERC20/ERC20Distribution.js, line 7