Skip to content

refactor: update gas limit and value handling to use BigInt#423

Merged
chibie merged 1 commit intomainfrom
fix-build
Mar 13, 2026
Merged

refactor: update gas limit and value handling to use BigInt#423
chibie merged 1 commit intomainfrom
fix-build

Conversation

@onahprosper
Copy link
Copy Markdown
Collaborator

@onahprosper onahprosper commented Mar 13, 2026

  • Changed gas limit and value definitions from numeric literals to BigInt for consistency across bundler files.
  • Updated calculations in executeSponsored and userOp to ensure proper handling of gas fees and values as BigInt.
  • Enhanced overall code clarity and reliability by standardizing bigint usage in gas-related operations.

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.

Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, contracts etc.

References

Include any links supporting this change such as a:

If there are no references, simply delete this section.

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this project has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated internal numeric handling for improved code consistency and compatibility.

* Changed gas limit and value definitions from numeric literals to BigInt for consistency across bundler files.
* Updated calculations in executeSponsored and userOp to ensure proper handling of gas fees and values as BigInt.
* Enhanced overall code clarity and reliability by standardizing bigint usage in gas-related operations.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 13, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

The pull request refactors bigint value initialization across three bundler configuration and utility files by replacing bigint literals (using the n suffix, e.g., 80_000n) with explicit BigInt() constructor calls (e.g., BigInt(80000)). Numeric values and behavior remain unchanged; this is purely a syntax standardization effort.

Changes

Cohort / File(s) Summary
BigInt Literal Refactoring
app/lib/bundler/config.ts, app/lib/bundler/executeSponsored.ts, app/lib/bundler/userOp.ts
Replaced bigint literals with suffix n (e.g., 80_000n, 100_000n) with explicit BigInt() constructor calls (e.g., BigInt(80000), BigInt(100000)) across gas configuration, fee calculations, and arithmetic operations. No functional changes to logic or control flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • chibie
  • 5ran6

Poem

🐰 With ears held high and whiskers bright,
We hop through code from 80_000n to light,
BigInt constructors, a cleaner way,
Same values shining—refactored today!

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (4 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description includes a brief summary of changes but lacks critical details in the template sections (References, Testing, and Checklist items are not completed). Add GitHub issue references (e.g., 'closes #XXX'), document testing steps including any manual testing and environment details, and check the required checklist items if applicable.
Linked Issues check ⚠️ Warning The linked issue #407 involves recipient name verification UI changes, while this PR refactors BigInt usage in bundler gas-related code; these are completely unrelated in scope and objectives. Verify the correct linked issue is attached. This PR appears unrelated to the recipient name editability feature described in #407; confirm the actual issue this refactoring addresses.
Out of Scope Changes check ⚠️ Warning All code changes in the three bundler files (config.ts, executeSponsored.ts, userOp.ts) consistently refactor bigint usage, but this refactoring is entirely out of scope relative to the linked issue #407 about recipient name verification. Clarify the relationship between this BigInt refactoring and issue #407, or link the correct issue that this PR is intended to address.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and accurately summarizes the main change: refactoring gas limit and value handling to use BigInt throughout the bundler files.

✏️ 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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-build
📝 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.

@chibie chibie merged commit 130f0be into main Mar 13, 2026
1 check was pending
@chibie chibie deleted the fix-build branch March 13, 2026 15:09
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