Skip to content

feat: smart contract upgrade script + docs update#16

Merged
keanji-x merged 2 commits intomainfrom
feat/upgrade-script-and-docs
Apr 17, 2026
Merged

feat: smart contract upgrade script + docs update#16
keanji-x merged 2 commits intomainfrom
feat/upgrade-script-and-docs

Conversation

@keanji-x
Copy link
Copy Markdown
Collaborator

Summary

  • Rewrite Upgrade.s.sol to only require ROUTER_ADDRESS - resolves all proxy addresses on-chain
  • Gracefully handles old Router (pre-EvaluationLedger): auto-deploys EvaluationLedger proxy and wires it
  • Add just gravity-upgrade / just anvil-upgrade commands to justfile
  • Update CLAUDE.md with debate, chronicle, world bible tools, EvaluationLedger contract, and upgrade workflow

Gravity testnet already upgraded successfully with this script - all implementations swapped, EvaluationLedger deployed at 0x0997B2d7c299Ecc7Eaf04f5AF7d2aa842434f5FC.

Test plan

  • just gravity-upgrade ran successfully on Gravity testnet
  • All 7 contracts upgraded (Router, AgentRegistry, AgentLedger, LocationLedger, InboxLedger, EvaluationLedger, GameEngine)
  • EvaluationLedger auto-deployed and wired to GameEngine + Router
  • World Bible auto-initialized
  • Proxy addresses unchanged

🤖 Generated with Claude Code

keanji-x and others added 2 commits April 17, 2026 10:07
- Rewrite Upgrade.s.sol to only require ROUTER_ADDRESS (resolves all
  other proxies on-chain via getAddresses)
- Handle old Router (5-return) gracefully: auto-deploy EvaluationLedger
  proxy and wire it to GameEngine + Router when missing
- Auto-initialize World Bible if not yet done
- Add `just gravity-upgrade` and `just anvil-upgrade` commands
- Update CLAUDE.md: add EvaluationLedger, debate/chronicle/world-bible
  tools, upgrade commands, and proxy address table

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README.md: add EvaluationLedger to architecture, fix Router address,
  fix post_to_location happiness (+10 -> +5), add debate/chronicle/bible
  tools, add upgrade commands
- docs/state-storage.md: add EvaluationLedger section, update Router to
  6 addresses, update architecture diagram
- skill.md: fix happiness decay formula, fix post happiness (+10 -> +5),
  add debate/chronicle/world bible mechanics and tool reference

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@keanji-x keanji-x merged commit a1a622b into main Apr 17, 2026
2 of 3 checks passed
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