Skip to content

(feat)!: upgrade to geth 1.13 #181

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

Merged
merged 156 commits into from
May 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
78dff01
feat: remove authz dependency from precompiles except for erc20
cloudgray Apr 9, 2025
50569db
wip: feat(precompiles): remove x/authz dependency
cloudgray Apr 9, 2025
b4f994b
test(precompiles): remove x/authz dependent test cases
cloudgray Apr 9, 2025
918ddd4
feat: remove x/authz dependency from x/erc20 and werc20 precompile
cloudgray Apr 11, 2025
925267f
fix(precompiles): modify contract interface and test contracts
cloudgray Apr 15, 2025
849ff2a
fix(precompiles): remove unused authz related types and test utils
cloudgray Apr 15, 2025
8446ab7
fix(precompiles): modify integration test of staking precompile
cloudgray Apr 15, 2025
9dd8c3d
feat(x/erc20): add allowance state (#90)
cloudgray Apr 21, 2025
8f2979f
bump geth to v1.13
GAtom22 Apr 21, 2025
ef6bdaf
remove gomod2nix file
GAtom22 Apr 21, 2025
6c64a94
update comment
GAtom22 Apr 21, 2025
76152a6
wip: test: modify erc20 precompile tests
cloudgray Apr 22, 2025
bc4c596
test: modify erc20 precompile tests
cloudgray Apr 22, 2025
5ad9aa0
test(precompiles): fix integration test
cloudgray Apr 22, 2025
aa54bdc
refactor(precompiles): remove authz dependent naming and comments
cloudgray Apr 22, 2025
323c207
wip: test(x/vm): modify flashLoan test
cloudgray Apr 22, 2025
5dbb00c
test(x/vm): fix flashLoan integration test
cloudgray Apr 22, 2025
cdc53ad
Merge branch 'main' into feat/remove-authz-from-precompiles
cloudgray Apr 22, 2025
244863f
fix: merge conflict
cloudgray Apr 22, 2025
019c20f
chore: fix lint
cloudgray Apr 23, 2025
3cf5f66
chore: fix lint
cloudgray Apr 23, 2025
aacfa50
feat: remove authz keeper dependency from x/erc20 keeper
cloudgray Apr 23, 2025
9f8729d
chore: fix lint
cloudgray Apr 23, 2025
12cb693
fix: increase consensusVersion of x/erc20 module
cloudgray Apr 23, 2025
b6108b2
chore: udpate CHANGELOG.md
cloudgray Apr 23, 2025
512a9a2
chore: update CHANGELOG.md
cloudgray Apr 23, 2025
f9d8887
chore: add comments to StakingCaller solidity contract
cloudgray Apr 23, 2025
fe60fa9
fix govulncheck failure
vladjdk Apr 26, 2025
567f4d8
lint fix
vladjdk Apr 26, 2025
3633be5
feat: x/precisebank module
dudong2 Apr 13, 2025
8557624
test: fix unit tests
dudong2 Apr 14, 2025
3ca1382
test: fix markdown lint
dudong2 Apr 14, 2025
2d9ef26
test: apply gci for x/precisebank
dudong2 Apr 14, 2025
1d51900
test: fix markdown lint
dudong2 Apr 14, 2025
fb186ed
test: fix lint
dudong2 Apr 14, 2025
5083839
feat: generalize decimals
dudong2 Apr 14, 2025
c4622ce
feat: add query cli
dudong2 Apr 14, 2025
fefeade
feat: generalize conversion factor
dudong2 Apr 15, 2025
5fc56eb
feat: add invariant about total supply
dudong2 Apr 15, 2025
0dd0703
chore: move config related files to evmd/config
dudong2 Apr 17, 2025
7982397
feat: store coin info (denom, conversion factor)
dudong2 Apr 17, 2025
67f023b
chore: remove chain specific logic from x/vm/keeper/keeper.go
dudong2 Apr 17, 2025
e4924a3
test: fix lint
dudong2 Apr 17, 2025
ba99fdb
chore: revert go.mod
dudong2 Apr 17, 2025
25ad411
test: add fuzz test
dudong2 Apr 17, 2025
2f02e25
test: fix fuzz test
dudong2 Apr 17, 2025
fc0898b
test: fix test_find_solidity_files
dudong2 Apr 17, 2025
9d27934
test: fix lint for python file
dudong2 Apr 17, 2025
1a00eec
feat: use precisebank module from precompile
dudong2 Apr 19, 2025
a0f13ce
Revert "feat: store coin info (denom, conversion factor)"
dudong2 Apr 19, 2025
8933a29
chore: add ConversionFactorVal for genesis block
dudong2 Apr 19, 2025
065f9b9
chore: remove unused proto import
dudong2 Apr 19, 2025
1d98d07
test: add generalized decimal tests
dudong2 Apr 21, 2025
7fd6c3f
test: add random value test with multi decimals
dudong2 Apr 22, 2025
028ba44
test: add contract interaction test
dudong2 Apr 22, 2025
acf3eb5
feat: remove flooring logic
dudong2 Apr 23, 2025
811a972
Revert "feat: remove flooring logic"
dudong2 Apr 24, 2025
71bfd83
feat: change logic from flooring to precisebank
dudong2 Apr 24, 2025
ef4a631
Revert "chore: move config related files to evmd/config"
dudong2 Apr 24, 2025
226b3ba
fix: node start
dudong2 Apr 25, 2025
52d7a1b
refactor: bank wrapper in x/vm scaling codes
dudong2 Apr 25, 2025
2d4a8cf
test: fix lint
dudong2 Apr 25, 2025
f0308f8
chore: cache EVMCoin infos before ResetTestConfig
dudong2 Apr 26, 2025
d5b5451
fix: return from sendExtendedCoins, if from == to
dudong2 Apr 26, 2025
55cf3f7
test: add SEED for deterministic random test
dudong2 Apr 26, 2025
ea4e94e
test: add random evm coin transfer with random gas
dudong2 Apr 26, 2025
73eb1c6
test: fix lint
dudong2 Apr 26, 2025
82aef4e
test: revert TestEvmAnteTestSuite test cases
dudong2 Apr 26, 2025
17fc32e
chore: revert useless changes
dudong2 Apr 26, 2025
e4dc90b
chore: remove evmtype constant dependency from precisebank module
dudong2 Apr 26, 2025
509fcd1
chore: register precisebank query cli to AppModuleBasic
dudong2 Apr 26, 2025
1553be2
test: remove useless configurator setting
dudong2 Apr 26, 2025
5e03608
fix: build
dudong2 Apr 26, 2025
5c26eea
fix: lint
dudong2 Apr 26, 2025
cbcb22c
feat: add extended denom to 18 decimals
dudong2 Apr 27, 2025
5e29b30
refactor: ConversionFactorVal -> Decimals
dudong2 Apr 27, 2025
0339a91
chore: sdkmath -> math
dudong2 Apr 27, 2025
bc949fc
chore: revert useless changes
dudong2 Apr 27, 2025
df17bb3
chore: remove useless check for extended denom
dudong2 Apr 27, 2025
49d18f0
refactor: simplify GetBalance of BankWrapper
dudong2 Apr 27, 2025
c736fe3
test: restore removed test
dudong2 Apr 27, 2025
8b39553
chore: remove useless decimal validation check
dudong2 Apr 27, 2025
82eaea7
chore: fix condition more clearly
dudong2 Apr 27, 2025
22bd4ba
docs: CHANGELOG.md
dudong2 Apr 27, 2025
c9c6073
chore: use only precisebank module for evm module and precompile
dudong2 Apr 27, 2025
fc6ee9a
Merge pull request #1 from GAtom22/GAtom22/bump-geth
suhailkakar Apr 28, 2025
d69151a
fix: typo
cloudgray Apr 28, 2025
792ded1
fix: remove duplicated test case
cloudgray Apr 28, 2025
33d63f5
fix: wrong args for ApprovalEvent
cloudgray Apr 28, 2025
43ca981
fix: wrong error message for test
cloudgray Apr 28, 2025
aba5934
refactor: refine code for staking precompile
cloudgray Apr 28, 2025
0796533
Merge branch 'main' into feat/remove-authz-from-precompiles
cloudgray Apr 28, 2025
a0c5f93
update geth dep
GAtom22 Apr 28, 2025
38133c5
Merge pull request #2 from GAtom22/update-dep
suhailkakar Apr 28, 2025
e2d5204
Merge branch 'main' into dudong2/feat/precisebank
dudong2 Apr 29, 2025
27e21c1
Merge branch 'main' into feat/remove-authz-from-precompiles
cloudgray Apr 29, 2025
021c4c2
fix: merge conflicts
cloudgray Apr 29, 2025
144cd48
chore: add extended denom for TestChainID
dudong2 Apr 29, 2025
dc225a2
refactor: change file name
cloudgray Apr 29, 2025
f30d239
refactor(testutil): move constants for test to testutil/constants pac…
cloudgray Apr 29, 2025
378a240
refactor(erc20): InitGenesis
cloudgray Apr 29, 2025
03a59a3
test(erc20): add genesis test case
cloudgray Apr 29, 2025
efc0ec0
fix(erc20): revert consensusVersion change
cloudgray Apr 29, 2025
c39ffaa
refactor(erc20): refactor keeper methods of Allowance state
cloudgray Apr 29, 2025
25f782f
test(testutil): fix test case and lint
cloudgray Apr 29, 2025
bff9789
wip: fix(precompiles/erc20): remove incompatible logic with ERC20 Spe…
cloudgray Apr 29, 2025
783f540
refactor: invariants
dudong2 Apr 29, 2025
619e6ec
chore: add comments for precisebank
dudong2 Apr 29, 2025
ee976de
refactor: remove hardcoded values in precisebanktypes
dudong2 Apr 29, 2025
97f1baf
test: set evm coin info explicitly
dudong2 Apr 29, 2025
9516f67
refactor: rename funcs
dudong2 Apr 29, 2025
b92fb93
chore: remove deprecated interface check
dudong2 Apr 30, 2025
4ebbe5d
docs: add thanks message to kava
dudong2 Apr 30, 2025
3569ed3
test: remove debug print
dudong2 Apr 30, 2025
c4c2a77
chore: remove TotalFractionalBalances query
dudong2 Apr 30, 2025
67c496b
fix: add Approval event to transferFrom method and fix integration tests
cloudgray Apr 30, 2025
d2fe36c
fix: FlashLoan.sol contract
cloudgray Apr 30, 2025
aacfc4c
fix(x/erc20): allowance methods and test cases
cloudgray Apr 30, 2025
7f651ae
refactor: rename funcs(ChangeEvmCoinDenomFrom18Decimals -> ConvertEvm…
dudong2 Apr 30, 2025
d546ec2
test: fix lint
dudong2 Apr 30, 2025
97c5cc0
Revert "test: fix lint"
dudong2 Apr 30, 2025
9b9f9b1
test: rename test names
dudong2 Apr 30, 2025
b7e8df1
test(precompiles): add test cases for erc20 precompile
cloudgray Apr 30, 2025
59a6e40
Merge branch 'main' into feat/remove-authz-from-precompiles
cloudgray Apr 30, 2025
ac0e1d0
test: add vesting test
dudong2 Apr 30, 2025
ca2a17b
chore: remove GetAllBalances from bank keeper interface
dudong2 May 1, 2025
ee77117
Merge branch 'main' into vlad/fix-govulncheck-daily
vladjdk May 2, 2025
579a5d1
do dependency review regardless of diff
vladjdk May 2, 2025
80cd7cd
Merge remote-tracking branch 'origin/feat/remove-authz-from-precompil…
vladjdk May 2, 2025
f7d3275
Merge branch 'dudong2/feat/precisebank' into audit/scope
vladjdk May 2, 2025
f932846
Merge branch 'vlad/fix-govulncheck-daily' into audit/scope
vladjdk May 2, 2025
3b0e3d6
fix: apply patch ISA-2025-004: Partial Precompile State Writes
tgntr May 16, 2025
2d65df5
revert python3
tgntr May 16, 2025
a8a20a4
Merge pull request #3 from tgntr/tgntr/ISA-2025-004--Partial-Precompi…
suhailkakar May 16, 2025
33b678c
Merge branch 'main' into audit/scope
vladjdk May 16, 2025
b1ec545
Add codecov and instructions
vladjdk May 16, 2025
2c02a34
append
vladjdk May 16, 2025
60f5fe8
lint
vladjdk May 16, 2025
d34c0bc
Merge branch 'vlad/update-readme' into audit/scope
vladjdk May 16, 2025
9c36dd8
Merge remote-tracking branch 'origin/main' into audit/scope
vladjdk May 17, 2025
471f50d
feat: eth_getBlockReceipts
tgntr May 20, 2025
00e8bcd
Merge pull request #4 from tgntr/tgntr/eth_getBlockReceipts
suhailkakar May 20, 2025
21f6b4c
update to cosmos geth
vladjdk May 23, 2025
60713bf
Merge remote-tracking branch 'origin/main' into release/v0.1.x-tac
vladjdk May 23, 2025
ae9b162
lints
vladjdk May 23, 2025
6d36416
properly handle overflows on big int to uint256 conversion
vladjdk May 23, 2025
a404a63
remove config from params on genesis
vladjdk May 23, 2025
fb26417
safeguard gas refund overflows
vladjdk May 23, 2025
9ea0892
more lints
vladjdk May 23, 2025
9b91d97
remove migrations
vladjdk May 23, 2025
e5f33e9
finish removing migrations
vladjdk May 23, 2025
0fd96fe
remove migrations from module
vladjdk May 23, 2025
a4cda5d
remove comments
vladjdk May 23, 2025
e19868a
add todo for evm equivalence
vladjdk May 23, 2025
76e40dd
Merge branch 'audit/scope' into release/v0.1.x-tac
vladjdk May 25, 2025
234b62f
redo check
vladjdk May 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ contracts/@openzeppelin/*
# Build files
evmd/build/

build/
build/
2 changes: 1 addition & 1 deletion ante/evm/05_signature_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (esvd EthSigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, s
evmParams := esvd.evmKeeper.GetParams(ctx)
ethCfg := evmtypes.GetEthChainConfig()
blockNum := big.NewInt(ctx.BlockHeight())
signer := ethtypes.MakeSigner(ethCfg, blockNum)
signer := ethtypes.MakeSigner(ethCfg, blockNum, uint64(ctx.BlockTime().Unix())) //#nosec G115 -- int overflow is not a concern here
allowUnprotectedTxs := evmParams.GetAllowUnprotectedTxs()

msgs := tx.GetMsgs()
Expand Down
2 changes: 1 addition & 1 deletion ante/evm/06_account_verification.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func VerifyAccountBalance(
account = statedb.NewEmptyAccount()
}

if err := keeper.CheckSenderBalance(sdkmath.NewIntFromBigInt(account.Balance), txData); err != nil {
if err := keeper.CheckSenderBalance(sdkmath.NewIntFromBigInt(account.Balance.ToBig()), txData); err != nil {
return errorsmod.Wrap(err, "failed to check sender balance")
}

Expand Down
17 changes: 11 additions & 6 deletions ante/evm/07_can_transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/ethereum/go-ethereum/core"

anteinterfaces "github.com/cosmos/evm/ante/interfaces"
"github.com/cosmos/evm/utils"
"github.com/cosmos/evm/x/vm/statedb"
evmtypes "github.com/cosmos/evm/x/vm/types"

Expand All @@ -25,11 +26,11 @@ func CanTransfer(
params evmtypes.Params,
isLondon bool,
) error {
if isLondon && msg.GasFeeCap().Cmp(baseFee) < 0 {
if isLondon && msg.GasFeeCap.Cmp(baseFee) < 0 {
return errorsmod.Wrapf(
errortypes.ErrInsufficientFee,
"max fee per gas less than block base fee (%s < %s)",
msg.GasFeeCap(), baseFee,
msg.GasFeeCap, baseFee,
)
}

Expand All @@ -41,16 +42,20 @@ func CanTransfer(
}

stateDB := statedb.New(ctx, evmKeeper, statedb.NewEmptyTxConfig(common.BytesToHash(ctx.HeaderHash())))
evm := evmKeeper.NewEVM(ctx, msg, cfg, evmtypes.NewNoOpTracer(), stateDB)
evm := evmKeeper.NewEVM(ctx, msg, cfg, nil, stateDB)

// check that caller has enough balance to cover asset transfer for **topmost** call
// NOTE: here the gas consumed is from the context with the infinite gas meter
if msg.Value().Sign() > 0 && !evm.Context.CanTransfer(stateDB, msg.From(), msg.Value()) {
convertedValue, err := utils.Uint256FromBigInt(msg.Value)
if err != nil {
return err
}
if msg.Value.Sign() > 0 && !evm.Context.CanTransfer(stateDB, msg.From, convertedValue) {
return errorsmod.Wrapf(
errortypes.ErrInsufficientFunds,
"failed to transfer %s from address %s using the EVM block context transfer function",
msg.Value(),
msg.From(),
msg.Value,
msg.From,
)
}

Expand Down
4 changes: 2 additions & 2 deletions ante/evm/07_can_transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (suite *EvmAnteTestSuite) TestCanTransfer() {
evmParams, err := grpcHandler.GetEvmParams()
suite.Require().NoError(err)
ctx := unitNetwork.GetContext()
signer := gethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight()))
signer := gethtypes.MakeSigner(ethCfg, big.NewInt(ctx.BlockHeight()), uint64(ctx.BlockTime().Unix())) //#nosec G115 -- int overflow is not a concern here
txArgs, err := txFactory.GenerateDefaultTxTypeArgs(senderKey.Addr, suite.ethTxType)
suite.Require().NoError(err)
txArgs.Amount = big.NewInt(100)
Expand All @@ -95,7 +95,7 @@ func (suite *EvmAnteTestSuite) TestCanTransfer() {
err = evm.CanTransfer(
unitNetwork.GetContext(),
unitNetwork.App.EVMKeeper,
coreMsg,
*coreMsg,
baseFeeResp.BaseFee.BigInt(),
evmParams.Params,
tc.isLondon,
Expand Down
5 changes: 3 additions & 2 deletions ante/evm/ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
ethparams "github.com/ethereum/go-ethereum/params"
"github.com/holiman/uint256"

testconstants "github.com/cosmos/evm/testutil/constants"
utiltx "github.com/cosmos/evm/testutil/tx"
Expand Down Expand Up @@ -1089,7 +1090,7 @@ func (suite *AnteTestSuite) TestAnteHandlerWithDynamicTxFee() {
suite.GetNetwork().App.AccountKeeper.SetAccount(ctx, acc)

ctx = ctx.WithIsCheckTx(tc.checkTx).WithIsReCheckTx(tc.reCheckTx)
err := suite.GetNetwork().App.EVMKeeper.SetBalance(ctx, addr, big.NewInt((ethparams.InitialBaseFee+10)*100000))
err := suite.GetNetwork().App.EVMKeeper.SetBalance(ctx, addr, uint256.NewInt((ethparams.InitialBaseFee+10)*100000))
suite.Require().NoError(err)

anteHandler := suite.GetAnteHandler()
Expand Down Expand Up @@ -1216,7 +1217,7 @@ func (suite *AnteTestSuite) TestAnteHandlerWithParams() {
suite.GetNetwork().App.AccountKeeper.SetAccount(ctx, acc)

ctx = ctx.WithIsCheckTx(true)
err := suite.GetNetwork().App.EVMKeeper.SetBalance(ctx, addr, big.NewInt((ethparams.InitialBaseFee+10)*100000))
err := suite.GetNetwork().App.EVMKeeper.SetBalance(ctx, addr, uint256.NewInt((ethparams.InitialBaseFee+10)*100000))
suite.Require().NoError(err)

anteHandler := suite.GetAnteHandler()
Expand Down
3 changes: 2 additions & 1 deletion ante/evm/mono_decorator.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (md MonoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
if err := CanTransfer(
ctx,
md.evmKeeper,
coreMsg,
*coreMsg,
decUtils.BaseFee,
decUtils.EvmParams,
decUtils.Rules.IsLondon,
Expand All @@ -177,6 +177,7 @@ func (md MonoDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, ne
decUtils.BaseFee,
decUtils.Rules.IsHomestead,
decUtils.Rules.IsIstanbul,
decUtils.Rules.IsShanghai,
ctx.IsCheckTx(),
)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions ante/evm/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewMonoDecoratorUtils(
ethCfg := evmtypes.GetEthChainConfig()
evmDenom := evmtypes.GetEVMCoinDenom()
blockHeight := big.NewInt(ctx.BlockHeight())
rules := ethCfg.Rules(blockHeight, true)
rules := ethCfg.Rules(blockHeight, true, uint64(ctx.BlockTime().Unix())) //#nosec G115 -- int overflow is not a concern here
baseFee := ek.GetBaseFee(ctx)

if rules.IsLondon && baseFee == nil {
Expand All @@ -67,7 +67,7 @@ func NewMonoDecoratorUtils(
return &DecoratorUtils{
EvmParams: evmParams,
Rules: rules,
Signer: ethtypes.MakeSigner(ethCfg, blockHeight),
Signer: ethtypes.MakeSigner(ethCfg, blockHeight, uint64(ctx.BlockTime().Unix())), //#nosec G115 -- int overflow is not a concern here
BaseFee: baseFee,
MempoolMinGasPrice: mempoolMinGasPrice,
GlobalMinGasPrice: globalMinGasPrice,
Expand Down
8 changes: 4 additions & 4 deletions ante/evm/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package evm_test
import (
"encoding/json"
"fmt"
"math/big"
"time"

"github.com/ethereum/go-ethereum/common"
"github.com/holiman/uint256"

"github.com/cosmos/evm/ante/testutils"
"github.com/cosmos/evm/crypto/ethsecp256k1"
Expand Down Expand Up @@ -448,7 +448,7 @@ func (suite *AnteTestSuite) generateMultikeySignatures(signMode signing.SignMode
}

// RegisterAccount creates an account with the keeper and populates the initial balance
func (suite *AnteTestSuite) RegisterAccount(pubKey cryptotypes.PubKey, balance *big.Int) {
func (suite *AnteTestSuite) RegisterAccount(pubKey cryptotypes.PubKey, balance *uint256.Int) {
ctx := suite.GetNetwork().GetContext()

acc := suite.GetNetwork().App.AccountKeeper.NewAccountWithAddress(ctx, sdk.AccAddress(pubKey.Address()))
Expand Down Expand Up @@ -513,7 +513,7 @@ func (suite *AnteTestSuite) CreateTestSignedMultisigTx(privKeys []cryptotypes.Pr
numKeys := len(privKeys)
multiKey := kmultisig.NewLegacyAminoPubKey(numKeys, pubKeys)

suite.RegisterAccount(multiKey, big.NewInt(10000000000))
suite.RegisterAccount(multiKey, uint256.NewInt(10000000000))

txBuilder := suite.createBaseTxBuilder(msg, gas)

Expand Down Expand Up @@ -546,7 +546,7 @@ func (suite *AnteTestSuite) CreateTestSignedMultisigTx(privKeys []cryptotypes.Pr
func (suite *AnteTestSuite) CreateTestSingleSignedTx(privKey cryptotypes.PrivKey, signMode signing.SignMode, msg sdk.Msg, chainID string, gas uint64, signType string) client.TxBuilder {
pubKey := privKey.PubKey()

suite.RegisterAccount(pubKey, big.NewInt(10_000_000_000))
suite.RegisterAccount(pubKey, uint256.NewInt(10_000_000_000))

txBuilder := suite.createBaseTxBuilder(msg, gas)

Expand Down
3 changes: 2 additions & 1 deletion ante/interfaces/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/vm"
"github.com/holiman/uint256"

feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
"github.com/cosmos/evm/x/vm/statedb"
Expand All @@ -23,7 +24,7 @@ type EVMKeeper interface {

NewEVM(ctx sdk.Context, msg core.Message, cfg *statedb.EVMConfig, tracer vm.EVMLogger, stateDB vm.StateDB) *vm.EVM
DeductTxCostsFromUserBalance(ctx sdk.Context, fees sdk.Coins, from common.Address) error
GetBalance(ctx sdk.Context, addr common.Address) *big.Int
GetBalance(ctx sdk.Context, addr common.Address) *uint256.Int
ResetTransientGasUsed(ctx sdk.Context)
GetTxIndexTransient(ctx sdk.Context) uint64
GetParams(ctx sdk.Context) evmtypes.Params
Expand Down
4 changes: 2 additions & 2 deletions ante/testutils/testutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ func (suite *AnteTestSuite) SetupTest() {
chainConfig.ArrowGlacierBlock = &maxInt
chainConfig.GrayGlacierBlock = &maxInt
chainConfig.MergeNetsplitBlock = &maxInt
chainConfig.ShanghaiBlock = &maxInt
chainConfig.CancunBlock = &maxInt
chainConfig.ShanghaiTime = &maxInt
chainConfig.CancunTime = &maxInt
}

// get the denom and decimals set when initialized the chain
Expand Down
Loading
Loading