# new ERC20Distribution(options)
ERC20 Token Distribution Contract Object
Parameters:
Name | Type | Description |
---|---|---|
options |
ERC20Distribution~Options
|
Members
Methods
# deploy(options) → {Promise.<(*|undefined)>}
Deploy the Contract
Parameters:
Name | Type | Description |
---|---|---|
options |
IContract~TxOptions
|
No Token Address Provided
Error
Promise.<(*|undefined)>
# getERC20Contract()
ERC20Contract|undefined
# getTokenAmount(params) → {Promise.<number>}
Get Token Amount of ERC20 Address
Parameters:
Name | Type | Description |
---|---|---|
params |
Object
|
|
address |
Address
|
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 |
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 |
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) |
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 |
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
|
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> |