Cycles-ledger mainnet canister-id

Hi everyone, I have some questions.

I want to use cycles-ledger in my project. Does anyone know the mainnet canister ID for cycles-ledger? I couldn’t find it on the documentation or the forum.

Thank you for your help.

1 Like

The cycles ledger is not up and running yet.
You can follow the development and ask questions about the cycles ledger project in this thread.

1 Like

For anyone (like myself) that lands here when looking for the answer:

The mainnet cycles ledger is at: um5iw-rqaaa-aaaaq-qaaba-cai

Source: sdk/src/dfx/src/lib/operations/cycles_ledger.rs at release-0.20.0 · dfinity/sdk · GitHub

To get the string I did:

max@sinkpad:~/dfn/cycles-ledger-canister-id (3:48)$ cat src/main.rs 
use candid::Principal;

fn main() {
    const CYCLES_LEDGER_CANISTER_ID: Principal =
    Principal::from_slice(&[0x00, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x02, 0x01, 0x01]);
    println!("{CYCLES_LEDGER_CANISTER_ID}");
}
max@sinkpad:~/dfn/cycles-ledger-canister-id (7:14)$ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
     Running `target/debug/cycles-ledger-canister-id`
um5iw-rqaaa-aaaaq-qaaba-cai

You can find NNS proposals about the cycles ledger on the dashboard: https://dashboard.internetcomputer.org/canister/um5iw-rqaaa-aaaaq-qaaba-cai

IMO it would be nice if dfx could say which cycles wallet it is using; it may be possible but I couldn’t find out how. I tried:

  • Looking at dfx cycles --help and dfx wallet --help
  • Running dfx cycles balance --ic --verbose in the hope that the debug messages might include API calls and canister IDs.
1 Like

Note: The canister ID is also listed in the thread linked above - I just missed it on the first skim read…

You can get the canister ID of the wallet associated with your current identity using this command:

$ dfx identity get-wallet --ic

Note that the command dfx cycles is all about cycles associated with your principal ID (or, more precisely, the principal ID of your current identity). It is meant to abstract away how the cycles are managed - which is always through the cycles ledger in the background. Consequently, there is no way to print out the canister ID of the cycles ledger.
If you need to work with the cycles ledger itself, you’ll (hopefully) find all the required information in the GitHub repository or wiki page.

1 Like