Merge pull request #126 from CosmWasm/update-test-contracts

Update test contracts
This commit is contained in:
Ethan Frey
2020-06-03 18:42:45 +02:00
committed by GitHub
8 changed files with 7 additions and 5 deletions

2
go.mod
View File

@@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
go 1.13
require (
github.com/CosmWasm/go-cosmwasm v0.0.0-20200603080847-883f85520aac
github.com/CosmWasm/go-cosmwasm v0.8.1-0.20200603124627-0af410d57fa1
github.com/btcsuite/btcd v0.0.0-20190807005414-4063feeff79a // indirect
github.com/cosmos/cosmos-sdk v0.38.3
github.com/golang/mock v1.4.3 // indirect

2
go.sum
View File

@@ -11,6 +11,8 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f h1:4O1om+U
github.com/ChainSafe/go-schnorrkel v0.0.0-20200102211924-4bcbc698314f/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4=
github.com/CosmWasm/go-cosmwasm v0.0.0-20200603080847-883f85520aac h1:Em+R1ZTKgnIT6bYhEqk8/e1IXuZDXvs7FyuUktNzWtg=
github.com/CosmWasm/go-cosmwasm v0.0.0-20200603080847-883f85520aac/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc=
github.com/CosmWasm/go-cosmwasm v0.8.1-0.20200603124627-0af410d57fa1 h1:yTh6KEZXpVtjkhRQQSKOpS4YbRNIz7VFcace5czQkDw=
github.com/CosmWasm/go-cosmwasm v0.8.1-0.20200603124627-0af410d57fa1/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=

View File

@@ -200,7 +200,7 @@ func TestInstantiate(t *testing.T) {
require.Equal(t, "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5", addr.String())
gasAfter := ctx.GasMeter().GasConsumed()
require.Equal(t, uint64(0x61f7), gasAfter-gasBefore)
require.Equal(t, uint64(0x78c3), gasAfter-gasBefore)
// ensure it is stored properly
info := keeper.GetContractInfo(ctx, addr)
@@ -295,7 +295,7 @@ func TestExecute(t *testing.T) {
// make sure gas is properly deducted from ctx
gasAfter := ctx.GasMeter().GasConsumed()
require.Equal(t, uint64(0x7b22), gasAfter-gasBefore)
require.Equal(t, uint64(0x7b38), gasAfter-gasBefore)
// ensure bob now exists and got both payments released
bobAcct = accKeeper.GetAccount(ctx, bob)

View File

@@ -22,8 +22,8 @@ type StakingInitMsg struct {
Decimals uint8 `json:"decimals"`
Validator sdk.ValAddress `json:"validator"`
ExitTax sdk.Dec `json:"exit_tax"`
// MinWithdrawl is uint128 encoded as a string (use sdk.Int?)
MinWithdrawl string `json:"min_withdrawl"`
// MinWithdrawal is uint128 encoded as a string (use sdk.Int?)
MinWithdrawl string `json:"min_withdrawal"`
}
// StakingHandleMsg is used to encode handle messages

Binary file not shown.

Binary file not shown.

Binary file not shown.