Source code
1. Overview
1. Overview
RWAToken or ComplianceManage implementation contracts. It is held by this proxy instance. This document explains why a contract with only a constructor is still a fundamental part of the system architecture.2. Responsibilities and Why It Exists
2. Responsibilities and Why It Exists
ArtStarERC1967Proxy can be summarized as:- A standardized proxy container that holds the state of upgradeable contracts.
- A stable, explicit, and reusable proxy entrypoint for the Hardhat Ignition deployment flow.
- Users typically interact with the proxy address, not the implementation address.
- The implementation can be replaced, while the proxy address and proxy state are preserved.
- Initialization is not performed in the implementation constructor. It is executed once during proxy deployment via the
dataparameter.
3. ERC-1967 Standard
3. ERC-1967 Standard
ERC-1967 is a key standard for proxy patterns. It defines fixed storage slots for metadata such as the implementation address. Standardizing these slots provides:- Avoidance of storage collisions between proxy internals and business state variables.
- Easier identification of proxy relationships by tooling, explorers, and auditors.
- Upgrades and deployments that follow common industry conventions instead of project-specific layouts.
ERC1967Proxy implementation directly, and OpenZeppelin maintains the standardized slot definitions.4. UUPS Proxy Pattern
4. UUPS Proxy Pattern
- Transparent proxy
- UUPS
ArtStarERC1967Proxy does not contain an upgrade authorization strategy. The “who can upgrade” decision is enforced by _authorizeUpgrade() in the current implementation:RWATokengates upgrades viaonlyOwner.ComplianceManagealso gates upgrades viaonlyOwner.
- The proxy stores the state.
- The current implementation decides upgrade authorization.
5. Minimal Wrapper Design
5. Minimal Wrapper Design
- Extremely small proxy surface area, making audits more tractable.
- Upgrade semantics stay aligned with mature library defaults.
- Deployment scripts can reference a project-owned proxy name for stable artifacts and deployment records.
- Without understanding
ERC-1967and UUPS, readers may underestimate its importance. - More upgrade risk is shifted to implementation contracts and operational processes rather than being guarded at the proxy layer.
6. Initialization Calldata and Deployment Flow
6. Initialization Calldata and Deployment Flow
implementation: the initial implementation contract address.data: calldata that is delegate-called immediately after deployment to initialize state.
7. Relationship with Ignition Deployment Modules
7. Relationship with Ignition Deployment Modules
ComplianceManage: deploy the implementation, then pass the encodedinitialize(deployer)calldata asdatawhen deploying the proxy (mapped asComplianceManageProxy).RWAToken: deploy the implementation, then pass encodedinitialize(...)(name, symbol, and other parameters) asdatawhen deploying the proxy (mapped asRWATokenProxy).
8. Responsibility Boundary vs. Implementations
8. Responsibility Boundary vs. Implementations
- Proxy contract: stores state, receives external calls, and delegates calls to the implementation.
- Implementation contract: defines business logic, access control, upgrade authorization, and storage layout.
9. Upgrade Risks and Operational Notes
9. Upgrade Risks and Operational Notes
Storage layout risk
Initialization risk
Address selection risk
10. Why Documentation Is Still Necessary
10. Why Documentation Is Still Necessary
- How proxy storage coexists with business storage.
- How implementations can be upgraded without changing the user-facing address.
- How deployment scripts initialize a proxy in one step to make the business system usable.