contractMatchingNew method

  1. @override
ContractMatching contractMatchingNew({
  1. required int accountId,
  2. required int subAccountId,
  3. required Contract taker,
  4. required List<Contract> maker,
  5. required String fee,
  6. required int feeToken,
  7. required List<ContractPrice> contractPrices,
  8. required List<SpotPriceInfo> marginPrices,
  9. dynamic hint,
})
override

Implementation

@override
ContractMatching contractMatchingNew(
    {required int accountId,
    required int subAccountId,
    required Contract taker,
    required List<Contract> maker,
    required String fee,
    required int feeToken,
    required List<ContractPrice> contractPrices,
    required List<SpotPriceInfo> marginPrices,
    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_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockContract(
              taker);
      var arg3 =
          cst_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockContract(
              maker);
      var arg4 = cst_encode_String(fee);
      var arg5 = cst_encode_u_16(feeToken);
      var arg6 =
          cst_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockContractPrice(
              contractPrices);
      var arg7 =
          cst_encode_list_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockSpotPriceInfo(
              marginPrices);
      return wire.wire_ContractMatching_new(
          arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    },
    codec: DcoCodec(
      decodeSuccessData:
          dco_decode_Auto_Owned_RustOpaque_flutter_rust_bridgefor_generatedrust_asyncRwLockContractMatching,
      decodeErrorData: dco_decode_AnyhowException,
    ),
    constMeta: kContractMatchingNewConstMeta,
    argValues: [
      accountId,
      subAccountId,
      taker,
      maker,
      fee,
      feeToken,
      contractPrices,
      marginPrices
    ],
    apiImpl: this,
    hint: hint,
  ));
}