MCPcopy Create free account
hub / github.com/dfinity/orbit / get_icp_asset

Function get_icp_asset

tests/integration/src/utils.rs:881–894  ·  view source on GitHub ↗
(
    env: &PocketIc,
    station_canister_id: Principal,
    requester: Principal,
)

Source from the content-addressed store, hash-verified

879}
880
881pub fn get_icp_asset(
882 env: &PocketIc,
883 station_canister_id: Principal,
884 requester: Principal,
885) -> station_api::AssetDTO {
886 list_assets(env, station_canister_id, requester)
887 .expect("Failed to query list_assets")
888 .0
889 .expect("Failed to list assets")
890 .assets
891 .into_iter()
892 .find(|asset| asset.symbol == "ICP")
893 .expect("Failed to find ICP asset")
894}
895
896pub fn get_icp_account_identifier(addresses: &[station_api::AccountAddressDTO]) -> Option<String> {
897 addresses

Calls 1

list_assetsFunction · 0.50