Icrc1 ledger owner

**I am deploying the ICRC1 ledger on the Internet Computer and have been setting the owner as the default identity of the DFX CLI using dfx identity --identity default get-principal. However, when I attempt to transfer tokens through the Candid UI, it shows that there is no balance because the caller is not the owner . So Who should I specify as the owner during deployment to avoid this problem?

If you want to mint tokens via Candid UI, then you should set your candid UI principal as the owner. If you want to mint tokens via CLI, then set your dfx identity as the owner. If you want a different canister to mint tokens, then set that canister as the owner.

how can i get candid principal before deploying ?

The Candid UI has a fixed URL. No matter what canister you point it at, you will always get the same principal when you log in

i dont understand can you please explain more what to put in the command in this case

dfx deploy icrc1_ledger_canister --argument “(variant {
Init = record {
token_symbol = “ICRC1”;
token_name = “L-ICRC1”;
minting_account = record {
owner = principal “$(dfx identity --identity DevJour get-principal)”
};
transfer_fee = 10_000;
metadata = vec {
record { “logo_url”; variant { Text = “/j.png” } };
};
initial_balances = vec {
record {
record {
owner = principal “$(dfx ledger account-id)”;
};
10_000_000_000;
};
};
archive_options = record {
num_blocks_to_archive = 1000;
trigger_threshold = 2000;
controller_id = principal “$(dfx identity --identity DevJour get-principal)”;
};
feature_flags = opt record {
icrc2 = true;
};
}
})”