sendRawPolyTransfer method

Future<Map<String, dynamic>> sendRawPolyTransfer({
  1. required PolyTransaction polyTransaction,
})

Sends a raw poly transfer call to a node

The connected node must be able to calculate the result locally, which means that the call won't write any data to the blockchain. Doing that would require sending a transaction which can be sent via sendTransaction. As no data will be written, you can use the sender inside the transaction to specify any Topl address that would call the above method.

Implementation

Future<Map<String, dynamic>> sendRawPolyTransfer(
    {required PolyTransaction polyTransaction}) async {
  final tx = await _fillMissingDataRawPoly(transaction: polyTransaction);
  return _makeRPCCall('topl_rawPolyTransfer', params: [tx.toJson()])
      .then((value) => {
            'rawTx': TransactionReceipt.fromJson(
                value['rawTx'] as Map<String, dynamic>),
            'messageToSign':
                Base58Data.validated(value['messageToSign'] as String).value
          });
}