diff --git a/crates/radix-engine-toolkit-uniffi/tests/bindings/example_test.go b/crates/radix-engine-toolkit-uniffi/tests/bindings/example_test.go index 7fde27b5..124ddc92 100644 --- a/crates/radix-engine-toolkit-uniffi/tests/bindings/example_test.go +++ b/crates/radix-engine-toolkit-uniffi/tests/bindings/example_test.go @@ -10,6 +10,7 @@ package main import ( "encoding/hex" + "fmt" "reflect" "testing" @@ -48,7 +49,7 @@ func newVirtualAccount(t *testing.T, networkId uint8) (*radix_engine_toolkit_uni } func TestRetManifestBuilder(t *testing.T) { - var networkId uint8 = 1 + var networkId uint8 = 2 // Stokenet var account, _, publicKey = newVirtualAccount(t, networkId) var addresses = radix_engine_toolkit_uniffi.GetKnownAddresses(networkId) @@ -111,7 +112,7 @@ func TestRetManifestBuilder(t *testing.T) { assert(t, error == nil, "Transaction Intent compile failed") intentHex := hex.EncodeToString(intentBytes) - assert(t, intentHex == "4d220104210707010a01000000000000000a0a0000000000000009010000002200012007210284bf" + + assert(t, intentHex == "4d220104210707020a01000000000000000a0a0000000000000009010000002200012007210284bf" + "7562262bbd6940085748f3be6afa52ae317155181ece31b66351ccffa4b0010108000020220441038000c0566318c6318c6" + "4f798cacc6318c6318cf7be8af78a78f8a6318c6318c60c086c6f636b5f666565210185000010632d5ec76b050000000000" + "0000000000000000000041038000c0566318c6318c64f798cacc6318c6318cf7be8af78a78f8a6318c6318c60c046672656" + @@ -123,7 +124,7 @@ func TestRetManifestBuilder(t *testing.T) { } func TestRetNotarizedTransaction(t *testing.T) { - var networkId uint8 = 1 + var networkId uint8 = 2 // Stokenet var account1, privateKey1, publicKey1 = newVirtualAccount(t, networkId) var account2, privateKey2, _ = newVirtualAccount(t, networkId) var addresses = radix_engine_toolkit_uniffi.GetKnownAddresses(networkId) @@ -136,8 +137,8 @@ func TestRetNotarizedTransaction(t *testing.T) { mb, err = mb.AccountWithdraw(account1, addresses.ResourceAddresses.Xrd, radix_engine_toolkit_uniffi.DecimalOne()) assert(t, err == nil, "AccountWithdraw failed") - mb, err = mb.AccountDepositEntireWorktop(account2) - assert(t, err == nil, "AccountDepositEntireWorktop failed") + mb, err = mb.AccountTryDepositEntireWorktopOrAbort(account2, nil) + assert(t, err == nil, "AccountTryDepositEntireWorktopOrAbort failed") var transactionManifest = mb.Build(networkId) @@ -175,18 +176,21 @@ func TestRetNotarizedTransaction(t *testing.T) { var transactionBytes, _ = notarizedTransaction.Compile() transactionHex := hex.EncodeToString(transactionBytes) - assert(t, transactionHex == "4d22030221022104210707010a01000000000000000a0a00000000000000090100000022000" + + fmt.Print(transactionHex) + + assert(t, transactionHex == "4d22030221022104210707020a01000000000000000a0a00000000000000090100000022000" + "12007210284bf7562262bbd6940085748f3be6afa52ae317155181ece31b66351ccffa4b0010108000020220341038000c0" + "566318c6318c64f798cacc6318c6318cf7be8af78a78f8a6318c6318c60c086c6f636b5f666565210185000010632d5ec76" + "b0500000000000000000000000000000041038000d1e120200bde95a52581c9284dab790cd0a1fd242eee0096186d6e5ef3" + "670c087769746864726177210280005da66318c6318c61f5a61b4c6318c6318cf794aa8d295f14e6318c6318c685000064a" + "7b3b6e00d0000000000000000000000000000000041038000d1e120200bde95a52581c9284dab790cd0a1fd242eee009618" + - "6d6e5ef3670c0d6465706f7369745f62617463682101830020200022010121020c0a746578742f706c61696e2200010c115" + - "36f6d7220585244205472616e736665722022020001210120074100df99c5ae00f9b69903074625de0d5175a89a0b2ae19d" + - "5cf599dbcb0be93512d838b58d9829a2b9afd3f511b97d3ce01f24a990186eb75f7092e496c54aef8406000121012007410" + - "0df99c5ae00f9b69903074625de0d5175a89a0b2ae19d5cf599dbcb0be93512d838b58d9829a2b9afd3f511b97d3ce01f24" + - "a990186eb75f7092e496c54aef84062200012101200741018588242bce5f10c823b7a7cc59cafaa958e2380a95867ee1f7b" + - "e78f8772092300373c892fb35f22f1392e2b9edd0833c3d655961e400ae954d2a6e18d1ad55e8", + "6d6e5ef3670c1a7472795f6465706f7369745f62617463685f6f725f61626f72742102830022000020200022010121020c0" + + "a746578742f706c61696e2200010c11536f6d7220585244205472616e7366657220220200012101200741009fc7e77ff3f1" + + "4ad73d83333f636f591933539126e4d9f226780a4fa273ed9fc905849b750318fc3ea50ef85bda0ba3ecb6778967e371555" + + "b48352d0d8d80dbf300012101200741009fc7e77ff3f14ad73d83333f636f591933539126e4d9f226780a4fa273ed9fc905" + + "849b750318fc3ea50ef85bda0ba3ecb6778967e371555b48352d0d8d80dbf32200012101200741010e0b2475a6b9ccc784b" + + "6e23c6766b0757b0d37d1beb825e7acd85cd8ec63badf660f5b34285e9cfb511325d5dc67e8494a973998298dc6076d548e" + + "36f80ef54d", "Notarized Transaction bytes not equal") }