contract.send

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

ParameterDescriptionTypeDefault
feeLimitThe maximum VS burns for resource consumption.number20000000
callValueThe VS transfer to the contract for each call.number0
shouldPollResponseIf set to true, this will wait until the transaction is confirmed on the solidity node before returning the result.booleanfalse
tokenIdThe id of vrc10 token transfer to the contract (Optional).string""
tokenValueThe amount of vrc10 token transfer to the contract for each call (Optional).number0

Returns

Object.

Example

const contract = visionWeb.contract().at('46f151d2b560d0f0a983cdbfc85fff392bb8874258');
contract.transfer('462d7a77f8bef6fe225bf5e353dd6a380f588a1496',1000).send({
  feeLimit: 100000000,
  callValue: 0,
  shouldPollResponse: true,
});
> true