Class: MockToken

lib/contract_interact/pricer~ MockToken


new MockToken()

Methods


approve(senderAddr, senderPassphrase, spenderAddress, value, gasPrice)

Approve
Parameters:
Name Type Description
senderAddr string address of sender
senderPassphrase string passphrase of sender
spenderAddress string address which will be approved for spending
value BigNumber amount which is being approved (in wei)
gasPrice BigNumber gas price
Returns:
Type
Promise

balanceOf(ownerAddress)

Get balance of address
Parameters:
Name Type Description
ownerAddress String address for which balance is to be fetched
Returns:
Type
Promise

setBalance(senderAddr, senderPassphrase, ownerAddress, value, gasPrice)

Set balance
Parameters:
Name Type Description
senderAddr string address of user who is sending amount
senderPassphrase string sender address passphrase
ownerAddress string address for which balance is to be set
value BigNumber amount which is being transferred (in wei)
gasPrice BigNumber gas price
Returns:
Type
Promise

setConversionRate(senderAddr, senderPassphrase, conversionRate, gasPrice)

Set conversion rate
Parameters:
Name Type Description
senderAddr string address of sender
senderPassphrase string passphrase of sender
conversionRate number conversion rate of branded token
gasPrice BigNumber gas price
Returns:
Type
Promise