Skip to content

Commit

Permalink
chores: bump deps and update swagger (#92)
Browse files Browse the repository at this point in the history
* bump deps and update swagger

* fix lint

* bump kvindexer and submodules

* update readme

---------

Co-authored-by: Geoff Lee <[email protected]>
  • Loading branch information
beer-1 and Vritra4 authored Feb 4, 2025
1 parent d01ae95 commit ed1728e
Show file tree
Hide file tree
Showing 21 changed files with 1,109 additions and 240 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-darwin-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Set environment variables
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-darwin-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"
- name: Set environment variables
run: |
MINIWASM_NETWORK_NAME="miniwasm-1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Set environment variables
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.22
go-version: 1.23
- name: Install openssl
run: sudo apt-get install libssl-dev
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-alpine3.19 AS go-builder
FROM golang:1.23-alpine AS go-builder
#ARG arch=x86_64

# See https://github.com/CosmWasm/wasmvm/releases
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM arm64v8/golang:1.22-bullseye AS go-builder
FROM arm64v8/golang:1.23-bullseye AS go-builder

# Install minimum necessary dependencies, build Cosmos SDK, remove packages
RUN apt update
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ MiniWasm is an optimistic rollup consumer chain powered by WasmVM, designed to s

## Prerequisites

- Go v1.22.7+
- Go v1.23.3+

## Getting Started

Expand Down
10 changes: 7 additions & 3 deletions app/blocksdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,20 @@ func setupBlockSDK(
app.BaseApp.CheckTx,
)
checkTxHandler := blockchecktx.NewMempoolParityCheckTx(
app.Logger(), mempool,
app.txConfig.TxDecoder(), mevCheckTx.CheckTx(),
app.Logger(),
mempool,
app.txConfig.TxDecoder(),
mevCheckTx.CheckTx(),
app.BaseApp,
)
checkTx := checkTxHandler.CheckTx()

proposalHandler := blockabci.NewProposalHandler(
proposalHandler := blockabci.New(
app.Logger(),
app.txConfig.TxDecoder(),
app.txConfig.TxEncoder(),
mempool,
true,
)

prepareProposalHandler := proposalHandler.PrepareProposalHandler()
Expand Down
4 changes: 2 additions & 2 deletions app/ibc-hooks/ack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func Test_OnAckPacket_ICS721(t *testing.T) {
_, _, addr := keyPubAddr()
_, _, addr2 := keyPubAddr()

data := nfttransfertypes.NonFungibleTokenPacketDataWasm{
data := nfttransfertypes.NonFungibleTokenPacketData{
ClassId: "classId",
ClassUri: "classUri",
ClassData: "classData",
Expand Down Expand Up @@ -184,7 +184,7 @@ func Test_OnAckPacket_memo_ICS721(t *testing.T) {
contractAddr, err := sdk.AccAddressFromBech32(contractAddrBech32)
require.NoError(t, err)

data := nfttransfertypes.NonFungibleTokenPacketDataWasm{
data := nfttransfertypes.NonFungibleTokenPacketData{
ClassId: "classId",
ClassUri: "classUri",
ClassData: "classData",
Expand Down
4 changes: 2 additions & 2 deletions app/ibc-hooks/receive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func Test_OnReceivePacket_ICS721(t *testing.T) {
_, _, addr := keyPubAddr()
_, _, addr2 := keyPubAddr()

data := nfttransfertypes.NonFungibleTokenPacketDataWasm{
data := nfttransfertypes.NonFungibleTokenPacketData{
ClassId: "classId",
ClassUri: "classUri",
ClassData: "classData",
Expand Down Expand Up @@ -176,7 +176,7 @@ func Test_onReceivePacket_memo_ICS721(t *testing.T) {
require.NoError(t, err)

contractAddrBech32 := instantiateRes.Address
data := nfttransfertypes.NonFungibleTokenPacketDataWasm{
data := nfttransfertypes.NonFungibleTokenPacketData{
ClassId: "classId",
ClassUri: "classUri",
ClassData: "classData",
Expand Down
4 changes: 2 additions & 2 deletions app/ibc-hooks/timeout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func Test_OnTimeoutPacket_ICS721(t *testing.T) {
_, _, addr := keyPubAddr()
_, _, addr2 := keyPubAddr()

data := nfttransfertypes.NonFungibleTokenPacketDataWasm{
data := nfttransfertypes.NonFungibleTokenPacketData{
ClassId: "classId",
ClassUri: "classUri",
ClassData: "classData",
Expand Down Expand Up @@ -162,7 +162,7 @@ func Test_OnTimeoutPacket_memo_ICS721(t *testing.T) {
contractAddr, err := sdk.AccAddressFromBech32(contractAddrBech32)
require.NoError(t, err)

data := nfttransfertypes.NonFungibleTokenPacketDataWasm{
data := nfttransfertypes.NonFungibleTokenPacketData{
ClassId: "classId",
ClassUri: "classUri",
ClassData: "classData",
Expand Down
4 changes: 1 addition & 3 deletions app/ibc-hooks/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ func isIcs20Packet(packetData []byte) (isIcs20 bool, ics20data transfertypes.Fun
return true, data
}

const wasmPortPrefix = "wasm."

func isIcs721Packet(packetData []byte) (isIcs721 bool, ics721data nfttransfertypes.NonFungibleTokenPacketData) {
// Use wasm port prefix to ack like normal wasm chain.
//
// initia l1 is handling encoding and decoding depends on port id,
// so miniwasm should ack like normal wasm chain.
if data, err := nfttransfertypes.DecodePacketData(packetData, wasmPortPrefix); err != nil {
if data, err := nfttransfertypes.DecodePacketData(packetData); err != nil {
return false, data
} else {
return true, data
Expand Down
2 changes: 1 addition & 1 deletion app/ibc-hooks/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func Test_isIcs20Packet(t *testing.T) {
func Test_isIcs721Packet(t *testing.T) {
nftTransferMsg := nfttransfertypes.NewNonFungibleTokenPacketData("class_id", "uri", "data", []string{"1", "2", "3"}, []string{"uri1", "uri2", "uri3"}, []string{"data1", "data2", "data3"}, "sender", "receiver", "memo")

ok, _nftTransferMsg := isIcs721Packet(nftTransferMsg.GetBytes(wasmPortPrefix))
ok, _nftTransferMsg := isIcs721Packet(nftTransferMsg.GetBytes())
require.True(t, ok)
require.Equal(t, nftTransferMsg, _nftTransferMsg)

Expand Down
8 changes: 4 additions & 4 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ import (
tokenfactorytypes "github.com/initia-labs/miniwasm/x/tokenfactory/types"

// noble forwarding keeper
forwarding "github.com/noble-assets/forwarding/v2/x/forwarding"
forwardingkeeper "github.com/noble-assets/forwarding/v2/x/forwarding/keeper"
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
forwarding "github.com/noble-assets/forwarding/v2"
forwardingkeeper "github.com/noble-assets/forwarding/v2/keeper"
forwardingtypes "github.com/noble-assets/forwarding/v2/types"
// kvindexer
)

Expand Down Expand Up @@ -317,7 +317,7 @@ func NewAppKeeper(
authorityAddr,
)

appKeepers.IBCKeeper.ClientKeeper.WithPostUpdateHandler(
appKeepers.IBCKeeper.ClientKeeper.SetPostUpdateHandler(
appKeepers.OPChildKeeper.UpdateHostValidatorSet,
)

Expand Down
2 changes: 1 addition & 1 deletion app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import (
tokenfactorytypes "github.com/initia-labs/miniwasm/x/tokenfactory/types"

// noble forwarding keeper
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
forwardingtypes "github.com/noble-assets/forwarding/v2/types"
)

func (appKeepers *AppKeepers) GenerateKeys() {
Expand Down
4 changes: 2 additions & 2 deletions app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ import (
tokenfactorytypes "github.com/initia-labs/miniwasm/x/tokenfactory/types"

// noble forwarding keeper
forwarding "github.com/noble-assets/forwarding/v2/x/forwarding"
forwardingtypes "github.com/noble-assets/forwarding/v2/x/forwarding/types"
forwarding "github.com/noble-assets/forwarding/v2"
forwardingtypes "github.com/noble-assets/forwarding/v2/types"
)

// module account permissions
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

Loading

0 comments on commit ed1728e

Please sign in to comment.