Functions

Basic Functions


dsa.transfer()

Transfer tokens.

dsa.transfer({
  "token": "eth||0x....", // the token key to transfer or address
  "amount": dsa.tokens.fromDecimal(1, "eth"), // this helper changes the amount to decimal value
  "to" : to, // default is DSA address
  "from": from, // defualt is user's address
  "gasPrice": gasPrice // estimate gas price*
}).then(data  => {
    return  data  // transaction hash
}).catch(error  => {
    return  error
});
  • View our Gist for estimation of gas price.

Returns

String Transaction hash.

ParameterTypeDescription
tokenstring/addressThe token key or token address to transfer.
amountnumber/stringThe amount of tokens to transfer. Here the helper changes the amount to decimal value.
toaddress(Optional) The token recipient address. If not defined, default (DSA address) will be used.
fromaddress(Optional) Transaction sender account address. If not defined default (user address) will be used.
gasPricestring/number(Optional) This is the estimated gas price.


If you still can't find something you're looking for or have any questions, ask them at our developers community on Telegram, Discord or simply send an Email.

Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.

Best way to stay connected with our progress.