Skip to content

fix: register LendGateway as default module#226

Merged
shivam-ef merged 2 commits into
feat/lendfrom
nik/record-atomic-lend-dev-addresses
Jul 23, 2026
Merged

fix: register LendGateway as default module#226
shivam-ef merged 2 commits into
feat/lendfrom
nik/record-atomic-lend-dev-addresses

Conversation

@nikkaroraa

@nikkaroraa nikkaroraa commented Jul 22, 2026

Copy link
Copy Markdown

Summary

  • register LendGateway as a default module during the Optimism dev deployment so Safe module calls cannot revert with OnlyModules
  • verify the gateway default-module invariant alongside the existing live deployment checks
  • record the atomic Lend implementation/module addresses and handle the legacy liquidRESERVE Spoke reserve

Test plan

  • forge build scripts/lend/DeployCashLendDev.s.sol scripts/lend/VerifyCashLendDev.s.sol
  • live Optimism dev verification: Cash Lend dev deployment verified
  • current gateway confirmed as an enabled default module
  • tests not run per repository instruction

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

if (asset == UNREGISTERED_LEGACY_LIQUID_RESERVE) {
require(!gateway.isRegistered(asset), "legacy liquidRESERVE unexpectedly registered");
continue;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Verify breaks redeploy reserve check

Medium Severity

VerifyCashLendDev now requires the legacy liquidRESERVE to stay unregistered, but DeployCashLendDev still calls setReserveId for every Spoke reserve. A rollback-and-redeploy would re-register that asset, then fail this check and leave the legacy OFT active on the gateway.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f81b96c. Configure here.

@nikkaroraa nikkaroraa changed the title chore: record atomic Lend dev deployment fix: register LendGateway as default module Jul 22, 2026

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4ee07f5. Configure here.

Comment thread scripts/lend/DeployCashLendDev.s.sol
@shivam-ef
shivam-ef merged commit e6669b7 into feat/lend Jul 23, 2026
1 of 2 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.

2 participants