You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SubTrackr uses an upgradeable architecture (proxy + storage + implementation). Use the deployed `PROXY_ID` (saved to `contracts/.env.<network>`) as the stable contract ID.
167
+
167
168
### 6. Run Tests
168
169
169
170
Run the test suite to ensure everything is working correctly:
Copy file name to clipboardExpand all lines: contracts/DEPLOYMENT.md
+73-10Lines changed: 73 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,16 @@
2
2
3
3
This guide describes how to deploy SubTrackr smart contracts to various Stellar networks using the provided automation scripts.
4
4
5
+
## Contract Architecture (Upgradeable)
6
+
7
+
SubTrackr is deployed as three Soroban contracts:
8
+
9
+
-**Proxy** (`subtrackr-proxy` / `UpgradeableProxy`): Stable contract ID used by the app. Manages upgrades (timelock, history, rollback scheduling) and forwards calls to the current implementation.
10
+
-**Storage** (`subtrackr-storage` / `SubTrackrStorage`): Holds all subscription state (plans, subscriptions, indexes). Only the currently-authorized implementation can write to it.
11
+
-**Implementation** (`subtrackr-subscription` / `SubTrackrSubscription`): Business logic. Can be upgraded by deploying a new implementation contract and updating the proxy.
12
+
13
+
The **proxy contract ID never changes** during upgrades, so subscribers and integrators don’t need to update addresses.
3) Upload the tar.gz bundle to your chosen explorer’s contract page (or submit via their form/API), referencing your deployed `CONTRACT_ID`.
100
+
3) Upload the tar.gz bundle to your chosen explorer’s contract page (or submit via their form/API), referencing your deployed `PROXY_ID` (and optionally the storage/implementation IDs).
86
101
87
102
Notes:
88
103
- Ensure the license header is present in your sources if required by the explorer.
89
104
- Keep optimizer/toolchain settings consistent across builds for reproducibility.
90
105
91
-
## Rollback Procedure
106
+
## Upgrade Procedure
107
+
108
+
### 1) Deploy a new implementation
109
+
110
+
Build and deploy the updated `subtrackr-subscription` contract.
111
+
112
+
You can use the helper script (deploy + schedule):
92
113
93
-
Since smart contracts on Soroban are immutable (unless explicitly designed otherwise), a "rollback" typically involves:
0 commit comments