Skip to content

Commit 14b1080

Browse files
committed
update bindings
1 parent 6236388 commit 14b1080

File tree

10 files changed

+942
-129
lines changed

10 files changed

+942
-129
lines changed

bindings/bind/bcs_decoder_test.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -331,24 +331,3 @@ func TestDeserializer(t *testing.T) {
331331
des,
332332
)
333333
}
334-
335-
func TestDeserializer_ShouldFail(t *testing.T) {
336-
// TODO: this test will fail when https://github.com/block-vision/sui-go-sdk/pull/78
337-
// is released and will have to be removed
338-
339-
// mystenbcs encoder has an issue where fixed-size byte arrays ([n]byte) are treated as regular slices.
340-
// so encoding a u128 via their encoder will result in failure to decode it back.
341-
// We're using this behavior to test our DeserializeBCS error handling.
342-
u128AsByte := [16]byte{0xd2, 0xa, 0x1f, 0xeb, 0x8c, 0xa9, 0x54, 0xab}
343-
// Encode BCS
344-
bcsEncodedMsg := bytes.Buffer{}
345-
encoder := mystenbcs.NewEncoder(&bcsEncodedMsg)
346-
encoder.Encode(u128AsByte)
347-
bcsMsg := bcsEncodedMsg.Bytes()
348-
// Deserialize BCS
349-
_, err := DeserializeBCS(
350-
bcsMsg,
351-
[]string{"u128"},
352-
)
353-
require.NotNil(t, err)
354-
}

0 commit comments

Comments
 (0)