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

Migrate wasm to proto #110

Merged
merged 7 commits into from
May 5, 2020
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
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func NewWasmApp(
}
wasmConfig := wasmWrap.Wasm

app.wasmKeeper = wasm.NewKeeper(app.cdc, keys[wasm.StoreKey], app.accountKeeper, app.bankKeeper, wasmRouter, wasmDir, wasmConfig)
app.wasmKeeper = wasm.NewKeeper(appCodec, keys[wasm.StoreKey], app.accountKeeper, app.bankKeeper, wasmRouter, wasmDir, wasmConfig)

// register the proposal types
govRouter := gov.NewRouter()
Expand Down
151 changes: 0 additions & 151 deletions app/integration/common_test.go

This file was deleted.

102 changes: 0 additions & 102 deletions app/integration/integration_test.go

This file was deleted.

1 change: 0 additions & 1 deletion lcd_test/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func InitializeLCD(

db := dbm.NewMemDB()
gapp := app.NewWasmApp(logger, db, nil, true, 0, map[int64]bool{}, "", baseapp.SetPruning(store.PruneNothing))
cdc = app.MakeCodec()

genDoc, valConsPubKeys, valOperAddrs, privVal, err := defaultGenesis(config, nValidators, initAddrs, minting)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion x/wasm/client/utils/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
)

func GetTestData() ([]byte, []byte, []byte, error) {
wasmCode, err := ioutil.ReadFile("../../internal/keeper/testdata/contract.wasm")
wasmCode, err := ioutil.ReadFile("../../keeper/testdata/contract.wasm")

if err != nil {
return nil, nil, nil, err
Expand Down
12 changes: 6 additions & 6 deletions x/wasm/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ func TestInitGenesis(t *testing.T) {

deposit := sdk.NewCoins(sdk.NewInt64Coin("denom", 100000))
topUp := sdk.NewCoins(sdk.NewInt64Coin("denom", 5000))
creator := createFakeFundedAccount(data.ctx, data.acctKeeper, deposit.Add(deposit...))
fred := createFakeFundedAccount(data.ctx, data.acctKeeper, topUp)
creator := createFakeFundedAccount(t, data.ctx, data.acctKeeper, data.bankKeeper, deposit.Add(deposit...))
fred := createFakeFundedAccount(t, data.ctx, data.acctKeeper, data.bankKeeper, topUp)

h := data.module.NewHandler()
q := data.module.NewQuerierHandler()

t.Log("fail with invalid source url")
msg := MsgStoreCode{
Sender: creator,
WASMByteCode: testContract,
WasmByteCode: testContract,
Source: "someinvalidurl",
Builder: "",
}
Expand All @@ -41,7 +41,7 @@ func TestInitGenesis(t *testing.T) {
t.Log("fail with relative source url")
msg = MsgStoreCode{
Sender: creator,
WASMByteCode: testContract,
WasmByteCode: testContract,
Source: "./testdata/escrow.wasm",
Builder: "",
}
Expand All @@ -55,7 +55,7 @@ func TestInitGenesis(t *testing.T) {
t.Log("fail with invalid build tag")
msg = MsgStoreCode{
Sender: creator,
WASMByteCode: testContract,
WasmByteCode: testContract,
Source: "",
Builder: "somerandombuildtag-0.6.2",
}
Expand All @@ -69,7 +69,7 @@ func TestInitGenesis(t *testing.T) {
t.Log("no error with valid source and build tag")
msg = MsgStoreCode{
Sender: creator,
WASMByteCode: testContract,
WasmByteCode: testContract,
Source: "https://github.com/cosmwasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm",
Builder: "confio/cosmwasm-opt:0.7.0",
}
Expand Down
Loading