diff --git a/app/app.go b/app/app.go index 9a491a4..6cdedba 100644 --- a/app/app.go +++ b/app/app.go @@ -111,6 +111,7 @@ import ( porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" + ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" "github.com/gorilla/mux" "github.com/rakyll/statik/fs" "github.com/spf13/cast" @@ -200,6 +201,7 @@ var ( feegrantmodule.AppModuleBasic{}, authzmodule.AppModuleBasic{}, ibc.AppModuleBasic{}, + ibctm.AppModuleBasic{}, upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, @@ -522,6 +524,7 @@ func New( ) interTxModule := intertx.NewAppModule(appCodec, app.InterTxKeeper) interTxIBCModule := intertx.NewIBCModule(app.InterTxKeeper) + _ = interTxIBCModule app.AquiferKeeper = *aquiferkeeper.NewKeeper( appCodec, @@ -566,6 +569,7 @@ func New( app.BankKeeper, app.StakingKeeper, distrkeeper.NewQuerier(app.DistrKeeper), + app.IBCFeeKeeper, // ISC4 Wrapper: fee IBC middleware app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper, app.scopedWasmKeeper, @@ -584,7 +588,7 @@ func New( govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals)) } - var aquiferStack porttypes.IBCModule + var aquiferStack porttypes.IBCModule = aquiferIBCModule aquiferStack = icacontroller.NewIBCMiddleware(aquiferIBCModule, app.ICAControllerKeeper) // Create fee enabled wasm ibc Stack diff --git a/go.mod b/go.mod index 94b79e9..979c45b 100644 --- a/go.mod +++ b/go.mod @@ -5,23 +5,24 @@ go 1.19 require ( cosmossdk.io/api v0.3.1 cosmossdk.io/errors v1.0.0-beta.7 - github.com/CosmWasm/wasmd v0.40.0-rc.1 - github.com/cometbft/cometbft v0.37.0 + cosmossdk.io/math v1.0.1 + github.com/CosmWasm/wasmd v0.40.0 + github.com/cometbft/cometbft v0.37.1 github.com/cometbft/cometbft-db v0.7.0 - github.com/cosmos/cosmos-sdk v0.47.1 + github.com/cosmos/cosmos-sdk v0.47.2 github.com/cosmos/gogoproto v1.4.8 - github.com/cosmos/ibc-go/v7 v7.0.0 + github.com/cosmos/ibc-go/v7 v7.0.1 github.com/gogo/protobuf v1.3.3 github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/prometheus/client_golang v1.15.0 github.com/rakyll/statik v0.1.7 - github.com/spf13/cast v1.5.0 + github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.15.0 - github.com/stretchr/testify v1.8.2 + github.com/stretchr/testify v1.8.3 google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 google.golang.org/grpc v1.55.0 google.golang.org/protobuf v1.30.0 @@ -36,7 +37,6 @@ require ( cloud.google.com/go/storage v1.29.0 // indirect cosmossdk.io/core v0.5.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - cosmossdk.io/math v1.0.0 // indirect cosmossdk.io/tools/rosetta v0.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -73,7 +73,7 @@ require ( github.com/dgraph-io/badger/v2 v2.2007.4 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect - github.com/docker/distribution v2.8.1+incompatible // indirect + github.com/docker/distribution v2.8.2+incompatible // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect @@ -101,7 +101,7 @@ require ( github.com/gtank/merlin v0.1.1 // indirect github.com/gtank/ristretto255 v0.1.2 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-getter v1.7.0 // indirect + github.com/hashicorp/go-getter v1.7.1 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect diff --git a/go.sum b/go.sum index 40d1e12..818fb99 100644 --- a/go.sum +++ b/go.sum @@ -196,8 +196,8 @@ cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= cosmossdk.io/errors v1.0.0-beta.7 h1:gypHW76pTQGVnHKo6QBkb4yFOJjC+sUGRc5Al3Odj1w= cosmossdk.io/errors v1.0.0-beta.7/go.mod h1:mz6FQMJRku4bY7aqS/Gwfcmr/ue91roMEKAmDUDpBfE= -cosmossdk.io/math v1.0.0 h1:ro9w7eKx23om2tZz/VM2Pf+z2WAbGX1yDQQOJ6iGeJw= -cosmossdk.io/math v1.0.0/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= +cosmossdk.io/math v1.0.1 h1:Qx3ifyOPaMLNH/89WeZFH268yCvU4xEcnPLu3sJqPPg= +cosmossdk.io/math v1.0.1/go.mod h1:Ygz4wBHrgc7g0N+8+MrnTfS9LLn9aaTGa9hKopuym5k= cosmossdk.io/tools/rosetta v0.2.1 h1:ddOMatOH+pbxWbrGJKRAawdBkPYLfKXutK9IETnjYxw= cosmossdk.io/tools/rosetta v0.2.1/go.mod h1:Pqdc1FdvkNV3LcNIkYWt2RQY6IP1ge6YWZk8MhhO9Hw= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -212,8 +212,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.40.0-rc.1 h1:prIM2vP1jNh0zgs9seua5BgKdayBgp3FiHtwxFcZSGs= -github.com/CosmWasm/wasmd v0.40.0-rc.1/go.mod h1:uacdue6EGn9JA1TqBNHB3iCe4PCIChuFT23AzIl2VME= +github.com/CosmWasm/wasmd v0.40.0 h1:3Vvq1m8dPQdvZR+QJc86VIx6QoWAEVnuHxqBPshJvyo= +github.com/CosmWasm/wasmd v0.40.0/go.mod h1:SuxskRBB7+bpwXGhUXaEfdpjg5WKpdxBy7Tm36VRMUU= github.com/CosmWasm/wasmvm v1.2.3 h1:OKYlobwmVGbl0eSn0mXoAAjE5hIuXnQCLPjbNd91sVY= github.com/CosmWasm/wasmvm v1.2.3/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= @@ -312,8 +312,8 @@ github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:z github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.0 h1:M005vBaSaugvYYmNZwJOopynQSjwLoDTwflnQ/I/eYk= -github.com/cometbft/cometbft v0.37.0/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= +github.com/cometbft/cometbft v0.37.1 h1:KLxkQTK2hICXYq21U2hn1W5hOVYUdQgDQ1uB+90xPIg= +github.com/cometbft/cometbft v0.37.1/go.mod h1:Y2MMMN//O5K4YKd8ze4r9jmk4Y7h0ajqILXbH5JQFVs= github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo= github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= @@ -328,8 +328,8 @@ github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= github.com/cosmos/cosmos-proto v1.0.0-beta.2/go.mod h1:+XRCLJ14pr5HFEHIUcn51IKXD1Fy3rkEQqt4WqmN4V0= -github.com/cosmos/cosmos-sdk v0.47.1 h1:HnaCYtaAMWZp1SdlwwE1mPJ8kFlZ/TuEJ/ciNXH6Uno= -github.com/cosmos/cosmos-sdk v0.47.1/go.mod h1:14tO5KQaTrl2q3OxBnDRfue7TRN9zkXS0cLutrSqkOo= +github.com/cosmos/cosmos-sdk v0.47.2 h1:9rSriCoiJD+4F+tEDobyM8V7HF5BtY5Ef4VYNig96s0= +github.com/cosmos/cosmos-sdk v0.47.2/go.mod h1:zYzgI8w8hhotXTSoGbbSOAKfpJTx4wOy4XgbaKhtRtc= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= @@ -340,8 +340,8 @@ github.com/cosmos/gogoproto v1.4.8 h1:BrHKc6WFZt8+jRV71vKSQE+JrfF+JAnzrKo2VP7wIZ github.com/cosmos/gogoproto v1.4.8/go.mod h1:hnb0DIEWTv+wdNzNcqus5xCQXq5+CXauq1FJuurRfVY= github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= -github.com/cosmos/ibc-go/v7 v7.0.0 h1:j4kyywlG0hhDmT9FmSaR5iCIka7Pz7kJTxGWY1nlV9Q= -github.com/cosmos/ibc-go/v7 v7.0.0/go.mod h1:BFh8nKWjr5zeR2OZfhkzdgDzj1+KjRn3aJLpwapStj8= +github.com/cosmos/ibc-go/v7 v7.0.1 h1:NIBNRWjlOoFvFQu1ZlgwkaSeHO5avf4C1YQiWegt8jw= +github.com/cosmos/ibc-go/v7 v7.0.1/go.mod h1:vEaapV6nuLPQlS+g8IKmxMo6auPi0i7HMv1PhViht/E= github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab h1:I9ialKTQo7248V827Bba4OuKPmk+FPzmTVHsLXaIJWw= github.com/cosmos/ics23/go v0.9.1-0.20221207100636-b1abd8678aab/go.mod h1:2CwqasX5dSD7Hbp/9b6lhK6BwoBDCBldx7gPKRukR60= github.com/cosmos/ledger-cosmos-go v0.12.1 h1:sMBxza5p/rNK/06nBSNmsI/WDqI0pVJFVNihy1Y984w= @@ -376,8 +376,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -411,7 +411,7 @@ github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= -github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -606,8 +606,8 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-getter v1.7.0 h1:bzrYP+qu/gMrL1au7/aDvkoOVGUJpeKBgbqRHACAFDY= -github.com/hashicorp/go-getter v1.7.0/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= +github.com/hashicorp/go-getter v1.7.1 h1:SWiSWN/42qdpR0MdhaOc/bLR48PLuP1ZQtYLRlM69uY= +github.com/hashicorp/go-getter v1.7.1/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -882,8 +882,8 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= -github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= +github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= @@ -915,8 +915,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= diff --git a/hermes/config.toml b/hermes/config.toml index caecada..64b7de7 100644 --- a/hermes/config.toml +++ b/hermes/config.toml @@ -101,7 +101,7 @@ store_prefix = 'ibc' default_gas = 100000 max_gas = 3000000 gas_price = { price = 0.005, denom = 'stake' } -gas_adjustment = 0.1 +gas_multiplier = 1.5 max_msg_num = 30 max_tx_size = 2097152 clock_drift = '5s' @@ -122,7 +122,7 @@ store_prefix = 'ibc' default_gas = 100000 max_gas = 3000000 gas_price = { price = 0.001, denom = 'stake' } -gas_adjustment = 0.1 +gas_multiplier = 1.5 max_msg_num = 30 max_tx_size = 2097152 clock_drift = '5s' diff --git a/osmosis/balancer/balancerPool.pb.go b/osmosis/balancer/balancerPool.pb.go index d612d6c..86e9a88 100644 --- a/osmosis/balancer/balancerPool.pb.go +++ b/osmosis/balancer/balancerPool.pb.go @@ -13,10 +13,9 @@ import ( github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types1 "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/x/auth/types" - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - _ "github.com/gogo/protobuf/types" - github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_gogo_protobuf_types "github.com/cosmos/gogoproto/types" io "io" math "math" math_bits "math/bits" diff --git a/osmosis/balancer/tx.pb.go b/osmosis/balancer/tx.pb.go index 29c4b5e..feb454a 100644 --- a/osmosis/balancer/tx.pb.go +++ b/osmosis/balancer/tx.pb.go @@ -6,9 +6,9 @@ package balancer import ( context "context" fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/scripts/aquifer/test.sh b/scripts/aquifer/test.sh index bcabf18..e19c81b 100644 --- a/scripts/aquifer/test.sh +++ b/scripts/aquifer/test.sh @@ -4,15 +4,21 @@ sh start_osmosis.sh sh start.sh -# create connection with and start (hermes 0.13.0-rc.0) -hermes -c ./hermes/config.toml keys restore qwoyn-1 -m "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" -hermes -c ./hermes/config.toml keys restore osmo-test -m "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" - -hermes -c ./hermes/config.toml create connection osmo-test qwoyn-1 -hermes -c ./hermes/config.toml start +# Restore keys to hermes relayer +echo "weather leader certain hard busy blouse click patient balcony return elephant hire mule gather danger curious visual boy estate army marine cinnamon snake flight" > ./relayer_mnemonic.txt +hermes --config ./hermes/config.toml keys delete --chain osmo-test --all +hermes --config ./hermes/config.toml keys add --chain osmo-test --mnemonic-file ./relayer_mnemonic.txt & +hermes --config ./hermes/config.toml keys delete --chain qwoyn-1 --all +hermes --config ./hermes/config.toml keys add --chain qwoyn-1 --mnemonic-file ./relayer_mnemonic.txt & + +# create connection with and start (hermes 1.4.0) +# hermes --config ./hermes/config.toml create client --host-chain osmo-test --reference-chain qwoyn-1 +# hermes --config ./hermes/config.toml create client --host-chain qwoyn-1 --reference-chain osmo-test +hermes --config ./hermes/config.toml create connection --a-chain osmo-test --b-chain qwoyn-1 +hermes --config ./hermes/config.toml start # create transfer channel -hermes -c ./hermes/config.toml create channel osmo-test qwoyn-1 --port-a transfer --port-b transfer +hermes --config ./hermes/config.toml create channel --a-chain osmo-test --a-port transfer --b-port transfer --a-connection connection-0 # check accounts to be managed on test qwoynd keys show -a maintainer --keyring-backend=test @@ -31,7 +37,7 @@ qwoynd q ibc channel channels channel_id: channel-0 # transfer tokens to QWOYN from Osmosis to buy QWOYN through aquifer module -osmosisd tx ibc-transfer transfer transfer channel-0 qwoyn13tqzdukugulllnk3p5js3w7hzw8gclkeenzp6e 1000000stake --chain-id=osmo-test --from=user1 --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 +osmosisd tx ibc-transfer transfer transfer channel-0 qwoyn13tqzdukugulllnk3p5js3w7hzw8gclkeenzp6e 1000000stake --fees=10000stake --chain-id=osmo-test --from=user1 --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 qwoynd query bank balances qwoyn13tqzdukugulllnk3p5js3w7hzw8gclkeenzp6e - amount: "1000000" denom: ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878 @@ -39,28 +45,29 @@ qwoynd query bank balances qwoyn13tqzdukugulllnk3p5js3w7hzw8gclkeenzp6e IBC_OSMO=ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878 # deposit tokens to be sold -qwoynd tx aquifer put-allocation-token 100000000uqwoyn --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer put-allocation-token 100000000uqwoyn --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=sync +qwoynd query tx 58EBEECD71BA897B61A02165C6B7420E9E1AA77E9CBC766816044B3FEC683E51 # set deposit end time by maintainer -qwoynd tx aquifer set-deposit-endtime $(($(date -u +%s) + 300)) --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=block -# qwoynd tx aquifer buy-allocation-token 100000000stake --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer set-deposit-endtime $(($(date -u +%s) + 300)) --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=sync +# qwoynd tx aquifer buy-allocation-token 100000000stake --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=sync # buy allocation token by user -qwoynd tx aquifer buy-allocation-token 200000$IBC_OSMO --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer buy-allocation-token 200000$IBC_OSMO --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=sync # init interchain account by maintainer -qwoynd tx aquifer init-ica connection-1 --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=block --gas=1000000 +qwoynd tx aquifer init-ica connection-0 --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=sync --gas=1000000 -qwoynd query intertx ica aquifer connection-1 -interchain_account_address: osmo1cfp8w03etsn4qz3a7eycjex24wfur6pe03u6lczxk8edw38srl6qvg8nnh +qwoynd query intertx ica aquifer connection-0 +interchain_account_address: osmo1q3vp0e6s3grtqap8ja25s3v0txqxufpfwq2w6ppqa08a00tfkrcsutdjr8 -ICA_ACCOUNT=osmo1cfp8w03etsn4qz3a7eycjex24wfur6pe03u6lczxk8edw38srl6qvg8nnh +ICA_ACCOUNT=osmo1q3vp0e6s3grtqap8ja25s3v0txqxufpfwq2w6ppqa08a00tfkrcsutdjr8 qwoynd query aquifer params # transfer required tokens to ICA account (it requires uosmo to pay fees for pool creation) -qwoynd tx aquifer exec-transfer channel-0 60000000000 --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=block -osmosisd tx bank send user1 $ICA_ACCOUNT 1000000stake,10000000000uosmo --chain-id=osmo-test --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 -qwoynd tx ibc-transfer transfer transfer channel-0 $ICA_ACCOUNT 100000000uqwoyn --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer exec-transfer channel-0 60000000000 --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=sync +osmosisd tx bank send user1 $ICA_ACCOUNT 1000000stake,10000000000uosmo --fees=10000stake --chain-id=osmo-test --keyring-backend=test -y --broadcast-mode=block --node=http://localhost:16657 +qwoynd tx ibc-transfer transfer transfer channel-0 $ICA_ACCOUNT 100000000uqwoyn --chain-id=qwoyn-1 --from=user1 --keyring-backend=test -y --broadcast-mode=sync osmosisd query bank balances $ICA_ACCOUNT --node=http://localhost:16657 # ensure that pool creation is allowed through IBC message on Osmosis @@ -70,7 +77,7 @@ osmosisd query interchain-accounts host params --node=http://0.0.0.0:16657 # host_enabled: true # create pool on Osmosis -qwoynd tx aquifer exec-add-liquidity --pool-file="pool.json" --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=block +qwoynd tx aquifer exec-add-liquidity --pool-file="pool.json" --chain-id=qwoyn-1 --from=maintainer --keyring-backend=test -y --broadcast-mode=sync pool.json ``` { diff --git a/start_osmosis.sh b/start_osmosis.sh index 5278dcb..8b7ff05 100644 --- a/start_osmosis.sh +++ b/start_osmosis.sh @@ -24,8 +24,10 @@ sed -i -e 's#"0.0.0.0:9091"#"0.0.0.0:9093"#g' $HOME/.osmosisd/config/app.toml sed -i -e 's#"0.0.0.0:9090"#"0.0.0.0:9092"#g' $HOME/.osmosisd/config/app.toml sed -i -e 's#"0.0.0.0:8080"#"0.0.0.0:8081"#g' $HOME/.osmosisd/config/app.toml sed -i -e 's#"0.0.0.0:1317"#"0.0.0.0:1316"#g' $HOME/.osmosisd/config/app.toml -sed -i -r "325s/.*/ \"allow_messages\": \[\"\/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool\"\]/" $HOME/.osmosisd/config/genesis.json - +sed -i -r "430s/.*/ \"allow_messages\": \[\"\/osmosis.gamm.poolmodels.balancer.v1beta1.MsgCreateBalancerPool\"\]/" $HOME/.osmosisd/config/genesis.json +sed -i -e 's#"voting_period": "172800s"#"voting_period": "20s"#g' $HOME/.osmosisd/config/genesis.json +sed -i -e 's#"expedited_voting_period": "86400s"#"expedited_voting_period": "20s"#g' $HOME/.osmosisd/config/genesis.json + osmosisd start --home=$HOME/.osmosisd diff --git a/x/aquifer/keeper/msg_server.go b/x/aquifer/keeper/msg_server.go index d312316..eaeeda0 100644 --- a/x/aquifer/keeper/msg_server.go +++ b/x/aquifer/keeper/msg_server.go @@ -12,6 +12,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" "github.com/cosmos/gogoproto/proto" + icacontrollerkeeper "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/keeper" + icacontrollertypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/controller/types" icatypes "github.com/cosmos/ibc-go/v7/modules/apps/27-interchain-accounts/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" @@ -196,10 +198,21 @@ func (m msgServer) InitICA(goCtx context.Context, msg *types.MsgInitICA) (*types TxType: icatypes.TxTypeSDKMultiMsg, })) - if err := m.icaControllerKeeper.RegisterInterchainAccount(ctx, msg.ConnectionId, types.ModuleName, appVersion); err != nil { + msgServer := icacontrollerkeeper.NewMsgServerImpl(&m.icaControllerKeeper) + msgRegisterInterchainAccount := icacontrollertypes.NewMsgRegisterInterchainAccount(msg.ConnectionId, types.ModuleName, appVersion) + + _, err := msgServer.RegisterInterchainAccount(sdk.WrapSDKContext(ctx), msgRegisterInterchainAccount) + if err != nil { + return nil, err + } + + portID, err := icatypes.NewControllerPortID(types.ModuleName) + if err != nil { return nil, err } + m.icaControllerKeeper.SetMiddlewareEnabled(ctx, portID, msg.ConnectionId) + return &types.MsgInitICAResponse{}, nil } @@ -257,7 +270,7 @@ func (m msgServer) ExecAddLiquidity(goCtx context.Context, msg *types.MsgExecAdd return nil, icatypes.ErrActiveChannelNotFound.Wrapf("failed to retrieve active channel for port %s", portID) } - chanCap, found := m.ScopedKeeper.GetCapability(ctx, host.ChannelCapabilityPath(portID, channelID)) + chanCap, found := m.IBCScopperKeeper.GetCapability(ctx, host.ChannelCapabilityPath(portID, channelID)) if !found { return nil, channeltypes.ErrChannelCapabilityNotFound.Wrap("module does not own channel capability") }