Skip to content

Commit 00e77d1

Browse files
committed
feat(evm)!: squashed commit
commit aaf6431 Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:25:36 2025 -0500 refactor: linter and formatter commit f36399c Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:07:42 2025 -0500 chore: changelog commit f6bb649 Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:07:42 2025 -0500 chore: changelog commit a6877ee Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:06:45 2025 -0500 chore: move Go to v1.22 because it's required for geth commit a1e74e9 Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:06:45 2025 -0500 chore: move Go to v1.22 because it's required for geth commit b546151 Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:04:56 2025 -0500 feat(evm)!: update to geth v1.13 with EIP-1153, PRECOMPILE_ADDRS, and transient storage support This commit upgrades the Nibiru EVM module for compatibility with go-ethereum v1.13.14, introducing the following changes: - Updated all references from deprecated types in `rpc` to their new equivalents under `common/math`, such as replacing `rpc.DecimalOrHex` with `math.HexOrDecimal64`. - Removed deprecated EIP-155 seed hash API (`debug_seedHash`) and associated `ethash` import. - Aligned `vm.Config` and fee calculation logic with new EIP-based gas cost parameters (`isShanghai`, `isEIP3860`). - Introduced explicit `PRECOMPILE_ADDRS` constant to aggregate EVM precompiles with NibiruΓÇÖs extensions (FunToken, Wasm, Oracle). - Implemented support for **EIP-1153** (transient storage): - Added `transientStorage` map to `StateDB`, with getters/setters and journaling support. - Added `Prepare` method to reset access lists and transient storage for each tx. - Refactored `SelfDestruct` logic and exposed `HasSelfDestructed` (was `Suicide`) for better clarity and future EIP-6780 readiness. - Reworked balance mutation logic (`AddBalanceSigned`) to correctly handle signed values and prevent `uint256` overflow errors. - Minor typo corrections (e.g., "occured" ΓåÆ "occurred") in proto files and comments. This upgrade also adjusts `go.mod` to: - Replace `go-ethereum v1.10.x` with `v1.13.14` - Downgrade Go version to 1.21 for compatibility with `go-ethereum` and its Pebble dependency - Pin Pebble to a compatible commit required by geth's internal `ethdb` commit 803f9b4 Author: Unique-Divine <[email protected]> Date: Mon Apr 14 10:04:56 2025 -0500 feat(evm)!: update to geth v1.13 with EIP-1153, PRECOMPILE_ADDRS, and transient storage support This commit upgrades the Nibiru EVM module for compatibility with go-ethereum v1.13.14, introducing the following changes: - Updated all references from deprecated types in `rpc` to their new equivalents under `common/math`, such as replacing `rpc.DecimalOrHex` with `math.HexOrDecimal64`. - Removed deprecated EIP-155 seed hash API (`debug_seedHash`) and associated `ethash` import. - Aligned `vm.Config` and fee calculation logic with new EIP-based gas cost parameters (`isShanghai`, `isEIP3860`). - Introduced explicit `PRECOMPILE_ADDRS` constant to aggregate EVM precompiles with NibiruΓÇÖs extensions (FunToken, Wasm, Oracle). - Implemented support for **EIP-1153** (transient storage): - Added `transientStorage` map to `StateDB`, with getters/setters and journaling support. - Added `Prepare` method to reset access lists and transient storage for each tx. - Refactored `SelfDestruct` logic and exposed `HasSelfDestructed` (was `Suicide`) for better clarity and future EIP-6780 readiness. - Reworked balance mutation logic (`AddBalanceSigned`) to correctly handle signed values and prevent `uint256` overflow errors. - Minor typo corrections (e.g., "occured" ΓåÆ "occurred") in proto files and comments. This upgrade also adjusts `go.mod` to: - Replace `go-ethereum v1.10.x` with `v1.13.14` - Downgrade Go version to 1.21 for compatibility with `go-ethereum` and its Pebble dependency - Pin Pebble to a compatible commit required by geth's internal `ethdb` commit 1834a61 Author: Unique-Divine <[email protected]> Date: Sat Apr 12 19:51:44 2025 -0500 feat(evm): Adapt module to Geth v1.13 core package changes This commit updates the Nibiru EVM module to align with significant breaking changes introduced in the upstream go-ethereum v1.13 `core/vm` and `core/types` packages. The goal is to leverage the updated Geth dependencies while ensuring compatibility with Nibiru's specific requirements, particularly its custom precompiles that interact with the Cosmos SDK. This addresses several LSP errors and runtime issues arising from removed or modified upstream functions and interfaces: 1. **Replace `core.NewMessage` Calls:** - The `core.NewMessage` factory function was removed upstream in favor of direct struct instantiation. - All instances have been replaced with `core.Message{...}` struct literals, correctly mapping arguments to fields like `From`, `To`, `Nonce`, `Value`, `GasLimit`, gas price fields (`GasPrice`, `GasFeeCap`, `GasTipCap`), `Data`, `AccessList`. - Monetary and gas values are initialized as `*big.Int` per the `core.Message` definition. - Newer fields relevant to Cancun/EIP-4844 (`BlobGasFeeCap`, `BlobHashes`) and Nibiru-specific fields (`SkipAccountChecks`) are now correctly initialized. 2. **Revert `vm.PrecompiledContract` Interface for Nibiru Precompiles:** - Geth v1.13 simplified the `PrecompiledContract.Run` signature to `Run(input []byte)`. - This change breaks Nibiru's custom precompiles (e.g., Wasm) which require the `*vm.EVM` pointer to access `StateDB` and derive the `sdk.Context` needed for Cosmos SDK keeper interactions. - This commit *reverts* the interface definition within Nibiru's fork back to `Run(evm *vm.EVM, contract *vm.Contract, readonly bool)`. - The `Address() common.Address` method is also restored to the interface and implementations for use by the execution logic. - Standard precompile implementations included in this module have been adapted to match this reverted interface signature. - The `vm.RunPrecompiledContract` helper function is updated to pass the necessary `*vm.EVM`, `*vm.Contract`, and `readonly` context. 3. **Adopt `uint256` for VM Value/Balance Interactions:** - While `core.Message` retains `*big.Int`, the internal VM logic and `StateDB` methods (e.g., `vm.Call`, `vm.Create`, `AddBalance`, `SubBalance`, `Contract.value`) were updated upstream to use `*uint256.Int` (from `holiman/uint256`). - Code passing values into these VM contexts has been updated to perform the necessary `*big.Int` -> `*uint256.Int` conversions. - Added `holiman/uint256` as a direct dependency in `go.mod`. 4. **Replace `StateDB.PrepareAccessList`:** - The `PrepareAccessList` method was removed from the `vm.StateDB` interface upstream. - Calls have been replaced with the new, more comprehensive `StateDB.Prepare(rules, sender, ...)` method. 5. **Replace `evm.ActivePrecompiles` Method:** - The `ActivePrecompiles` method on the `vm.EVM` struct was removed. - Calls have been replaced with the standalone package function `vm.ActivePrecompiles(rules)`, passing the appropriate chain rules. These changes resolve the identified compatibility errors and ensure the EVM module integrates correctly with both the updated Geth core components and Nibiru's specific architecture and custom precompiles. commit af71ded Author: Unique-Divine <[email protected]> Date: Sat Apr 12 19:51:44 2025 -0500 feat(evm): Adapt module to Geth v1.13 core package changes This commit updates the Nibiru EVM module to align with significant breaking changes introduced in the upstream go-ethereum v1.13 `core/vm` and `core/types` packages. The goal is to leverage the updated Geth dependencies while ensuring compatibility with Nibiru's specific requirements, particularly its custom precompiles that interact with the Cosmos SDK. This addresses several LSP errors and runtime issues arising from removed or modified upstream functions and interfaces: 1. **Replace `core.NewMessage` Calls:** - The `core.NewMessage` factory function was removed upstream in favor of direct struct instantiation. - All instances have been replaced with `core.Message{...}` struct literals, correctly mapping arguments to fields like `From`, `To`, `Nonce`, `Value`, `GasLimit`, gas price fields (`GasPrice`, `GasFeeCap`, `GasTipCap`), `Data`, `AccessList`. - Monetary and gas values are initialized as `*big.Int` per the `core.Message` definition. - Newer fields relevant to Cancun/EIP-4844 (`BlobGasFeeCap`, `BlobHashes`) and Nibiru-specific fields (`SkipAccountChecks`) are now correctly initialized. 2. **Revert `vm.PrecompiledContract` Interface for Nibiru Precompiles:** - Geth v1.13 simplified the `PrecompiledContract.Run` signature to `Run(input []byte)`. - This change breaks Nibiru's custom precompiles (e.g., Wasm) which require the `*vm.EVM` pointer to access `StateDB` and derive the `sdk.Context` needed for Cosmos SDK keeper interactions. - This commit *reverts* the interface definition within Nibiru's fork back to `Run(evm *vm.EVM, contract *vm.Contract, readonly bool)`. - The `Address() common.Address` method is also restored to the interface and implementations for use by the execution logic. - Standard precompile implementations included in this module have been adapted to match this reverted interface signature. - The `vm.RunPrecompiledContract` helper function is updated to pass the necessary `*vm.EVM`, `*vm.Contract`, and `readonly` context. 3. **Adopt `uint256` for VM Value/Balance Interactions:** - While `core.Message` retains `*big.Int`, the internal VM logic and `StateDB` methods (e.g., `vm.Call`, `vm.Create`, `AddBalance`, `SubBalance`, `Contract.value`) were updated upstream to use `*uint256.Int` (from `holiman/uint256`). - Code passing values into these VM contexts has been updated to perform the necessary `*big.Int` -> `*uint256.Int` conversions. - Added `holiman/uint256` as a direct dependency in `go.mod`. 4. **Replace `StateDB.PrepareAccessList`:** - The `PrepareAccessList` method was removed from the `vm.StateDB` interface upstream. - Calls have been replaced with the new, more comprehensive `StateDB.Prepare(rules, sender, ...)` method. 5. **Replace `evm.ActivePrecompiles` Method:** - The `ActivePrecompiles` method on the `vm.EVM` struct was removed. - Calls have been replaced with the standalone package function `vm.ActivePrecompiles(rules)`, passing the appropriate chain rules. These changes resolve the identified compatibility errors and ensure the EVM module integrates correctly with both the updated Geth core components and Nibiru's specific architecture and custom precompiles. commit 6370b96 Author: Unique-Divine <[email protected]> Date: Sat Apr 12 10:38:30 2025 -0500 fix(evm): Pass block timestamp to MakeSigner and refactor MsgEthereumTx field usage - Update all calls to `gethcore.MakeSigner` to include the block time as a Unix timestamp (seconds), using `evm.ParseBlockTimeUnixU64(ctx)`. - Add `ParseBlockTimeUnixU64` utility to extract block time from `sdk.Context` in a safe, reusable way. - Refactor usage of MsgEthereumTx field getters to use direct struct fields (`From`, `To`, `Value`, `GasFeeCap`, etc.), improving efficiency and clarity. - Enhance `ParseWeiAsMultipleOfMicronibi` to return `uint256.Int` and handle nil, zero, negative, and overflow edge cases with clear error messages. commit 0fad842 Author: Unique-Divine <[email protected]> Date: Sat Apr 12 10:38:30 2025 -0500 fix(evm): Pass block timestamp to MakeSigner and refactor MsgEthereumTx field usage - Update all calls to `gethcore.MakeSigner` to include the block time as a Unix timestamp (seconds), using `evm.ParseBlockTimeUnixU64(ctx)`. - Add `ParseBlockTimeUnixU64` utility to extract block time from `sdk.Context` in a safe, reusable way. - Refactor usage of MsgEthereumTx field getters to use direct struct fields (`From`, `To`, `Value`, `GasFeeCap`, etc.), improving efficiency and clarity. - Enhance `ParseWeiAsMultipleOfMicronibi` to return `uint256.Int` and handle nil, zero, negative, and overflow edge cases with clear error messages. commit 1002634 Author: Unique-Divine <[email protected]> Date: Sat Apr 12 03:21:08 2025 -0500 refactor(evm): add more compatibility the new geth StateDB inteface, updating AddBalance and SubBalance to use uint256 commit d69a8c3 Author: Unique-Divine <[email protected]> Date: Sat Apr 12 03:21:08 2025 -0500 refactor(evm): add more compatibility the new geth StateDB inteface, updating AddBalance and SubBalance to use uint256 commit d07093c Author: Unique-Divine <[email protected]> Date: Fri Apr 11 21:18:53 2025 -0500 feat: impl slog.Handler for geth v1.13. used in json-rpc These changes update Nibiru's integration with the `go-ethereum/log` package to align with its upstream migration to Go's standard structured logging library (`slog`). The previous logging setup in Nibiru, which relied on `go-ethereum/log`'s deprecated `FuncHandler` and `Record` types, was removed. 1. **Added `LogHandler`:** A new file `app/server/geth_log_handler.go` introduces the `LogHandler` type. This type implements the standard `slog.Handler` interface. Its primary role is to receive log records generated by Geth components (which now use `slog`) and translate them into corresponding calls on Nibiru's standard `cmtlog.Logger` (CometBFT logger). It correctly maps Geth/`slog` levels (including `Trace` and `Crit`) and formats log attributes for compatibility. 2. **Updated Initialization:** In `app/server/json_rpc.go`, the old `ethlog.Root().SetHandler(...)` block was replaced. The code now instantiates the new `LogHandler` (providing it the context logger `ctx.Logger.With("module", "geth")`), wraps it using `gethlog.NewLogger()`, and sets the result as the default logger for `go-ethereum` components via `gethlog.SetDefault()`. The primary reason for this refactor was the breaking change in the `go-ethereum/log` dependency, which deprecated its custom logging implementation in favor of Go's standard `slog`. These changes adapt Nibiru to the new `slog`-based API, ensuring that logs generated within embedded Geth components are correctly captured and processed by Nibiru's existing logging infrastructure (`cmtlog.Logger`). This maintains consistent logging behavior and compatibility with the updated dependency. commit 5937bbe Author: Unique-Divine <[email protected]> Date: Fri Apr 11 21:18:53 2025 -0500 feat: impl slog.Handler for geth v1.13. used in json-rpc These changes update Nibiru's integration with the `go-ethereum/log` package to align with its upstream migration to Go's standard structured logging library (`slog`). The previous logging setup in Nibiru, which relied on `go-ethereum/log`'s deprecated `FuncHandler` and `Record` types, was removed. 1. **Added `LogHandler`:** A new file `app/server/geth_log_handler.go` introduces the `LogHandler` type. This type implements the standard `slog.Handler` interface. Its primary role is to receive log records generated by Geth components (which now use `slog`) and translate them into corresponding calls on Nibiru's standard `cmtlog.Logger` (CometBFT logger). It correctly maps Geth/`slog` levels (including `Trace` and `Crit`) and formats log attributes for compatibility. 2. **Updated Initialization:** In `app/server/json_rpc.go`, the old `ethlog.Root().SetHandler(...)` block was replaced. The code now instantiates the new `LogHandler` (providing it the context logger `ctx.Logger.With("module", "geth")`), wraps it using `gethlog.NewLogger()`, and sets the result as the default logger for `go-ethereum` components via `gethlog.SetDefault()`. The primary reason for this refactor was the breaking change in the `go-ethereum/log` dependency, which deprecated its custom logging implementation in favor of Go's standard `slog`. These changes adapt Nibiru to the new `slog`-based API, ensuring that logs generated within embedded Geth components are correctly captured and processed by Nibiru's existing logging infrastructure (`cmtlog.Logger`). This maintains consistent logging behavior and compatibility with the updated dependency. commit ca3c821 Author: Unique-Divine <[email protected]> Date: Fri Apr 11 19:03:04 2025 -0500 wip!: start with a local brute force jump to a geth v1.13.15 with no changes commit 10010d6 Author: Unique-Divine <[email protected]> Date: Fri Apr 11 19:03:04 2025 -0500 wip!: start with a local brute force jump to a geth v1.13.15 with no changes
1 parent f80f4a9 commit 00e77d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1216
-585
lines changed

