/// Public constructor. public MsgCloseCdp(CloseCdp closeCdp) { Trace.Assert(closeCdp != null); // Assigns the properties this.closeCdp = closeCdp; base.setProperties("commercio/MsgCloseCdp", _toJson()); }
/// Closes the CDP having the given [timestamp]. /// Optionally [fee] and broadcasting [mode] parameters can be specified. public static async Task <TransactionResult> closeCdp(int timestamp, Wallet wallet, StdFee fee = null, BroadcastingMode mode = BroadcastingMode.SYNC) { CloseCdp closeCdp = CloseCdpHelper.fromWallet(wallet, timestamp); MsgCloseCdp msg = new MsgCloseCdp(closeCdp: closeCdp); // Careful here, Eugene: we are passing a list of BaseType containing the derived MsgSetDidDocument msg return(await TxHelper.createSignAndSendTx(new List <StdMsg> { msg }, wallet, fee : fee, mode : mode)); }