withdrawNew method

  1. @override
Withdraw withdrawNew({
  1. required int accountId,
  2. required int subAccountId,
  3. required int toChainId,
  4. required String toAddress,
  5. required int l2SourceToken,
  6. required int l1TargetToken,
  7. required String amount,
  8. String? callData,
  9. required String fee,
  10. required int nonce,
  11. required bool withdrawToL1,
  12. required int withdrawFeeRatio,
  13. int? ts,
  14. dynamic hint,
})
override

Implementation

@override
Withdraw withdrawNew(
    {required int accountId,
    required int subAccountId,
    required int toChainId,
    required String toAddress,
    required int l2SourceToken,
    required int l1TargetToken,
    required String amount,
    String? callData,
    required String fee,
    required int nonce,
    required bool withdrawToL1,
    required int withdrawFeeRatio,
    int? ts,
    dynamic hint}) {
  return handler.executeSync(SyncTask(
    callFfi: () {
      var arg0 = cst_encode_u_32(accountId);
      var arg1 = cst_encode_u_8(subAccountId);
      var arg2 = cst_encode_u_8(toChainId);
      var arg3 = cst_encode_String(toAddress);
      var arg4 = cst_encode_u_32(l2SourceToken);
      var arg5 = cst_encode_u_32(l1TargetToken);
      var arg6 = cst_encode_String(amount);
      var arg7 = cst_encode_opt_String(callData);
      var arg8 = cst_encode_String(fee);
      var arg9 = cst_encode_u_32(nonce);
      var arg10 = cst_encode_bool(withdrawToL1);
      var arg11 = cst_encode_u_16(withdrawFeeRatio);
      var arg12 = cst_encode_opt_box_autoadd_u_32(ts);
      return wire.wire_Withdraw_new(arg0, arg1, arg2, arg3, arg4, arg5, arg6,
          arg7, arg8, arg9, arg10, arg11, arg12);
    },
    codec: DcoCodec(
      decodeSuccessData:
          dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockWithdraw,
      decodeErrorData: dco_decode_AnyhowException,
    ),
    constMeta: kWithdrawNewConstMeta,
    argValues: [
      accountId,
      subAccountId,
      toChainId,
      toAddress,
      l2SourceToken,
      l1TargetToken,
      amount,
      callData,
      fee,
      nonce,
      withdrawToL1,
      withdrawFeeRatio,
      ts
    ],
    apiImpl: this,
    hint: hint,
  ));
}