.github/workflows/e2e-evm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Go
3131
uses: actions/setup-go@v5
3232
with:
33-
go-version: 1.24
33+
go-version: 1.22
3434
cache: true
3535

3636
# Use GitHub actions output paramters to get go paths. For more info, see

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/setup-go@v5
4141
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
4242
with:
43-
go-version: 1.24
43+
go-version: 1.22
4444
cache: false # the golangci-lint action already caches for us (https://github.com/golangci/golangci-lint-action#performance)
4545

4646
# Use GitHub actions output paramters to get go paths. For more info, see

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
4242
uses: actions/setup-go@v5
4343
with:
44-
go-version: 1.24
44+
go-version: 1.22
4545
cache: true
4646

4747
# Use GitHub actions output paramters to get go paths. For more info, see

.github/workflows/simulation-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v4
1717
- uses: actions/setup-go@v5
1818
with:
19-
go-version: 1.24
19+
go-version: 1.22
2020
cache: true
2121
- name: TestAppStateDeterminism
2222
run: |
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-go@v5
3030
with:
31-
go-version: 1.24
31+
go-version: 1.22
3232
cache: true
3333
- name: TestFullAppSimulation
3434
run: |
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/checkout@v4
4141
- uses: actions/setup-go@v5
4242
with:
43-
go-version: 1.24
43+
go-version: 1.22
4444
cache: true
4545
- name: TestAppImportExport
4646
run: |
@@ -52,7 +52,7 @@ jobs:
5252
- uses: actions/checkout@v4
5353
- uses: actions/setup-go@v5
5454
with:
55-
go-version: 1.24
55+
go-version: 1.22
5656
cache: true
5757
- name: TestAppSimulationAfterImport
5858
run: |

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
4040
uses: actions/setup-go@v5
4141
with:
42-
go-version: 1.24
42+
go-version: 1.22
4343
cache: true
4444

