Commit f6df66d
authored
fix(entropy): Only mark callbacks as failed if enough gas was provided, regardless of revert code (#3106)
Summary
This PR removes the check that allows us to mark callbacks as failed (even if enough gas wasn't provided) if they revert with a non-empty return code.
Rationale
When we wrote this initally, we thought that all out-of-gas reverts from calling contracts would bubble up and be caught by the ret.length == 0 condition. However, we have found that some contracts catch out-of-gas reverts and then revert with a different error code. This means we can end up calling these callbacks without enough gas.
Simple fix here is to require enough gas to be provided regardless of the revert code.1 parent 0ae895b commit f6df66d
File tree
2 files changed
+12
-3
lines changed- target_chains/ethereum/contracts
- contracts/entropy
- test
2 files changed
+12
-3
lines changedLines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
619 | 619 | | |
620 | 620 | | |
621 | 621 | | |
622 | | - | |
623 | 622 | | |
624 | 623 | | |
625 | 624 | | |
626 | 625 | | |
627 | | - | |
628 | | - | |
| 626 | + | |
| 627 | + | |
629 | 628 | | |
630 | 629 | | |
631 | 630 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1116 | 1126 | | |
1117 | 1127 | | |
1118 | 1128 | | |
| |||
0 commit comments