Can you upgrade an ledger canister to use ICRC2 without a reinstall?

I deployed an ICRC1 ledger canister with feature_flags = opt record{icrc2 = false}; in the arguments.

I now want to enable the ICRC2 standard but when I re-run the deploy command with feature_flags = opt record{icrc2 = true};, I still get an error that ICRC2 has not been enabled when I run an ICRC2 command.

Is there a way to upgrade a ledger canister to use ICRC2 without a reinstall?

Yes you can. If you look at the upgrade method of the icrc1 ledger you can see that it is possible to set the feature flag even after deployment.

You can refer to the candid file on how to construct upgrade arguments.

2 Likes