NextPlanId = 1, NextSubId = 1). This function can only be called once - subsequent calls will fail with AlreadyInitialized.
Parameters
Authorization
None. This function has norequire_auth() call - it relies on the fact that it can only succeed once. The first caller sets the admin.
Return value
None (void).
Events emitted
None.Error cases
Examples
- Soroban CLI
- SDK
This is typically a one-time setup performed via the CLI immediately after contract deployment.
After initialization, the admin address is stored in instance storage and shares the contract’s TTL. The counters start at 1, so the first plan created will have
plan_id = 1 and the first subscription will have sub_id = 1.