Skip to content

Commit 3c6f681

Browse files
committed
Merge remote-tracking branch 'origin/audit-fixes' into merge-350
2 parents 95fa308 + f96eed0 commit 3c6f681

19 files changed

Lines changed: 132 additions & 67 deletions

app/app.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ import (
115115
"github.com/cosmos/evm/x/feemarket"
116116
feemarketkeeper "github.com/cosmos/evm/x/feemarket/keeper"
117117
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
118-
transfer "github.com/cosmos/evm/x/ibc/transfer"
119-
ibctransferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper"
120118
"github.com/cosmos/evm/x/vm"
121119

122120
// _ "github.com/ethereum/go-ethereum/core/tracers/js"
@@ -142,6 +140,8 @@ import (
142140
icahostkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/keeper"
143141
icahosttypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/host/types"
144142
icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
143+
transfer "github.com/cosmos/ibc-go/v10/modules/apps/transfer"
144+
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
145145
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
146146
ibc "github.com/cosmos/ibc-go/v10/modules/core"
147147
ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types" //nolint:staticcheck
@@ -856,17 +856,21 @@ func NewChainApp(
856856
app.IBCKeeper.ChannelKeeper, // Use ChannelKeeper as ICS4Wrapper
857857
)
858858

859-
// Create Transfer Keepers : upgraded for ibc-go v10
859+
// Create Transfer Keepers : upgraded for ibc-go v10.
860+
// cosmos/evm v0.6.0 removed its custom x/ibc/transfer wrapper, so this now uses
861+
// the standard ibc-go transfer keeper. ERC-20<>IBC conversion that the custom
862+
// keeper used to perform (it took an Erc20Keeper arg) is now done by the
863+
// erc20 IBC middleware wrapped around the transfer stack below.
860864
app.TransferKeeper = ibctransferkeeper.NewKeeper(
861865
appCodec,
862866
runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]),
867+
nil, // legacySubspace (no params subspace)
863868
app.RatelimitKeeper, // ICS4Wrapper
864869
//app.IBCFeeKeeper,
865870
app.IBCKeeper.ChannelKeeper,
866871
app.MsgServiceRouter(),
867872
app.AccountKeeper,
868873
app.BankKeeper,
869-
app.Erc20Keeper,
870874
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
871875
)
872876

