Skip to content
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

Update DEX related deterministic messages gas and make the MsgPlaceOrder nondeterministic. #1013

Merged
merged 8 commits into from
Nov 4, 2024
2 changes: 1 addition & 1 deletion build/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ replace (
require (
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20240321120602-0a9c50facc68
github.com/CoreumFoundation/coreum/v5 v5.0.0-20241022051641-b49ec5faa621
github.com/CoreumFoundation/crust v0.0.0-20241023120411-b54970b4922c
github.com/CoreumFoundation/crust v0.0.0-20241024103044-9a7232fcc043
github.com/iancoleman/strcase v0.3.0
github.com/pkg/errors v0.9.1
github.com/samber/lo v1.39.0
Expand Down
4 changes: 2 additions & 2 deletions build/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20240321120602-0a9c50facc68 h1:Tb9avuSQW3smVGrUnDh/Y+ML4eK802UsvJNZHsBgOGg=
github.com/CoreumFoundation/coreum-tools v0.4.1-0.20240321120602-0a9c50facc68/go.mod h1:VD93vCHkxYaT/RhOesXTFgd/GQDW54tr0BqGi5JU1c0=
github.com/CoreumFoundation/crust v0.0.0-20241023120411-b54970b4922c h1:vtNl0+pQ8p6rogxWD4yx+Qp4r9IK8qwyo32Qki21ltg=
github.com/CoreumFoundation/crust v0.0.0-20241023120411-b54970b4922c/go.mod h1:95ZdELt65yNef7qty4vvRBcBgkgw0L0+td2tNa/JKTM=
github.com/CoreumFoundation/crust v0.0.0-20241024103044-9a7232fcc043 h1:rtuta3MHFBdEV0acMNCtGEXmE95zeBJpwKURfkllpKM=
github.com/CoreumFoundation/crust v0.0.0-20241024103044-9a7232fcc043/go.mod h1:95ZdELt65yNef7qty4vvRBcBgkgw0L0+td2tNa/JKTM=
github.com/CosmWasm/wasmd v0.53.0 h1:kdaoAi20bIb4VCsxw9pRaT2g5PpIp82Wqrr9DRVN9ao=
github.com/CosmWasm/wasmd v0.53.0/go.mod h1:FJl/aWjdpGof3usAMFQpDe07Rkx77PUzp0cygFMOvtw=
github.com/CosmWasm/wasmvm/v2 v2.1.2 h1:GkJ5bAsRlLHfIQVg/FY1VHwLyBwlCjAhDea0B8L+e20=
Expand Down
8 changes: 3 additions & 5 deletions integration-tests/ibc/dex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ func TestIBCDexLimitOrdersMatching(t *testing.T) {
coreumChain.FundAccountWithOptions(ctx, t, coreumSender, integration.BalancesOptions{
Messages: []sdk.Msg{
&ibctransfertypes.MsgTransfer{},
&dextypes.MsgPlaceOrder{},
&dextypes.MsgPlaceOrder{},
&ibctransfertypes.MsgTransfer{},
},
Amount: dexParamsRes.Params.OrderReserve.Amount.MulRaw(2),
Amount: dexParamsRes.Params.OrderReserve.Amount.MulRaw(2).AddRaw(200_000),
})

denom1 := issueFT(ctx, t, coreumChain, coreumIssuer, sdkmath.NewIntWithDecimal(1, 6), assetfttypes.Feature_ibc)
Expand Down Expand Up @@ -115,7 +113,7 @@ func TestIBCDexLimitOrdersMatching(t *testing.T) {
_, err = client.BroadcastTx(
ctx,
coreumChain.ClientContext.WithFromAddress(coreumSender),
coreumChain.TxFactory().WithGas(coreumChain.GasLimitByMsgs(placeSellOrderMsg)),
coreumChain.TxFactoryAuto(),
placeSellOrderMsg,
)
requireT.ErrorContains(err, cosmoserrors.ErrInsufficientFunds.Error())
Expand Down Expand Up @@ -157,7 +155,7 @@ func TestIBCDexLimitOrdersMatching(t *testing.T) {
_, err = client.BroadcastTx(
ctx,
coreumChain.ClientContext.WithFromAddress(coreumSender),
coreumChain.TxFactory().WithGas(coreumChain.GasLimitByMsgs(placeSellOrderMsg)),
coreumChain.TxFactoryAuto(),
placeSellOrderMsg,
)
requireT.NoError(err)
Expand Down
Loading
Loading