Skip to main content

IcpFeatures

Struct IcpFeatures 

Source
pub struct IcpFeatures {
    pub registry: Option<IcpFeaturesConfig>,
    pub cycles_minting: Option<IcpFeaturesConfig>,
    pub icp_token: Option<IcpFeaturesConfig>,
    pub cycles_token: Option<IcpFeaturesConfig>,
    pub nns_governance: Option<IcpFeaturesConfig>,
    pub sns: Option<IcpFeaturesConfig>,
    pub ii: Option<IcpFeaturesConfig>,
    pub nns_ui: Option<IcpFeaturesConfig>,
    pub bitcoin: Option<IcpFeaturesConfig>,
    pub dogecoin: Option<IcpFeaturesConfig>,
    pub canister_migration: Option<IcpFeaturesConfig>,
}
Expand description

Specifies ICP features enabled by deploying their corresponding system canisters when creating a PocketIC instance and keeping them up to date during the PocketIC instance lifetime. The subnets to which the corresponding system canisters are deployed must be empty, i.e., their corresponding field in ExtendedSubnetConfigSet must be None or Some(config) with config.state_config = SubnetStateConfig::New. An ICP feature is enabled if its IcpFeaturesConfig is provided, i.e., if the corresponding field is not None.

Fields§

§registry: Option<IcpFeaturesConfig>

Deploys the NNS registry canister and keeps its content in sync with registry used internally by PocketIC. Subnets: NNS.

§cycles_minting: Option<IcpFeaturesConfig>

Deploys the NNS cycles minting canister, sets ICP/XDR conversion rate, and keeps its subnet lists in sync with PocketIC topology. If the cycles_minting feature is enabled, then the default timestamp of a PocketIC instance is set to 10 May 2021 10:00:01 AM CEST (the smallest value that is strictly larger than the default timestamp hard-coded in the CMC state). Subnets: NNS.

§icp_token: Option<IcpFeaturesConfig>

Deploys the ICP ledger and index canisters and initializes the ICP account of the anonymous principal with 1,000,000,000 ICP. Subnets: NNS.

§cycles_token: Option<IcpFeaturesConfig>

Deploys the cycles ledger and index canisters and initializes the cycles account of the anonymous principal with 2^127 cycles. Subnets: II.

§nns_governance: Option<IcpFeaturesConfig>

Deploys the NNS governance and root canisters and sets up an initial NNS neuron with 1 ICP stake. The initial NNS neuron is controlled by the anonymous principal. Subnets: NNS.

§sns: Option<IcpFeaturesConfig>

Deploys the SNS-W and aggregator canisters, sets up the SNS subnet list in the SNS-W canister according to PocketIC topology, and uploads the SNS canister WASMs to the SNS-W canister. Subnets: NNS, SNS.

§ii: Option<IcpFeaturesConfig>

Deploys the Internet Identity canister. Subnets: II.

§nns_ui: Option<IcpFeaturesConfig>

Deploys the NNS frontend dapp. The HTTP gateway must be specified via http_gateway_config in InstanceConfig and the ICP features cycles_minting, icp_token, nns_governance, sns, ii must all be enabled. Subnets: NNS.

§bitcoin: Option<IcpFeaturesConfig>

Deploys the Bitcoin canister under the testnet canister ID g4xu7-jiaaa-aaaan-aaaaq-cai and configured for the regtest network. Subnets: Bitcoin.

§dogecoin: Option<IcpFeaturesConfig>

Deploys the Dogecoin canister under the mainnet canister ID gordg-fyaaa-aaaan-aaadq-cai and configured for the regtest network. Subnets: Bitcoin.

§canister_migration: Option<IcpFeaturesConfig>

Deploys the canister migration orchestrator canister. Subnets: NNS.

Trait Implementations§

Source§

impl Clone for IcpFeatures

Source§

fn clone(&self) -> IcpFeatures

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IcpFeatures

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for IcpFeatures

Source§

fn default() -> IcpFeatures

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for IcpFeatures

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<IcpFeatures, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for IcpFeatures

Source§

impl Hash for IcpFeatures

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl JsonSchema for IcpFeatures

Source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for IcpFeatures

Source§

fn eq(&self, other: &IcpFeatures) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for IcpFeatures

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for IcpFeatures

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SendSyncUnwindSafe for T
where T: Send + Sync + UnwindSafe + ?Sized,

Source§

impl<T> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more