@@ -967,6 +971,10 @@ func NewChainApp(
967971
// Create Transfer Stack
968972
var transferStack porttypes.IBCModule
969973
transferStack = transfer.NewIBCModule(app.TransferKeeper)
974+
// ERC-20 middleware converts IBC vouchers to/from ERC-20 tokens. In cosmos/evm
975+
// v0.6.0 this replaced the ERC-20 conversion that the removed custom
976+
// x/ibc/transfer keeper performed in its OnRecvPacket/msg-server override.
977+
transferStack = erc20.NewIBCMiddleware(app.Erc20Keeper, transferStack)
970978
// callbacks wraps the transfer stack as its base app, and uses PacketForwardKeeper as the ICS4Wrapper
971979
// i.e. packet-forward-middleware is higher on the stack and sits between callbacks and the ibc channel keeper
972980
// Since this is the lowest level middleware of the transfer stack, it should be the first entrypoint for transfer keeper's

app/precompiles.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
slashingprecompile "github.com/cosmos/evm/precompiles/slashing"
2121
stakingprecompile "github.com/cosmos/evm/precompiles/staking"
2222
erc20Keeper "github.com/cosmos/evm/x/erc20/keeper"
23-
transferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper"
23+
transferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
2424
channelkeeper "github.com/cosmos/ibc-go/v10/modules/core/04-channel/keeper"
2525
"github.com/ethereum/go-ethereum/common"
2626
"github.com/ethereum/go-ethereum/core/vm"
@@ -113,6 +113,7 @@ func NewAvailableStaticPrecompiles(
113113
stakingKeeper,
114114
transferKeeper,
115115
channelKeeper,
116+
erc20Kpr,
116117
)
117118

118119
bankPrecompile := bankprecompile.NewPrecompile(bankKeeper, erc20Kpr)

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ replace (
1717
cosmossdk.io/x/upgrade => cosmossdk.io/x/upgrade v0.1.4
1818
github.com/CosmWasm/wasmd => github.com/CosmWasm/wasmd v0.55.0 // Keep v0.55.0
1919
github.com/cosmos/cosmos-sdk => github.com/cosmos/cosmos-sdk v0.50.10 // Use stable v0.50.10
20-
github.com/cosmos/evm => github.com/pushchain/evm v1.0.0-rc2.0.20260616081105-96231e7a76c0
20+
github.com/cosmos/evm => github.com/pushchain/evm v1.0.0-rc2.0.20260826155700-89c7e52be541
2121
github.com/ethereum/go-ethereum => github.com/cosmos/go-ethereum v0.0.0-20250806193535-2fc7571efa91
2222
github.com/spf13/viper => github.com/spf13/viper v1.17.0
2323
github.com/strangelove-ventures/tokenfactory => github.com/strangelove-ventures/tokenfactory v0.50.7-wasmvm2
@@ -56,7 +56,7 @@ require (
5656
cosmossdk.io/x/tx v1.2.0-alpha.1
5757
cosmossdk.io/x/upgrade v0.2.0
5858
github.com/CosmWasm/wasmd v0.51.0
59-
github.com/cometbft/cometbft v0.38.19
59+
github.com/cometbft/cometbft v0.38.21
6060
github.com/cosmos/cosmos-db v1.1.3
6161
github.com/cosmos/cosmos-proto v1.0.0-beta.5
6262
github.com/cosmos/cosmos-sdk v0.54.0-alpha.0.0.20250611155041-9fa93c9afe32
@@ -79,7 +79,7 @@ require (
7979
github.com/rs/zerolog v1.34.0
8080
github.com/spf13/cast v1.10.0
8181
github.com/spf13/cobra v1.10.1
82-
github.com/spf13/viper v1.20.1
82+
github.com/spf13/viper v1.21.0
8383
github.com/strangelove-ventures/tokenfactory v0.50.7-wasmvm2
8484
github.com/stretchr/testify v1.11.1
8585
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7
@@ -238,7 +238,7 @@ require (
238238
github.com/cosmos/iavl v1.2.6 // indirect
239239
github.com/cosmos/ibc-go/modules/light-clients/08-wasm/v10 v10.4.0
240240
github.com/cosmos/ics23/go v0.11.0 // indirect
241-
github.com/cosmos/ledger-cosmos-go v0.16.0 // indirect
241+
github.com/cosmos/ledger-cosmos-go v1.0.0 // indirect
242242
github.com/creachadair/atomicfile v0.3.7 // indirect
243243
github.com/creachadair/tomledit v0.0.28 // indirect
244244
github.com/danieljoos/wincred v1.2.1 // indirect
@@ -294,7 +294,7 @@ require (
294294
github.com/hashicorp/yamux v0.1.2 // indirect
295295
github.com/hdevalence/ed25519consensus v0.2.0 // indirect
296296
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
297-
github.com/holiman/uint256 v1.3.2 // indirect
297+
github.com/holiman/uint256 v1.3.2
298298
github.com/huandu/skiplist v1.2.1 // indirect
299299
github.com/huin/goupnp v1.3.0 // indirect
300300
github.com/iancoleman/orderedmap v0.3.0 // indirect
@@ -343,12 +343,12 @@ require (
343343
github.com/rivo/uniseg v0.2.0 // indirect
344344
github.com/rogpeppe/go-internal v1.14.1 // indirect
345345
github.com/rs/cors v1.11.1 // indirect
346-
github.com/sagikazarmark/locafero v0.9.0 // indirect
346+
github.com/sagikazarmark/locafero v0.11.0 // indirect
347347
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
348348
github.com/sasha-s/go-deadlock v0.3.5 // indirect
349349
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
350-
github.com/sourcegraph/conc v0.3.0 // indirect
351-
github.com/spf13/afero v1.14.0 // indirect
350+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
351+
github.com/spf13/afero v1.15.0 // indirect
352352
github.com/spf13/pflag v1.0.10 // indirect
353353
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect
354354
github.com/stretchr/objx v0.5.2 // indirect

go.sum

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -862,8 +862,8 @@ github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZ
862862
github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb h1:3bCgBvB8PbJVMX1ouCcSIxvsqKPYM7gs72o0zC76n9g=
863863
github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ=
864864
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
865-
github.com/cometbft/cometbft v0.38.19 h1:vNdtCkvhuwUlrcLPAyigV7lQpmmo+tAq8CsB8gZjEYw=
866-
github.com/cometbft/cometbft v0.38.19/go.mod h1:UCu8dlHqvkAsmAFmWDRWNZJPlu6ya2fTWZlDrWsivwo=
865+
github.com/cometbft/cometbft v0.38.21 h1:qcIJSH9LiwU5s6ZgKR5eRbsLNucbubfraDs5bzgjtOI=
866+
github.com/cometbft/cometbft v0.38.21/go.mod h1:UCu8dlHqvkAsmAFmWDRWNZJPlu6ya2fTWZlDrWsivwo=
867867
github.com/cometbft/cometbft-db v1.0.4 h1:cezb8yx/ZWcF124wqUtAFjAuDksS1y1yXedvtprUFxs=
868868
github.com/cometbft/cometbft-db v1.0.4/go.mod h1:M+BtHAGU2XLrpUxo3Nn1nOCcnVCiLM9yx5OuT0u5SCA=
869869
github.com/consensys/gnark-crypto v0.18.0 h1:vIye/FqI50VeAr0B3dx+YjeIvmc3LWz4yEfbWBpTUf0=
@@ -915,8 +915,8 @@ github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5Rtn
915915
github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0=
916916
github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo=
917917
github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA=
918-
github.com/cosmos/ledger-cosmos-go v0.16.0 h1:YKlWPG9NnGZIEUb2bEfZ6zhON1CHlNTg0QKRRGcNEd0=
919-
github.com/cosmos/ledger-cosmos-go v0.16.0/go.mod h1:WrM2xEa8koYoH2DgeIuZXNarF7FGuZl3mrIOnp3Dp0o=
918+
github.com/cosmos/ledger-cosmos-go v1.0.0 h1:jNKW89nPf0vR0EkjHG8Zz16h6p3zqwYEOxlHArwgYtw=
919+
github.com/cosmos/ledger-cosmos-go v1.0.0/go.mod h1:mGaw2wDOf+Z6SfRJsMGxU9DIrBa4du0MAiPlpPhLAOE=
920920
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
921921
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
922922
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0=
@@ -1765,8 +1765,8 @@ github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b h1
17651765
github.com/prysmaticlabs/gohashtree v0.0.4-beta.0.20240624100937-73632381301b/go.mod h1:HRuvtXLZ4WkaB1MItToVH2e8ZwKwZPY5/Rcby+CvvLY=
17661766
github.com/prysmaticlabs/prysm/v5 v5.3.0 h1:7Lr8ndapBTZg00YE+MgujN6+yvJR6Bdfn28ZDSJ00II=
17671767
github.com/prysmaticlabs/prysm/v5 v5.3.0/go.mod h1:r1KhlduqDMIGZ1GhR5pjZ2Ko8Q89noTDYTRoPKwf1+c=
1768-
github.com/pushchain/evm v1.0.0-rc2.0.20260616081105-96231e7a76c0 h1:y4oaq20SC2hFSg2/AyLc4iSLu9i6z/mCgyKcsrVyVhg=
1769-
github.com/pushchain/evm v1.0.0-rc2.0.20260616081105-96231e7a76c0/go.mod h1:BjKknQX/cnH/v/i2AgtfsJY4g/gihm9n6ilXk2SExUo=
1768+
github.com/pushchain/evm v1.0.0-rc2.0.20260826155700-89c7e52be541 h1:Ols8viNso7TAphC5MYbl+GrmMuFVKvvfn8uzeGEnV0Q=
1769+
github.com/pushchain/evm v1.0.0-rc2.0.20260826155700-89c7e52be541/go.mod h1:QuenX5DgRhWeYdIg0J/p65cyS/ntpgnzpZOIajZ/SHk=
17701770
github.com/quic-go/qpack v0.4.0 h1:Cr9BXA1sQS2SmDUWjSofMPNKmvF6IiIfDRmgU0w1ZCo=
17711771
github.com/quic-go/qpack v0.4.0/go.mod h1:UZVnYIfi5GRk+zI9UMaCPsmZ2xKJP7XBUvVyT1Knj9A=
17721772
github.com/quic-go/qtls-go1-20 v0.3.4 h1:MfFAPULvst4yoMgY9QmtpYmfij/em7O8UUi+bNVm7Cg=
@@ -1809,8 +1809,8 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
18091809
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
18101810
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
18111811
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
1812-
github.com/sagikazarmark/locafero v0.9.0 h1:GbgQGNtTrEmddYDSAH9QLRyfAHY12md+8YFTqyMTC9k=
1813-
github.com/sagikazarmark/locafero v0.9.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk=
1812+
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
1813+
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
18141814
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
18151815
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
18161816
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
@@ -1859,17 +1859,17 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9
18591859
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
18601860
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
18611861
github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
1862-
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
1863-
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
1862+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
1863+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
18641864
github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
18651865
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
18661866
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
18671867
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
18681868
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
18691869
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
18701870
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
1871-
github.com/spf13/afero v1.14.0 h1:9tH6MapGnn/j0eb0yIXiLjERO8RB6xIVZRDCX7PtqWA=
1872-
github.com/spf13/afero v1.14.0/go.mod h1:acJQ8t0ohCGuMN3O+Pv0V0hgMxNYDlvdk+VTfyZmbYo=
1871+
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
1872+
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
18731873
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
18741874
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
18751875
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
@@ -2061,8 +2061,8 @@ go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
20612061
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
20622062
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
20632063
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
2064-
go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE=
2065-
go.yaml.in/yaml/v3 v3.0.3/go.mod h1:tBHosrYAkRZjRAOREWbDnBXUf08JOwYq++0QNwQiWzI=
2064+
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
2065+
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
20662066
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
20672067
golang.org/x/arch v0.17.0 h1:4O3dfLzd+lQewptAHqjewQZQDyEdejz3VwgeYwkZneU=
20682068
golang.org/x/arch v0.17.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=

test/integration/uexecutor/inbound_cea_gas_and_payload_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,12 @@ func TestInboundCEAGasAndPayload(t *testing.T) {
468468
// Check that PRC20 was deposited into the UEA (recipient)
469469
res, err := chainApp.EVMKeeper.CallEVM(
470470
ctx,
471+
chainApp.EVMKeeper.NewStateDB(ctx),
471472
prc20ABI,
472473
ueModuleAccAddress,
473474
prc20Address,
474475
false,
476+
false,
475477
nil,
476478
"balanceOf",
477479
ueaAddrHex,
@@ -497,7 +499,7 @@ func TestInboundCEAGasAndPayload(t *testing.T) {
497499
chainApp.UregistryKeeper.AddChainConfig(ctx, &uregistrytypes.ChainConfig{
498500
Chain: "eip155:97",
499501
VmType: uregistrytypes.VmType_EVM,
500-
PublicRpcUrl: "https://data-seed-prebsc-1-s1.binance.org:8545",
502+
PublicRpcUrl: "https://data-seed-prebsc-1-s1.binance.org:8545",
501503
GatewayAddress: "0x0000000000000000000000000000000000000000",
502504
BlockConfirmation: &uregistrytypes.BlockConfirmation{
503505
FastInbound: 5,

test/integration/uexecutor/inbound_cea_payload_test.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ func setupInboundCEAPayloadTest(t *testing.T, numVals int) (*app.ChainApp, sdk.C
2727
chainApp, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals)
2828

2929
chainConfigTest := uregistrytypes.ChainConfig{
30-
Chain: "eip155:11155111",
31-
VmType: uregistrytypes.VmType_EVM,
32-
PublicRpcUrl: "https://sepolia.drpc.org",
30+
Chain: "eip155:11155111",
31+
VmType: uregistrytypes.VmType_EVM,
32+
PublicRpcUrl: "https://sepolia.drpc.org",
3333
GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe",
3434
BlockConfirmation: &uregistrytypes.BlockConfirmation{
3535
FastInbound: 5,
@@ -227,10 +227,12 @@ func TestInboundCEAFundsAndPayload(t *testing.T) {
227227
// Check that PRC20 was deposited into the UEA (recipient)
228228
res, err := chainApp.EVMKeeper.CallEVM(
229229
ctx,
230+
chainApp.EVMKeeper.NewStateDB(ctx),
230231
prc20ABI,
231232
ueModuleAccAddress,
232233
prc20Address,
233234
false,
235+
false,
234236
nil,
235237
"balanceOf",
236238
ueaAddrHex,
@@ -597,7 +599,7 @@ func TestInboundCEAFundsAndPayload(t *testing.T) {
597599
ceaInbound := &uexecutortypes.Inbound{
598600
SourceChain: "eip155:11155111",
599601
TxHash: "0xcea07",
600-
Sender: personBSender, // person B — no UEA
602+
Sender: personBSender, // person B — no UEA
601603
Recipient: ueaAddrHex.String(), // person A's UEA
602604
Amount: "1000000",
603605
AssetAddr: usdcAddress.String(),
@@ -633,10 +635,12 @@ func TestInboundCEAFundsAndPayload(t *testing.T) {
633635
// Confirm the PRC20 balance landed at the explicitly passed recipient (person A's UEA)
634636
res, err := chainApp.EVMKeeper.CallEVM(
635637
ctx,
638+
chainApp.EVMKeeper.NewStateDB(ctx),
636639
prc20ABI,
637640
ueModuleAccAddress,
638641
prc20Address,
639642
false,
643+
false,
640644
nil,
641645
"balanceOf",
642646
ueaAddrHex,
@@ -726,7 +730,7 @@ func TestInboundCEAFundsAndPayload(t *testing.T) {
726730
chainApp.UregistryKeeper.AddChainConfig(ctx, &uregistrytypes.ChainConfig{
727731
Chain: "eip155:97",
728732
VmType: uregistrytypes.VmType_EVM,
729-
PublicRpcUrl: "https://data-seed-prebsc-1-s1.binance.org:8545",
733+
PublicRpcUrl: "https://data-seed-prebsc-1-s1.binance.org:8545",
730734
GatewayAddress: "0x0000000000000000000000000000000000000000",
731735
BlockConfirmation: &uregistrytypes.BlockConfirmation{
732736
FastInbound: 5,

test/integration/uexecutor/inbound_cea_smart_contract_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,12 @@ func TestInboundCEASmartContractRecipient(t *testing.T) {
239239

240240
res, err := chainApp.EVMKeeper.CallEVM(
241241
ctx,
242+
chainApp.EVMKeeper.NewStateDB(ctx),
242243
prc20ABI,
243244
ueModuleAccAddress,
244245
prc20Address,
245246
false,
247+
false,
246248
nil,
247249
"balanceOf",
248250
contractAddr,
@@ -455,7 +457,7 @@ func TestInboundCEASmartContractRecipient(t *testing.T) {
455457
ueModuleAccAddress, _ := chainApp.UexecutorKeeper.GetUeModuleAddress(ctx)
456458

457459
res, err := chainApp.EVMKeeper.CallEVM(
458-
ctx, prc20ABI, ueModuleAccAddress, prc20Address, false, nil, "balanceOf", recipientAddr,
460+
ctx, chainApp.EVMKeeper.NewStateDB(ctx), prc20ABI, ueModuleAccAddress, prc20Address, false, false, nil, "balanceOf", recipientAddr,
459461
)
460462
require.NoError(t, err)
461463
balances, err := prc20ABI.Unpack("balanceOf", res.Ret)

test/integration/uexecutor/inbound_multicall_outbound_atomicity_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,10 +451,12 @@ func prc20BalanceOf(t *testing.T, chainApp *app.ChainApp, ctx sdk.Context, holde
451451
ueModuleAccAddress, _ := chainApp.UexecutorKeeper.GetUeModuleAddress(ctx)
452452
res, err := chainApp.EVMKeeper.CallEVM(
453453
ctx,
454+
chainApp.EVMKeeper.NewStateDB(ctx),
454455
prc20ABI,
455456
ueModuleAccAddress,
456457
utils.GetDefaultAddresses().PRC20USDCAddr,
457458
false,
459+
false,
458460
nil,
459461
"balanceOf",
460462
holder,

test/integration/uexecutor/inbound_solana_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func TestSolanaInboundFunds(t *testing.T) {
142142
recipient := common.HexToAddress(inbound.Recipient)
143143

144144
// Check initial balance is 0
145-
res, err := app.EVMKeeper.CallEVM(ctx, prc20ABI, ueModuleAccAddress, prc20Address, false, nil, "balanceOf", recipient)
145+
res, err := app.EVMKeeper.CallEVM(ctx, app.EVMKeeper.NewStateDB(ctx), prc20ABI, ueModuleAccAddress, prc20Address, false, false, nil, "balanceOf", recipient)
146146
require.NoError(t, err)
147147
balances, _ := prc20ABI.Unpack("balanceOf", res.Ret)
148148
require.Equal(t, int64(0), balances[0].(*big.Int).Int64())
@@ -156,7 +156,7 @@ func TestSolanaInboundFunds(t *testing.T) {
156156
require.False(t, isPending)
157157

158158
// PRC20 balance should equal inbound amount
159-
res, err = app.EVMKeeper.CallEVM(ctx, prc20ABI, ueModuleAccAddress, prc20Address, false, nil, "balanceOf", recipient)
159+
res, err = app.EVMKeeper.CallEVM(ctx, app.EVMKeeper.NewStateDB(ctx), prc20ABI, ueModuleAccAddress, prc20Address, false, false, nil, "balanceOf", recipient)
160160
require.NoError(t, err)
161161
balances, _ = prc20ABI.Unpack("balanceOf", res.Ret)
162162
expected := new(big.Int)
@@ -179,7 +179,7 @@ func TestSolanaInboundFunds(t *testing.T) {
179179
voteToQuorum(t, ctx, app, vals, coreVals, &inbound2)
180180

181181
// Balance should be 2x
182-
res, err := app.EVMKeeper.CallEVM(ctx, prc20ABI, ueModuleAccAddress, prc20Address, false, nil, "balanceOf", recipient)
182+
res, err := app.EVMKeeper.CallEVM(ctx, app.EVMKeeper.NewStateDB(ctx), prc20ABI, ueModuleAccAddress, prc20Address, false, false, nil, "balanceOf", recipient)
183183
require.NoError(t, err)
184184
balances, _ := prc20ABI.Unpack("balanceOf", res.Ret)
185185
expected := new(big.Int)

0 commit comments

Comments
 (0)