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

feat: replace importing CosmWasm/wasmvm with line/wasmvm #194

Merged
merged 4 commits into from
May 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG_PENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Write the changes made after branching from cosmos-sdk v0.42.1.
* (config) [\#114](https://github.com/line/lbm-sdk/pull/114) Add idle-timeout to rest server and rpc server config
* (x/wasm) [\#127](https://github.com/line/lbm-sdk/pull/127) Add wasm with Staragate migration completed.
* (x/wasm) [\#151](https://github.com/line/lbm-sdk/pull/151) Add contract access control.
* (x/wasm) [\#194](https://github.com/line/lbm-sdk/pull/194) Replace importing CosmWasm/wasmvm with line/wasmvm.

### IMPROVEMENTS

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module github.com/line/lbm-sdk/v2

require (
github.com/99designs/keyring v1.1.6
github.com/CosmWasm/wasmvm v0.14.0-beta1
github.com/DataDog/zstd v1.4.5 // indirect
github.com/VictoriaMetrics/fastcache v1.5.8
github.com/armon/go-metrics v0.3.6
Expand Down Expand Up @@ -32,6 +31,7 @@ require (
github.com/line/iavl/v2 v2.0.0-init.1.0.20210507092458-8331d3daef36
github.com/line/ostracon v0.34.9-0.20210429084710-ef4fe0a40c7d
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524
github.com/line/wasmvm v0.14.0-0.5.0
github.com/magiconair/properties v1.8.4
github.com/mattn/go-isatty v0.0.12
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
Expand Down Expand Up @@ -67,7 +67,6 @@ require (
)

replace (
github.com/CosmWasm/wasmvm => github.com/line/wasmvm v0.14.0-0.4.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
Expand Down Expand Up @@ -341,8 +340,8 @@ github.com/line/ostracon v0.34.9-0.20210429084710-ef4fe0a40c7d h1:/6vnjrk3SpCUUi
github.com/line/ostracon v0.34.9-0.20210429084710-ef4fe0a40c7d/go.mod h1:ttnbq+yQJMQ9a2MT5SEisOoa/+pOgh2KenTiK/rVdiw=
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524 h1:eKXXnUm1SblC0AIXAMNDaSyvIbQ50yXqFbh9+Q8Kjvg=
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524/go.mod h1:wmkyPabXjtVZ1dvRofmurjaceghywtCSYGqFuFS+TbI=
github.com/line/wasmvm v0.14.0-0.4.0 h1:XvJZ0HO7xNtQ/+IEjF2WtK93PC1e+dT0McomCwRTZnQ=
github.com/line/wasmvm v0.14.0-0.4.0/go.mod h1:iCSHAV56VCjsrPFcLywh32bdha88AH/imzTTn/8Xuao=
github.com/line/wasmvm v0.14.0-0.5.0 h1:FRjzcUh+LiTMvCrSoucL7a5DlWHHRQgZ78h8YB8l4Fs=
github.com/line/wasmvm v0.14.0-0.5.0/go.mod h1:cgsILoCDigfQ2XplFI4rOo2ImOLEZH/OM8sulxGoKUA=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.4 h1:8KGKTcQQGm0Kv7vEbKFErAoAOFyyacLStRtQSeYtvkY=
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package wasm
import (
"math"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
capabilitytypes "github.com/line/lbm-sdk/v2/x/capability/types"
channeltypes "github.com/line/lbm-sdk/v2/x/ibc/core/04-channel/types"
porttypes "github.com/line/lbm-sdk/v2/x/ibc/core/05-port/types"
host "github.com/line/lbm-sdk/v2/x/ibc/core/24-host"
wasmTypes "github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvmtypes "github.com/line/wasmvm/types"
)

var _ porttypes.IBCModule = IBCHandler{}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package keeper
import (
"fmt"

wasmvm "github.com/CosmWasm/wasmvm"
sdk "github.com/line/lbm-sdk/v2/types"
wasmvm "github.com/line/wasmvm"
)

type cosmwasmAPIImpl struct {
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/handler_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
codectypes "github.com/line/lbm-sdk/v2/codec/types"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
Expand All @@ -16,6 +15,7 @@ import (
host "github.com/line/lbm-sdk/v2/x/ibc/core/24-host"
stakingtypes "github.com/line/lbm-sdk/v2/x/staking/types"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvmtypes "github.com/line/wasmvm/types"
)

type DefaultMessageHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/handler_plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"github.com/line/lbm-sdk/v2/x/wasm/internal/keeper/wasmtesting"
"testing"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
banktypes "github.com/line/lbm-sdk/v2/x/bank/types"
distributiontypes "github.com/line/lbm-sdk/v2/x/distribution/types"
stakingtypes "github.com/line/lbm-sdk/v2/x/staking/types"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/internal/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
"fmt"
"path/filepath"

wasmvm "github.com/CosmWasm/wasmvm"
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
"github.com/line/lbm-sdk/v2/codec"
"github.com/line/lbm-sdk/v2/store/prefix"
sdk "github.com/line/lbm-sdk/v2/types"
Expand All @@ -18,6 +16,8 @@ import (
abci "github.com/line/ostracon/abci/types"
"github.com/line/ostracon/crypto"
"github.com/line/ostracon/libs/log"
wasmvm "github.com/line/wasmvm"
wasmvmtypes "github.com/line/wasmvm/types"
)

// MaxGas for a contract is 10 billion wasmer gas (enforced in rust to prevent overflow)
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/internal/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"testing"
"time"

wasmvm "github.com/CosmWasm/wasmvm"
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
stypes "github.com/line/lbm-sdk/v2/store/types"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
Expand All @@ -18,6 +16,8 @@ import (
"github.com/line/lbm-sdk/v2/x/wasm/internal/keeper/wasmtesting"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
tmproto "github.com/line/ostracon/proto/ostracon/types"
wasmvm "github.com/line/wasmvm"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/proposal_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"io/ioutil"
"testing"

wasmvm "github.com/CosmWasm/wasmvm"
sdk "github.com/line/lbm-sdk/v2/types"
govtypes "github.com/line/lbm-sdk/v2/x/gov/types"
"github.com/line/lbm-sdk/v2/x/params/types/proposal"
"github.com/line/lbm-sdk/v2/x/wasm/internal/keeper/wasmtesting"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvm "github.com/line/wasmvm"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/internal/keeper/querier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (

"github.com/line/lbm-sdk/v2/x/wasm/internal/keeper/wasmtesting"

cosmwasm "github.com/CosmWasm/wasmvm"
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
sdkErrors "github.com/line/lbm-sdk/v2/types/errors"
"github.com/line/lbm-sdk/v2/types/query"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
"github.com/line/ostracon/libs/log"
cosmwasm "github.com/line/wasmvm"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/query_plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
channeltypes "github.com/line/lbm-sdk/v2/x/ibc/core/04-channel/types"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
distributiontypes "github.com/line/lbm-sdk/v2/x/distribution/types"
stakingtypes "github.com/line/lbm-sdk/v2/x/staking/types"
abci "github.com/line/ostracon/abci/types"
wasmvmtypes "github.com/line/wasmvm/types"
)

type QueryHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/recurse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/line/lbm-sdk/v2/x/wasm/internal/types"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/reflect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"strings"
"testing"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
"github.com/line/lbm-sdk/v2/codec"
codectypes "github.com/line/lbm-sdk/v2/codec/types"
sdk "github.com/line/lbm-sdk/v2/types"
Expand All @@ -16,6 +15,7 @@ import (
bankkeeper "github.com/line/lbm-sdk/v2/x/bank/keeper"
banktypes "github.com/line/lbm-sdk/v2/x/bank/types"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/relay.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package keeper

import (
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvmtypes "github.com/line/wasmvm/types"
)

// OnOpenChannel calls the contract to participate in the IBC channel handshake step.
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/internal/keeper/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"errors"
"testing"

wasmvm "github.com/CosmWasm/wasmvm"
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
"github.com/line/lbm-sdk/v2/x/wasm/internal/keeper/wasmtesting"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
wasmvm "github.com/line/wasmvm"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/staking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"io/ioutil"
"testing"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
codectypes "github.com/line/lbm-sdk/v2/codec/types"
"github.com/line/lbm-sdk/v2/crypto/keys/secp256k1"
sdk "github.com/line/lbm-sdk/v2/types"
Expand All @@ -17,6 +16,7 @@ import (
stakingkeeper "github.com/line/lbm-sdk/v2/x/staking/keeper"
"github.com/line/lbm-sdk/v2/x/staking/types"
stakingtypes "github.com/line/lbm-sdk/v2/x/staking/types"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/submsg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

"github.com/stretchr/testify/assert"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
wasmvmtypes "github.com/line/wasmvm/types"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/keeper/wasmtesting/messenger.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package wasmtesting
import (
"errors"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/line/lbm-sdk/v2/types"
wasmvmtypes "github.com/line/wasmvm/types"
)

type MockMessageHandler struct {
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/internal/keeper/wasmtesting/mock_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"bytes"
"crypto/sha256"

wasmvm "github.com/CosmWasm/wasmvm"
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
"github.com/line/lbm-sdk/v2/x/wasm/internal/types"
"github.com/line/ostracon/libs/rand"
wasmvm "github.com/line/wasmvm"
wasmvmtypes "github.com/line/wasmvm/types"
)

var _ types.WasmerEngine = &MockWasmer{}
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/types/store.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package types

import (
wasmvm "github.com/CosmWasm/wasmvm"
storetypes "github.com/line/lbm-sdk/v2/store/types"
wasmvm "github.com/line/wasmvm"
)

var _ wasmvm.KVStore = (*WasmStore)(nil)
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"encoding/json"
"fmt"

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
"github.com/gogo/protobuf/jsonpb"
sdk "github.com/line/lbm-sdk/v2/types"
sdkerrors "github.com/line/lbm-sdk/v2/types/errors"
wasmvmtypes "github.com/line/wasmvm/types"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions x/wasm/internal/types/wasmer_engine.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package types

import (
wasmvm "github.com/CosmWasm/wasmvm"
wasmvmtypes "github.com/CosmWasm/wasmvm/types"
wasmvm "github.com/line/wasmvm"
wasmvmtypes "github.com/line/wasmvm/types"
)

// WasmerEngine defines the WASM contract runtime engine.
Expand Down
9 changes: 5 additions & 4 deletions x/wasm/linkwasmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ module github.com/line/lbm-sdk/v2/x/wasm/linkwasmd
go 1.13

require (
github.com/golang/snappy v0.0.3-0.20201103224600-674baa8c7fc3 // indirect
github.com/gorilla/mux v1.8.0
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect
github.com/line/lbm-sdk/v2 v2.0.0-init.1.0.20210407071744-95eb4e7aef27
github.com/line/ostracon v0.34.9-0.20210406083837-4183d649b30c
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210406062110-9424ca70955a
github.com/line/ostracon v0.34.9-0.20210429084710-ef4fe0a40c7d
github.com/line/tm-db/v2 v2.0.0-init.1.0.20210413083915-5bb60e117524
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.3.1
github.com/spf13/cobra v1.1.3
github.com/spf13/viper v1.7.1
github.com/stretchr/testify v1.7.0
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954 // indirect
github.com/tendermint/tm-db v0.6.4 // indirect
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect
)

replace (
github.com/CosmWasm/wasmvm => github.com/line/wasmvm v0.14.0-0.3.0
brew0722 marked this conversation as resolved.
Show resolved Hide resolved
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/line/lbm-sdk/v2 => ../../..
github.com/tendermint/tm-db => github.com/line/tm-db v0.5.2
Expand Down
Loading