ckb_jsonrpc_types/
experiment.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::{Cycle, OutPoint};
use ckb_types::H256;
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

/// Response result of the RPC method `estimate_cycles`.
#[derive(Clone, Default, Serialize, Deserialize, PartialEq, Eq, Hash, Debug, JsonSchema)]
pub struct EstimateCycles {
    /// The count of cycles that the VM has consumed to verify this transaction.
    pub cycles: Cycle,
}

/// An enum to represent the two kinds of dao withdrawal amount calculation option.
/// `DaoWithdrawingCalculationKind` is equivalent to [`H256`] `|` [`OutPoint`].
///
/// [`H256`]: struct.H256.html
/// [`OutPoint`]: struct.OutPoint.html
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug, JsonSchema)]
#[serde(untagged)]
pub enum DaoWithdrawingCalculationKind {
    /// the assumed reference block hash for withdrawing phase 1 transaction
    WithdrawingHeaderHash(H256),
    /// the out point of the withdrawing phase 1 transaction
    WithdrawingOutPoint(OutPoint),
}