diff --git a/tests/testdata/babylon_contract.wasm b/tests/testdata/babylon_contract.wasm index 65480942..5072a845 100644 Binary files a/tests/testdata/babylon_contract.wasm and b/tests/testdata/babylon_contract.wasm differ diff --git a/tests/testdata/btc_staking.wasm b/tests/testdata/btc_staking.wasm index 0daf88c2..93015f7d 100644 Binary files a/tests/testdata/btc_staking.wasm and b/tests/testdata/btc_staking.wasm differ diff --git a/tests/testdata/version.txt b/tests/testdata/version.txt index b6fb89e7..2b7c938d 100644 --- a/tests/testdata/version.txt +++ b/tests/testdata/version.txt @@ -1 +1 @@ -77a165d570b7f78d315d94f7adde850cd8874547 +35d2a493ba44af372b0ab5eaf4a414e6967b8c67 diff --git a/x/babylon/contract/out_message.go b/x/babylon/contract/out_message.go index 4ea16f53..48dae437 100644 --- a/x/babylon/contract/out_message.go +++ b/x/babylon/contract/out_message.go @@ -1,7 +1,5 @@ package contract -import "time" - // SudoMsg is a message sent from the Babylon module to a smart contract type SudoMsg struct { BeginBlockMsg *BeginBlock `json:"begin_block,omitempty"` @@ -9,17 +7,11 @@ type SudoMsg struct { } type BeginBlock struct { - Height int64 `json:"height"` // Height is the height of the block - HashHex string `json:"hash_hex"` // HashHex is the hash of the block in hex - Time time.Time `json:"time"` // Time is the time of the block - ChainID string `json:"chain_id"` // ChainId is the chain ID of the block - AppHashHex string `json:"app_hash_hex"` // AppHashHex is the app hash of the block in hex + HashHex string `json:"hash_hex"` // HashHex is the hash of the block in hex + AppHashHex string `json:"app_hash_hex"` // AppHashHex is the app hash of the block in hex } type EndBlock struct { - Height int64 `json:"height"` // Height is the height of the block - HashHex string `json:"hash_hex"` // HashHex is the hash of the block in hex - Time time.Time `json:"time"` // Time is the time of the block - ChainID string `json:"chain_id"` // ChainId is the chain ID of the block - AppHashHex string `json:"app_hash_hex"` // AppHashHex is the app hash of the block in hex + HashHex string `json:"hash_hex"` // HashHex is the hash of the block in hex + AppHashHex string `json:"app_hash_hex"` // AppHashHex is the app hash of the block in hex } diff --git a/x/babylon/keeper/wasm.go b/x/babylon/keeper/wasm.go index a91f879a..8ec307a2 100644 --- a/x/babylon/keeper/wasm.go +++ b/x/babylon/keeper/wasm.go @@ -23,10 +23,7 @@ func (k Keeper) SendBeginBlockMsg(ctx sdk.Context) error { headerInfo := ctx.HeaderInfo() msg := contract.SudoMsg{ BeginBlockMsg: &contract.BeginBlock{ - Height: headerInfo.Height, HashHex: hex.EncodeToString(headerInfo.Hash), - Time: headerInfo.Time, - ChainID: headerInfo.ChainID, AppHashHex: hex.EncodeToString(headerInfo.AppHash), }, } @@ -49,10 +46,7 @@ func (k Keeper) SendEndBlockMsg(ctx sdk.Context) error { headerInfo := ctx.HeaderInfo() msg := contract.SudoMsg{ EndBlockMsg: &contract.EndBlock{ - Height: headerInfo.Height, HashHex: hex.EncodeToString(headerInfo.Hash), - Time: headerInfo.Time, - ChainID: headerInfo.ChainID, AppHashHex: hex.EncodeToString(headerInfo.AppHash), }, }