Basic Functions
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
});
String
Transaction hash.
Parameter | Type | Description |
---|---|---|
token | string/address | The token key or token address to transfer. |
amount | number/string | The amount of tokens to transfer. Here the helper changes the amount to decimal value. |
to | address | (Optional) The token recipient address. If not defined, default (DSA address) will be used. |
from | address | (Optional) Transaction sender account address. If not defined default (user address) will be used. |
gasPrice | string/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 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.