transfer method

Future<String> transfer(
  1. XCBAddress recipient,
  2. BigInt amount, {
  3. required Credentials credentials,
  4. Transaction? transaction,
})

Moves amount tokens from the caller's account to recipient. Returns a boolean value indicating whether the operation succeeded. Emits a Transfer event.

The optional transaction parameter can be used to override parameters like the energy price, nonce and max energy. The data and to fields will be set by the contract.

Implementation

Future<String> transfer(_i1.XCBAddress recipient, BigInt amount,
    {required _i1.Credentials credentials,
    _i1.Transaction? transaction}) async {
  final function = self.abi.functions[4];
  assert(checkSignature(function, 'a9059cbb'));
  final params = [recipient, amount];
  return write(credentials, transaction, function, params);
}