This repository was archived by the owner on May 12, 2025. It is now read-only.
simulateBundle helpers + JSON RPC lib from #51#57
Open
zeroXbrock wants to merge 20 commits into
Open
Conversation
lthibault
approved these changes
Mar 13, 2024
lthibault
left a comment
There was a problem hiding this comment.
I looked really hard for something to nit pick about, but couldn't find anything.
LGTM. Send it :)
Member
Author
|
While doing some integration testing, I noticed that the JSON encoder lib is using a LOT of gas. I have to set my gas limit to 30M for one CCR that JSON-encodes 10 (each) simBundle & sendBundle payloads. When the CCR lands, it only ends up using about 36k gas. But if I don't set the limit extremely high, I get an out of gas error. Is this OK? I wonder if it would be better to do the JSON encoding offchain to avoid this, or maybe there's a way to tweak the gas estimate logic on the backend to avoid this confusion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bundle.simulateBundle(bundleObj): syntactical sugar to callSuave.simulateBundle(encodeSimBundle(bundleObj))encodeSimBundle: encodesbundleObjforBundle.simulateBundleyou can also use the
using ... forsyntax:merged with #51 to use its JSON libraryremoved bc gas too high