4545
# Use GitHub actions output paramters to get go paths. For more info, see
@@ -94,7 +94,7 @@ jobs:
9494
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'
9595
uses: actions/setup-go@v5
9696
with:
97-
go-version: 1.24
97+
go-version: 1.22
9898

9999
- name: "Install just"
100100
if: steps.check_nibiru_go.outputs.nibiru-go == 'true'

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4141
## Unreleased
4242

4343
- [#2270](https://github.com/NibiruChain/nibiru/pull/2270) - refactor(app): remove private keeper struct and transient/mem keys from app
44+
- [#2274](https://github.com/NibiruChain/nibiru/pull/2274) - feat(evm)!: update to geth v1.13 with EIP-1153, PRECOMPILE_ADDRS, and transient storage support
4445

4546
## v2.3.0
4647

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG src=base
22

33
# ---------- Build Stage ----------
4-
FROM golang:1.24 AS build-base
4+
FROM golang:1.22 AS build-base
55

66
WORKDIR /nibiru
77

@@ -74,4 +74,4 @@ RUN apk --no-cache add ca-certificates
7474
COPY --from=build-source /root/nibid /usr/local/bin/nibid
7575

7676
ENTRYPOINT ["nibid"]
77-
CMD ["start"]
77+
CMD ["start"]

api/nibiru/sudo/v1/event.pulsar.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/evmante/evmante_can_transfer.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ func (ctd CanTransferDecorator) AnteHandle(
2525
ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler,
2626
) (sdk.Context, error) {
2727
ethCfg := evm.EthereumConfig(ctd.EVMKeeper.EthChainID(ctx))
28-
signer := gethcore.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight()))
28+
signer := gethcore.MakeSigner(
29+
ethCfg,
30+
big.NewInt(ctx.BlockHeight()),
31+
evm.ParseBlockTimeUnixU64(ctx),
32+
)
2933

3034
for _, msg := range tx.GetMsgs() {
3135
msgEthTx, ok := msg.(*evm.MsgEthereumTx)
@@ -57,25 +61,25 @@ func (ctd CanTransferDecorator) AnteHandle(
5761
return ctx, errors.Wrapf(
5862
sdkerrors.ErrInsufficientFee,
5963
"gas fee cap (wei) less than block base fee (wei); (%s < %s)",
60-
evmMsg.GasFeeCap(), baseFeeWeiPerGas,
64+
evmMsg.GasFeeCap, baseFeeWeiPerGas,
6165
)
6266
}
6367

6468
// check that caller has enough balance to cover asset transfer for **topmost** call
6569
// NOTE: here the gas consumed is from the context with the infinite gas meter
6670

67-
if evmMsg.Value().Sign() > 0 {
68-
nibiruAddr := eth.EthAddrToNibiruAddr(evmMsg.From())
71+
if evmMsg.Value.Sign() > 0 {
72+
nibiruAddr := eth.EthAddrToNibiruAddr(evmMsg.From)
6973
balanceNative := ctd.Bank.GetBalance(ctx, nibiruAddr, evm.EVMBankDenom).Amount.BigInt()
7074
balanceWei := evm.NativeToWei(balanceNative)
7175

72-
if balanceWei.Cmp(evmMsg.Value()) < 0 {
76+
if balanceWei.Cmp(evmMsg.Value) < 0 {
7377
return ctx, errors.Wrapf(
7478
sdkerrors.ErrInsufficientFunds,
7579
"failed to transfer %s wei ( balance=%s )from address %s using the EVM block context transfer function",
76-
evmMsg.Value(),
80+
evmMsg.Value,
7781
balanceWei,
78-
evmMsg.From(),
82+
evmMsg.From,
7983
)
8084
}
8185
}

app/evmante/evmante_gas_consume_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (s *TestSuite) TestAnteDecEthGasConsume() {
2626
beforeTxSetup: func(deps *evmtest.TestDeps, sdb *statedb.StateDB) {
2727
gasLimit := happyGasLimit()
2828
balance := evm.NativeToWei(new(big.Int).Add(gasLimit, big.NewInt(100)))
29-
sdb.AddBalance(deps.Sender.EthAddr, balance)
29+
sdb.AddBalanceSigned(deps.Sender.EthAddr, balance)
3030
},
3131
txSetup: evmtest.HappyCreateContractTx,
3232
wantErr: "",
@@ -47,7 +47,7 @@ func (s *TestSuite) TestAnteDecEthGasConsume() {
4747
beforeTxSetup: func(deps *evmtest.TestDeps, sdb *statedb.StateDB) {
4848
gasLimit := happyGasLimit()
4949
balance := evm.NativeToWei(new(big.Int).Add(gasLimit, big.NewInt(100)))
50-
sdb.AddBalance(deps.Sender.EthAddr, balance)
50+
sdb.AddBalanceSigned(deps.Sender.EthAddr, balance)
5151
},
5252
txSetup: evmtest.HappyCreateContractTx,
5353
wantErr: "exceeds block gas limit (0)",

0 commit comments

Comments
 (0)