buyToken method

Future<Map<String, dynamic>> buyToken({
  1. required PolygonWallet signerWallet,
  2. required String contractAddress,
  3. required String from,
  4. required String to,
  5. required String amountHuman,
  6. bool waitForTx = true,
})

Implementation

Future<Map<String, dynamic>> buyToken({
  required PolygonWallet signerWallet,
  required String contractAddress,
  required String from,
  required String to,
  required String amountHuman,
  bool waitForTx = true,
}) {
  return _postExecute(
    signerWallet: signerWallet,
    contractAddress: contractAddress,
    func: 'Buytoken',
    args: {
      'from': from,
      'to': to,
      'value': _toBaseUnits6(amountHuman),
    },
    waitForTx: waitForTx,
  );
}