TronSave send()

The method you must use to send a request with option useRelay

You can set any parameter like method.send()

  • Option useRelay = true: Call the method through TronSave if your energy is insufficient to execute.

  • Option forceUseRelay = true: Always call the method through TronSave, even when you have enough energy to execute. Priority is higher than useRelay


const onSend = async () => {
   const instance = await tronSave.contract().at("...")
   const testSend = await instance.method().send({
        useRelay: true,
        useSignType: "personal_trx",
        feeLimit: 1e9,
        ...
    })
}

Reference: https://developers.tron.network/reference/methodsend

ParamsTypeDefaultDescription

useRelay

boolean

false

Call the method through TronSave if your energy is insufficient to execute.

forceUseRelay

boolean

false

Always call the method through TronSave, even when you have enough energy to execute. Priority is higher than useRelay.

useSignType

string

"personal_trx"

  • personal_trx: personal sign use function tronweb.trx.sign

  • typed_data: use function tronweb.trx._signTypedData (Currently, Tronlink does not support this function)

Last updated