Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: manualExec --estimate-gas-limit smaller than original #9

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

andrevmatos
Copy link
Collaborator

Currently, if you try to estimate-gas-limit and get a limit smaller than request's gasLimit, you get a thrown estimation error due to trying to manually execute with a smaller gasLimitOverride.
This adds a check, with a logged warn in that case, and keeps the original (=0) gas limit, which will succeed anyway (in case you could estimate)

…ginal

gasLimitOverride doesn't accept a value less than or equal original
gasLimit, so we must verify, warn and don't override in that case.
@andrevmatos andrevmatos self-assigned this Dec 9, 2024
@andrevmatos andrevmatos requested a review from a team as a code owner December 9, 2024 21:10
Copy link

github-actions bot commented Dec 9, 2024

Coverage Report

------------------------------|---------|----------|---------|---------|----------------------------------------
File                          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                      
------------------------------|---------|----------|---------|---------|----------------------------------------
All files                     |   93.67 |    78.12 |   94.54 |    95.4 |                                        
 abi                          |     100 |      100 |     100 |     100 |                                        
  BurnMintERC677Token.ts      |     100 |      100 |     100 |     100 |                                        
  BurnMintTokenPool_1_5.ts    |     100 |      100 |     100 |     100 |                                        
  CommitStore_1_2.ts          |     100 |      100 |     100 |     100 |                                        
  CommitStore_1_5.ts          |     100 |      100 |     100 |     100 |                                        
  LockReleaseTokenPool_1_5.ts |     100 |      100 |     100 |     100 |                                        
  OffRamp_1_2.ts              |     100 |      100 |     100 |     100 |                                        
  OffRamp_1_5.ts              |     100 |      100 |     100 |     100 |                                        
  OnRamp_1_2.ts               |     100 |      100 |     100 |     100 |                                        
  OnRamp_1_5.ts               |     100 |      100 |     100 |     100 |                                        
  Router.ts                   |     100 |      100 |     100 |     100 |                                        
 lib                          |   93.72 |    80.82 |   97.72 |   96.01 |                                        
  commits.ts                  |    90.9 |    56.25 |     100 |   93.54 | 70,91                                  
  errors.ts                   |   93.97 |    87.23 |     100 |   96.05 | 162,181,189                            
  execution.ts                |   91.04 |    76.59 |      95 |   94.11 | 163-164,185-186,226,240,314            
  gas.ts                      |   94.33 |    66.66 |     100 |   96.15 | 86,126                                 
  offchain.ts                 |     100 |    95.45 |     100 |     100 | 30                                     
  requests.ts                 |   92.98 |    78.57 |   93.33 |   96.19 | 32,163,213,247                         
  selectors.ts                |     100 |      100 |     100 |     100 |                                        
  types.ts                    |     100 |      100 |     100 |     100 |                                        
  utils.ts                    |    93.1 |    81.57 |     100 |   95.32 | 53,66,73-74,125                        
 lib/hasher                   |      93 |    62.16 |   81.81 |   92.36 |                                        
  hasher.ts                   |     100 |    66.66 |     100 |     100 | 50                                     
  index.ts                    |     100 |      100 |   42.85 |     100 |                                        
  merklemulti.ts              |   91.15 |    61.76 |     100 |   90.74 | 52,147,210,229,233,239,243,248,295,304 
------------------------------|---------|----------|---------|---------|----------------------------------------

@andrevmatos andrevmatos merged commit c92e135 into main Dec 9, 2024
1 check passed
@andrevmatos andrevmatos deleted the misc branch December 9, 2024 21:50
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.

3 participants