go-cosmwasm 0.11.0-alpha1 and fix compiler issues
This commit is contained in:
2
go.mod
2
go.mod
@@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
|
||||
go 1.14
|
||||
|
||||
require (
|
||||
github.com/CosmWasm/go-cosmwasm v0.10.0
|
||||
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha1
|
||||
github.com/cosmos/cosmos-sdk v0.39.1-0.20200727135228-9d00f712e334
|
||||
github.com/golang/mock v1.4.3 // indirect
|
||||
github.com/google/gofuzz v1.0.0
|
||||
|
||||
2
go.sum
2
go.sum
@@ -11,6 +11,8 @@ github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQ
|
||||
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4=
|
||||
github.com/CosmWasm/go-cosmwasm v0.10.0 h1:3DBOiGtLllevLgf8PQO5+hRCKKqYEQJIw6cgaZzr1Ag=
|
||||
github.com/CosmWasm/go-cosmwasm v0.10.0/go.mod h1:gAFCwllx97ejI+m9SqJQrmd2SBW7HA0fOjvWWJjM2uc=
|
||||
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha1 h1:5c87JcnA+ncQlSJO/mEK6z9oIi/oS46CCsYduvRgPvw=
|
||||
github.com/CosmWasm/go-cosmwasm v0.11.0-alpha1/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=
|
||||
|
||||
@@ -234,7 +234,7 @@ func (k Keeper) instantiate(ctx sdk.Context, codeID uint64, creator, admin sdk.A
|
||||
}
|
||||
|
||||
// emit all events from this contract itself
|
||||
events := types.ParseEvents(res.Log, contractAddress)
|
||||
events := types.ParseEvents(res.Attributes, contractAddress)
|
||||
ctx.EventManager().EmitEvents(events)
|
||||
|
||||
err = k.dispatchMessages(ctx, contractAddress, res.Messages)
|
||||
@@ -287,7 +287,7 @@ func (k Keeper) Execute(ctx sdk.Context, contractAddress sdk.AccAddress, caller
|
||||
}
|
||||
|
||||
// emit all events from this contract itself
|
||||
events := types.ParseEvents(res.Log, contractAddress)
|
||||
events := types.ParseEvents(res.Attributes, contractAddress)
|
||||
ctx.EventManager().EmitEvents(events)
|
||||
|
||||
err = k.dispatchMessages(ctx, contractAddress, res.Messages)
|
||||
@@ -340,7 +340,7 @@ func (k Keeper) migrate(ctx sdk.Context, contractAddress sdk.AccAddress, caller
|
||||
}
|
||||
|
||||
// emit all events from this contract itself
|
||||
events := types.ParseEvents(res.Log, contractAddress)
|
||||
events := types.ParseEvents(res.Attributes, contractAddress)
|
||||
ctx.EventManager().EmitEvents(events)
|
||||
|
||||
historyEntry := contractInfo.AddMigration(ctx, newCodeID, msg)
|
||||
|
||||
@@ -228,7 +228,7 @@ func sdkToFullDelegation(ctx sdk.Context, keeper staking.Keeper, delegation stak
|
||||
Validator: delegation.ValidatorAddress.String(),
|
||||
Amount: convertSdkCoinToWasmCoin(amount),
|
||||
// TODO: AccumulatedRewards
|
||||
AccumulatedRewards: wasmTypes.NewCoin(0, bondDenom),
|
||||
AccumulatedRewards: wasmTypes.Coins{},
|
||||
// TODO: Determine redelegate
|
||||
CanRedelegate: wasmTypes.NewCoin(0, bondDenom),
|
||||
}, nil
|
||||
|
||||
@@ -229,7 +229,7 @@ const CustomEventType = "wasm"
|
||||
const AttributeKeyContractAddr = "contract_address"
|
||||
|
||||
// ParseEvents converts wasm LogAttributes into an sdk.Events (with 0 or 1 elements)
|
||||
func ParseEvents(logs []wasmTypes.LogAttribute, contractAddr sdk.AccAddress) sdk.Events {
|
||||
func ParseEvents(logs []wasmTypes.EventAttribute, contractAddr sdk.AccAddress) sdk.Events {
|
||||
if len(logs) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user