Skip to content

fix: show contract address on testnet deploys#281

Merged
MuncleUscles merged 5 commits intomainfrom
feat/testnet-bradbury
Mar 17, 2026
Merged

fix: show contract address on testnet deploys#281
MuncleUscles merged 5 commits intomainfrom
feat/testnet-bradbury

Conversation

@MuncleUscles
Copy link
Member

@MuncleUscles MuncleUscles commented Mar 17, 2026

Summary

  • Fix deploy command showing Contract Address: undefined on testnet
  • Read address from txDataDecoded.contractAddress (testnet path) with fallback to data.contract_address (localnet path)

Test plan

  • Manual deploy on Bradbury — contract address now displays correctly
  • npm run build succeeds

Summary by CodeRabbit

  • New Features

    • Added testnet-bradbury as a supported network option alongside testnet-asimov.
  • Bug Fixes

    • Improved contract address retrieval to support both studio/localnet and testnet environments.
  • Documentation

    • Updated network guides and examples to reference testnet-bradbury.
  • Chores

    • Upgraded genlayer-js dependency to ^0.21.0.
    • Expanded test coverage for multiple testnets.

Add Bradbury testnet to built-in networks. Update docs and guides to
default to testnet-bradbury as the developer-facing testnet.
Requires genlayer-js with testnetBradbury export.
The deploy command read contract address from result.data.contract_address
which only exists on localnet/studio. On testnet, the address is in
result.txDataDecoded.contractAddress from the decoded RLP calldata.
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR transitions the codebase from testnet-asimov to testnet-bradbury, bumps the genlayer-js dependency to ^0.21.0, refactors contract deployment to handle address retrieval from both localnet/studio and testnet sources, and restructures smoke tests to support multi-network execution.

Changes

Cohort / File(s) Summary
Documentation Updates
README.md, docs/delegator-guide.md, docs/validator-guide.md
Updated testnet references from asimov to bradbury in network setup examples, command descriptions, and verification outputs.
Dependency Upgrade
package.json
Upgraded genlayer-js from ^0.18.10 to ^0.21.0.
Network Support
src/lib/actions/BaseAction.ts, tests/actions/setNetwork.test.ts, tests/actions/staking.test.ts
Added testnet-bradbury as a built-in network option; updated network selections and test mocks to include the new network.
Contract Deployment
src/commands/contracts/deploy.ts
Introduced contractAddress variable to unify address retrieval from both localnet/studio (result.data?.contract_address) and testnet (result.txDataDecoded.contractAddress) sources.
Multi-Network Smoke Tests
tests/smoke.test.ts
Restructured smoke tests to iterate over multiple testnets (Asimov and Bradbury); made test suite names dynamic; removed stake requirement field assertions from epoch info validation; wrapped test blocks in a for loop.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • PR #223: Modifies deployment-related code and genlayer-js SDK usage, sharing similar contract address handling and SDK dependency patterns.

Suggested reviewers

  • cristiam86
  • danielrc888

Poem

🐰 Hopping from Asimov to Bradbury's gleam,
Networks now multiply in our test-suite dream,
Contracts find homes in both testnet and local nest,
Dependency bumped, our genlayer-js at its best! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main fix: enabling contract address display on testnet deployments, which is the primary functional change in the deploy.ts file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/testnet-bradbury
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@MuncleUscles MuncleUscles merged commit af99d01 into main Mar 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