How can I expose a function from my canister that returns the current freezing threshold to an anonymous caller?

I can get the freezing threshold from the virtual IC Management Canister https://github.com/Motokoder/ic-management-canister-client, but only if I am the owner, so it’s not quite the solution I need. Thank you.

Context: I need this for monitoring cycles across many canisters and sending an alert when any canister’s cycles are below a multiple of the current freezing threshold.

1 Like

The canister can ask for its own status (a recent change made it so that it doesn’t need to be its own controller for that) and then return some of the values in the status request. You can find the interface in the spec.

2 Likes