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 14

Methods

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

Deploy the Contract

Parameters:
Name Type Description
options IContract~TxOptions

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

No Token Address Provided

Error
Promise.<(*|undefined)>

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

Get ERC20 Address of the Token Contract managed

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

Promise.<Address>

# getERC20Contract()

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

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 39

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 60

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 86

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 72

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 48

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 103

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 6