-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
William Cory
authored and
William Cory
committed
Jun 13, 2024
1 parent
9bd957f
commit 01d3cb6
Showing
6 changed files
with
346 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@tevm/actions": patch | ||
--- | ||
|
||
Fixed bug where tevmCall and related methods would improperly validate params such as depth and value. Previously it would not throw a validation error if these numbers are negative |
This file contains 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
79 changes: 79 additions & 0 deletions
79
packages/actions/src/BaseCall/__snapshots__/validateBaseCallParams.spec.ts.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// Bun Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should match snapshot for invalid parameters 1`] = ` | ||
[ | ||
[InvalidSkipBalanceError: Expected boolean, received string | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidskipbalanceerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidGasRefundError: Expected bigint, received number | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidgasrefunderror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Invalid literal value, expected "latest" | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Invalid literal value, expected "earliest" | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Invalid literal value, expected "pending" | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Invalid literal value, expected "safe" | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Invalid literal value, expected "finalized" | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Expected bigint, received number | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidBlockError: Expected string, received number | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidblockerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidGasPriceError: Expected bigint, received string | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidgaspriceerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidOriginError: Invalid Address invalid address | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidoriginerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidCallerError: Expected string, received number | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidcallererror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidGasPriceError: Expected bigint, received string | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidgaspriceerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidValueError: Expected bigint, received string | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidvalueerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidSelfdestructError: Expected set, received string | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidselfdestructerror/ | ||
Version: 1.1.0.next-73], | ||
[InvalidToError: Expected string, received number | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidtoerror/ | ||
Version: 1.1.0.next-73], | ||
] | ||
`; | ||
|
||
exports[`should validate if top level is wrong 1`] = ` | ||
[ | ||
[InvalidParamsError: Expected object, received string | ||
Docs: https://tevm.sh/reference/tevm/errors/classes/invalidparamserror/ | ||
Version: 1.1.0.next-73], | ||
] | ||
`; |
This file contains 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
Oops, something went wrong.