Send To Contract

sendtocontract "contractaddress" "data" (amount gaslimit gasprice senderaddress broadcast)

Send funds and data to a contract.

Arguments:

  1. "contractaddress" (string, required) The contract address that will receive the funds and data
  2. "datahex" (string, required) data to send
  3. "amount" (numeric or string, optional) The amount in GLITCH to send, default: 0
  4. gasLimit (numeric or string, optional) gasLimit, default: 150000, max: 30000000
  5. gasPrice (numeric or string, optional) gasPrice GLITCH price per gas unit, default: 0.0000004, min:0.0000004
  6. "senderaddress" (string, optional) The Glitch address that will be used as sender
  7. "broadcast" (bool, optional, default=true) Whether to broadcast the transaction or not
  8. "changeToSender" (bool, optional, default=true) Return the change to the sender

Returns transaction information:

sendtocontract "0bf3b83bfdeca874ddf209dae6863743d749dd4" "53e62baf"

{
"txid": "cb382afb599edcd421d053b824383ca593aeb3c85a8228ad7628f20a2c38abe",
"sender": "GdB38ew4m8N29nc3zb3pb238PWzs3Sbp8",
"hash160": "dc24a7b87a88381e7d027d0becf368557acbf62"
}