Skip to content

Commit

Permalink
Merge branch 'main' into pysel/bigdec-sdkdec
Browse files Browse the repository at this point in the history
  • Loading branch information
pysel authored Sep 13, 2023
2 parents 7da117b + ebb31b6 commit 7f20c37
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build e2e image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
load: true
context: .
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push-dev-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -66,7 +66,7 @@ jobs:
echo "OSMOSIS_VERSION=${{ github.ref_name }}-$SHORT_SHA" >> $GITHUB_ENV
-
name: Build and Push Docker Images
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
Expand All @@ -81,7 +81,7 @@ jobs:
${{ env.OSMOSIS_DEV_IMAGE_REPOSITORY }}:${{ env.DOCKER_IMAGE_TAG }}
-
name: Build and Push E2E Init Docker Images
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: tests/e2e/initialization/init.Dockerfile
context: .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/push-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
Expand All @@ -80,7 +80,7 @@ jobs:
-
name: Build and push (distroless)
id: build_push_distroless
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
Expand All @@ -102,7 +102,7 @@ jobs:
-
name: Build and push (nonroot)
id: build_push_nonroot
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
Expand All @@ -121,7 +121,7 @@ jobs:
-
name: Build and push (alpine)
id: build_push_alpine
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: Dockerfile
context: .
Expand All @@ -139,7 +139,7 @@ jobs:
-
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '.0')
name: Build and push (e2e-chain-init)
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
file: tests/e2e/initialization/init.Dockerfile
context: .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build e2e image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
load: true
context: .
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Misc Improvements

* [#6261](https://github.com/osmosis-labs/osmosis/pull/6261) mutative and efficient BigDec truncations with arbitrary decimals.
*
### Client Breaks
* [#6388](https://github.com/osmosis-labs/osmosis/pull/6388) Make cosmwasmpool's create pool cli generic

## v19.0.0

Expand Down
18 changes: 9 additions & 9 deletions x/cosmwasmpool/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/spf13/pflag"

"github.com/osmosis-labs/osmosis/osmoutils/osmocli"
"github.com/osmosis-labs/osmosis/v19/x/cosmwasmpool/cosmwasm/msg"
"github.com/osmosis-labs/osmosis/v19/x/cosmwasmpool/model"
"github.com/osmosis-labs/osmosis/v19/x/cosmwasmpool/types"
)
Expand All @@ -32,7 +31,7 @@ func NewCreateCWPoolCmd() (*osmocli.TxCliDesc, *model.MsgCreateCosmWasmPool) {
return &osmocli.TxCliDesc{
Use: "create-pool",
Short: "create a cosmwasm pool",
Example: "osmosisd tx cosmwasmpool create-pool 1 uion,uosmo --from lo-test1 --keyring-backend test --chain-id localosmosis --fees 875uosmo -b=block",
Example: "osmosisd tx cosmwasmpool create-pool 1 '{\"pool_assets_denom\":[\"uion\",\"uosmo\"]}' --from lo-test1 --keyring-backend test --chain-id localosmosis --fees 875uosmo -b=block",
NumArgs: 2,
ParseAndBuildMsg: BuildCreatePoolMsg,
}, &model.MsgCreateCosmWasmPool{}
Expand All @@ -44,17 +43,18 @@ func BuildCreatePoolMsg(clientCtx client.Context, args []string, flags *pflag.Fl
return nil, err
}

denoms := strings.Split(args[1], ",")
instantiateMsg := args[1]

// Construct instantiate msg
instantiateMsg := &msg.InstantiateMsg{
PoolAssetDenoms: denoms,
}
msgBz, err := json.Marshal(instantiateMsg)
// Check JSON format for instantiateMsg
var jsonCheck map[string]interface{}
err = json.Unmarshal([]byte(instantiateMsg), &jsonCheck)
if err != nil {
return nil, err
return nil, fmt.Errorf("invalid JSON format for instantiateMsg: %v", err)
}

// Turn instantiateMsg to bytes
msgBz := []byte(instantiateMsg)

return &model.MsgCreateCosmWasmPool{
CodeId: codeId,
InstantiateMsg: msgBz,
Expand Down

0 comments on commit 7f20c37

Please sign in to comment.