Skip to content

Commit f68e792

Browse files
authored
Merge pull request #561 from CosmWasm/co/bump-cw
Update to cosmwasm 2.2-rc.1
2 parents 4728aa1 + a327452 commit f68e792

File tree

3 files changed

+172
-458
lines changed

3 files changed

+172
-458
lines changed

internal/api/lib_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ func TestInstantiate(t *testing.T) {
485485
res, cost, err := Instantiate(cache, checksum, env, info, msg, &igasMeter, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
486486
require.NoError(t, err)
487487
requireOkResponse(t, res, 0)
488-
assert.Equal(t, uint64(0x8c288c), cost.UsedInternally)
488+
assert.Equal(t, uint64(0xb1fe27), cost.UsedInternally)
489489

490490
var result types.ContractResult
491491
err = json.Unmarshal(res, &result)
@@ -516,7 +516,7 @@ func TestExecute(t *testing.T) {
516516
diff := time.Since(start)
517517
require.NoError(t, err)
518518
requireOkResponse(t, res, 0)
519-
assert.Equal(t, uint64(0x8c288c), cost.UsedInternally)
519+
assert.Equal(t, uint64(0xb1fe27), cost.UsedInternally)
520520
t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff)
521521

522522
// execute with the same store
@@ -529,7 +529,7 @@ func TestExecute(t *testing.T) {
529529
res, cost, err = Execute(cache, checksum, env, info, []byte(`{"release":{}}`), &igasMeter2, store, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
530530
diff = time.Since(start)
531531
require.NoError(t, err)
532-
assert.Equal(t, uint64(0xfaea3d), cost.UsedInternally)
532+
assert.Equal(t, uint64(0x1416da5), cost.UsedInternally)
533533
t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff)
534534

535535
// make sure it read the balance properly and we got 250 atoms
@@ -637,7 +637,7 @@ func TestExecuteCpuLoop(t *testing.T) {
637637
diff := time.Since(start)
638638
require.NoError(t, err)
639639
requireOkResponse(t, res, 0)
640-
assert.Equal(t, uint64(0x64fb31), cost.UsedInternally)
640+
assert.Equal(t, uint64(0x79f527), cost.UsedInternally)
641641
t.Logf("Time (%d gas): %s\n", cost.UsedInternally, diff)
642642

643643
// execute a cpu loop
@@ -866,7 +866,7 @@ func TestMultipleInstances(t *testing.T) {
866866
require.NoError(t, err)
867867
requireOkResponse(t, res, 0)
868868
// we now count wasm gas charges and db writes
869-
assert.Equal(t, uint64(0x8b0ca4), cost.UsedInternally)
869+
assert.Equal(t, uint64(0xb0c2cd), cost.UsedInternally)
870870

871871
// instance2 controlled by mary
872872
gasMeter2 := NewMockGasMeter(TESTING_GAS_LIMIT)
@@ -877,14 +877,14 @@ func TestMultipleInstances(t *testing.T) {
877877
res, cost, err = Instantiate(cache, checksum, env, info, msg, &igasMeter2, store2, api, &querier, TESTING_GAS_LIMIT, TESTING_PRINT_DEBUG)
878878
require.NoError(t, err)
879879
requireOkResponse(t, res, 0)
880-
assert.Equal(t, uint64(0x8baa51), cost.UsedInternally)
880+
assert.Equal(t, uint64(0xb1760a), cost.UsedInternally)
881881

882882
// fail to execute store1 with mary
883-
resp := exec(t, cache, checksum, "mary", store1, api, querier, 0x85e616)
883+
resp := exec(t, cache, checksum, "mary", store1, api, querier, 0xa7c5ce)
884884
require.Equal(t, "Unauthorized", resp.Err)
885885

886886
// succeed to execute store1 with fred
887-
resp = exec(t, cache, checksum, "fred", store1, api, querier, 0xfa70f3)
887+
resp = exec(t, cache, checksum, "fred", store1, api, querier, 0x140e8ad)
888888
require.Equal(t, "", resp.Err)
889889
require.Equal(t, 1, len(resp.Ok.Messages))
890890
attributes := resp.Ok.Attributes
@@ -893,7 +893,7 @@ func TestMultipleInstances(t *testing.T) {
893893
require.Equal(t, "bob", attributes[1].Value)
894894

895895
// succeed to execute store2 with mary
896-
resp = exec(t, cache, checksum, "mary", store2, api, querier, 0xfaad98)
896+
resp = exec(t, cache, checksum, "mary", store2, api, querier, 0x1412b29)
897897
require.Equal(t, "", resp.Err)
898898
require.Equal(t, 1, len(resp.Ok.Messages))
899899
attributes = resp.Ok.Attributes

0 commit comments

Comments
 (0)