Skip to content

feat(contracts): add upgrade function to RewardsContract and comprehensive upgradeability docs (#98)#135

Open
D2758695161 wants to merge 1 commit intoFinesseStudioLab:mainfrom
D2758695161:feat/upgradeability-doc
Open

feat(contracts): add upgrade function to RewardsContract and comprehensive upgradeability docs (#98)#135
D2758695161 wants to merge 1 commit intoFinesseStudioLab:mainfrom
D2758695161:feat/upgradeability-doc

Conversation

@D2758695161
Copy link
Copy Markdown

Summary

Implements Soroban in-place WASM upgrade support for the Trivela rewards contract and adds comprehensive upgradeability documentation.

Changes

contracts/rewards/src/lib.rs

  • Add upgrade(admin, new_wasm_hash) function using env.deployer().update_current_contract_wasm(new_wasm_hash)

docs/upgradeability.md

  • Complete rewrite: WASM upgrade mechanism, storage compatibility, upgrade process, admin security, rollback options, storage layout tables

Payment Address

0xaae0101ac77a2e4e0ea826eb4d309374f029b0a6

…sseStudioLab#98)

- Add upgrade(admin, new_wasm_hash) function to rewards contract
  implementing Soroban's update_current_contract_wasm mechanism
- Add BytesN import required for the wasm hash parameter
- Rewrite docs/upgradeability.md with comprehensive documentation:
  - Overview of the in-place WASM upgrade mechanism
  - Storage compatibility rules (safe changes vs breaking changes)
  - Complete upgrade process (build, install, invoke, verify)
  - Admin security model and operational recommendations
  - Rollback options and prevention strategies
  - Proxy pattern alternative discussion
  - Storage layout table for RewardsContract and CampaignContract
  - Links to official Soroban documentation
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

@D2758695161 is attempting to deploy a commit to the joelpeace48-cell's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant