Skip to content

🔨 contracts: deploy business tenant via createx - #1348

Open
patitonar wants to merge 1 commit into
mainfrom
testnet-tenant
Open

patitonar wants to merge 1 commit into
mainfrom
testnet-tenant

Conversation

@patitonar

@patitonar patitonar commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

closes #1340

Summary by CodeRabbit

  • Tests
    • Improved contract test setup so CreateX is available consistently, including on active forks.
    • Added a deployed business tenant access manager to the shared test context, making it available across test scenarios.
  • Chores
    • Refreshed recorded gas measurements for selected contract tests; all updated measurements increased.
    • Updated release metadata.

@changeset-bot

changeset-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7b831b4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 75bd7ff1-1d89-48a2-940e-e180219fbe8b

📥 Commits

Reviewing files that changed from the base of the PR and between 7a26a7b and ce74fa0.

📒 Files selected for processing (1)
  • contracts/test/mocks/ExaBusinessTenant.s.sol

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Walkthrough

The changes add CreateX bytecode to contract test setup and update ExaBusinessTenant deployment for the Anvil test setup. Anvil reads the deployed manager address from the broadcast, verifies it, and provides it to Vitest. Gas snapshots, spell-check configuration, and Changesets metadata are also updated.

Changes

Test deployment setup

Layer / File(s) Summary
CreateX test setup
contracts/test/Fork.t.sol, contracts/.gas-snapshot, cspell.json, .changeset/tender-bats-end.md
ForkTest installs CreateX runtime bytecode at the canonical address for local and active-fork tests. The gas snapshot records updated measurements, cspell.json accepts createx, and the Changesets file adds an empty frontmatter block.
Tenant deployment and test context
contracts/test/mocks/ExaBusinessTenant.s.sol, server/test/anvil.ts
The Foundry script broadcasts deployment of an AccessManager and computes its deterministic CREATE3 address. The Anvil setup reads and verifies the manager address from the broadcast, then provides it to Vitest.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AnvilSetup as server/test/anvil.ts
  participant Foundry as DeployExaBusinessTenant
  participant Broadcast as Foundry broadcast
  participant Vitest
  AnvilSetup->>Foundry: run deployment script
  Foundry->>Broadcast: write manager address
  AnvilSetup->>Broadcast: read returns.manager.value
  AnvilSetup->>Vitest: provide ExaBusinessTenant address
Loading

Merge Risk: ⚪ Minimal · up to ce74f

The change adds CreateX-backed tenant deployment to test setup. No concrete merge-blocking issue remains in the supplied evidence; merge after normal checks pass.

Architecture Summary

Architecture risk: 🔵 Low · up to ce74f

The change affects 3 systems.

Changed systems: contracts, cspell.json, server

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — contracts (service) was modified; 3 changed files map to changed impact.
  • observed — cspell.json (service) was modified; 1 changed file maps to changed impact.
  • observed — server (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in contracts/.gas-snapshot: The snapshot updates the recorded gas values for testFuzz_createAccount_EOAOwners and test_deploy_deploysToSameAddress; the first entry’s mean decreases while the second entry’s gas value increases.
  • observed — Modified behavior in contracts/.gas-snapshot: The snapshot increases recorded gas values for the listed HypEXA router deployment, bridge-role, and router-rotation tests. Other entries in this span retain their values.
  • observed — Modified behavior in contracts/.gas-snapshot: The snapshot increases recorded gas values for every listed RedeployerTest case.
  • observed — Modified behavior in contracts/test/Fork.t.sol: Added the internal constant CREATEX at 0xba5Ed099633D3B313e4D5F7bdc1305d3c28ba5Ed.
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning Issue #1340 requires support for op-sepolia and base-sepolia. The PR adds a CreateX-based AccessManager deployment to the local Anvil setup. server/test/anvil.ts runs the script and reads only… Add the business tenant deployment setup for both op-sepolia and base-sepolia. Add automated validation that confirms the tenant is deployed and available on both networks.
✅ 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 clearly describes the primary change: deploying the business tenant through CreateX. It is concise and specific.
Out of Scope Changes check ✅ Passed The changed files support the business tenant deployment flow. The CreateX test helper, deployment script, Anvil integration, gas snapshot, spelling entry, and changeset are connected to that flow. No…
Full details: Linked Issues check

Explanation

Issue #1340 requires support for op-sepolia and base-sepolia. The PR adds a CreateX-based AccessManager deployment to the local Anvil setup. server/test/anvil.ts runs the script and reads only broadcast/.../31337/run-latest.json. The reviewed changes contain no deployment configuration or automated validation for either requested network.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67ee6a4850

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread contracts/test/mocks/ExaBusinessTenant.s.sol Outdated
Comment thread contracts/test/mocks/ExaBusinessTenant.s.sol

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 0a782200-6785-4c0a-9f55-8e3f8f0113e1

📥 Commits

Reviewing files that changed from the base of the PR and between 8c46edb and 67ee6a4.

📒 Files selected for processing (6)
  • .changeset/tender-bats-end.md
  • contracts/.gas-snapshot
  • contracts/test/Fork.t.sol
  • contracts/test/mocks/ExaBusinessTenant.s.sol
  • cspell.json
  • server/test/anvil.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread server/test/anvil.ts
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1605 1 1604 1
View the full list of 1 ❄️ flaky test(s)
local::local

Flake rate in main: 86.21% (Passed 4 times, Failed 25 times)

Stack Traces | 505s run time
Assertion is false: "\$[\s\d,.\xa0]+, AVAILABLE BALANCE" is not visible

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

This branch was successfully deployed

1 active deployment
test — 7b831b4d Deployed Oct 1, 2026 by patitonar via e2e #14471
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.

contracts: assess testnet business tenant setup

2 participants