ckb_jsonrpc_types/experiment.rs
1use crate::{Cycle, OutPoint};
2use ckb_types::H256;
3use schemars::JsonSchema;
4use serde::{Deserialize, Serialize};
5
6/// Response result of the RPC method `estimate_cycles`.
7#[derive(Clone, Default, Serialize, Deserialize, PartialEq, Eq, Hash, Debug, JsonSchema)]
8pub struct EstimateCycles {
9 /// The count of cycles that the VM has consumed to verify this transaction.
10 pub cycles: Cycle,
11}
12
13/// An enum to represent the two kinds of dao withdrawal amount calculation option.
14/// `DaoWithdrawingCalculationKind` is equivalent to [`H256`] `|` [`OutPoint`].
15///
16/// [`H256`]: struct.H256.html
17/// [`OutPoint`]: struct.OutPoint.html
18#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug, JsonSchema)]
19#[serde(untagged)]
20pub enum DaoWithdrawingCalculationKind {
21 /// the assumed reference block hash for withdrawing phase 1 transaction
22 WithdrawingHeaderHash(H256),
23 /// the out point of the withdrawing phase 1 transaction
24 WithdrawingOutPoint(OutPoint),
25}