From a2857e3b1d9d45419244f7c6fbf44499b5063666 Mon Sep 17 00:00:00 2001 From: Jeff Schroeder Date: Thu, 29 Dec 2022 10:46:55 -0500 Subject: [PATCH] sdk: test BodyWormchainStoreCode.Serialize() --- sdk/vaa/payloads_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sdk/vaa/payloads_test.go b/sdk/vaa/payloads_test.go index cca7f305d..0a499f117 100644 --- a/sdk/vaa/payloads_test.go +++ b/sdk/vaa/payloads_test.go @@ -104,3 +104,11 @@ func TestBodyTokenBridgeUpgradeContractSerialize(t *testing.T) { serializedBodyTokenBridgeUpgradeContract := bodyTokenBridgeUpgradeContract.Serialize() assert.Equal(t, expected, hex.EncodeToString(serializedBodyTokenBridgeUpgradeContract)) } + +func TestBodyWormchainStoreCodeSerialize(t *testing.T) { + expected := "0000000000000000000000000000000000000000005761736d644d6f64756c65010c200102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20" + bodyWormchainStoreCode := BodyWormchainStoreCode{ + WasmHash: [32]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, + } + assert.Equal(t, expected, hex.EncodeToString(bodyWormchainStoreCode.Serialize())) +}