Skip to content

Commit 9e5b7c4

Browse files
authored
Merge pull request #158 from CosmWasm/update-to-0.12.0
Update to 0.12.0
2 parents 01d827f + 21f2c6b commit 9e5b7c4

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wasmvm"
3-
version = "0.12.0-alpha3"
3+
version = "0.12.0"
44
authors = ["Ethan Frey <[email protected]>"]
55
edition = "2018"
66
description = "Go bindings for cosmwasm contracts"
@@ -32,8 +32,8 @@ singlepass = ["cosmwasm-vm/default-singlepass"]
3232
cranelift = ["cosmwasm-vm/default-cranelift"]
3333

3434
[dependencies]
35-
cosmwasm-std = { version = "0.12.0-alpha3", features = ["iterator"]}
36-
cosmwasm-vm = { version = "0.12.0-alpha3", features = ["iterator"] }
35+
cosmwasm-std = { version = "0.12.0", features = ["iterator"]}
36+
cosmwasm-vm = { version = "0.12.0", features = ["iterator"] }
3737
errno = "0.2"
3838
serde_json = "1.0"
3939
thiserror = "1.0"

api/lib_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestInstantiate(t *testing.T) {
9292
res, cost, err := Instantiate(cache, id, env, info, msg, &igasMeter, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
9393
require.NoError(t, err)
9494
requireOkResponse(t, res, 0)
95-
assert.Equal(t, uint64(0x113ae), cost)
95+
assert.Equal(t, uint64(0x13860), cost)
9696

9797
var resp types.InitResult
9898
err = json.Unmarshal(res, &resp)
@@ -123,7 +123,7 @@ func TestHandle(t *testing.T) {
123123
diff := time.Now().Sub(start)
124124
require.NoError(t, err)
125125
requireOkResponse(t, res, 0)
126-
assert.Equal(t, uint64(0x113ae), cost)
126+
assert.Equal(t, uint64(0x13860), cost)
127127
t.Logf("Time (%d gas): %s\n", 0xbb66, diff)
128128

129129
// execute with the same store
@@ -136,7 +136,7 @@ func TestHandle(t *testing.T) {
136136
res, cost, err = Handle(cache, id, env, info, []byte(`{"release":{}}`), &igasMeter2, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
137137
diff = time.Now().Sub(start)
138138
require.NoError(t, err)
139-
assert.Equal(t, uint64(0x1a021), cost)
139+
assert.Equal(t, uint64(0x1d663), cost)
140140
t.Logf("Time (%d gas): %s\n", cost, diff)
141141

142142
// make sure it read the balance properly and we got 250 atoms
@@ -179,7 +179,7 @@ func TestHandleCpuLoop(t *testing.T) {
179179
diff := time.Now().Sub(start)
180180
require.NoError(t, err)
181181
requireOkResponse(t, res, 0)
182-
assert.Equal(t, uint64(0x113ae), cost)
182+
assert.Equal(t, uint64(0x13860), cost)
183183
t.Logf("Time (%d gas): %s\n", 0xbb66, diff)
184184

185185
// execute a cpu loop
@@ -331,7 +331,7 @@ func TestMultipleInstances(t *testing.T) {
331331
require.NoError(t, err)
332332
requireOkResponse(t, res, 0)
333333
// we now count wasm gas charges and db writes
334-
assert.Equal(t, uint64(0x112e8), cost)
334+
assert.Equal(t, uint64(0x13762), cost)
335335

336336
// instance2 controlled by mary
337337
gasMeter2 := NewMockGasMeter(TESTING_GAS_LIMIT)
@@ -342,14 +342,14 @@ func TestMultipleInstances(t *testing.T) {
342342
res, cost, err = Instantiate(cache, id, env, info, msg, &igasMeter2, store2, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
343343
require.NoError(t, err)
344344
requireOkResponse(t, res, 0)
345-
assert.Equal(t, uint64(0x1134b), cost)
345+
assert.Equal(t, uint64(0x137e1), cost)
346346

347347
// fail to execute store1 with mary
348-
resp := exec(t, cache, id, "mary", store1, api, querier, 0xf703)
348+
resp := exec(t, cache, id, "mary", store1, api, querier, 0x11574)
349349
require.Equal(t, "Unauthorized", resp.Err)
350350

351351
// succeed to execute store1 with fred
352-
resp = exec(t, cache, id, "fred", store1, api, querier, 0x1a021)
352+
resp = exec(t, cache, id, "fred", store1, api, querier, 0x1d663)
353353
require.Equal(t, "", resp.Err)
354354
require.Equal(t, 1, len(resp.Ok.Messages))
355355
attributes := resp.Ok.Attributes
@@ -358,7 +358,7 @@ func TestMultipleInstances(t *testing.T) {
358358
require.Equal(t, "bob", attributes[1].Value)
359359

360360
// succeed to execute store2 with mary
361-
resp = exec(t, cache, id, "mary", store2, api, querier, 0x1a021)
361+
resp = exec(t, cache, id, "mary", store2, api, querier, 0x1d663)
362362
require.Equal(t, "", resp.Err)
363363
require.Equal(t, 1, len(resp.Ok.Messages))
364364
attributes = resp.Ok.Attributes

api/testdata/hackatom.wasm

11 KB
Binary file not shown.

api/testdata/queue.wasm

32.4 KB
Binary file not shown.

api/testdata/reflect.wasm

9.63 KB
Binary file not shown.

0 commit comments

Comments
 (0)