Use send to execute a non-pure or modify smart contract method on a given smart contract that modify or change values on the blockchain. These methods consume resources(photon and entropy) to perform as the changes need to be broadcasted out to the network.
Usage
contract['function_name']().send(options)
Parameters
Parameter | Description | Type | Default |
---|---|---|---|
feeLimit | The maximum VS burns for resource consumption. | number | 20000000 |
callValue | The VS transfer to the contract for each call. | number | 0 |
shouldPollResponse | If set to true, this will wait until the transaction is confirmed on the solidity node before returning the result. | boolean | false |
tokenId | The id of vrc10 token transfer to the contract (Optional). | string | "" |
tokenValue | The amount of vrc10 token transfer to the contract for each call (Optional). | number | 0 |
Returns
Object.
Example
const contract = visionWeb.contract().at('46f151d2b560d0f0a983cdbfc85fff392bb8874258');
contract.transfer('462d7a77f8bef6fe225bf5e353dd6a380f588a1496',1000).send({
feeLimit: 100000000,
callValue: 0,
shouldPollResponse: true,
});
> true