From 2c15eaad1749a0d43c889726908ef4f9d3af51f4 Mon Sep 17 00:00:00 2001
From: overcat <4catcode@gmail.com>
Date: Wed, 29 Nov 2023 10:45:30 +0800
Subject: [PATCH 1/6] Add support for Soroban.
---
docs/COMMANDS.md | 15 +
src/apdu/dispatcher.c | 15 +-
src/handler/handler.h | 16 +
src/handler/sign_soroban_authorization.c | 93 +++
src/settings.h | 5 +-
src/sw.h | 5 +
src/swap/handle_swap_sign_transaction.c | 1 +
src/transaction/transaction_formatter.c | 207 +++++-
src/transaction/transaction_parser.c | 593 +++++++++++++++++-
src/transaction/transaction_parser.h | 2 +
src/transaction/transaction_types.h | 121 +++-
src/types.h | 33 +-
src/ui/ui.h | 9 +-
src/ui/ui_menu_bagl.c | 31 +-
src/ui/ui_menu_nbgl.c | 24 +-
src/ui/ui_soroban_authorization_bagl.c | 347 ++++++++++
src/ui/ui_soroban_authorization_nbgl.c | 249 ++++++++
src/utils.c | 35 ++
src/utils.h | 27 +
tests_common_js/package-lock.json | 262 ++++----
tests_common_js/package.json | 2 +-
tests_common_js/src/index.ts | 460 +++++++++++++-
tests_generate_binary/package-lock.json | 4 +-
tests_unit/test_tx_formatter.c | 12 +
tests_unit/test_tx_parser.c | 12 +
tests_unit/testcases/opExtendFootprintTtl.txt | 5 +
.../opInvokeHostFunctionAssetApprove.txt | 12 +
.../opInvokeHostFunctionAssetTransfer.txt | 11 +
...vokeHostFunctionCreateContractNewAsset.txt | 6 +
...InvokeHostFunctionCreateContractWasmId.txt | 5 +
...okeHostFunctionCreateContractWrapAsset.txt | 5 +
.../testcases/opInvokeHostFunctionScvals.txt | 8 +
...opInvokeHostFunctionUnverifiedContract.txt | 8 +
...nUnverifiedContractWithApproveFunction.txt | 9 +
...UnverifiedContractWithTransferFunction.txt | 8 +
.../opInvokeHostFunctionUploadWasm.txt | 6 +
tests_unit/testcases/opRestoreFootprint.txt | 7 +
tests_zemu/package-lock.json | 381 +++++------
tests_zemu/package.json | 8 +-
.../s-op-extend-footprint-ttl/00000.png | Bin 0 -> 379 bytes
.../s-op-extend-footprint-ttl/00001.png | Bin 0 -> 347 bytes
.../s-op-extend-footprint-ttl/00002.png | Bin 0 -> 379 bytes
.../s-op-extend-footprint-ttl/00003.png | Bin 0 -> 454 bytes
.../s-op-extend-footprint-ttl/00004.png | Bin 0 -> 403 bytes
.../s-op-extend-footprint-ttl/00005.png | Bin 0 -> 404 bytes
.../s-op-extend-footprint-ttl/00006.png | Bin 0 -> 389 bytes
.../s-op-extend-footprint-ttl/00007.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 385 bytes
.../00003.png | Bin 0 -> 452 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 390 bytes
.../00006.png | Bin 0 -> 365 bytes
.../00007.png | Bin 0 -> 495 bytes
.../00008.png | Bin 0 -> 509 bytes
.../00009.png | Bin 0 -> 498 bytes
.../00010.png | Bin 0 -> 404 bytes
.../00011.png | Bin 0 -> 313 bytes
.../00012.png | Bin 0 -> 448 bytes
.../00013.png | Bin 0 -> 453 bytes
.../00014.png | Bin 0 -> 435 bytes
.../00015.png | Bin 0 -> 375 bytes
.../00016.png | Bin 0 -> 501 bytes
.../00017.png | Bin 0 -> 480 bytes
.../00018.png | Bin 0 -> 490 bytes
.../00019.png | Bin 0 -> 420 bytes
.../00020.png | Bin 0 -> 321 bytes
.../00021.png | Bin 0 -> 394 bytes
.../00022.png | Bin 0 -> 408 bytes
.../00023.png | Bin 0 -> 389 bytes
.../00024.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 391 bytes
.../00003.png | Bin 0 -> 458 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 390 bytes
.../00006.png | Bin 0 -> 365 bytes
.../00007.png | Bin 0 -> 495 bytes
.../00008.png | Bin 0 -> 509 bytes
.../00009.png | Bin 0 -> 498 bytes
.../00010.png | Bin 0 -> 404 bytes
.../00011.png | Bin 0 -> 315 bytes
.../00012.png | Bin 0 -> 327 bytes
.../00013.png | Bin 0 -> 448 bytes
.../00014.png | Bin 0 -> 453 bytes
.../00015.png | Bin 0 -> 435 bytes
.../00016.png | Bin 0 -> 375 bytes
.../00017.png | Bin 0 -> 438 bytes
.../00018.png | Bin 0 -> 433 bytes
.../00019.png | Bin 0 -> 436 bytes
.../00020.png | Bin 0 -> 373 bytes
.../00021.png | Bin 0 -> 408 bytes
.../00022.png | Bin 0 -> 389 bytes
.../00023.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 383 bytes
.../00003.png | Bin 0 -> 455 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 408 bytes
.../00006.png | Bin 0 -> 408 bytes
.../00007.png | Bin 0 -> 389 bytes
.../00008.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 365 bytes
.../00003.png | Bin 0 -> 450 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 408 bytes
.../00006.png | Bin 0 -> 389 bytes
.../00007.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 387 bytes
.../00003.png | Bin 0 -> 453 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 408 bytes
.../00006.png | Bin 0 -> 389 bytes
.../00007.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 342 bytes
.../00003.png | Bin 0 -> 406 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 390 bytes
.../00006.png | Bin 0 -> 365 bytes
.../00007.png | Bin 0 -> 495 bytes
.../00008.png | Bin 0 -> 509 bytes
.../00009.png | Bin 0 -> 498 bytes
.../00010.png | Bin 0 -> 404 bytes
.../00011.png | Bin 0 -> 288 bytes
.../00012.png | Bin 0 -> 492 bytes
.../00013.png | Bin 0 -> 483 bytes
.../00014.png | Bin 0 -> 427 bytes
.../00015.png | Bin 0 -> 389 bytes
.../00016.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 342 bytes
.../00003.png | Bin 0 -> 458 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 390 bytes
.../00006.png | Bin 0 -> 365 bytes
.../00007.png | Bin 0 -> 495 bytes
.../00008.png | Bin 0 -> 509 bytes
.../00009.png | Bin 0 -> 498 bytes
.../00010.png | Bin 0 -> 404 bytes
.../00011.png | Bin 0 -> 286 bytes
.../00012.png | Bin 0 -> 492 bytes
.../00013.png | Bin 0 -> 483 bytes
.../00014.png | Bin 0 -> 427 bytes
.../00015.png | Bin 0 -> 408 bytes
.../00016.png | Bin 0 -> 389 bytes
.../00017.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 342 bytes
.../00003.png | Bin 0 -> 457 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 390 bytes
.../00006.png | Bin 0 -> 365 bytes
.../00007.png | Bin 0 -> 495 bytes
.../00008.png | Bin 0 -> 514 bytes
.../00009.png | Bin 0 -> 512 bytes
.../00010.png | Bin 0 -> 395 bytes
.../00011.png | Bin 0 -> 313 bytes
.../00012.png | Bin 0 -> 492 bytes
.../00013.png | Bin 0 -> 483 bytes
.../00014.png | Bin 0 -> 427 bytes
.../00015.png | Bin 0 -> 389 bytes
.../00016.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 387 bytes
.../00003.png | Bin 0 -> 452 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 390 bytes
.../00006.png | Bin 0 -> 365 bytes
.../00007.png | Bin 0 -> 495 bytes
.../00008.png | Bin 0 -> 514 bytes
.../00009.png | Bin 0 -> 512 bytes
.../00010.png | Bin 0 -> 395 bytes
.../00011.png | Bin 0 -> 295 bytes
.../00012.png | Bin 0 -> 492 bytes
.../00013.png | Bin 0 -> 483 bytes
.../00014.png | Bin 0 -> 427 bytes
.../00015.png | Bin 0 -> 389 bytes
.../00016.png | Bin 0 -> 428 bytes
.../00000.png | Bin 0 -> 379 bytes
.../00001.png | Bin 0 -> 347 bytes
.../00002.png | Bin 0 -> 388 bytes
.../00003.png | Bin 0 -> 459 bytes
.../00004.png | Bin 0 -> 403 bytes
.../00005.png | Bin 0 -> 400 bytes
.../00006.png | Bin 0 -> 410 bytes
.../00007.png | Bin 0 -> 408 bytes
.../00008.png | Bin 0 -> 389 bytes
.../00009.png | Bin 0 -> 428 bytes
.../s-op-restore-footprint/00000.png | Bin 0 -> 379 bytes
.../s-op-restore-footprint/00001.png | Bin 0 -> 341 bytes
.../s-op-restore-footprint/00002.png | Bin 0 -> 337 bytes
.../s-op-restore-footprint/00003.png | Bin 0 -> 444 bytes
.../s-op-restore-footprint/00004.png | Bin 0 -> 463 bytes
.../s-op-restore-footprint/00005.png | Bin 0 -> 403 bytes
.../s-op-restore-footprint/00006.png | Bin 0 -> 383 bytes
.../s-op-restore-footprint/00007.png | Bin 0 -> 408 bytes
.../s-op-restore-footprint/00008.png | Bin 0 -> 389 bytes
.../s-op-restore-footprint/00009.png | Bin 0 -> 428 bytes
.../s-soroban-auth-asset-approve/00000.png | Bin 0 -> 401 bytes
.../s-soroban-auth-asset-approve/00001.png | Bin 0 -> 495 bytes
.../s-soroban-auth-asset-approve/00002.png | Bin 0 -> 523 bytes
.../s-soroban-auth-asset-approve/00003.png | Bin 0 -> 524 bytes
.../s-soroban-auth-asset-approve/00004.png | Bin 0 -> 441 bytes
.../s-soroban-auth-asset-approve/00005.png | Bin 0 -> 313 bytes
.../s-soroban-auth-asset-approve/00006.png | Bin 0 -> 325 bytes
.../s-soroban-auth-asset-approve/00007.png | Bin 0 -> 343 bytes
.../s-soroban-auth-asset-approve/00008.png | Bin 0 -> 439 bytes
.../s-soroban-auth-asset-approve/00009.png | Bin 0 -> 506 bytes
.../s-soroban-auth-asset-approve/00010.png | Bin 0 -> 496 bytes
.../s-soroban-auth-asset-approve/00011.png | Bin 0 -> 493 bytes
.../s-soroban-auth-asset-approve/00012.png | Bin 0 -> 407 bytes
.../s-soroban-auth-asset-approve/00013.png | Bin 0 -> 452 bytes
.../s-soroban-auth-asset-approve/00014.png | Bin 0 -> 450 bytes
.../s-soroban-auth-asset-approve/00015.png | Bin 0 -> 437 bytes
.../s-soroban-auth-asset-approve/00016.png | Bin 0 -> 384 bytes
.../s-soroban-auth-asset-approve/00017.png | Bin 0 -> 327 bytes
.../s-soroban-auth-asset-approve/00018.png | Bin 0 -> 425 bytes
.../s-soroban-auth-asset-approve/00019.png | Bin 0 -> 333 bytes
.../s-soroban-auth-asset-approve/00020.png | Bin 0 -> 428 bytes
.../s-soroban-auth-asset-transfer/00000.png | Bin 0 -> 401 bytes
.../s-soroban-auth-asset-transfer/00001.png | Bin 0 -> 495 bytes
.../s-soroban-auth-asset-transfer/00002.png | Bin 0 -> 509 bytes
.../s-soroban-auth-asset-transfer/00003.png | Bin 0 -> 498 bytes
.../s-soroban-auth-asset-transfer/00004.png | Bin 0 -> 404 bytes
.../s-soroban-auth-asset-transfer/00005.png | Bin 0 -> 315 bytes
.../s-soroban-auth-asset-transfer/00006.png | Bin 0 -> 347 bytes
.../s-soroban-auth-asset-transfer/00007.png | Bin 0 -> 343 bytes
.../s-soroban-auth-asset-transfer/00008.png | Bin 0 -> 439 bytes
.../s-soroban-auth-asset-transfer/00009.png | Bin 0 -> 359 bytes
.../s-soroban-auth-asset-transfer/00010.png | Bin 0 -> 452 bytes
.../s-soroban-auth-asset-transfer/00011.png | Bin 0 -> 450 bytes
.../s-soroban-auth-asset-transfer/00012.png | Bin 0 -> 437 bytes
.../s-soroban-auth-asset-transfer/00013.png | Bin 0 -> 384 bytes
.../s-soroban-auth-asset-transfer/00014.png | Bin 0 -> 447 bytes
.../s-soroban-auth-asset-transfer/00015.png | Bin 0 -> 451 bytes
.../s-soroban-auth-asset-transfer/00016.png | Bin 0 -> 447 bytes
.../s-soroban-auth-asset-transfer/00017.png | Bin 0 -> 359 bytes
.../s-soroban-auth-asset-transfer/00018.png | Bin 0 -> 333 bytes
.../s-soroban-auth-asset-transfer/00019.png | Bin 0 -> 428 bytes
.../s-soroban-auth-create-contract/00000.png | Bin 0 -> 401 bytes
.../s-soroban-auth-create-contract/00001.png | Bin 0 -> 374 bytes
.../s-soroban-auth-create-contract/00002.png | Bin 0 -> 347 bytes
.../s-soroban-auth-create-contract/00003.png | Bin 0 -> 333 bytes
.../s-soroban-auth-create-contract/00004.png | Bin 0 -> 428 bytes
.../s-soroban-auth-custom-contract/00000.png | Bin 0 -> 401 bytes
.../s-soroban-auth-custom-contract/00001.png | Bin 0 -> 495 bytes
.../s-soroban-auth-custom-contract/00002.png | Bin 0 -> 509 bytes
.../s-soroban-auth-custom-contract/00003.png | Bin 0 -> 498 bytes
.../s-soroban-auth-custom-contract/00004.png | Bin 0 -> 404 bytes
.../s-soroban-auth-custom-contract/00005.png | Bin 0 -> 288 bytes
.../s-soroban-auth-custom-contract/00006.png | Bin 0 -> 347 bytes
.../s-soroban-auth-custom-contract/00007.png | Bin 0 -> 286 bytes
.../s-soroban-auth-custom-contract/00008.png | Bin 0 -> 379 bytes
.../s-soroban-auth-custom-contract/00009.png | Bin 0 -> 492 bytes
.../s-soroban-auth-custom-contract/00010.png | Bin 0 -> 483 bytes
.../s-soroban-auth-custom-contract/00011.png | Bin 0 -> 427 bytes
.../s-soroban-auth-custom-contract/00012.png | Bin 0 -> 457 bytes
.../s-soroban-auth-custom-contract/00013.png | Bin 0 -> 468 bytes
.../s-soroban-auth-custom-contract/00014.png | Bin 0 -> 475 bytes
.../s-soroban-auth-custom-contract/00015.png | Bin 0 -> 389 bytes
.../s-soroban-auth-custom-contract/00016.png | Bin 0 -> 333 bytes
.../s-soroban-auth-custom-contract/00017.png | Bin 0 -> 428 bytes
.../sp-op-extend-footprint-ttl/00000.png | Bin 0 -> 419 bytes
.../sp-op-extend-footprint-ttl/00001.png | Bin 0 -> 399 bytes
.../sp-op-extend-footprint-ttl/00002.png | Bin 0 -> 434 bytes
.../sp-op-extend-footprint-ttl/00003.png | Bin 0 -> 517 bytes
.../sp-op-extend-footprint-ttl/00004.png | Bin 0 -> 472 bytes
.../sp-op-extend-footprint-ttl/00005.png | Bin 0 -> 463 bytes
.../sp-op-extend-footprint-ttl/00006.png | Bin 0 -> 451 bytes
.../sp-op-extend-footprint-ttl/00007.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 434 bytes
.../00003.png | Bin 0 -> 514 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 506 bytes
.../00006.png | Bin 0 -> 936 bytes
.../00007.png | Bin 0 -> 468 bytes
.../00008.png | Bin 0 -> 368 bytes
.../00009.png | Bin 0 -> 854 bytes
.../00010.png | Bin 0 -> 445 bytes
.../00011.png | Bin 0 -> 899 bytes
.../00012.png | Bin 0 -> 495 bytes
.../00013.png | Bin 0 -> 364 bytes
.../00014.png | Bin 0 -> 480 bytes
.../00015.png | Bin 0 -> 469 bytes
.../00016.png | Bin 0 -> 451 bytes
.../00017.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 440 bytes
.../00003.png | Bin 0 -> 521 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 506 bytes
.../00006.png | Bin 0 -> 936 bytes
.../00007.png | Bin 0 -> 468 bytes
.../00008.png | Bin 0 -> 372 bytes
.../00009.png | Bin 0 -> 380 bytes
.../00010.png | Bin 0 -> 854 bytes
.../00011.png | Bin 0 -> 445 bytes
.../00012.png | Bin 0 -> 838 bytes
.../00013.png | Bin 0 -> 431 bytes
.../00014.png | Bin 0 -> 469 bytes
.../00015.png | Bin 0 -> 451 bytes
.../00016.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 441 bytes
.../00003.png | Bin 0 -> 516 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 470 bytes
.../00006.png | Bin 0 -> 469 bytes
.../00007.png | Bin 0 -> 451 bytes
.../00008.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 426 bytes
.../00003.png | Bin 0 -> 511 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 470 bytes
.../00006.png | Bin 0 -> 451 bytes
.../00007.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 446 bytes
.../00003.png | Bin 0 -> 511 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 470 bytes
.../00006.png | Bin 0 -> 451 bytes
.../00007.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 390 bytes
.../00003.png | Bin 0 -> 467 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 506 bytes
.../00006.png | Bin 0 -> 936 bytes
.../00007.png | Bin 0 -> 468 bytes
.../00008.png | Bin 0 -> 339 bytes
.../00009.png | Bin 0 -> 718 bytes
.../00010.png | Bin 0 -> 451 bytes
.../00011.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 390 bytes
.../00003.png | Bin 0 -> 521 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 506 bytes
.../00006.png | Bin 0 -> 936 bytes
.../00007.png | Bin 0 -> 468 bytes
.../00008.png | Bin 0 -> 340 bytes
.../00009.png | Bin 0 -> 718 bytes
.../00010.png | Bin 0 -> 469 bytes
.../00011.png | Bin 0 -> 451 bytes
.../00012.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 390 bytes
.../00003.png | Bin 0 -> 521 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 506 bytes
.../00006.png | Bin 0 -> 952 bytes
.../00007.png | Bin 0 -> 458 bytes
.../00008.png | Bin 0 -> 368 bytes
.../00009.png | Bin 0 -> 718 bytes
.../00010.png | Bin 0 -> 451 bytes
.../00011.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 442 bytes
.../00003.png | Bin 0 -> 513 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 506 bytes
.../00006.png | Bin 0 -> 952 bytes
.../00007.png | Bin 0 -> 458 bytes
.../00008.png | Bin 0 -> 360 bytes
.../00009.png | Bin 0 -> 718 bytes
.../00010.png | Bin 0 -> 451 bytes
.../00011.png | Bin 0 -> 473 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 446 bytes
.../00003.png | Bin 0 -> 517 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 561 bytes
.../00006.png | Bin 0 -> 469 bytes
.../00007.png | Bin 0 -> 451 bytes
.../00008.png | Bin 0 -> 473 bytes
.../sp-op-restore-footprint/00000.png | Bin 0 -> 419 bytes
.../sp-op-restore-footprint/00001.png | Bin 0 -> 405 bytes
.../sp-op-restore-footprint/00002.png | Bin 0 -> 385 bytes
.../sp-op-restore-footprint/00003.png | Bin 0 -> 503 bytes
.../sp-op-restore-footprint/00004.png | Bin 0 -> 523 bytes
.../sp-op-restore-footprint/00005.png | Bin 0 -> 472 bytes
.../sp-op-restore-footprint/00006.png | Bin 0 -> 440 bytes
.../sp-op-restore-footprint/00007.png | Bin 0 -> 469 bytes
.../sp-op-restore-footprint/00008.png | Bin 0 -> 451 bytes
.../sp-op-restore-footprint/00009.png | Bin 0 -> 473 bytes
.../sp-soroban-auth-asset-approve/00000.png | Bin 0 -> 436 bytes
.../sp-soroban-auth-asset-approve/00001.png | Bin 0 -> 968 bytes
.../sp-soroban-auth-asset-approve/00002.png | Bin 0 -> 510 bytes
.../sp-soroban-auth-asset-approve/00003.png | Bin 0 -> 368 bytes
.../sp-soroban-auth-asset-approve/00004.png | Bin 0 -> 366 bytes
.../sp-soroban-auth-asset-approve/00005.png | Bin 0 -> 393 bytes
.../sp-soroban-auth-asset-approve/00006.png | Bin 0 -> 509 bytes
.../sp-soroban-auth-asset-approve/00007.png | Bin 0 -> 943 bytes
.../sp-soroban-auth-asset-approve/00008.png | Bin 0 -> 477 bytes
.../sp-soroban-auth-asset-approve/00009.png | Bin 0 -> 862 bytes
.../sp-soroban-auth-asset-approve/00010.png | Bin 0 -> 447 bytes
.../sp-soroban-auth-asset-approve/00011.png | Bin 0 -> 386 bytes
.../sp-soroban-auth-asset-approve/00012.png | Bin 0 -> 507 bytes
.../sp-soroban-auth-asset-approve/00013.png | Bin 0 -> 353 bytes
.../sp-soroban-auth-asset-approve/00014.png | Bin 0 -> 473 bytes
.../sp-soroban-auth-asset-transfer/00000.png | Bin 0 -> 436 bytes
.../sp-soroban-auth-asset-transfer/00001.png | Bin 0 -> 936 bytes
.../sp-soroban-auth-asset-transfer/00002.png | Bin 0 -> 468 bytes
.../sp-soroban-auth-asset-transfer/00003.png | Bin 0 -> 372 bytes
.../sp-soroban-auth-asset-transfer/00004.png | Bin 0 -> 399 bytes
.../sp-soroban-auth-asset-transfer/00005.png | Bin 0 -> 393 bytes
.../sp-soroban-auth-asset-transfer/00006.png | Bin 0 -> 509 bytes
.../sp-soroban-auth-asset-transfer/00007.png | Bin 0 -> 429 bytes
.../sp-soroban-auth-asset-transfer/00008.png | Bin 0 -> 862 bytes
.../sp-soroban-auth-asset-transfer/00009.png | Bin 0 -> 447 bytes
.../sp-soroban-auth-asset-transfer/00010.png | Bin 0 -> 882 bytes
.../sp-soroban-auth-asset-transfer/00011.png | Bin 0 -> 411 bytes
.../sp-soroban-auth-asset-transfer/00012.png | Bin 0 -> 353 bytes
.../sp-soroban-auth-asset-transfer/00013.png | Bin 0 -> 473 bytes
.../sp-soroban-auth-create-contract/00000.png | Bin 0 -> 436 bytes
.../sp-soroban-auth-create-contract/00001.png | Bin 0 -> 434 bytes
.../sp-soroban-auth-create-contract/00002.png | Bin 0 -> 399 bytes
.../sp-soroban-auth-create-contract/00003.png | Bin 0 -> 353 bytes
.../sp-soroban-auth-create-contract/00004.png | Bin 0 -> 473 bytes
.../sp-soroban-auth-custom-contract/00000.png | Bin 0 -> 436 bytes
.../sp-soroban-auth-custom-contract/00001.png | Bin 0 -> 936 bytes
.../sp-soroban-auth-custom-contract/00002.png | Bin 0 -> 468 bytes
.../sp-soroban-auth-custom-contract/00003.png | Bin 0 -> 339 bytes
.../sp-soroban-auth-custom-contract/00004.png | Bin 0 -> 399 bytes
.../sp-soroban-auth-custom-contract/00005.png | Bin 0 -> 326 bytes
.../sp-soroban-auth-custom-contract/00006.png | Bin 0 -> 442 bytes
.../sp-soroban-auth-custom-contract/00007.png | Bin 0 -> 718 bytes
.../sp-soroban-auth-custom-contract/00008.png | Bin 0 -> 852 bytes
.../sp-soroban-auth-custom-contract/00009.png | Bin 0 -> 444 bytes
.../sp-soroban-auth-custom-contract/00010.png | Bin 0 -> 353 bytes
.../sp-soroban-auth-custom-contract/00011.png | Bin 0 -> 473 bytes
.../stax-op-extend-footprint-ttl/00000.png | Bin 0 -> 8820 bytes
.../stax-op-extend-footprint-ttl/00001.png | Bin 0 -> 15901 bytes
.../stax-op-extend-footprint-ttl/00002.png | Bin 0 -> 9719 bytes
.../stax-op-extend-footprint-ttl/00003.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 16719 bytes
.../00002.png | Bin 0 -> 16766 bytes
.../00003.png | Bin 0 -> 24204 bytes
.../00004.png | Bin 0 -> 13200 bytes
.../00005.png | Bin 0 -> 9719 bytes
.../00006.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 16561 bytes
.../00002.png | Bin 0 -> 18520 bytes
.../00003.png | Bin 0 -> 23640 bytes
.../00004.png | Bin 0 -> 8979 bytes
.../00005.png | Bin 0 -> 9719 bytes
.../00006.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 16541 bytes
.../00002.png | Bin 0 -> 8981 bytes
.../00003.png | Bin 0 -> 9719 bytes
.../00004.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 16210 bytes
.../00002.png | Bin 0 -> 9719 bytes
.../00003.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 16593 bytes
.../00002.png | Bin 0 -> 9719 bytes
.../00003.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 15979 bytes
.../00002.png | Bin 0 -> 16278 bytes
.../00003.png | Bin 0 -> 11753 bytes
.../00004.png | Bin 0 -> 9721 bytes
.../00005.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 15979 bytes
.../00002.png | Bin 0 -> 16380 bytes
.../00003.png | Bin 0 -> 14978 bytes
.../00004.png | Bin 0 -> 9721 bytes
.../00005.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 15979 bytes
.../00002.png | Bin 0 -> 17249 bytes
.../00003.png | Bin 0 -> 11753 bytes
.../00004.png | Bin 0 -> 9721 bytes
.../00005.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 16552 bytes
.../00002.png | Bin 0 -> 17121 bytes
.../00003.png | Bin 0 -> 11753 bytes
.../00004.png | Bin 0 -> 9721 bytes
.../00005.png | Bin 0 -> 5467 bytes
.../00000.png | Bin 0 -> 8820 bytes
.../00001.png | Bin 0 -> 17715 bytes
.../00002.png | Bin 0 -> 8981 bytes
.../00003.png | Bin 0 -> 9719 bytes
.../00004.png | Bin 0 -> 5467 bytes
.../stax-op-restore-footprint/00000.png | Bin 0 -> 8820 bytes
.../stax-op-restore-footprint/00001.png | Bin 0 -> 15997 bytes
.../stax-op-restore-footprint/00002.png | Bin 0 -> 11649 bytes
.../stax-op-restore-footprint/00003.png | Bin 0 -> 9719 bytes
.../stax-op-restore-footprint/00004.png | Bin 0 -> 5467 bytes
.../stax-soroban-auth-asset-approve/00000.png | Bin 0 -> 9539 bytes
.../stax-soroban-auth-asset-approve/00001.png | Bin 0 -> 20238 bytes
.../stax-soroban-auth-asset-approve/00002.png | Bin 0 -> 20517 bytes
.../stax-soroban-auth-asset-approve/00003.png | Bin 0 -> 19651 bytes
.../stax-soroban-auth-asset-approve/00004.png | Bin 0 -> 10269 bytes
.../stax-soroban-auth-asset-approve/00005.png | Bin 0 -> 5494 bytes
.../00000.png | Bin 0 -> 9539 bytes
.../00001.png | Bin 0 -> 18732 bytes
.../00002.png | Bin 0 -> 13130 bytes
.../00003.png | Bin 0 -> 14969 bytes
.../00004.png | Bin 0 -> 15576 bytes
.../00005.png | Bin 0 -> 10267 bytes
.../00006.png | Bin 0 -> 5494 bytes
.../00000.png | Bin 0 -> 9539 bytes
.../00001.png | Bin 0 -> 10005 bytes
.../00002.png | Bin 0 -> 9566 bytes
.../00003.png | Bin 0 -> 10266 bytes
.../00004.png | Bin 0 -> 5494 bytes
.../00000.png | Bin 0 -> 9539 bytes
.../00001.png | Bin 0 -> 10005 bytes
.../00002.png | Bin 0 -> 18295 bytes
.../00003.png | Bin 0 -> 19697 bytes
.../00004.png | Bin 0 -> 10266 bytes
.../00005.png | Bin 0 -> 5494 bytes
.../x-op-extend-footprint-ttl/00000.png | Bin 0 -> 419 bytes
.../x-op-extend-footprint-ttl/00001.png | Bin 0 -> 399 bytes
.../x-op-extend-footprint-ttl/00002.png | Bin 0 -> 433 bytes
.../x-op-extend-footprint-ttl/00003.png | Bin 0 -> 515 bytes
.../x-op-extend-footprint-ttl/00004.png | Bin 0 -> 472 bytes
.../x-op-extend-footprint-ttl/00005.png | Bin 0 -> 462 bytes
.../x-op-extend-footprint-ttl/00006.png | Bin 0 -> 451 bytes
.../x-op-extend-footprint-ttl/00007.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 433 bytes
.../00003.png | Bin 0 -> 512 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 509 bytes
.../00006.png | Bin 0 -> 932 bytes
.../00007.png | Bin 0 -> 467 bytes
.../00008.png | Bin 0 -> 368 bytes
.../00009.png | Bin 0 -> 859 bytes
.../00010.png | Bin 0 -> 453 bytes
.../00011.png | Bin 0 -> 912 bytes
.../00012.png | Bin 0 -> 494 bytes
.../00013.png | Bin 0 -> 363 bytes
.../00014.png | Bin 0 -> 480 bytes
.../00015.png | Bin 0 -> 468 bytes
.../00016.png | Bin 0 -> 451 bytes
.../00017.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 436 bytes
.../00003.png | Bin 0 -> 520 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 509 bytes
.../00006.png | Bin 0 -> 932 bytes
.../00007.png | Bin 0 -> 467 bytes
.../00008.png | Bin 0 -> 372 bytes
.../00009.png | Bin 0 -> 378 bytes
.../00010.png | Bin 0 -> 859 bytes
.../00011.png | Bin 0 -> 453 bytes
.../00012.png | Bin 0 -> 852 bytes
.../00013.png | Bin 0 -> 431 bytes
.../00014.png | Bin 0 -> 468 bytes
.../00015.png | Bin 0 -> 451 bytes
.../00016.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 436 bytes
.../00003.png | Bin 0 -> 515 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 471 bytes
.../00006.png | Bin 0 -> 468 bytes
.../00007.png | Bin 0 -> 451 bytes
.../00008.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 424 bytes
.../00003.png | Bin 0 -> 510 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 471 bytes
.../00006.png | Bin 0 -> 451 bytes
.../00007.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 442 bytes
.../00003.png | Bin 0 -> 512 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 471 bytes
.../00006.png | Bin 0 -> 451 bytes
.../00007.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 385 bytes
.../00003.png | Bin 0 -> 465 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 509 bytes
.../00006.png | Bin 0 -> 932 bytes
.../00007.png | Bin 0 -> 467 bytes
.../00008.png | Bin 0 -> 339 bytes
.../00009.png | Bin 0 -> 711 bytes
.../00010.png | Bin 0 -> 451 bytes
.../00011.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 385 bytes
.../00003.png | Bin 0 -> 520 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 509 bytes
.../00006.png | Bin 0 -> 932 bytes
.../00007.png | Bin 0 -> 467 bytes
.../00008.png | Bin 0 -> 340 bytes
.../00009.png | Bin 0 -> 711 bytes
.../00010.png | Bin 0 -> 468 bytes
.../00011.png | Bin 0 -> 451 bytes
.../00012.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 385 bytes
.../00003.png | Bin 0 -> 519 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 509 bytes
.../00006.png | Bin 0 -> 948 bytes
.../00007.png | Bin 0 -> 457 bytes
.../00008.png | Bin 0 -> 368 bytes
.../00009.png | Bin 0 -> 711 bytes
.../00010.png | Bin 0 -> 451 bytes
.../00011.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 438 bytes
.../00003.png | Bin 0 -> 512 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 509 bytes
.../00006.png | Bin 0 -> 948 bytes
.../00007.png | Bin 0 -> 457 bytes
.../00008.png | Bin 0 -> 360 bytes
.../00009.png | Bin 0 -> 711 bytes
.../00010.png | Bin 0 -> 451 bytes
.../00011.png | Bin 0 -> 471 bytes
.../00000.png | Bin 0 -> 419 bytes
.../00001.png | Bin 0 -> 399 bytes
.../00002.png | Bin 0 -> 443 bytes
.../00003.png | Bin 0 -> 515 bytes
.../00004.png | Bin 0 -> 472 bytes
.../00005.png | Bin 0 -> 564 bytes
.../00006.png | Bin 0 -> 468 bytes
.../00007.png | Bin 0 -> 451 bytes
.../00008.png | Bin 0 -> 471 bytes
.../x-op-restore-footprint/00000.png | Bin 0 -> 419 bytes
.../x-op-restore-footprint/00001.png | Bin 0 -> 405 bytes
.../x-op-restore-footprint/00002.png | Bin 0 -> 379 bytes
.../x-op-restore-footprint/00003.png | Bin 0 -> 500 bytes
.../x-op-restore-footprint/00004.png | Bin 0 -> 523 bytes
.../x-op-restore-footprint/00005.png | Bin 0 -> 472 bytes
.../x-op-restore-footprint/00006.png | Bin 0 -> 438 bytes
.../x-op-restore-footprint/00007.png | Bin 0 -> 468 bytes
.../x-op-restore-footprint/00008.png | Bin 0 -> 451 bytes
.../x-op-restore-footprint/00009.png | Bin 0 -> 471 bytes
.../x-soroban-auth-asset-approve/00000.png | Bin 0 -> 436 bytes
.../x-soroban-auth-asset-approve/00001.png | Bin 0 -> 974 bytes
.../x-soroban-auth-asset-approve/00002.png | Bin 0 -> 491 bytes
.../x-soroban-auth-asset-approve/00003.png | Bin 0 -> 368 bytes
.../x-soroban-auth-asset-approve/00004.png | Bin 0 -> 366 bytes
.../x-soroban-auth-asset-approve/00005.png | Bin 0 -> 393 bytes
.../x-soroban-auth-asset-approve/00006.png | Bin 0 -> 506 bytes
.../x-soroban-auth-asset-approve/00007.png | Bin 0 -> 950 bytes
.../x-soroban-auth-asset-approve/00008.png | Bin 0 -> 479 bytes
.../x-soroban-auth-asset-approve/00009.png | Bin 0 -> 861 bytes
.../x-soroban-auth-asset-approve/00010.png | Bin 0 -> 447 bytes
.../x-soroban-auth-asset-approve/00011.png | Bin 0 -> 386 bytes
.../x-soroban-auth-asset-approve/00012.png | Bin 0 -> 508 bytes
.../x-soroban-auth-asset-approve/00013.png | Bin 0 -> 353 bytes
.../x-soroban-auth-asset-approve/00014.png | Bin 0 -> 471 bytes
.../x-soroban-auth-asset-transfer/00000.png | Bin 0 -> 436 bytes
.../x-soroban-auth-asset-transfer/00001.png | Bin 0 -> 932 bytes
.../x-soroban-auth-asset-transfer/00002.png | Bin 0 -> 467 bytes
.../x-soroban-auth-asset-transfer/00003.png | Bin 0 -> 372 bytes
.../x-soroban-auth-asset-transfer/00004.png | Bin 0 -> 399 bytes
.../x-soroban-auth-asset-transfer/00005.png | Bin 0 -> 393 bytes
.../x-soroban-auth-asset-transfer/00006.png | Bin 0 -> 506 bytes
.../x-soroban-auth-asset-transfer/00007.png | Bin 0 -> 432 bytes
.../x-soroban-auth-asset-transfer/00008.png | Bin 0 -> 861 bytes
.../x-soroban-auth-asset-transfer/00009.png | Bin 0 -> 447 bytes
.../x-soroban-auth-asset-transfer/00010.png | Bin 0 -> 889 bytes
.../x-soroban-auth-asset-transfer/00011.png | Bin 0 -> 412 bytes
.../x-soroban-auth-asset-transfer/00012.png | Bin 0 -> 353 bytes
.../x-soroban-auth-asset-transfer/00013.png | Bin 0 -> 471 bytes
.../x-soroban-auth-create-contract/00000.png | Bin 0 -> 436 bytes
.../x-soroban-auth-create-contract/00001.png | Bin 0 -> 435 bytes
.../x-soroban-auth-create-contract/00002.png | Bin 0 -> 399 bytes
.../x-soroban-auth-create-contract/00003.png | Bin 0 -> 353 bytes
.../x-soroban-auth-create-contract/00004.png | Bin 0 -> 471 bytes
.../x-soroban-auth-custom-contract/00000.png | Bin 0 -> 436 bytes
.../x-soroban-auth-custom-contract/00001.png | Bin 0 -> 932 bytes
.../x-soroban-auth-custom-contract/00002.png | Bin 0 -> 467 bytes
.../x-soroban-auth-custom-contract/00003.png | Bin 0 -> 339 bytes
.../x-soroban-auth-custom-contract/00004.png | Bin 0 -> 399 bytes
.../x-soroban-auth-custom-contract/00005.png | Bin 0 -> 326 bytes
.../x-soroban-auth-custom-contract/00006.png | Bin 0 -> 446 bytes
.../x-soroban-auth-custom-contract/00007.png | Bin 0 -> 711 bytes
.../x-soroban-auth-custom-contract/00008.png | Bin 0 -> 852 bytes
.../x-soroban-auth-custom-contract/00009.png | Bin 0 -> 444 bytes
.../x-soroban-auth-custom-contract/00010.png | Bin 0 -> 353 bytes
.../x-soroban-auth-custom-contract/00011.png | Bin 0 -> 471 bytes
tests_zemu/tests/main.test.ts | 277 +++++++-
728 files changed, 2967 insertions(+), 369 deletions(-)
create mode 100644 src/handler/sign_soroban_authorization.c
create mode 100644 src/ui/ui_soroban_authorization_bagl.c
create mode 100644 src/ui/ui_soroban_authorization_nbgl.c
create mode 100644 tests_unit/testcases/opExtendFootprintTtl.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionAssetApprove.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionAssetTransfer.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionCreateContractNewAsset.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionCreateContractWasmId.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionCreateContractWrapAsset.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionScvals.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionUnverifiedContract.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithApproveFunction.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithTransferFunction.txt
create mode 100644 tests_unit/testcases/opInvokeHostFunctionUploadWasm.txt
create mode 100644 tests_unit/testcases/opRestoreFootprint.txt
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00000.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00001.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00002.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00003.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00004.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00006.png
create mode 100644 tests_zemu/snapshots/s-op-extend-footprint-ttl/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00009.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00010.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00011.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00012.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00013.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00014.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00015.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00016.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00017.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00018.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00019.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00020.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00021.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00022.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00023.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00024.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00009.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00010.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00011.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00012.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00013.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00014.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00015.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00016.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00017.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00018.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00019.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00020.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00021.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00022.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00023.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00009.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00010.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00011.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00012.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00013.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00014.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00015.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-scvals/00016.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00009.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00010.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00011.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00012.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00013.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00014.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00015.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00016.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-approve-function/00017.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00009.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00010.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00011.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00012.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00013.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00014.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00015.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract-with-transfer-function/00016.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00009.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00010.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00011.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00012.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00013.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00014.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00015.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-unverified-contract/00016.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00000.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00001.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00002.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00003.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00004.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00005.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00006.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00007.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00008.png
create mode 100644 tests_zemu/snapshots/s-op-invoke-host-function-upload-wasm/00009.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00000.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00001.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00002.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00003.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00004.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00005.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00006.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00007.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00008.png
create mode 100644 tests_zemu/snapshots/s-op-restore-footprint/00009.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00007.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00008.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00009.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00010.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00011.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00012.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00013.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00014.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00015.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00016.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00017.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00018.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00019.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-approve/00020.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00007.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00008.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00009.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00010.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00011.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00012.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00013.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00014.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00015.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00016.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00017.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00018.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-asset-transfer/00019.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-create-contract/00000.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-create-contract/00001.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-create-contract/00002.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-create-contract/00003.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-create-contract/00004.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00000.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00001.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00002.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00003.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00004.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00005.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00006.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00007.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00008.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00009.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00010.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00011.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00012.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00013.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00014.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00015.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00016.png
create mode 100644 tests_zemu/snapshots/s-soroban-auth-custom-contract/00017.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-extend-footprint-ttl/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00009.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00010.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00011.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00012.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00013.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00014.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00015.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00016.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-approve/00017.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00009.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00010.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00011.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00012.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00013.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00014.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00015.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-asset-transfer/00016.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-new-asset/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wasm-id/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-create-contract-wrap-asset/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00009.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00010.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-scvals/00011.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00009.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00010.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00011.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-approve-function/00012.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00009.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00010.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract-with-transfer-function/00011.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00009.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00010.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-unverified-contract/00011.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-invoke-host-function-upload-wasm/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00000.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00001.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00002.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00003.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00004.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00005.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00006.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00007.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00008.png
create mode 100644 tests_zemu/snapshots/sp-op-restore-footprint/00009.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00007.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00008.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00009.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00010.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00011.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00012.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00013.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-approve/00014.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00007.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00008.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00009.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00010.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00011.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00012.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-asset-transfer/00013.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-create-contract/00000.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-create-contract/00001.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-create-contract/00002.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-create-contract/00003.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-create-contract/00004.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00000.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00001.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00002.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00003.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00004.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00005.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00006.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00007.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00008.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00009.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00010.png
create mode 100644 tests_zemu/snapshots/sp-soroban-auth-custom-contract/00011.png
create mode 100644 tests_zemu/snapshots/stax-op-extend-footprint-ttl/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-extend-footprint-ttl/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-extend-footprint-ttl/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-extend-footprint-ttl/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-new-asset/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-new-asset/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-new-asset/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-new-asset/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-new-asset/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wasm-id/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wasm-id/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wasm-id/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wasm-id/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wrap-asset/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wrap-asset/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wrap-asset/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-create-contract-wrap-asset/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-scvals/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-scvals/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-scvals/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-scvals/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-scvals/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-scvals/00005.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-approve-function/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-approve-function/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-approve-function/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-approve-function/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-approve-function/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-approve-function/00005.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-transfer-function/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-transfer-function/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-transfer-function/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-transfer-function/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-transfer-function/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract-with-transfer-function/00005.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-unverified-contract/00005.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-upload-wasm/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-upload-wasm/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-upload-wasm/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-upload-wasm/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-invoke-host-function-upload-wasm/00004.png
create mode 100644 tests_zemu/snapshots/stax-op-restore-footprint/00000.png
create mode 100644 tests_zemu/snapshots/stax-op-restore-footprint/00001.png
create mode 100644 tests_zemu/snapshots/stax-op-restore-footprint/00002.png
create mode 100644 tests_zemu/snapshots/stax-op-restore-footprint/00003.png
create mode 100644 tests_zemu/snapshots/stax-op-restore-footprint/00004.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-create-contract/00000.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-create-contract/00001.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-create-contract/00002.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-create-contract/00003.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-create-contract/00004.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-custom-contract/00000.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-custom-contract/00001.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-custom-contract/00002.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-custom-contract/00003.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-custom-contract/00004.png
create mode 100644 tests_zemu/snapshots/stax-soroban-auth-custom-contract/00005.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00000.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00001.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00002.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00003.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00004.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00005.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00006.png
create mode 100644 tests_zemu/snapshots/x-op-extend-footprint-ttl/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00009.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00010.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00011.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00012.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00013.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00014.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00015.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00016.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-approve/00017.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00009.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00010.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00011.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00012.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00013.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00014.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00015.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-asset-transfer/00016.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-new-asset/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wasm-id/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-create-contract-wrap-asset/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00009.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00010.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-scvals/00011.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00009.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00010.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00011.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-approve-function/00012.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00009.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00010.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract-with-transfer-function/00011.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00008.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00009.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00010.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-unverified-contract/00011.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00000.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00001.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00002.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00003.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00004.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00005.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00006.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00007.png
create mode 100644 tests_zemu/snapshots/x-op-invoke-host-function-upload-wasm/00008.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00000.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00001.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00002.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00003.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00004.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00005.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00006.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00007.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00008.png
create mode 100644 tests_zemu/snapshots/x-op-restore-footprint/00009.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00000.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00001.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00002.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00003.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00004.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00005.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00006.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00007.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00008.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00009.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00010.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00011.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00012.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00013.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-approve/00014.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00000.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00001.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00002.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00003.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00004.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00005.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00006.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00007.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00008.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00009.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00010.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00011.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00012.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-asset-transfer/00013.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-create-contract/00000.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-create-contract/00001.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-create-contract/00002.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-create-contract/00003.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-create-contract/00004.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00000.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00001.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00002.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00003.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00004.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00005.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00006.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00007.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00008.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00009.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00010.png
create mode 100644 tests_zemu/snapshots/x-soroban-auth-custom-contract/00011.png
diff --git a/docs/COMMANDS.md b/docs/COMMANDS.md
index 77baeb40..8b200e31 100644
--- a/docs/COMMANDS.md
+++ b/docs/COMMANDS.md
@@ -65,6 +65,20 @@
| ----------------------- | ------ | ---------------- |
| 64 | 0x9000 | `signature (64)` |
+## SIGN_TX
+
+### Command
+
+| CLA | INS | P1 | P2 | Lc | CData |
+| ---- | ---- | ---------------------------------- | ---------------------------- | ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
+| 0xE0 | 0x0A | 0x00 (first)
0x80 (not_first) | 0x00 (last)
0x80 (more) | 1 + 4n + k
Only the first data chunk contains bip32 path data | `len(bip32_path) (1)` \|\|
`bip32_path{1} (4)` \|\|
`...` \|\|
`bip32_path{n} (4)` \|\|
`hash_id_preimage_chunk(k)` |
+
+### Response
+
+| Response length (bytes) | SW | RData |
+| ----------------------- | ------ | ---------------- |
+| 64 | 0x9000 | `signature (64)` |
+
## Status Words
| SW | SW name | Description |
@@ -76,6 +90,7 @@
| 0x6C24 | `SW_UNKNOWN_OP` | Unknown Stellar operation |
| 0x6C25 | `SW_UNKNOWN_ENVELOPE_TYPE` | Unknown Stellar envelope type |
| 0x6C66 | `SW_TX_HASH_SIGNING_MODE_NOT_ENABLED` | Hash signing model not enabled |
+| 0x6C66 | `SW_CUSTOM_CONTRACT_MODE_NOT_ENABLED` | Custom contract model not enabled |
| 0x6D00 | `SW_INS_NOT_SUPPORTED` | No command exists with `INS` |
| 0x6E00 | `SW_CLA_NOT_SUPPORTED` | Bad `CLA` used for this application |
| 0xB000 | `SW_WRONG_RESPONSE_LENGTH` | Wrong response length (buffer too small or too big) |
diff --git a/src/apdu/dispatcher.c b/src/apdu/dispatcher.c
index bb95c701..80c45b8d 100644
--- a/src/apdu/dispatcher.c
+++ b/src/apdu/dispatcher.c
@@ -74,8 +74,21 @@ int apdu_dispatcher(const command_t *cmd) {
buf.ptr = cmd->data;
buf.size = cmd->lc;
buf.offset = 0;
-
return handler_sign_tx(&buf, !cmd->p1, (bool) (cmd->p2 & P2_MORE));
+ case INS_SIGN_SOROBAN_AUTHORATION:
+ if ((cmd->p1 != P1_FIRST && cmd->p1 != P1_MORE) ||
+ (cmd->p2 != P2_LAST && cmd->p2 != P2_MORE)) {
+ return io_send_sw(SW_WRONG_P1P2);
+ }
+
+ if (!cmd->data) {
+ return io_send_sw(SW_WRONG_DATA_LENGTH);
+ }
+
+ buf.ptr = cmd->data;
+ buf.size = cmd->lc;
+ buf.offset = 0;
+ return handle_sign_soroban_authorization(&buf, !cmd->p1, (bool) (cmd->p2 & P2_MORE));
default:
return io_send_sw(SW_INS_NOT_SUPPORTED);
}
diff --git a/src/handler/handler.h b/src/handler/handler.h
index 940e77d1..7af0c121 100644
--- a/src/handler/handler.h
+++ b/src/handler/handler.h
@@ -55,3 +55,19 @@ int handler_sign_tx(buffer_t *cdata, bool is_first_chunk, bool more);
*
*/
int handler_sign_tx_hash(buffer_t *cdata);
+
+/**
+ * Handler for INS_SIGN_SOROBAN_AUTHORATION command. If successfully parse BIP32 path
+ * and soroban authorization, sign soroban authorization and send APDU response.
+ *
+ * @param[in,out] cdata
+ * Command data with BIP32 path and soroban authorization serialized.
+ * @param[in] is_first_chunk
+ * Is the first data chunk
+ * @param[in] more
+ * Whether more APDU chunk to be received or not.
+ *
+ * @return zero or positive integer if success, negative integer otherwise.
+ *
+ */
+int handle_sign_soroban_authorization(buffer_t *cdata, bool is_first_chunk, bool more);
\ No newline at end of file
diff --git a/src/handler/sign_soroban_authorization.c b/src/handler/sign_soroban_authorization.c
new file mode 100644
index 00000000..216df45c
--- /dev/null
+++ b/src/handler/sign_soroban_authorization.c
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Ledger Stellar App.
+ * (c) 2022 Ledger SAS.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *****************************************************************************/
+
+#include "./handler.h"
+#include "../globals.h"
+#include "../types.h"
+#include "../sw.h"
+#include "../send_response.h"
+#include "../crypto.h"
+#include "../ui/ui.h"
+#include "../swap/swap_lib_calls.h"
+#include "../swap/handle_swap_commands.h"
+#include "../transaction/transaction_parser.h"
+
+int handle_sign_soroban_authorization(buffer_t *cdata, bool is_first_chunk, bool more) {
+ if (is_first_chunk) {
+ explicit_bzero(&G_context, sizeof(G_context));
+ }
+
+ if (G_context.auth.raw_size + cdata->size > RAW_TX_MAX_SIZE) {
+ return io_send_sw(SW_WRONG_TX_LENGTH);
+ }
+
+ if (is_first_chunk) {
+ G_context.req_type = CONFIRM_SOROBAN_AUTHORATION;
+ G_context.state = STATE_NONE;
+
+ if (!buffer_read_u8(cdata, &G_context.bip32_path_len) ||
+ !buffer_read_bip32_path(cdata,
+ G_context.bip32_path,
+ (size_t) G_context.bip32_path_len)) {
+ return io_send_sw(SW_WRONG_DATA_LENGTH);
+ }
+ size_t data_length = cdata->size - cdata->offset;
+ memcpy(G_context.auth.raw, cdata->ptr + cdata->offset, data_length);
+ G_context.auth.raw_size += data_length;
+ } else {
+ if (G_context.req_type != CONFIRM_SOROBAN_AUTHORATION) {
+ return io_send_sw(SW_BAD_STATE);
+ }
+ memcpy(G_context.auth.raw + G_context.auth.raw_size, cdata->ptr, cdata->size);
+ G_context.auth.raw_size += cdata->size;
+ }
+
+ PRINTF("data size: %d\n", G_context.auth.raw_size);
+
+ if (more) {
+ return io_send_sw(SW_OK);
+ }
+
+ if (!parse_auth(G_context.auth.raw, G_context.auth.raw_size, &G_context.auth)) {
+ THROW(SW_TX_PARSING_FAIL);
+ }
+
+ G_context.state = STATE_PARSED;
+ PRINTF("auth parsed.\n");
+
+ cx_ecfp_private_key_t private_key = {0};
+ cx_ecfp_public_key_t public_key = {0};
+
+ // derive private key according to BIP32 path
+ int error =
+ crypto_derive_private_key(&private_key, G_context.bip32_path, G_context.bip32_path_len);
+ if (error != 0) {
+ explicit_bzero(&private_key, sizeof(private_key));
+ return io_send_sw(error);
+ }
+ // generate corresponding public key
+ crypto_init_public_key(&private_key, &public_key, G_context.raw_public_key);
+ // reset private key
+ explicit_bzero(&private_key, sizeof(private_key));
+
+ if (cx_hash_sha256(G_context.auth.raw, G_context.auth.raw_size, G_context.hash, HASH_SIZE) !=
+ HASH_SIZE) {
+ THROW(SW_TX_HASH_FAIL);
+ }
+
+ return ui_approve_soroban_auth_init();
+};
diff --git a/src/settings.h b/src/settings.h
index 2b42891c..41c8b954 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -24,7 +24,8 @@ extern const internal_storage_t N_storage_real;
// check a setting item
#define HAS_SETTING(k) ((N_settings & (1 << (k))) >> (k))
-#define S_HASH_SIGNING_ENABLED 0
-#define S_SEQUENCE_NUMBER_ENABLED 1
+#define S_HASH_SIGNING_ENABLED 0
+#define S_CUSTOM_CONTRACTS_ENABLED 1
+#define S_SEQUENCE_NUMBER_ENABLED 2
#define S_INITIALIZED 7
diff --git a/src/sw.h b/src/sw.h
index c9d267e7..723e12ca 100644
--- a/src/sw.h
+++ b/src/sw.h
@@ -35,6 +35,11 @@
*/
#define SW_TX_HASH_SIGNING_MODE_NOT_ENABLED 0x6C66
+/**
+ * Status word for custom contract model not enabled.
+ */
+#define SW_CUSTOM_CONTRACT_MODE_NOT_ENABLED 0x6C67
+
/**
* Status word for unknown command with this INS.
*/
diff --git a/src/swap/handle_swap_sign_transaction.c b/src/swap/handle_swap_sign_transaction.c
index e3646599..33a61514 100644
--- a/src/swap/handle_swap_sign_transaction.c
+++ b/src/swap/handle_swap_sign_transaction.c
@@ -1,6 +1,7 @@
#include "os.h"
#include "ux.h"
#include "os_io_seproxyhal.h"
+#include
#include "./swap_lib_calls.h"
#include "handle_swap_commands.h"
diff --git a/src/transaction/transaction_formatter.c b/src/transaction/transaction_formatter.c
index 16cfb083..ee95543c 100644
--- a/src/transaction/transaction_formatter.c
+++ b/src/transaction/transaction_formatter.c
@@ -31,27 +31,6 @@
#include "../common/format.h"
#include "../transaction/transaction_parser.h"
-#define FORMATTER_CHECK(x) \
- { \
- if (!(x)) THROW(SW_TX_FORMATTING_FAIL); \
- }
-
-#define STRLCPY(dst, src, size) \
- { \
- size_t len = strlcpy(dst, src, size); \
- if (len >= size) { \
- THROW(SW_TX_FORMATTING_FAIL); \
- } \
- }
-
-#define STRLCAT(dst, src, size) \
- { \
- size_t len = strlcat(dst, src, size); \
- if (len >= size) { \
- THROW(SW_TX_FORMATTING_FAIL); \
- } \
- }
-
static const char *NETWORK_NAMES[3] = {"Public", "Testnet", "Unknown"};
char op_caption[OPERATION_CAPTION_MAX_LENGTH];
@@ -291,6 +270,9 @@ static void format_transaction_details(tx_ctx_t *tx_ctx) {
case ENVELOPE_TYPE_TX:
STRLCPY(G.ui.detail_caption, "Transaction", DETAIL_CAPTION_MAX_LENGTH);
break;
+ default:
+ THROW(SW_TX_FORMATTING_FAIL);
+ return;
}
STRLCPY(G.ui.detail_value, "Details", DETAIL_VALUE_MAX_LENGTH);
if (tx_ctx->tx_details.memo.type != MEMO_NONE) {
@@ -1619,6 +1601,184 @@ static void format_liquidity_pool_withdraw(tx_ctx_t *tx_ctx) {
push_to_formatter_stack(&format_liquidity_pool_withdraw_liquidity_pool_id);
}
+static void format_invoke_host_function_asset_approve_expiration_ledger(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Expiration Ledger", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_uint(tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_approve.expiration_ledger,
+ G.ui.detail_value,
+ DETAIL_VALUE_MAX_LENGTH))
+ format_operation_source_prepare(tx_ctx);
+}
+
+static void format_invoke_host_function_asset_approve_amount(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Amount", DETAIL_CAPTION_MAX_LENGTH);
+ char tmp[DETAIL_VALUE_MAX_LENGTH];
+ explicit_bzero(tmp, DETAIL_VALUE_MAX_LENGTH);
+ FORMATTER_CHECK(print_amount(tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_approve.amount,
+ NULL,
+ tx_ctx->network,
+ tmp,
+ DETAIL_VALUE_MAX_LENGTH))
+ STRLCAT(tmp, " ", DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(tmp,
+ tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args.asset_approve
+ .asset_code,
+ DETAIL_VALUE_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, tmp, DETAIL_VALUE_MAX_LENGTH);
+ push_to_formatter_stack(&format_invoke_host_function_asset_approve_expiration_ledger);
+}
+
+static void format_invoke_host_function_asset_approve_spender(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Spender", DETAIL_CAPTION_MAX_LENGTH);
+
+ FORMATTER_CHECK(print_sc_address(&tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_approve.spender,
+ G.ui.detail_value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ push_to_formatter_stack(&format_invoke_host_function_asset_approve_amount);
+}
+
+static void format_invoke_host_function_asset_approve_from(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "From", DETAIL_CAPTION_MAX_LENGTH);
+
+ FORMATTER_CHECK(print_sc_address(&tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_approve.from,
+ G.ui.detail_value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ push_to_formatter_stack(&format_invoke_host_function_asset_approve_spender);
+}
+
+static void format_invoke_host_function_asset_transfer_to(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "To", DETAIL_CAPTION_MAX_LENGTH);
+
+ FORMATTER_CHECK(print_sc_address(&tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_transfer.to,
+ G.ui.detail_value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ format_operation_source_prepare(tx_ctx);
+}
+
+static void format_invoke_host_function_asset_transfer_from(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "From", DETAIL_CAPTION_MAX_LENGTH);
+
+ FORMATTER_CHECK(print_sc_address(&tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_transfer.from,
+ G.ui.detail_value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ push_to_formatter_stack(&format_invoke_host_function_asset_transfer_to);
+}
+
+static void format_invoke_host_function_asset_transfer_amount(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Transfer", DETAIL_CAPTION_MAX_LENGTH);
+ char tmp[DETAIL_VALUE_MAX_LENGTH];
+ explicit_bzero(tmp, DETAIL_VALUE_MAX_LENGTH);
+ FORMATTER_CHECK(print_amount(tx_ctx->tx_details.op_details.invoke_host_function_op
+ .invoke_contract_args.asset_transfer.amount,
+ NULL,
+ tx_ctx->network,
+ tmp,
+ DETAIL_VALUE_MAX_LENGTH))
+ STRLCAT(tmp, " ", DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(tmp,
+ tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args
+ .asset_transfer.asset_code,
+ DETAIL_VALUE_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, tmp, DETAIL_VALUE_MAX_LENGTH);
+ push_to_formatter_stack(&format_invoke_host_function_asset_transfer_from);
+}
+
+static void format_invoke_host_function_unverified_contract_warning(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "RISK WARNING", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value,
+ "Unverified contract, will not display details",
+ DETAIL_VALUE_MAX_LENGTH);
+ format_operation_source_prepare(tx_ctx);
+}
+
+static void format_invoke_host_function_func_name(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Function", DETAIL_CAPTION_MAX_LENGTH);
+
+ memcpy(G.ui.detail_value,
+ tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args.function_name
+ .text,
+ tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args.function_name
+ .text_size);
+ G.ui.detail_value[tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args
+ .function_name.text_size] = '\0';
+
+ switch (
+ tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args.contract_type) {
+ case SOROBAN_CONTRACT_TYPE_UNVERIFIED:
+ push_to_formatter_stack(&format_invoke_host_function_unverified_contract_warning);
+ break;
+ case SOROBAN_CONTRACT_TYPE_ASSET_APPROVE:
+ push_to_formatter_stack(&format_invoke_host_function_asset_approve_from);
+ break;
+ case SOROBAN_CONTRACT_TYPE_ASSET_TRANSFER:
+ push_to_formatter_stack(&format_invoke_host_function_asset_transfer_amount);
+ break;
+ default:
+ THROW(SW_TX_FORMATTING_FAIL);
+ return;
+ }
+}
+
+static void format_invoke_host_function_contract_id(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Contract ID", DETAIL_CAPTION_MAX_LENGTH);
+
+ FORMATTER_CHECK(print_sc_address(
+ &tx_ctx->tx_details.op_details.invoke_host_function_op.invoke_contract_args.address,
+ G.ui.detail_value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ push_to_formatter_stack(&format_invoke_host_function_func_name);
+}
+
+static void format_invoke_host_function(tx_ctx_t *tx_ctx) {
+ switch (tx_ctx->tx_details.op_details.invoke_host_function_op.host_function_type) {
+ case HOST_FUNCTION_TYPE_INVOKE_CONTRACT:
+ STRLCPY(G.ui.detail_caption, "Soroban", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, "Invoke Smart Contract", DETAIL_VALUE_MAX_LENGTH);
+ push_to_formatter_stack(&format_invoke_host_function_contract_id);
+ break;
+ case HOST_FUNCTION_TYPE_CREATE_CONTRACT:
+ STRLCPY(G.ui.detail_caption, "Soroban", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, "Create Smart Contract", DETAIL_VALUE_MAX_LENGTH);
+ format_operation_source_prepare(tx_ctx);
+ break;
+ case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM:
+ STRLCPY(G.ui.detail_caption, "Soroban", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, "Upload Smart Contract Wasm", DETAIL_VALUE_MAX_LENGTH);
+ format_operation_source_prepare(tx_ctx);
+ break;
+ default:
+ THROW(SW_TX_FORMATTING_FAIL);
+ return;
+ }
+}
+
+static void format_extend_footprint_ttl(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Soroban", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, "Extend Footprint TTL", DETAIL_VALUE_MAX_LENGTH);
+ format_operation_source_prepare(tx_ctx);
+}
+
+static void format_restore_footprint(tx_ctx_t *tx_ctx) {
+ STRLCPY(G.ui.detail_caption, "Soroban", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(G.ui.detail_value, "Restore Footprint", DETAIL_VALUE_MAX_LENGTH);
+ format_operation_source_prepare(tx_ctx);
+}
+
static const format_function_t formatters[] = {&format_create_account,
&format_payment,
&format_path_payment_strict_receive,
@@ -1642,7 +1802,10 @@ static const format_function_t formatters[] = {&format_create_account,
&format_clawback_claimable_balance,
&format_set_trust_line_flags,
&format_liquidity_pool_deposit,
- &format_liquidity_pool_withdraw};
+ &format_liquidity_pool_withdraw,
+ &format_invoke_host_function,
+ &format_extend_footprint_ttl,
+ &format_restore_footprint};
void format_confirm_operation(tx_ctx_t *tx_ctx) {
if (tx_ctx->tx_details.operations_count > 1) {
diff --git a/src/transaction/transaction_parser.c b/src/transaction/transaction_parser.c
index f9abe7d8..d80b70a0 100644
--- a/src/transaction/transaction_parser.c
+++ b/src/transaction/transaction_parser.c
@@ -24,12 +24,15 @@
#include "../types.h"
#include "../sw.h"
#include "../common/buffer.h"
+#include "../settings.h"
#define PARSER_CHECK(x) \
{ \
if (!(x)) return false; \
}
+bool parse_scval(buffer_t *buffer);
+
/* SHA256("Public Global Stellar Network ; September 2015") */
static const uint8_t NETWORK_ID_PUBLIC_HASH[32] = {
0x7a, 0xc3, 0x39, 0x97, 0x54, 0x4e, 0x31, 0x75, 0xd2, 0x66, 0xbd, 0x02, 0x24, 0x39, 0xb2, 0x2c,
@@ -40,6 +43,59 @@ static const uint8_t NETWORK_ID_TEST_HASH[32] = {
0xce, 0xe0, 0x30, 0x2d, 0x59, 0x84, 0x4d, 0x32, 0xbd, 0xca, 0x91, 0x5c, 0x82, 0x03, 0xdd, 0x44,
0xb3, 0x3f, 0xbb, 0x7e, 0xdc, 0x19, 0x05, 0x1e, 0xa3, 0x7a, 0xbe, 0xdf, 0x28, 0xec, 0xd4, 0x72};
+static const contract_t SOROBAN_ASSET_CONTRACTS[SOROBAN_ASSET_CONTRACTS_NUM] = {
+ // XLM (testnet)
+ // CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
+ {"XLM",
+ {
+ 0xd7, 0x92, 0x8b, 0x72, 0xc2, 0x70, 0x3c, 0xcf, 0xea, 0xf7, 0xeb,
+ 0x9f, 0xf4, 0xef, 0x4d, 0x50, 0x4a, 0x55, 0xa8, 0xb9, 0x79, 0xfc,
+ 0x9b, 0x45, 0x0e, 0xa2, 0xc8, 0x42, 0xb4, 0xd1, 0xce, 0x61,
+ }},
+ // CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA
+ {"XLM",
+ {
+ 0x25, 0xb4, 0xfc, 0xd8, 0x59, 0xae, 0xc2, 0xfa, 0x63, 0x48, 0x43,
+ 0x8c, 0x48, 0x9b, 0x3c, 0x3c, 0x10, 0xc9, 0x8b, 0x6d, 0x21, 0xbe,
+ 0x4f, 0xd3, 0xcb, 0x30, 0xcb, 0x68, 0x95, 0x3e, 0xf9, 0x77,
+ }},
+ // CBZVSNVB55ANF24QVJL2K5QCLOAB6XITGTGXYEAF6NPTXYKEJUYQOHFC
+ {"yXLM",
+ {
+ 0x73, 0x59, 0x36, 0xa1, 0xef, 0x40, 0xd2, 0xeb, 0x90, 0xaa, 0x57,
+ 0xa5, 0x76, 0x02, 0x5b, 0x80, 0x1f, 0x5d, 0x13, 0x34, 0xcd, 0x7c,
+ 0x10, 0x05, 0xf3, 0x5f, 0x3b, 0xe1, 0x44, 0x4d, 0x31, 0x07,
+ }},
+ // CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75
+ {"USDC",
+ {
+ 0xad, 0xef, 0xce, 0x59, 0xae, 0xe5, 0x29, 0x68, 0xf7, 0x60, 0x61,
+ 0xd4, 0x94, 0xc2, 0x52, 0x5b, 0x75, 0x65, 0x9f, 0xa4, 0x29, 0x6a,
+ 0x65, 0xf4, 0x99, 0xef, 0x29, 0xe5, 0x64, 0x77, 0xe4, 0x96,
+ }},
+ // CDOFW7HNKLUZRLFZST4EW7V3AV4JI5IHMT6BPXXSY2IEFZ4NE5TWU2P4
+ {"yUSDC",
+ {
+ 0xdc, 0x5b, 0x7c, 0xed, 0x52, 0xe9, 0x98, 0xac, 0xb9, 0x94, 0xf8,
+ 0x4b, 0x7e, 0xbb, 0x05, 0x78, 0x94, 0x75, 0x07, 0x64, 0xfc, 0x17,
+ 0xde, 0xf2, 0xc6, 0x90, 0x42, 0xe7, 0x8d, 0x27, 0x67, 0x6a,
+ }},
+ // CAAV3AE3VKD2P4TY7LWTQMMJHIJ4WOCZ5ANCIJPC3NRSERKVXNHBU2W7
+ {"XRP",
+ {
+ 0x01, 0x5d, 0x80, 0x9b, 0xaa, 0x87, 0xa7, 0xf2, 0x78, 0xfa, 0xed,
+ 0x38, 0x31, 0x89, 0x3a, 0x13, 0xcb, 0x38, 0x59, 0xe8, 0x1a, 0x24,
+ 0x25, 0xe2, 0xdb, 0x63, 0x22, 0x45, 0x55, 0xbb, 0x4e, 0x1a,
+ }},
+ // CAUIKL3IYGMERDRUN6YSCLWVAKIFG5Q4YJHUKM4S4NJZQIA3BAS6OJPK
+ {"AQUA",
+ {
+ 0x28, 0x85, 0x2f, 0x68, 0xc1, 0x98, 0x48, 0x8e, 0x34, 0x6f, 0xb1,
+ 0x21, 0x2e, 0xd5, 0x02, 0x90, 0x53, 0x76, 0x1c, 0xc2, 0x4f, 0x45,
+ 0x33, 0x92, 0xe3, 0x53, 0x98, 0x20, 0x1b, 0x08, 0x25, 0xe7,
+ }},
+};
+
static bool buffer_advance(buffer_t *buffer, size_t num_bytes) {
return buffer_seek_cur(buffer, num_bytes);
}
@@ -443,6 +499,10 @@ bool parse_path_payment_strict_receive(buffer_t *buffer, path_payment_strict_rec
if (path_len > PATH_PAYMENT_MAX_PATH_LENGTH) {
return false;
}
+ for (uint32_t i = 0; i < path_len; i++) {
+ asset_t tmp_asset;
+ PARSER_CHECK(parse_asset(buffer, &tmp_asset))
+ }
return true;
}
@@ -613,6 +673,10 @@ bool parse_path_payment_strict_send(buffer_t *buffer, path_payment_strict_send_o
if (path_len > PATH_PAYMENT_MAX_PATH_LENGTH) {
return false;
}
+ for (uint32_t i = 0; i < path_len; i++) {
+ asset_t tmp_asset;
+ PARSER_CHECK(parse_asset(buffer, &tmp_asset))
+ }
return true;
}
@@ -711,6 +775,139 @@ bool parse_begin_sponsoring_future_reserves(buffer_t *buffer,
return true;
}
+bool parse_sc_address(buffer_t *buffer, sc_address_t *sc_address) {
+ uint32_t address_type;
+ PARSER_CHECK(buffer_read32(buffer, &address_type))
+ sc_address->type = address_type;
+
+ switch (sc_address->type) {
+ case SC_ADDRESS_TYPE_ACCOUNT:
+ PARSER_CHECK(parse_account_id(buffer, &sc_address->address))
+ return true;
+ case SC_ADDRESS_TYPE_CONTRACT:
+ PARSER_CHECK(buffer_can_read(buffer, 32))
+ sc_address->address = buffer->ptr + buffer->offset;
+ buffer->offset += HASH_SIZE;
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool parse_scval_vec(buffer_t *buffer) {
+ uint32_t vec_len;
+ PARSER_CHECK(buffer_read32(buffer, &vec_len))
+ for (uint32_t i = 0; i < vec_len; i++) {
+ PARSER_CHECK(parse_scval(buffer))
+ }
+ return true;
+}
+
+bool parse_scval_map(buffer_t *buffer) {
+ uint32_t map_len;
+ PARSER_CHECK(buffer_read32(buffer, &map_len))
+ for (uint32_t i = 0; i < map_len; i++) {
+ PARSER_CHECK(parse_scval(buffer))
+ PARSER_CHECK(parse_scval(buffer))
+ }
+ return true;
+}
+
+bool parse_contract_executable(buffer_t *buffer) {
+ uint32_t type;
+ PARSER_CHECK(buffer_read32(buffer, &type))
+ switch (type) {
+ case CONTRACT_EXECUTABLE_WASM:
+ PARSER_CHECK(buffer_advance(buffer, 32)) // code
+ break;
+ case CONTRACT_EXECUTABLE_STELLAR_ASSET:
+ // void
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+bool parse_scval(buffer_t *buffer) {
+ uint32_t sc_type;
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+
+ switch (sc_type) {
+ case SCV_BOOL:
+ PARSER_CHECK(buffer_advance(buffer, 4))
+ break;
+ case SCV_VOID:
+ break; // void
+ case SCV_ERROR:
+ return false; // not implemented
+ case SCV_U32:
+ case SCV_I32:
+ PARSER_CHECK(buffer_advance(buffer, 4))
+ break;
+ case SCV_U64:
+ case SCV_I64:
+ case SCV_TIMEPOINT:
+ case SCV_DURATION:
+ PARSER_CHECK(buffer_advance(buffer, 8))
+ break;
+ case SCV_U128:
+ case SCV_I128:
+ PARSER_CHECK(buffer_advance(buffer, 16))
+ break;
+ case SCV_U256:
+ case SCV_I256:
+ PARSER_CHECK(buffer_advance(buffer, 32))
+ break;
+ case SCV_BYTES:
+ case SCV_STRING:
+ case SCV_SYMBOL: {
+ uint32_t data_len;
+ PARSER_CHECK(buffer_read32(buffer, &data_len))
+ PARSER_CHECK(buffer_advance(buffer, num_bytes(data_len)))
+ break;
+ }
+ case SCV_VEC: {
+ bool vec_exists;
+ PARSER_CHECK(buffer_read_bool(buffer, &vec_exists))
+ if (vec_exists) {
+ parse_scval_vec(buffer);
+ }
+ break;
+ }
+ case SCV_MAP: {
+ bool map_exists;
+ PARSER_CHECK(buffer_read_bool(buffer, &map_exists))
+ if (map_exists) {
+ parse_scval_map(buffer);
+ }
+ break;
+ }
+ case SCV_ADDRESS: {
+ sc_address_t sc_address;
+ PARSER_CHECK(parse_sc_address(buffer, &sc_address));
+ break;
+ }
+ case SCV_CONTRACT_INSTANCE: {
+ PARSER_CHECK(parse_contract_executable(buffer))
+ bool map_exists;
+ PARSER_CHECK(buffer_read_bool(buffer, &map_exists))
+ if (map_exists) {
+ parse_scval_map(buffer);
+ }
+ break;
+ }
+ case SCV_LEDGER_KEY_CONTRACT_INSTANCE:
+ break; // void
+ case SCV_LEDGER_KEY_NONCE:
+ PARSER_CHECK(buffer_advance(buffer, 8))
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
bool parse_ledger_key(buffer_t *buffer, ledger_key_t *ledger_key) {
uint32_t ledger_entry_type;
PARSER_CHECK(buffer_read32(buffer, &ledger_entry_type))
@@ -743,6 +940,22 @@ bool parse_ledger_key(buffer_t *buffer, ledger_key_t *ledger_key) {
ledger_key->liquidity_pool.liquidity_pool_id = buffer->ptr + buffer->offset;
PARSER_CHECK(buffer_advance(buffer, LIQUIDITY_POOL_ID_SIZE))
return true;
+ case CONTRACT_DATA: {
+ sc_address_t sc_address;
+ PARSER_CHECK(parse_sc_address(buffer, &sc_address)) // contract
+ PARSER_CHECK(parse_scval(buffer)) // key
+ PARSER_CHECK(buffer_advance(buffer, 4)) // durability
+ return true;
+ }
+ case CONTRACT_CODE:
+ PARSER_CHECK(buffer_advance(buffer, 32))
+ return true;
+ case CONFIG_SETTING:
+ PARSER_CHECK(buffer_advance(buffer, 4))
+ return true;
+ case TTL:
+ PARSER_CHECK(buffer_advance(buffer, 32))
+ return true;
default:
return false;
}
@@ -807,7 +1020,289 @@ bool parse_liquidity_pool_withdraw(buffer_t *buffer, liquidity_pool_withdraw_op_
return true;
}
+bool parse_extension_point(buffer_t *buffer) {
+ uint32_t v;
+ PARSER_CHECK(buffer_read32(buffer, &v))
+ if (v != 0) {
+ return false;
+ }
+ return true;
+}
+
+bool parse_restore_footprint(buffer_t *buffer, restore_footprint_op_t *op) {
+ (void) op;
+ PARSER_CHECK(parse_extension_point(buffer))
+ return true;
+}
+
+bool parse_soroban_resources(buffer_t *buffer) {
+ // footprint
+ uint32_t len;
+ ledger_key_t ledger_key;
+ PARSER_CHECK(buffer_read32(buffer, (uint32_t *) &len)) // read_only array length
+ for (uint32_t i = 0; i < len; i++) {
+ PARSER_CHECK(parse_ledger_key(buffer, &ledger_key))
+ }
+
+ PARSER_CHECK(buffer_read32(buffer, (uint32_t *) &len)) // read_write array length
+ for (uint32_t i = 0; i < len; i++) {
+ PARSER_CHECK(parse_ledger_key(buffer, &ledger_key))
+ }
+
+ PARSER_CHECK(buffer_advance(buffer, 4)) // instructions
+ PARSER_CHECK(buffer_advance(buffer, 4)) // read_bytes
+ PARSER_CHECK(buffer_advance(buffer, 4)) // write_bytes
+ return true;
+}
+
+bool parse_soroban_transaction_data(buffer_t *buffer) {
+ PARSER_CHECK(parse_extension_point(buffer))
+ PARSER_CHECK(parse_soroban_resources(buffer))
+ PARSER_CHECK(buffer_advance(buffer, 8)) // resource_fee
+ return true;
+}
+
+bool parse_soroban_credentials(buffer_t *buffer) {
+ uint32_t type;
+ PARSER_CHECK(buffer_read32(buffer, &type))
+ switch (type) {
+ case SOROBAN_CREDENTIALS_SOURCE_ACCOUNT:
+ // void
+ break;
+ case SOROBAN_CREDENTIALS_ADDRESS: {
+ sc_address_t address;
+ PARSER_CHECK(parse_sc_address(buffer, &address))
+ PARSER_CHECK(buffer_advance(buffer, 8)) // nonce
+ PARSER_CHECK(buffer_advance(buffer, 4)) // signatureExpirationLedger
+ PARSER_CHECK(parse_scval(buffer)) // signature
+ break;
+ }
+ default:
+ return false;
+ }
+ return true;
+}
+
+bool parse_create_contract_args(buffer_t *buffer) {
+ // contract_id_preimage
+ uint32_t type;
+ PARSER_CHECK(buffer_read32(buffer, &type))
+ switch (type) {
+ case CONTRACT_ID_PREIMAGE_FROM_ADDRESS: {
+ sc_address_t address;
+ PARSER_CHECK(parse_sc_address(buffer, &address))
+ PARSER_CHECK(buffer_advance(buffer, 32)) // salt
+ break;
+ }
+ case CONTRACT_ID_PREIMAGE_FROM_ASSET: {
+ asset_t asset;
+ PARSER_CHECK(parse_asset(buffer, &asset))
+ break;
+ }
+ default:
+ return false;
+ }
+
+ // executable
+ PARSER_CHECK(parse_contract_executable(buffer))
+ return true;
+}
+
+bool parse_invoke_contract_args(buffer_t *buffer, invoke_contract_args_t *args) {
+ // contractAddress
+ PARSER_CHECK(parse_sc_address(buffer, &args->address))
+ // functionName
+ size_t text_size;
+ PARSER_CHECK(parse_binary_string_ptr(buffer,
+ (const uint8_t **) &args->function_name.text,
+ &text_size,
+ 32))
+ args->function_name.text_size = text_size;
+
+ // args
+ args->parameters_position = buffer->offset;
+ PRINTF("function_name.text_size=%d, function_name.text=%s\n",
+ args->function_name.text_size,
+ args->function_name.text);
+
+ args->contract_type = SOROBAN_CONTRACT_TYPE_UNVERIFIED;
+ for (int i = 0; i < SOROBAN_ASSET_CONTRACTS_NUM; i++) {
+ if (memcmp(args->address.address, SOROBAN_ASSET_CONTRACTS[i].address, 32) == 0) {
+ PRINTF("Valid contract address found\n");
+ if (args->function_name.text_size == 7 &&
+ memcmp(args->function_name.text, "approve", 7) == 0) {
+ args->contract_type = SOROBAN_CONTRACT_TYPE_ASSET_APPROVE;
+ memset(args->asset_approve.asset_code, 0, ASSET_CODE_MAX_LENGTH);
+ memcpy(args->asset_approve.asset_code,
+ SOROBAN_ASSET_CONTRACTS[i].name,
+ strlen(SOROBAN_ASSET_CONTRACTS[i].name));
+ } else if (args->function_name.text_size == 8 &&
+ memcmp(args->function_name.text, "transfer", 8) == 0) {
+ args->contract_type = SOROBAN_CONTRACT_TYPE_ASSET_TRANSFER;
+ memset(args->asset_transfer.asset_code, 0, ASSET_CODE_MAX_LENGTH);
+ memcpy(args->asset_transfer.asset_code,
+ SOROBAN_ASSET_CONTRACTS[i].name,
+ strlen(SOROBAN_ASSET_CONTRACTS[i].name));
+ }
+ break;
+ }
+ }
+
+ PRINTF("args->contract_type=%d\n", args->contract_type);
+ uint32_t args_len;
+ PARSER_CHECK(buffer_read32(buffer, &args_len))
+
+ switch (args->contract_type) {
+ case SOROBAN_CONTRACT_TYPE_UNVERIFIED: {
+ for (uint32_t i = 0; i < args_len; i++) {
+ PARSER_CHECK(parse_scval(buffer))
+ }
+ break;
+ }
+ case SOROBAN_CONTRACT_TYPE_ASSET_APPROVE: {
+ if (args_len != 4) {
+ return false;
+ }
+
+ uint32_t sc_type;
+
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_ADDRESS) {
+ return false;
+ }
+ PARSER_CHECK(parse_sc_address(buffer, &args->asset_approve.from))
+
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_ADDRESS) {
+ return false;
+ }
+ PARSER_CHECK(parse_sc_address(buffer, &args->asset_approve.spender))
+
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_I128) {
+ return false;
+ }
+ PARSER_CHECK(buffer_advance(buffer, 8)) // amount.hi
+ PARSER_CHECK(buffer_read64(buffer, &args->asset_approve.amount)) // amount.lo
+
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_U32) {
+ return false;
+ }
+ PARSER_CHECK(
+ buffer_read32(buffer, &args->asset_approve.expiration_ledger)) // exp ledger
+ break;
+ }
+ case SOROBAN_CONTRACT_TYPE_ASSET_TRANSFER: {
+ if (args_len != 3) {
+ return false;
+ }
+ uint32_t sc_type;
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_ADDRESS) {
+ return false;
+ }
+ PARSER_CHECK(parse_sc_address(buffer, &args->asset_transfer.from))
+
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_ADDRESS) {
+ return false;
+ }
+ PARSER_CHECK(parse_sc_address(buffer, &args->asset_transfer.to))
+
+ PARSER_CHECK(buffer_read32(buffer, &sc_type))
+ if (sc_type != SCV_I128) {
+ return false;
+ }
+ PARSER_CHECK(buffer_advance(buffer, 8)) // amount.hi
+ PARSER_CHECK(buffer_read64(buffer, &args->asset_transfer.amount)) // amount.lo
+ break;
+ }
+ default:
+ return false;
+ }
+ return true;
+}
+
+bool parse_soroban_authorized_function(buffer_t *buffer) {
+ uint32_t type;
+ PARSER_CHECK(buffer_read32(buffer, &type))
+ switch (type) {
+ case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: {
+ // contractFn
+ invoke_contract_args_t args;
+ PARSER_CHECK(parse_invoke_contract_args(buffer, &args));
+ break;
+ }
+ case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
+ // createContractHostFn
+ PARSER_CHECK(parse_create_contract_args(buffer));
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
+
+bool parse_soroban_authorized_invocation(buffer_t *buffer) {
+ // function
+ PARSER_CHECK(parse_soroban_authorized_function(buffer))
+
+ // subInvocations
+ uint32_t len;
+ PARSER_CHECK(buffer_read32(buffer, &len))
+ for (uint32_t i = 0; i < len; i++) {
+ PARSER_CHECK(parse_soroban_authorized_invocation(buffer))
+ }
+ return true;
+}
+
+bool parse_soroban_authorization_entry(buffer_t *buffer) {
+ PARSER_CHECK(parse_soroban_credentials(buffer))
+ PARSER_CHECK(parse_soroban_authorized_invocation(buffer))
+ return true;
+}
+
+bool parse_invoke_host_function(buffer_t *buffer, invoke_host_function_op_t *op) {
+ // hostFunction
+ uint32_t type;
+ PARSER_CHECK(buffer_read32(buffer, &type));
+ op->host_function_type = type;
+ PRINTF("host_func_type=%d\n", &op->host_function_type);
+ switch (op->host_function_type) {
+ case HOST_FUNCTION_TYPE_INVOKE_CONTRACT:
+ PARSER_CHECK(parse_invoke_contract_args(buffer, &op->invoke_contract_args))
+ break;
+ case HOST_FUNCTION_TYPE_CREATE_CONTRACT:
+ PARSER_CHECK(parse_create_contract_args(buffer))
+ break;
+ case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: {
+ uint32_t data_len;
+ PARSER_CHECK(buffer_read32(buffer, &data_len))
+ PARSER_CHECK(buffer_advance(buffer, num_bytes(data_len)))
+ break;
+ }
+ default:
+ break;
+ }
+
+ // auth<>
+ uint32_t auth_len;
+ PARSER_CHECK(buffer_read32(buffer, &auth_len))
+ for (uint32_t i = 0; i < auth_len; i++) {
+ PARSER_CHECK(parse_soroban_authorization_entry(buffer))
+ }
+ return true;
+}
+
+bool parse_extend_footprint_ttl(buffer_t *buffer, extend_footprint_ttl_op_t *op) {
+ PARSER_CHECK(parse_extension_point(buffer))
+ PARSER_CHECK(buffer_read32(buffer, &op->extend_to))
+ return true;
+}
+
bool parse_operation(buffer_t *buffer, operation_t *operation) {
+ PRINTF("parse_operation: offset=%d\n", buffer->offset);
explicit_bzero(operation, sizeof(operation_t));
uint32_t op_type;
@@ -894,6 +1389,23 @@ bool parse_operation(buffer_t *buffer, operation_t *operation) {
return parse_liquidity_pool_deposit(buffer, &operation->liquidity_pool_deposit_op);
case OPERATION_TYPE_LIQUIDITY_POOL_WITHDRAW:
return parse_liquidity_pool_withdraw(buffer, &operation->liquidity_pool_withdraw_op);
+ case OPERATION_INVOKE_HOST_FUNCTION: {
+ PARSER_CHECK(parse_invoke_host_function(buffer, &operation->invoke_host_function_op))
+#ifndef TEST
+ if (operation->invoke_host_function_op.host_function_type ==
+ HOST_FUNCTION_TYPE_INVOKE_CONTRACT &&
+ operation->invoke_host_function_op.invoke_contract_args.contract_type ==
+ SOROBAN_CONTRACT_TYPE_UNVERIFIED &&
+ !HAS_SETTING(S_CUSTOM_CONTRACTS_ENABLED)) {
+ THROW(SW_CUSTOM_CONTRACT_MODE_NOT_ENABLED);
+ }
+#endif
+ return true;
+ }
+ case OPERATION_EXTEND_FOOTPRINT_TTL:
+ return parse_extend_footprint_ttl(buffer, &operation->extend_footprint_ttl_op);
+ case OPERATION_RESTORE_FOOTPRINT:
+ return parse_restore_footprint(buffer, &operation->restore_footprint_op);
default:
return false;
}
@@ -930,6 +1442,42 @@ bool parse_transaction_operation_len(buffer_t *buffer, uint8_t *operations_count
return true;
}
+bool check_operations(buffer_t *buffer, uint8_t op_count) {
+ PRINTF("check_operations: offset=%d\n", buffer->offset);
+ operation_t op;
+ for (uint8_t i = 0; i < op_count; i++) {
+ PARSER_CHECK(parse_operation(buffer, &op))
+ // for soroban tx, only one soroban operation is allowed
+ if (op_count != 1 && (op.type == OPERATION_EXTEND_FOOTPRINT_TTL ||
+ op.type == OPERATION_INVOKE_HOST_FUNCTION ||
+ op.type == OPERATION_INVOKE_HOST_FUNCTION)) {
+ PRINTF(
+ "check_operations: soroban operation is not allowed in multi-operation tx, "
+ "idx=%d\n",
+ i);
+ return false;
+ }
+ }
+ return true;
+}
+
+bool parse_transaction_ext(buffer_t *buffer) {
+ uint32_t ext;
+ PARSER_CHECK(buffer_read32(buffer, &ext))
+ PRINTF("parse_transaction_ext: ext=%d\n", ext);
+ switch (ext) {
+ case 0:
+ // void
+ break;
+ case 1:
+ PARSER_CHECK(parse_soroban_transaction_data(buffer))
+ break;
+ default:
+ break;
+ }
+ return true;
+}
+
bool parse_transaction_details(buffer_t *buffer, transaction_details_t *transaction) {
// account used to run the (inner)transaction
PARSER_CHECK(parse_transaction_source(buffer, &transaction->source_account))
@@ -945,6 +1493,10 @@ bool parse_transaction_details(buffer_t *buffer, transaction_details_t *transact
PARSER_CHECK(parse_transaction_memo(buffer, &transaction->memo))
PARSER_CHECK(parse_transaction_operation_len(buffer, &transaction->operations_count))
+ size_t offset = buffer->offset;
+ PARSER_CHECK(check_operations(buffer, transaction->operations_count))
+ PARSER_CHECK(parse_transaction_ext(buffer))
+ buffer->offset = offset;
return true;
}
@@ -986,9 +1538,9 @@ bool parse_transaction_envelope_type(buffer_t *buffer, envelope_type_t *envelope
bool parse_network(buffer_t *buffer, uint8_t *network) {
PARSER_CHECK(buffer_can_read(buffer, HASH_SIZE))
- if (memcmp(buffer->ptr, NETWORK_ID_PUBLIC_HASH, HASH_SIZE) == 0) {
+ if (memcmp(buffer->ptr + buffer->offset, NETWORK_ID_PUBLIC_HASH, HASH_SIZE) == 0) {
*network = NETWORK_TYPE_PUBLIC;
- } else if (memcmp(buffer->ptr, NETWORK_ID_TEST_HASH, HASH_SIZE) == 0) {
+ } else if (memcmp(buffer->ptr + buffer->offset, NETWORK_ID_TEST_HASH, HASH_SIZE) == 0) {
*network = NETWORK_TYPE_TEST;
} else {
*network = NETWORK_TYPE_UNKNOWN;
@@ -1004,6 +1556,8 @@ bool parse_tx_xdr(const uint8_t *data, size_t size, tx_ctx_t *tx_ctx) {
uint16_t offset = tx_ctx->offset;
buffer.offset = tx_ctx->offset;
+ PRINTF("parse_tx_xdr: offset=%d\n", offset);
+
if (offset == 0) {
explicit_bzero(&tx_ctx->tx_details, sizeof(transaction_details_t));
explicit_bzero(&tx_ctx->fee_bump_tx_details, sizeof(fee_bump_transaction_details_t));
@@ -1036,3 +1590,38 @@ bool parse_tx_xdr(const uint8_t *data, size_t size, tx_ctx_t *tx_ctx) {
tx_ctx->offset = offset;
return true;
}
+
+bool parse_auth(const uint8_t *data, size_t size, auth_ctx_t *auth_ctx) {
+ buffer_t buffer = {data, size, 0};
+ uint32_t type;
+ PARSER_CHECK(buffer_read32(&buffer, &type))
+ if (type != ENVELOPE_TYPE_SOROBAN_AUTHORIZATION) {
+ return false;
+ }
+ PARSER_CHECK(parse_network(&buffer, &auth_ctx->network))
+ PARSER_CHECK(buffer_read64(&buffer, &auth_ctx->nonce))
+ PARSER_CHECK(buffer_read32(&buffer, &auth_ctx->signature_exp_ledger))
+ PARSER_CHECK(buffer_read32(&buffer, &type))
+
+ auth_ctx->function_type = type;
+ switch (type) {
+ case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: {
+ // contractFn
+ PARSER_CHECK(parse_invoke_contract_args(&buffer, &auth_ctx->invoke_contract_args));
+#ifndef TEST
+ if (auth_ctx->invoke_contract_args.contract_type == SOROBAN_CONTRACT_TYPE_UNVERIFIED &&
+ !HAS_SETTING(S_CUSTOM_CONTRACTS_ENABLED)) {
+ THROW(SW_CUSTOM_CONTRACT_MODE_NOT_ENABLED);
+ }
+#endif
+ break;
+ }
+ case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN:
+ // createContractHostFn
+ PARSER_CHECK(parse_create_contract_args(&buffer))
+ break;
+ default:
+ return false;
+ }
+ return true;
+}
\ No newline at end of file
diff --git a/src/transaction/transaction_parser.h b/src/transaction/transaction_parser.h
index 1bac58ac..db928c0e 100644
--- a/src/transaction/transaction_parser.h
+++ b/src/transaction/transaction_parser.h
@@ -2,3 +2,5 @@
#include "../types.h"
bool parse_tx_xdr(const uint8_t *data, size_t size, tx_ctx_t *tx_ctx);
+
+bool parse_auth(const uint8_t *data, size_t size, auth_ctx_t *auth_ctx);
\ No newline at end of file
diff --git a/src/transaction/transaction_types.h b/src/transaction/transaction_types.h
index 303a9ee3..01f2f611 100644
--- a/src/transaction/transaction_types.h
+++ b/src/transaction/transaction_types.h
@@ -9,6 +9,7 @@
// ------------------------------------------------------------------------- //
#define ENCODED_ED25519_PUBLIC_KEY_LENGTH 57
+#define ENCODED_CONTRACT_KEY_LENGTH 57
#define ENCODED_ED25519_PRIVATE_KEY_LENGTH 57
#define ENCODED_HASH_X_KEY_LENGTH 57
#define ENCODED_PRE_AUTH_TX_KEY_LENGTH 57
@@ -18,6 +19,7 @@
#define RAW_ED25519_PRIVATE_KEY_SIZE 32
#define RAW_HASH_X_KEY_SIZE 32
#define RAW_PRE_AUTH_TX_KEY_SIZE 32
+#define RAW_CONTRACT_KEY_SIZE 32
#define RAW_MUXED_ACCOUNT_KEY_SIZE 40
#define VERSION_BYTE_ED25519_PUBLIC_KEY 6 << 3
@@ -26,6 +28,7 @@
#define VERSION_BYTE_HASH_X 23 << 3
#define VERSION_BYTE_MUXED_ACCOUNT 12 << 3
#define VERSION_BYTE_ED25519_SIGNED_PAYLOAD 15 << 3
+#define VERSION_BYTE_CONTRACT 2 << 3
#define ASSET_CODE_MAX_LENGTH 13
#define CLAIMANTS_MAX_LENGTH 10
@@ -69,6 +72,7 @@ typedef enum {
typedef enum {
ENVELOPE_TYPE_TX = 2,
ENVELOPE_TYPE_TX_FEE_BUMP = 5,
+ ENVELOPE_TYPE_SOROBAN_AUTHORIZATION = 9
} envelope_type_t;
typedef enum {
@@ -96,6 +100,9 @@ typedef enum {
OPERATION_TYPE_SET_TRUST_LINE_FLAGS = 21,
OPERATION_TYPE_LIQUIDITY_POOL_DEPOSIT = 22,
OPERATION_TYPE_LIQUIDITY_POOL_WITHDRAW = 23,
+ OPERATION_INVOKE_HOST_FUNCTION = 24,
+ OPERATION_EXTEND_FOOTPRINT_TTL = 25,
+ OPERATION_RESTORE_FOOTPRINT = 26
} operation_type_t;
typedef const uint8_t *account_id_t;
@@ -381,7 +388,11 @@ typedef enum {
OFFER = 2,
DATA = 3,
CLAIMABLE_BALANCE = 4,
- LIQUIDITY_POOL = 5
+ LIQUIDITY_POOL = 5,
+ CONTRACT_DATA = 6,
+ CONTRACT_CODE = 7,
+ CONFIG_SETTING = 8,
+ TTL = 9
} ledger_entry_type_t;
typedef struct {
@@ -467,6 +478,111 @@ typedef struct {
int64_t min_amount_b; // minimum amount of second asset to withdraw
} liquidity_pool_withdraw_op_t;
+// ************************* Soroban ************************* //
+#define CONTRACT_ID_PREIMAGE_FROM_ADDRESS 0
+#define CONTRACT_ID_PREIMAGE_FROM_ASSET 1
+#define CONTRACT_EXECUTABLE_WASM 0
+#define CONTRACT_EXECUTABLE_STELLAR_ASSET 1
+#define MAX_CONTRACT_NAME_LEN 13
+#define SOROBAN_ASSET_CONTRACTS_NUM 7
+
+typedef enum SCValType {
+ SCV_BOOL = 0,
+ SCV_VOID = 1,
+ SCV_ERROR = 2,
+ SCV_U32 = 3,
+ SCV_I32 = 4,
+ SCV_U64 = 5,
+ SCV_I64 = 6,
+ SCV_TIMEPOINT = 7,
+ SCV_DURATION = 8,
+ SCV_U128 = 9,
+ SCV_I128 = 10,
+ SCV_U256 = 11,
+ SCV_I256 = 12,
+ SCV_BYTES = 13,
+ SCV_STRING = 14,
+ SCV_SYMBOL = 15,
+ SCV_VEC = 16,
+ SCV_MAP = 17,
+ SCV_ADDRESS = 18,
+ SCV_CONTRACT_INSTANCE = 19,
+ SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20,
+ SCV_LEDGER_KEY_NONCE = 21
+} sc_val_type_t;
+
+typedef enum { SC_ADDRESS_TYPE_ACCOUNT = 0, SC_ADDRESS_TYPE_CONTRACT = 1 } sc_address_type_t;
+
+typedef struct {
+ sc_address_type_t type;
+ const uint8_t *address; // account id or contract id
+} sc_address_t;
+
+typedef enum {
+ SOROBAN_CREDENTIALS_SOURCE_ACCOUNT = 0,
+ SOROBAN_CREDENTIALS_ADDRESS = 1
+} soroban_credentials_type_t;
+
+typedef struct contract_t {
+ char name[MAX_CONTRACT_NAME_LEN];
+ uint8_t address[RAW_CONTRACT_KEY_SIZE];
+} contract_t;
+
+typedef enum {
+ SOROBAN_CONTRACT_TYPE_UNVERIFIED = 0,
+ SOROBAN_CONTRACT_TYPE_ASSET_APPROVE = 1,
+ SOROBAN_CONTRACT_TYPE_ASSET_TRANSFER = 2,
+} soroban_contract_type_t;
+
+typedef struct {
+ sc_address_t address;
+ size_t parameters_position;
+ struct {
+ uint8_t text_size;
+ const uint8_t *text;
+ } function_name;
+ soroban_contract_type_t contract_type;
+ union {
+ struct {
+ sc_address_t from;
+ sc_address_t spender;
+ uint64_t amount;
+ uint32_t expiration_ledger;
+ char asset_code[ASSET_CODE_MAX_LENGTH];
+ } asset_approve;
+ struct {
+ sc_address_t from;
+ sc_address_t to;
+ uint64_t amount;
+ char asset_code[ASSET_CODE_MAX_LENGTH];
+ } asset_transfer;
+ };
+} invoke_contract_args_t;
+
+typedef enum {
+ HOST_FUNCTION_TYPE_INVOKE_CONTRACT = 0,
+ HOST_FUNCTION_TYPE_CREATE_CONTRACT = 1,
+ HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM = 2
+} host_function_type_t;
+
+typedef struct {
+ host_function_type_t host_function_type;
+ invoke_contract_args_t invoke_contract_args;
+} invoke_host_function_op_t;
+
+typedef struct {
+ uint32_t extend_to;
+} extend_footprint_ttl_op_t;
+
+typedef struct {
+} restore_footprint_op_t;
+
+typedef enum {
+ SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN = 0,
+ SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN = 1
+} soroban_authorization_function_type_t;
+// ************************* Soroban ************************* //
+
typedef struct {
muxed_account_t source_account;
uint8_t type;
@@ -494,6 +610,9 @@ typedef struct {
set_trust_line_flags_op_t set_trust_line_flags_op;
liquidity_pool_deposit_op_t liquidity_pool_deposit_op;
liquidity_pool_withdraw_op_t liquidity_pool_withdraw_op;
+ invoke_host_function_op_t invoke_host_function_op;
+ extend_footprint_ttl_op_t extend_footprint_ttl_op;
+ restore_footprint_op_t restore_footprint_op;
};
} operation_t;
diff --git a/src/types.h b/src/types.h
index 3487165c..dce69e8a 100644
--- a/src/types.h
+++ b/src/types.h
@@ -66,10 +66,11 @@ typedef enum {
* Enumeration with expected INS of APDU commands.
*/
typedef enum {
- INS_GET_PUBLIC_KEY = 0x02, // public key of corresponding BIP32 path
- INS_SIGN_TX = 0x04, // sign transaction with BIP32 path
- INS_GET_APP_CONFIGURATION = 0x06, // app configuration of the application
- INS_SIGN_TX_HASH = 0x08, // sign transaction in hash mode
+ INS_GET_PUBLIC_KEY = 0x02, // public key of corresponding BIP32 path
+ INS_SIGN_TX = 0x04, // sign transaction with BIP32 path
+ INS_GET_APP_CONFIGURATION = 0x06, // app configuration of the application
+ INS_SIGN_TX_HASH = 0x08, // sign transaction in hash mode
+ INS_SIGN_SOROBAN_AUTHORATION = 0x0a, // sign soroban authoration
} command_e;
/**
@@ -88,9 +89,10 @@ typedef struct {
* Enumeration with user request type.
*/
typedef enum {
- CONFIRM_ADDRESS, // confirm address derived from public key
- CONFIRM_TRANSACTION, // confirm transaction information
- CONFIRM_TRANSACTION_HASH // confirm transaction hash information
+ CONFIRM_ADDRESS, // confirm address derived from public key
+ CONFIRM_TRANSACTION, // confirm transaction information
+ CONFIRM_TRANSACTION_HASH, // confirm transaction hash information
+ CONFIRM_SOROBAN_AUTHORATION // confirm soroban authoration information
} request_type_e;
/**
@@ -116,11 +118,26 @@ typedef struct {
transaction_details_t tx_details;
} tx_ctx_t;
+typedef struct {
+ uint8_t raw[RAW_TX_MAX_SIZE];
+ uint32_t raw_size;
+ uint8_t network;
+ uint64_t nonce;
+ uint32_t signature_exp_ledger;
+ soroban_authorization_function_type_t function_type;
+ invoke_contract_args_t invoke_contract_args; // only exist when function_type is
+ // SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN
+} auth_ctx_t;
+
/**
* Structure for global context.
*/
typedef struct {
- tx_ctx_t tx_info; // tx
+ union {
+ tx_ctx_t tx_info; // tx
+ auth_ctx_t auth; // soroban auth
+ };
+
uint8_t hash[HASH_SIZE]; // tx hash
uint32_t bip32_path[MAX_BIP32_PATH]; // BIP32 path
uint8_t raw_public_key[RAW_ED25519_PUBLIC_KEY_SIZE]; // BIP32 path public key
diff --git a/src/ui/ui.h b/src/ui/ui.h
index e70c3457..73b9211b 100644
--- a/src/ui/ui.h
+++ b/src/ui/ui.h
@@ -36,4 +36,11 @@ int ui_approve_tx_hash_init();
*
* @return 0 if success, negative integer otherwise.
*/
-int ui_approve_tx_init();
\ No newline at end of file
+int ui_approve_tx_init();
+
+/**
+ * Shows the process of signing a Soroban authorization.
+ *
+ * @return 0 if success, negative integer otherwise.
+ */
+int ui_approve_soroban_auth_init();
\ No newline at end of file
diff --git a/src/ui/ui_menu_bagl.c b/src/ui/ui_menu_bagl.c
index 5f316f88..2e16f746 100644
--- a/src/ui/ui_menu_bagl.c
+++ b/src/ui/ui_menu_bagl.c
@@ -15,6 +15,7 @@
* limitations under the License.
*****************************************************************************/
#ifdef HAVE_BAGL
+#include
#include "./ui.h"
#include "../globals.h"
#include "../settings.h"
@@ -22,6 +23,7 @@
void ui_idle(void);
void display_settings(const ux_flow_step_t* const start_step);
void switch_settings_hash_signing();
+void switch_settings_custom_contracts();
void switch_settings_sequence_number();
// FLOW for the settings menu:
// #1 screen: enable hash signing
@@ -34,12 +36,19 @@ UX_STEP_CB(ux_settings_hash_signing_step,
.title = "Hash signing",
.text = G.ui.detail_value,
});
+UX_STEP_CB(ux_settings_custom_contracts_step,
+ bnnn_paging,
+ switch_settings_custom_contracts(),
+ {
+ .title = "Custom contracts",
+ .text = G.ui.detail_value + 12,
+ });
UX_STEP_CB(ux_settings_sequence_number_step,
bnnn_paging,
switch_settings_sequence_number(),
{
.title = "Sequence Number",
- .text = G.ui.detail_value + 12,
+ .text = G.ui.detail_value + 24,
});
#else
UX_STEP_CB(ux_settings_hash_signing_step,
@@ -51,6 +60,15 @@ UX_STEP_CB(ux_settings_hash_signing_step,
"hash signing",
G.ui.detail_value,
});
+UX_STEP_CB(ux_settings_custom_contracts_step,
+ bnnn,
+ switch_settings_custom_contracts(),
+ {
+ "Custom contracts",
+ "Allow unverified",
+ "contracts",
+ G.ui.detail_value + 12,
+ });
UX_STEP_CB(ux_settings_sequence_number_step,
bnnn,
switch_settings_sequence_number(),
@@ -58,7 +76,7 @@ UX_STEP_CB(ux_settings_sequence_number_step,
"Sequence Number",
"Display sequence",
"in transactions",
- G.ui.detail_value + 12,
+ G.ui.detail_value + 24,
});
#endif
UX_STEP_CB(ux_settings_exit_step,
@@ -70,6 +88,7 @@ UX_STEP_CB(ux_settings_exit_step,
});
UX_FLOW(ux_settings_flow,
&ux_settings_hash_signing_step,
+ &ux_settings_custom_contracts_step,
&ux_settings_sequence_number_step,
&ux_settings_exit_step);
@@ -110,6 +129,9 @@ void display_settings(const ux_flow_step_t* const start_step) {
(HAS_SETTING(S_HASH_SIGNING_ENABLED) ? "Enabled" : "NOT Enabled"),
12);
strlcpy(G.ui.detail_value + 12,
+ (HAS_SETTING(S_CUSTOM_CONTRACTS_ENABLED) ? "Enabled" : "NOT Enabled"),
+ 12);
+ strlcpy(G.ui.detail_value + 24,
(HAS_SETTING(S_SEQUENCE_NUMBER_ENABLED) ? "Displayed" : "NOT Displayed"),
14);
ux_flow_init(0, ux_settings_flow, start_step);
@@ -120,6 +142,11 @@ void switch_settings_hash_signing() {
display_settings(&ux_settings_hash_signing_step);
}
+void switch_settings_custom_contracts() {
+ SETTING_TOGGLE(S_CUSTOM_CONTRACTS_ENABLED);
+ display_settings(&ux_settings_custom_contracts_step);
+}
+
void switch_settings_sequence_number() {
SETTING_TOGGLE(S_SEQUENCE_NUMBER_ENABLED);
display_settings(&ux_settings_sequence_number_step);
diff --git a/src/ui/ui_menu_nbgl.c b/src/ui/ui_menu_nbgl.c
index becbf323..946a8ef5 100644
--- a/src/ui/ui_menu_nbgl.c
+++ b/src/ui/ui_menu_nbgl.c
@@ -30,13 +30,17 @@ static void displaySettingsMenu(void);
static void settingsControlsCallback(int token, uint8_t index);
static bool settingsNavCallback(uint8_t page, nbgl_pageContent_t* content);
-enum { SWITCH_HASH_SET_TOKEN = FIRST_USER_TOKEN, SWITCH_SEQUENCE_SET_TOKEN };
+enum {
+ SWITCH_HASH_SET_TOKEN = FIRST_USER_TOKEN,
+ SWITCH_CUSTOM_CONTRACTS_SET_TOKEN,
+ SWITCH_SEQUENCE_SET_TOKEN
+};
#define NB_INFO_FIELDS 2
static const char* const infoTypes[] = {"Version", "Developer"};
static const char* const infoContents[] = {APPVERSION, "Ledger"};
-#define NB_SETTINGS_SWITCHES 2
+#define NB_SETTINGS_SWITCHES 3
#define SETTINGS_INIT_PAGE 0
#define SETTINGS_NB_PAGES 2
#define SETTINGS_TOUCHABLE false
@@ -58,11 +62,16 @@ static bool settingsNavCallback(uint8_t page, nbgl_pageContent_t* content) {
switches[0].token = SWITCH_HASH_SET_TOKEN;
switches[0].tuneId = TUNE_TAP_CASUAL;
switches[0].initState = (HAS_SETTING(S_HASH_SIGNING_ENABLED)) ? ON_STATE : OFF_STATE;
- switches[1].text = "Sequence number";
- switches[1].subText = "Display sequence in\ntransactions";
- switches[1].token = SWITCH_SEQUENCE_SET_TOKEN;
+ switches[1].text = "Custom contracts";
+ switches[1].subText = "Allow unverified\ncontracts";
+ switches[1].token = SWITCH_CUSTOM_CONTRACTS_SET_TOKEN;
switches[1].tuneId = TUNE_TAP_CASUAL;
- switches[1].initState = (HAS_SETTING(S_SEQUENCE_NUMBER_ENABLED)) ? ON_STATE : OFF_STATE;
+ switches[1].initState = (HAS_SETTING(S_CUSTOM_CONTRACTS_ENABLED)) ? ON_STATE : OFF_STATE;
+ switches[2].text = "Sequence number";
+ switches[2].subText = "Display sequence in\ntransactions";
+ switches[2].token = SWITCH_SEQUENCE_SET_TOKEN;
+ switches[2].tuneId = TUNE_TAP_CASUAL;
+ switches[2].initState = (HAS_SETTING(S_SEQUENCE_NUMBER_ENABLED)) ? ON_STATE : OFF_STATE;
content->type = SWITCHES_LIST;
content->switchesList.nbSwitches = NB_SETTINGS_SWITCHES;
@@ -79,6 +88,9 @@ static void settingsControlsCallback(int token, uint8_t index) {
case SWITCH_HASH_SET_TOKEN:
SETTING_TOGGLE(S_HASH_SIGNING_ENABLED);
break;
+ case SWITCH_CUSTOM_CONTRACTS_SET_TOKEN:
+ SETTING_TOGGLE(S_CUSTOM_CONTRACTS_ENABLED);
+ break;
case SWITCH_SEQUENCE_SET_TOKEN:
SETTING_TOGGLE(S_SEQUENCE_NUMBER_ENABLED);
break;
diff --git a/src/ui/ui_soroban_authorization_bagl.c b/src/ui/ui_soroban_authorization_bagl.c
new file mode 100644
index 00000000..9332ee7e
--- /dev/null
+++ b/src/ui/ui_soroban_authorization_bagl.c
@@ -0,0 +1,347 @@
+/*****************************************************************************
+ * Ledger Stellar App.
+ * (c) 2022 Ledger SAS.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *****************************************************************************/
+#ifdef HAVE_BAGL
+#include // bool
+#include // memset
+
+#include "./ui.h"
+#include "./action/validate.h"
+#include "../globals.h"
+#include "../sw.h"
+#include "../utils.h"
+#include "../io.h"
+#include "../common/format.h"
+
+static void display_next_state(bool is_upper_delimiter);
+static const char *NETWORK_NAMES[3] = {"Public", "Testnet", "Unknown"};
+
+// Step with icon and text
+UX_STEP_NOCB(ux_soroban_auth_signing_review_step,
+ pnn,
+ {
+ &C_icon_eye,
+ "Review",
+ "Soroban Auth",
+ });
+// what we're doing here is a little more complicated due to the need to reduce memory usage
+UX_STEP_INIT(ux_soroban_auth_init_upper_border, NULL, NULL, { display_next_state(true); });
+UX_STEP_NOCB(ux_soroban_auth_variable_display,
+ bnnn_paging,
+ {
+ .title = G.ui.detail_caption,
+ .text = G.ui.detail_value,
+ });
+UX_STEP_INIT(ux_soroban_auth_init_lower_border, NULL, NULL, { display_next_state(false); });
+// Step with approve button
+UX_STEP_CB(ux_soroban_auth_display_approve_step,
+ pb,
+ (*G.ui.validate_callback)(true),
+ {
+ &C_icon_validate_14,
+ "Finalize",
+ });
+// Step with reject button
+UX_STEP_CB(ux_soroban_auth_display_reject_step,
+ pb,
+ (*G.ui.validate_callback)(false),
+ {
+ &C_icon_crossmark,
+ "Reject",
+ });
+// FLOW to display hash signing
+// #1 screen: eye icon + "Soroban Auth"
+// #2 screen: auth info
+// #3 screen: approve button
+// #4 screen: reject button
+UX_FLOW(ux_soroban_auth_signing_flow,
+ &ux_soroban_auth_signing_review_step,
+ &ux_soroban_auth_init_upper_border,
+ &ux_soroban_auth_variable_display,
+ &ux_soroban_auth_init_lower_border,
+ &ux_soroban_auth_display_approve_step,
+ &ux_soroban_auth_display_reject_step);
+
+static bool get_next_data(char *caption, char *value, bool forward) {
+ explicit_bzero(caption, sizeof(caption));
+ explicit_bzero(value, sizeof(value));
+ if (forward) {
+ G.ui.current_data_index++;
+ } else {
+ G.ui.current_data_index--;
+ }
+ if (G_context.auth.function_type == SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN) {
+ switch (G.ui.current_data_index) {
+ case 1:
+ STRLCPY(caption, "Soroban", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(value, "Create Contract", DETAIL_CAPTION_MAX_LENGTH);
+ break;
+ case 2:
+ STRLCPY(caption, "Network", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(value,
+ (char *) PIC(NETWORK_NAMES[G_context.auth.network]),
+ DETAIL_VALUE_MAX_LENGTH);
+ break;
+ default:
+ return false;
+ }
+ } else {
+ switch (G.ui.current_data_index) {
+ case 1:
+ STRLCPY(caption, "Contract ID", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_sc_address(&G_context.auth.invoke_contract_args.address,
+ value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ break;
+ case 2:
+ STRLCPY(caption, "Function", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(value,
+ (char *) G_context.auth.invoke_contract_args.function_name.text,
+ DETAIL_VALUE_MAX_LENGTH);
+ break;
+ case 3:
+ STRLCPY(caption, "Network", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(value,
+ (char *) PIC(NETWORK_NAMES[G_context.auth.network]),
+ DETAIL_VALUE_MAX_LENGTH);
+ break;
+ case 4:
+ STRLCPY(caption, "Nonce", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_uint(G_context.auth.nonce, value, DETAIL_VALUE_MAX_LENGTH))
+ break;
+ case 5:
+ STRLCPY(caption, "Sig Exp Ledger", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(
+ print_uint(G_context.auth.signature_exp_ledger, value, DETAIL_VALUE_MAX_LENGTH))
+ break;
+ default:
+ break;
+ }
+
+ if (G.ui.current_data_index < 6) {
+ return true;
+ }
+
+ switch (G_context.auth.invoke_contract_args.contract_type) {
+ case SOROBAN_CONTRACT_TYPE_UNVERIFIED:
+ switch (G.ui.current_data_index) {
+ case 6:
+ STRLCPY(caption, "RISK WARNING", DETAIL_CAPTION_MAX_LENGTH);
+ STRLCPY(value,
+ "Unverified contract, will not display details",
+ DETAIL_VALUE_MAX_LENGTH);
+ break;
+ case 7:
+ STRLCPY(caption, "Hash", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(
+ format_hex(G_context.hash, 32, value, DETAIL_VALUE_MAX_LENGTH))
+ break;
+ default:
+ return false;
+ }
+ break;
+ case SOROBAN_CONTRACT_TYPE_ASSET_APPROVE:
+ switch (G.ui.current_data_index) {
+ case 6: {
+ STRLCPY(caption, "Spender", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_sc_address(
+ &G_context.auth.invoke_contract_args.asset_approve.spender,
+ value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ break;
+ }
+ case 7: {
+ STRLCPY(caption, "From", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_sc_address(
+ &G_context.auth.invoke_contract_args.asset_approve.from,
+ value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ break;
+ }
+ case 8: {
+ STRLCPY(caption, "Amount", DETAIL_CAPTION_MAX_LENGTH);
+ char tmp[DETAIL_VALUE_MAX_LENGTH];
+ explicit_bzero(tmp, DETAIL_VALUE_MAX_LENGTH);
+ FORMATTER_CHECK(
+ print_amount(G_context.auth.invoke_contract_args.asset_approve.amount,
+ NULL,
+ G_context.auth.network,
+ tmp,
+ DETAIL_VALUE_MAX_LENGTH))
+ STRLCAT(tmp, " ", DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(tmp,
+ G_context.auth.invoke_contract_args.asset_approve.asset_code,
+ DETAIL_VALUE_MAX_LENGTH);
+ STRLCPY(value, tmp, DETAIL_VALUE_MAX_LENGTH);
+ break;
+ }
+ case 9: {
+ STRLCPY(caption, "Approve Exp Ledger", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_uint(
+ G_context.auth.invoke_contract_args.asset_approve.expiration_ledger,
+ value,
+ DETAIL_VALUE_MAX_LENGTH))
+ break;
+ }
+ default:
+ return false;
+ }
+ break;
+ case SOROBAN_CONTRACT_TYPE_ASSET_TRANSFER:
+ switch (G.ui.current_data_index) {
+ case 6: {
+ STRLCPY(caption, "Transfer", DETAIL_CAPTION_MAX_LENGTH);
+ char tmp[DETAIL_VALUE_MAX_LENGTH];
+ explicit_bzero(tmp, DETAIL_VALUE_MAX_LENGTH);
+ FORMATTER_CHECK(
+ print_amount(G_context.auth.invoke_contract_args.asset_transfer.amount,
+ NULL,
+ G_context.auth.network,
+ tmp,
+ DETAIL_VALUE_MAX_LENGTH))
+ STRLCAT(tmp, " ", DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(tmp,
+ G_context.auth.invoke_contract_args.asset_transfer.asset_code,
+ DETAIL_VALUE_MAX_LENGTH);
+ STRLCPY(value, tmp, DETAIL_VALUE_MAX_LENGTH);
+ break;
+ }
+ case 7: {
+ STRLCPY(caption, "From", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(print_sc_address(
+ &G_context.auth.invoke_contract_args.asset_transfer.from,
+ value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ break;
+ }
+ case 8: {
+ STRLCPY(caption, "To", DETAIL_CAPTION_MAX_LENGTH);
+ FORMATTER_CHECK(
+ print_sc_address(&G_context.auth.invoke_contract_args.asset_transfer.to,
+ value,
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ break;
+ }
+ default:
+ return false;
+ }
+ break;
+ }
+ }
+ return true;
+}
+
+// This is a special function you must call for bnnn_paging to work properly in an edgecase.
+// It does some weird stuff with the `G_ux` global which is defined by the SDK.
+// No need to dig deeper into the code, a simple copy-paste will do.
+static void bnnn_paging_edgecase() {
+ G_ux.flow_stack[G_ux.stack_count - 1].prev_index =
+ G_ux.flow_stack[G_ux.stack_count - 1].index - 2;
+ G_ux.flow_stack[G_ux.stack_count - 1].index--;
+ ux_flow_relayout();
+}
+
+// Main function that handles all the business logic for our new display architecture.
+static void display_next_state(bool is_upper_delimiter) {
+ if (is_upper_delimiter) { // We're called from the upper delimiter.
+ if (G.ui.current_state == OUT_OF_BORDERS) {
+ // Fetch new data.
+ bool dynamic_data = get_next_data(G.ui.detail_caption, G.ui.detail_value, true);
+
+ if (dynamic_data) {
+ // We found some data to display so we now enter in dynamic mode.
+ G.ui.current_state = INSIDE_BORDERS;
+ }
+
+ // Move to the next step, which will display the screen.
+ ux_flow_next();
+ } else {
+ // The previous screen was NOT a static screen, so we were already in a dynamic screen.
+
+ // Fetch new data.
+ bool dynamic_data = get_next_data(G.ui.detail_caption, G.ui.detail_value, false);
+ if (dynamic_data) {
+ // We found some data so simply display it.
+ ux_flow_next();
+ } else {
+ // There's no more dynamic data to display, so
+ // update the current state accordingly.
+ G.ui.current_state = OUT_OF_BORDERS;
+
+ // Display the previous screen which should be a static one.
+ ux_flow_prev();
+ }
+ }
+ } else {
+ // We're called from the lower delimiter.
+
+ if (G.ui.current_state == OUT_OF_BORDERS) {
+ // Fetch new data.
+ bool dynamic_data = get_next_data(G.ui.detail_caption, G.ui.detail_value, false);
+
+ if (dynamic_data) {
+ // We found some data to display so enter in dynamic mode.
+ G.ui.current_state = INSIDE_BORDERS;
+ }
+
+ // Display the data.
+ ux_flow_prev();
+ } else {
+ // We're being called from a dynamic screen, so the user was already browsing the
+ // array.
+
+ // Fetch new data.
+ bool dynamic_data = get_next_data(G.ui.detail_caption, G.ui.detail_value, true);
+ if (dynamic_data) {
+ // We found some data, so display it.
+ // Similar to `ux_flow_prev()` but updates layout to account for `bnnn_paging`'s
+ // weird behaviour.
+ bnnn_paging_edgecase();
+ } else {
+ // We found no data so make sure we update the state accordingly.
+ G.ui.current_state = OUT_OF_BORDERS;
+
+ // Display the next screen
+ ux_flow_next();
+ }
+ }
+ }
+}
+
+int ui_approve_soroban_auth_init() {
+ if (G_context.req_type != CONFIRM_SOROBAN_AUTHORATION || G_context.state != STATE_PARSED) {
+ G_context.state = STATE_NONE;
+ return io_send_sw(SW_BAD_STATE);
+ }
+ PRINTF("parse_auth, network=%d\n", G_context.auth.network);
+
+ G.ui.current_state = OUT_OF_BORDERS;
+ G.ui.current_data_index = 0;
+ G.ui.validate_callback = &ui_action_validate_transaction;
+ ux_flow_init(0, ux_soroban_auth_signing_flow, NULL);
+ return 0;
+}
+#endif // HAVE_BAGL
diff --git a/src/ui/ui_soroban_authorization_nbgl.c b/src/ui/ui_soroban_authorization_nbgl.c
new file mode 100644
index 00000000..37f2a687
--- /dev/null
+++ b/src/ui/ui_soroban_authorization_nbgl.c
@@ -0,0 +1,249 @@
+/*****************************************************************************
+ * Ledger Stellar App.
+ * (c) 2022 Ledger SAS.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *****************************************************************************/
+#ifdef HAVE_NBGL
+#include // bool
+#include // memset
+
+#include "ui.h"
+#include "validate.h"
+#include "globals.h"
+#include "sw.h"
+#include "utils.h"
+#include "io.h"
+#include "format.h"
+#include "nbgl_use_case.h"
+
+// Macros
+#define TAG_VAL_LST_PAIR_NB 9
+
+// Globals
+static char str_values[TAG_VAL_LST_PAIR_NB][DETAIL_VALUE_MAX_LENGTH];
+static nbgl_pageInfoLongPress_t infoLongPress;
+static nbgl_layoutTagValue_t caption_value_pairs[TAG_VAL_LST_PAIR_NB];
+static nbgl_layoutTagValueList_t pairList;
+static const char *NETWORK_NAMES[3] = {"Public", "Testnet", "Unknown"};
+static uint8_t actual_pair;
+
+// Static functions declarations
+static void reviewStart(void);
+static void reviewWarning(void);
+static void reviewContinue(void);
+static void rejectConfirmation(void);
+static void rejectChoice(void);
+
+// Functions definitions
+static void preparePage(void) {
+ explicit_bzero(caption_value_pairs, sizeof(caption_value_pairs));
+ explicit_bzero(str_values, sizeof(str_values));
+
+ if (G_context.auth.function_type == SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN) {
+ caption_value_pairs[0].item = "Soroban";
+ STRLCPY(str_values[0], "Create Contract", DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[0].value = str_values[1];
+
+ caption_value_pairs[1].item = "Network";
+ STRLCPY(str_values[1],
+ (char *) PIC(NETWORK_NAMES[G_context.auth.network]),
+ DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[1].value = str_values[1];
+ actual_pair = 2;
+ } else {
+ caption_value_pairs[0].item = "Contract ID";
+ FORMATTER_CHECK(print_sc_address(&G_context.auth.invoke_contract_args.address,
+ str_values[0],
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ caption_value_pairs[0].value = str_values[0];
+
+ caption_value_pairs[1].item = "Function";
+ STRLCPY(str_values[1],
+ (char *) G_context.auth.invoke_contract_args.function_name.text,
+ DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[1].value = str_values[1];
+
+ caption_value_pairs[2].item = "Network";
+ STRLCPY(str_values[2],
+ (char *) PIC(NETWORK_NAMES[G_context.auth.network]),
+ DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[2].value = str_values[2];
+
+ caption_value_pairs[3].item = "Nonce";
+ FORMATTER_CHECK(print_uint(G_context.auth.nonce, str_values[3], DETAIL_VALUE_MAX_LENGTH))
+ caption_value_pairs[3].value = str_values[3];
+
+ caption_value_pairs[4].item = "Sig Exp Ledger";
+ FORMATTER_CHECK(
+ print_uint(G_context.auth.signature_exp_ledger, str_values[4], DETAIL_VALUE_MAX_LENGTH))
+ caption_value_pairs[4].value = str_values[4];
+
+ switch (G_context.auth.invoke_contract_args.contract_type) {
+ case SOROBAN_CONTRACT_TYPE_UNVERIFIED:
+ caption_value_pairs[5].item = "Soroban Auth Hash";
+ FORMATTER_CHECK(
+ format_hex(G_context.hash, 32, str_values[5], DETAIL_VALUE_MAX_LENGTH))
+ caption_value_pairs[5].value = str_values[5];
+ actual_pair = 6;
+ break;
+ case SOROBAN_CONTRACT_TYPE_ASSET_APPROVE:
+ caption_value_pairs[5].item = "Spender";
+ FORMATTER_CHECK(
+ print_sc_address(&G_context.auth.invoke_contract_args.asset_approve.spender,
+ str_values[5],
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ caption_value_pairs[5].value = str_values[5];
+
+ caption_value_pairs[6].item = "From";
+ FORMATTER_CHECK(
+ print_sc_address(&G_context.auth.invoke_contract_args.asset_approve.from,
+ str_values[6],
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ caption_value_pairs[6].value = str_values[6];
+
+ caption_value_pairs[7].item = "Amount";
+ print_amount(G_context.auth.invoke_contract_args.asset_approve.amount,
+ NULL,
+ G_context.auth.network,
+ str_values[7],
+ DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(str_values[7], " ", DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(str_values[7],
+ G_context.auth.invoke_contract_args.asset_approve.asset_code,
+ DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[7].value = str_values[7];
+
+ caption_value_pairs[8].item = "Approve Expire Ledger";
+ print_uint(G_context.auth.invoke_contract_args.asset_approve.expiration_ledger,
+ str_values[8],
+ DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[8].value = str_values[8];
+
+ actual_pair = 9;
+ break;
+ case SOROBAN_CONTRACT_TYPE_ASSET_TRANSFER:
+ caption_value_pairs[5].item = "Transfer";
+ FORMATTER_CHECK(
+ print_amount(G_context.auth.invoke_contract_args.asset_transfer.amount,
+ NULL,
+ G_context.auth.network,
+ str_values[5],
+ DETAIL_VALUE_MAX_LENGTH))
+ STRLCAT(str_values[5], " ", DETAIL_VALUE_MAX_LENGTH);
+ STRLCAT(str_values[5],
+ G_context.auth.invoke_contract_args.asset_transfer.asset_code,
+ DETAIL_VALUE_MAX_LENGTH);
+ caption_value_pairs[5].value = str_values[5];
+
+ caption_value_pairs[6].item = "From";
+ FORMATTER_CHECK(
+ print_sc_address(&G_context.auth.invoke_contract_args.asset_transfer.from,
+ str_values[6],
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ caption_value_pairs[6].value = str_values[6];
+
+ caption_value_pairs[7].item = "To";
+ FORMATTER_CHECK(
+ print_sc_address(&G_context.auth.invoke_contract_args.asset_transfer.to,
+ str_values[7],
+ DETAIL_VALUE_MAX_LENGTH,
+ 0,
+ 0))
+ caption_value_pairs[7].value = str_values[7];
+ actual_pair = 8;
+ break;
+ }
+ }
+}
+
+static void rejectConfirmation(void) {
+ ui_action_validate_transaction(false);
+ nbgl_useCaseStatus("Soroban Auth\nRejected", false, ui_menu_main);
+}
+
+static void rejectChoice(void) {
+ nbgl_useCaseConfirm("Reject Soroban Auth?",
+ NULL,
+ "Yes, Reject",
+ "Go back to Soroban Auth",
+ rejectConfirmation);
+}
+
+static void reviewChoice(bool confirm) {
+ if (confirm) {
+ ui_action_validate_transaction(true);
+ nbgl_useCaseStatus("SOROBAN AUTH\nSIGNED", true, ui_menu_main);
+ } else {
+ rejectChoice();
+ }
+}
+
+static void reviewStart(void) {
+ if (G_context.auth.invoke_contract_args.contract_type == SOROBAN_CONTRACT_TYPE_UNVERIFIED) {
+ nbgl_useCaseReviewStart(&C_icon_stellar_64px,
+ "Review Soroban Auth",
+ "",
+ "Reject Soroban Auth",
+ reviewWarning,
+ rejectChoice);
+ } else {
+ nbgl_useCaseReviewStart(&C_icon_stellar_64px,
+ "Review Soroban Auth",
+ "",
+ "Reject Soroban Auth",
+ reviewContinue,
+ rejectChoice);
+ }
+}
+
+static void reviewWarning(void) {
+ nbgl_useCaseReviewStart(NULL,
+ "WARNING",
+ "Unverified contract,\nwill not display details",
+ "Reject transaction",
+ reviewContinue,
+ rejectChoice);
+}
+
+static void reviewContinue(void) {
+ pairList.pairs = caption_value_pairs;
+ pairList.nbPairs = actual_pair;
+
+ infoLongPress.text = "Sign Soroban Auth?";
+ infoLongPress.icon = &C_icon_stellar_64px;
+ infoLongPress.longPressText = "Hold to sign";
+ infoLongPress.longPressToken = 0;
+ infoLongPress.tuneId = TUNE_TAP_CASUAL;
+
+ nbgl_useCaseStaticReview(&pairList, &infoLongPress, "Reject Soroban Auth", reviewChoice);
+}
+
+int ui_approve_soroban_auth_init() {
+ if (G_context.req_type != CONFIRM_SOROBAN_AUTHORATION || G_context.state != STATE_PARSED) {
+ G_context.state = STATE_NONE;
+ return io_send_sw(SW_BAD_STATE);
+ }
+ preparePage();
+ reviewStart();
+ return 0;
+}
+#endif // HAVE_NBGL
diff --git a/src/utils.c b/src/utils.c
index 44f685b4..f5444679 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -113,6 +113,12 @@ bool encode_pre_auth_x_key(const uint8_t raw_pre_auth_tx[static RAW_PRE_AUTH_TX_
return encode_key(raw_pre_auth_tx, VERSION_BYTE_PRE_AUTH_TX_KEY, out, out_len);
}
+bool encode_contract(const uint8_t raw_contract[static RAW_CONTRACT_KEY_SIZE],
+ char *out,
+ size_t out_len) {
+ return encode_key(raw_contract, VERSION_BYTE_CONTRACT, out, out_len);
+}
+
bool encode_ed25519_signed_payload(const ed25519_signed_payload_t *signed_payload,
char *out,
size_t out_len) {
@@ -225,6 +231,21 @@ bool print_account_id(const account_id_t account_id,
return encode_ed25519_public_key(account_id, out, out_len);
}
+bool print_contract_id(const uint8_t *contract_id,
+ char *out,
+ size_t out_len,
+ uint8_t num_chars_l,
+ uint8_t num_chars_r) {
+ if (num_chars_l > 0) {
+ char buffer[ENCODED_CONTRACT_KEY_LENGTH];
+ if (!encode_contract(contract_id, buffer, sizeof(buffer))) {
+ return false;
+ }
+ return print_summary(buffer, out, out_len, num_chars_l, num_chars_r);
+ }
+ return encode_contract(contract_id, out, out_len);
+}
+
bool print_hash_x_key(const uint8_t raw_hash_x[static RAW_HASH_X_KEY_SIZE],
char *out,
size_t out_len,
@@ -254,6 +275,7 @@ bool print_pre_auth_x_key(const uint8_t raw_pre_auth_tx[static RAW_PRE_AUTH_TX_K
}
return encode_pre_auth_x_key(raw_pre_auth_tx, out, out_len);
}
+
bool print_ed25519_signed_payload(const ed25519_signed_payload_t *signed_payload,
char *out,
size_t out_len,
@@ -269,6 +291,19 @@ bool print_ed25519_signed_payload(const ed25519_signed_payload_t *signed_payload
return print_summary(tmp, out, out_len, num_chars_l, num_chars_r);
}
+bool print_sc_address(const sc_address_t *sc_address,
+ char *out,
+ size_t out_len,
+ uint8_t num_chars_l,
+ uint8_t num_chars_r) {
+ if (sc_address->type == SC_ADDRESS_TYPE_ACCOUNT) {
+ return print_account_id(sc_address->address, out, out_len, num_chars_l, num_chars_r);
+ } else {
+ return print_contract_id(sc_address->address, out, out_len, num_chars_l, num_chars_r);
+ }
+ return true;
+}
+
bool print_muxed_account(const muxed_account_t *muxed_account,
char *out,
size_t out_len,
diff --git a/src/utils.h b/src/utils.h
index b1871517..84d9b624 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -2,6 +2,27 @@
#include "./types.h"
+#define STRLCPY(dst, src, size) \
+ { \
+ size_t len = strlcpy(dst, src, size); \
+ if (len >= size) { \
+ THROW(SW_TX_FORMATTING_FAIL); \
+ } \
+ }
+
+#define FORMATTER_CHECK(x) \
+ { \
+ if (!(x)) THROW(SW_TX_FORMATTING_FAIL); \
+ }
+
+#define STRLCAT(dst, src, size) \
+ { \
+ size_t len = strlcat(dst, src, size); \
+ if (len >= size) { \
+ THROW(SW_TX_FORMATTING_FAIL); \
+ } \
+ }
+
bool encode_ed25519_public_key(const uint8_t raw_public_key[static RAW_ED25519_PUBLIC_KEY_SIZE],
char *out,
size_t out_len);
@@ -75,6 +96,12 @@ bool print_ed25519_signed_payload(const ed25519_signed_payload_t *signed_payload
uint8_t num_chars_l,
uint8_t num_chars_r);
+bool print_sc_address(const sc_address_t *sc_address,
+ char *out,
+ size_t out_len,
+ uint8_t num_chars_l,
+ uint8_t num_chars_r);
+
bool print_muxed_account(const muxed_account_t *muxed_account,
char *out,
size_t out_len,
diff --git a/tests_common_js/package-lock.json b/tests_common_js/package-lock.json
index c08d8584..1e2889aa 100644
--- a/tests_common_js/package-lock.json
+++ b/tests_common_js/package-lock.json
@@ -9,13 +9,47 @@
"version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
- "stellar-base": "^8.1.0"
+ "@stellar/stellar-base": "^11.0.0"
},
"devDependencies": {
"@types/node": "^17.0.29",
"typescript": "^4.6.3"
}
},
+ "node_modules/@stellar/js-xdr": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@stellar/js-xdr/-/js-xdr-3.1.0.tgz",
+ "integrity": "sha512-mYTyFnhgyQgyvpAYZRO1LurUn2MxcIZRj74zZz/BxKEk7zrL4axhQ1ez0HL2BRi0wlG6cHn5BeD/t9Xcyp7CSQ=="
+ },
+ "node_modules/@stellar/stellar-base": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-11.0.0.tgz",
+ "integrity": "sha512-KPTjaWJCG2m7hMCPRWFGGPaG5qOkgPLWvFVOhe1HUy7dlE4MxxPfdusz0mcLkf6VT7doqhLB1rIt0D9M2GgQcQ==",
+ "dependencies": {
+ "@stellar/js-xdr": "^3.1.0",
+ "base32.js": "^0.1.0",
+ "bignumber.js": "^9.1.2",
+ "buffer": "^6.0.3",
+ "sha.js": "^2.3.6",
+ "tweetnacl": "^1.0.3",
+ "typescript": "^5.3.3"
+ },
+ "optionalDependencies": {
+ "sodium-native": "^4.0.8"
+ }
+ },
+ "node_modules/@stellar/stellar-base/node_modules/typescript": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/@types/node": {
"version": "17.0.29",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.29.tgz",
@@ -32,70 +66,82 @@
},
"node_modules/base64-js": {
"version": "1.5.1",
- "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz",
- "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
+ "resolved": "https://mirrors.cloud.tencent.com/npm/base64-js/-/base64-js-1.5.1.tgz",
+ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
},
"node_modules/bignumber.js": {
- "version": "4.1.0",
- "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-4.1.0.tgz",
- "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==",
+ "version": "9.1.2",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/bignumber.js/-/bignumber.js-9.1.2.tgz",
+ "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==",
"engines": {
"node": "*"
}
},
"node_modules/buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "version": "6.0.3",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
"dependencies": {
"base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
- }
- },
- "node_modules/crc": {
- "version": "3.8.0",
- "resolved": "https://registry.npmmirror.com/crc/-/crc-3.8.0.tgz",
- "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==",
- "dependencies": {
- "buffer": "^5.1.0"
+ "ieee754": "^1.2.1"
}
},
"node_modules/ieee754": {
"version": "1.2.1",
- "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
- "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
+ "resolved": "https://mirrors.cloud.tencent.com/npm/ieee754/-/ieee754-1.2.1.tgz",
+ "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
- "node_modules/js-xdr": {
- "version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/js-xdr/-/js-xdr-1.3.0.tgz",
- "integrity": "sha512-fjLTm2uBtFvWsE3l2J14VjTuuB8vJfeTtYuNS7LiLHDWIX2kt0l1pqq9334F8kODUkKPMuULjEcbGbkFFwhx5g==",
- "dependencies": {
- "lodash": "^4.17.5",
- "long": "^2.2.3"
- }
- },
- "node_modules/lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
- },
- "node_modules/long": {
- "version": "2.4.0",
- "resolved": "https://registry.npmmirror.com/long/-/long-2.4.0.tgz",
- "integrity": "sha512-ijUtjmO/n2A5PaosNG9ZGDsQ3vxJg7ZW8vsY8Kp0f2yIZWhSJvjmegV7t+9RPQKxKrvj8yKGehhS+po14hPLGQ==",
- "engines": {
- "node": ">=0.6"
- }
- },
"node_modules/node-gyp-build": {
- "version": "4.4.0",
- "resolved": "https://registry.npmmirror.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz",
- "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==",
+ "version": "4.7.1",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/node-gyp-build/-/node-gyp-build-4.7.1.tgz",
+ "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==",
"optional": true,
"bin": {
"node-gyp-build": "bin.js",
@@ -121,30 +167,13 @@
}
},
"node_modules/sodium-native": {
- "version": "3.3.0",
- "resolved": "https://registry.npmmirror.com/sodium-native/-/sodium-native-3.3.0.tgz",
- "integrity": "sha512-rg6lCDM/qa3p07YGqaVD+ciAbUqm6SoO4xmlcfkbU5r1zIGrguXztLiEtaLYTV5U6k8KSIUFmnU3yQUSKmf6DA==",
+ "version": "4.0.9",
+ "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.0.9.tgz",
+ "integrity": "sha512-nuEaJkwQMjzZOgD6N/yTJAWuzeOq+HKnBR7Qo+geZGorf/AkyBEtwIEjnd2YSs21w/TuFKCgbo2i6j7Uv+kVDQ==",
"hasInstallScript": true,
"optional": true,
"dependencies": {
- "node-gyp-build": "^4.3.0"
- }
- },
- "node_modules/stellar-base": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.1.0.tgz",
- "integrity": "sha512-sQaLZZ2qaFUokOtFVfimFNCCZuX5QEYV2Zxa4Ve+br8cdv1pl6AOaAlpyjs0T7E4V3FmvLi5MJkUQ50i0yHfmA==",
- "dependencies": {
- "base32.js": "^0.1.0",
- "bignumber.js": "^4.0.0",
- "crc": "^3.5.0",
- "js-xdr": "^1.1.3",
- "lodash": "^4.17.21",
- "sha.js": "^2.3.6",
- "tweetnacl": "^1.0.3"
- },
- "optionalDependencies": {
- "sodium-native": "^3.3.0"
+ "node-gyp-build": "^4.6.0"
}
},
"node_modules/tweetnacl": {
@@ -167,6 +196,33 @@
}
},
"dependencies": {
+ "@stellar/js-xdr": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@stellar/js-xdr/-/js-xdr-3.1.0.tgz",
+ "integrity": "sha512-mYTyFnhgyQgyvpAYZRO1LurUn2MxcIZRj74zZz/BxKEk7zrL4axhQ1ez0HL2BRi0wlG6cHn5BeD/t9Xcyp7CSQ=="
+ },
+ "@stellar/stellar-base": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-11.0.0.tgz",
+ "integrity": "sha512-KPTjaWJCG2m7hMCPRWFGGPaG5qOkgPLWvFVOhe1HUy7dlE4MxxPfdusz0mcLkf6VT7doqhLB1rIt0D9M2GgQcQ==",
+ "requires": {
+ "@stellar/js-xdr": "^3.1.0",
+ "base32.js": "^0.1.0",
+ "bignumber.js": "^9.1.2",
+ "buffer": "^6.0.3",
+ "sha.js": "^2.3.6",
+ "sodium-native": "^4.0.8",
+ "tweetnacl": "^1.0.3",
+ "typescript": "^5.3.3"
+ },
+ "dependencies": {
+ "typescript": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw=="
+ }
+ }
+ },
"@types/node": {
"version": "17.0.29",
"resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.29.tgz",
@@ -180,34 +236,26 @@
},
"base64-js": {
"version": "1.5.1",
- "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"bignumber.js": {
- "version": "4.1.0",
- "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-4.1.0.tgz",
- "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA=="
+ "version": "9.1.2",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/bignumber.js/-/bignumber.js-9.1.2.tgz",
+ "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug=="
},
"buffer": {
- "version": "5.7.1",
- "resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
- "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+ "version": "6.0.3",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"requires": {
"base64-js": "^1.3.1",
- "ieee754": "^1.1.13"
- }
- },
- "crc": {
- "version": "3.8.0",
- "resolved": "https://registry.npmmirror.com/crc/-/crc-3.8.0.tgz",
- "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==",
- "requires": {
- "buffer": "^5.1.0"
+ "ieee754": "^1.2.1"
}
},
"ieee754": {
"version": "1.2.1",
- "resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"inherits": {
@@ -215,29 +263,10 @@
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
- "js-xdr": {
- "version": "1.3.0",
- "resolved": "https://registry.npmmirror.com/js-xdr/-/js-xdr-1.3.0.tgz",
- "integrity": "sha512-fjLTm2uBtFvWsE3l2J14VjTuuB8vJfeTtYuNS7LiLHDWIX2kt0l1pqq9334F8kODUkKPMuULjEcbGbkFFwhx5g==",
- "requires": {
- "lodash": "^4.17.5",
- "long": "^2.2.3"
- }
- },
- "lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
- },
- "long": {
- "version": "2.4.0",
- "resolved": "https://registry.npmmirror.com/long/-/long-2.4.0.tgz",
- "integrity": "sha512-ijUtjmO/n2A5PaosNG9ZGDsQ3vxJg7ZW8vsY8Kp0f2yIZWhSJvjmegV7t+9RPQKxKrvj8yKGehhS+po14hPLGQ=="
- },
"node-gyp-build": {
- "version": "4.4.0",
- "resolved": "https://registry.npmmirror.com/node-gyp-build/-/node-gyp-build-4.4.0.tgz",
- "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==",
+ "version": "4.7.1",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/node-gyp-build/-/node-gyp-build-4.7.1.tgz",
+ "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==",
"optional": true
},
"safe-buffer": {
@@ -255,27 +284,12 @@
}
},
"sodium-native": {
- "version": "3.3.0",
- "resolved": "https://registry.npmmirror.com/sodium-native/-/sodium-native-3.3.0.tgz",
- "integrity": "sha512-rg6lCDM/qa3p07YGqaVD+ciAbUqm6SoO4xmlcfkbU5r1zIGrguXztLiEtaLYTV5U6k8KSIUFmnU3yQUSKmf6DA==",
+ "version": "4.0.9",
+ "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.0.9.tgz",
+ "integrity": "sha512-nuEaJkwQMjzZOgD6N/yTJAWuzeOq+HKnBR7Qo+geZGorf/AkyBEtwIEjnd2YSs21w/TuFKCgbo2i6j7Uv+kVDQ==",
"optional": true,
"requires": {
- "node-gyp-build": "^4.3.0"
- }
- },
- "stellar-base": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.1.0.tgz",
- "integrity": "sha512-sQaLZZ2qaFUokOtFVfimFNCCZuX5QEYV2Zxa4Ve+br8cdv1pl6AOaAlpyjs0T7E4V3FmvLi5MJkUQ50i0yHfmA==",
- "requires": {
- "base32.js": "^0.1.0",
- "bignumber.js": "^4.0.0",
- "crc": "^3.5.0",
- "js-xdr": "^1.1.3",
- "lodash": "^4.17.21",
- "sha.js": "^2.3.6",
- "sodium-native": "^3.3.0",
- "tweetnacl": "^1.0.3"
+ "node-gyp-build": "^4.6.0"
}
},
"tweetnacl": {
diff --git a/tests_common_js/package.json b/tests_common_js/package.json
index ebfe30bf..eef780c7 100644
--- a/tests_common_js/package.json
+++ b/tests_common_js/package.json
@@ -25,7 +25,7 @@
},
"homepage": "https://github.com/LedgerHQ/app-stellar#readme",
"dependencies": {
- "stellar-base": "^8.1.0"
+ "@stellar/stellar-base": "^11.0.0"
},
"devDependencies": {
"@types/node": "^17.0.29",
diff --git a/tests_common_js/src/index.ts b/tests_common_js/src/index.ts
index 463e43ca..8ffa61f2 100644
--- a/tests_common_js/src/index.ts
+++ b/tests_common_js/src/index.ts
@@ -1,3 +1,4 @@
+import exp = require("constants");
import {
Operation,
TransactionBuilder,
@@ -13,7 +14,7 @@ import {
LiquidityPoolAsset,
MuxedAccount,
LiquidityPoolId,
-} from "stellar-base";
+} from "@stellar/stellar-base";
// mnemonic: 'other base behind follow wet put glad muscle unlock sell income october'
// index 0: GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7 / SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK
@@ -1213,6 +1214,463 @@ export function opLiquidityPoolWithdraw() {
.build();
}
+export function opInvokeHostFunctionUploadWasm() {
+ /**
+ * soroban --very-verbose contract deploy \
+ --wasm ./increment/target/wasm32-unknown-unknown/release/soroban_increment_contract.wasm \
+ --source SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK \
+ --rpc-url https://soroban-testnet.stellar.org \
+ --network-passphrase 'Test SDF Network ; September 2015'
+ */
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAAcdcALZ/tAAAAAQAAAAAAAAAAAAAAAQAAAAEAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0AAAAYAAAAAgAAAkwAYXNtAQAAAAEVBGACfn4BfmADfn5+AX5gAAF+YAAAAhkEAWwBMAAAAWwBMQAAAWwBXwABAWwBOAAAAwUEAgMDAwUDAQAQBhkDfwFBgIDAAAt/AEGAgMAAC38AQYCAwAALBzUFBm1lbW9yeQIACWluY3JlbWVudAAEAV8ABwpfX2RhdGFfZW5kAwELX19oZWFwX2Jhc2UDAgqnAQSSAQIBfwF+QQAhAAJAAkACQEKOutCvhtQ5QgIQgICAgABCAVINAEKOutCvhtQ5QgIQgYCAgAAiAUL/AYNCBFINASABQiCIpyEACyAAQQFqIgBFDQFCjrrQr4bUOSAArUIghkIEhCIBQgIQgoCAgAAaQoSAgICgBkKEgICAwAwQg4CAgAAaIAEPCwAACxCFgICAAAALCQAQhoCAgAAACwQAAAALAgALAHMOY29udHJhY3RzcGVjdjAAAAAAAAAAQEluY3JlbWVudCBpbmNyZW1lbnRzIGFuIGludGVybmFsIGNvdW50ZXIsIGFuZCByZXR1cm5zIHRoZSB2YWx1ZS4AAAAJaW5jcmVtZW50AAAAAAAAAAAAAAEAAAAEAB4RY29udHJhY3RlbnZtZXRhdjAAAAAAAAAAFAAAADkAcw5jb250cmFjdG1ldGF2MAAAAAAAAAAFcnN2ZXIAAAAAAAAGMS43My4wAAAAAAAAAAAACHJzc2RrdmVyAAAAMzIwLjAuMC1yYzIjMDk5MjQxM2Y5YjA1ZTViZmIxZjg3MmJjZTk5ZTg5ZDkxMjliMmU2MQAAAAAAAAAAAQAAAAAAAAABAAAABxPhaFi95KtQoAbb8HFyKI8+wZ2GQNGoUwFsYMFcJREXAAAAAAAYZjYAAAKwAAAAAAAAAAAAAAAMAAAAAU5Gbs0AAABA4Qgx6lFhpvkLoEOoHEV2O/B0+ALtMwuX4Kh3iPmI4CtYXBFNMUmKDnKvsiZE/moqNtxyD8Ce0ZblL6rhjCCaBA==";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionCreateContractWasmId() {
+ /**
+ * soroban --very-verbose contract deploy \
+ --wasm ./increment/target/wasm32-unknown-unknown/release/soroban_increment_contract.wasm \
+ --source SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK \
+ --rpc-url https://soroban-testnet.stellar.org \
+ --network-passphrase 'Test SDF Network ; September 2015'
+ */
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAB7iQALZ/tAAAAAgAAAAAAAAAAAAAAAQAAAAAAAAAYAAAAAQAAAAAAAAAAAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NqDN1ZmOZBULw7RQpLx1hMwklzeYyod2tz7XGLOGlAnsAAAAAE+FoWL3kq1CgBtvwcXIojz7BnYZA0ahTAWxgwVwlERcAAAABAAAAAAAAAAEAAAAAAAAAAAAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzagzdWZjmQVC8O0UKS8dYTMJJc3mMqHdrc+1xizhpQJ7AAAAABPhaFi95KtQoAbb8HFyKI8+wZ2GQNGoUwFsYMFcJREXAAAAAAAAAAEAAAAAAAAAAQAAAAcT4WhYveSrUKAG2/BxciiPPsGdhkDRqFMBbGDBXCURFwAAAAEAAAAGAAAAASDg5o1dgbNGaFKMfUZ6NtiiHIsKeZQjTddBtARypKjgAAAAFAAAAAEAAbYGAAAC4AAAAGgAAAAAAACh8wAAAAFORm7NAAAAQB9/IVcMlt2Uo2f5SSwDUXEimmUOQMqgz2baGQlL6a4aH/Jyqpm5sGsraNzDlbu6W5VIcHkEtuGVY+d7kPNFHwU=";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionCreateContractNewAsset() {
+ // import time
+
+ // from stellar_sdk import (
+ // Keypair,
+ // Network,
+ // SorobanServer,
+ // StrKey,
+ // TransactionBuilder,
+ // )
+ // from stellar_sdk import xdr as stellar_xdr
+ // from stellar_sdk.exceptions import PrepareTransactionException
+ // from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus
+
+ // secret = "SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK"
+ // rpc_server_url = "https://soroban-testnet.stellar.org:443"
+ // network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
+
+ // kp = Keypair.from_secret(secret)
+ // soroban_server = SorobanServer(rpc_server_url)
+ // source = soroban_server.load_account(kp.public_key)
+
+ // tx = (
+ // TransactionBuilder(source, network_passphrase)
+ // .add_time_bounds(0, 0)
+ // .append_create_stellar_asset_contract_from_address_op(address=kp.public_key, salt=b'c' * 32, source=kp.public_key)
+ // .build()
+ // )
+
+ // try:
+ // tx = soroban_server.prepare_transaction(tx)
+ // except PrepareTransactionException as e:
+ // print(f"Got exception: {e.simulate_transaction_response}")
+ // raise e
+
+ // print(tx.to_xdr())
+
+ // tx.sign(kp)
+
+ // send_transaction_data = soroban_server.send_transaction(tx)
+ // print(f"sent transaction: {send_transaction_data}")
+ // if send_transaction_data.status != SendTransactionStatus.PENDING:
+ // raise Exception("send transaction failed")
+
+ // while True:
+ // print("waiting for transaction to be confirmed...")
+ // get_transaction_data = soroban_server.get_transaction(send_transaction_data.hash)
+ // if get_transaction_data.status != GetTransactionStatus.NOT_FOUND:
+ // break
+ // time.sleep(3)
+
+ // print(f"transaction: {get_transaction_data}")
+
+ // if get_transaction_data.status == GetTransactionStatus.SUCCESS:
+ // assert get_transaction_data.result_meta_xdr is not None
+ // transaction_meta = stellar_xdr.TransactionMeta.from_xdr(
+ // get_transaction_data.result_meta_xdr
+ // )
+ // result = transaction_meta.v3.soroban_meta.return_value.address.contract_id.hash # type: ignore
+ // contract_id = StrKey.encode_contract(result)
+ // print(f"contract id: {contract_id}")
+ // else:
+ // print(f"Transaction failed: {get_transaction_data.result_xdr}")
+
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQABUbYALZ/tAAAACgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NAAAAGAAAAAEAAAAAAAAAAAAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzWNjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjAAAAAQAAAAEAAAAAAAAAAQAAAAAAAAAAAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2MAAAABAAAAAAAAAAEAAAAAAAAAAAAAAAEAAAAGAAAAAVvz5/0ZDBy7NBxhMS/CR+rdii7rHMTLZO5cDByDoxtUAAAAFAAAAAEAAXf0AAAAMAAAAEgAAAAAAACSxAAAAAA=";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionCreateContractWrapAsset() {
+ /**
+ * soroban contract deploy \
+ --wasm ./increment/target/wasm32-unknown-unknown/release/soroban_increment_contract.wasm \
+ --source SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK \
+ --rpc-url https://soroban-testnet.stellar.org \
+ --network-passphrase 'Test SDF Network ; September 2015'
+ */
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAGY4YALZ/tAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAAYAAAAAQAAAAEAAAACTEVER0VSAAAAAAAAAAAAAOLGgQ+bUJsmS/JcX/hJdFvPzHVliRnd2jaspzLmaehVAAAAAQAAAAAAAAABAAAAAAAAAAAAAAABAAAABgAAAAH1fw7+2c6SK9x+aL47FkMYOgIZwujCGmG2Ve5S7lUfFgAAABQAAAABAAOluwAAADAAAAHsAAAAAAABWgMAAAABTkZuzQAAAEAScsqMRjAFnQsVoZjDSfYjEGAOPXjgZaFvxaN1EuE0q/zuF+uukosgx7UaxNR7R1xvz0Rk27VtC+E0X/SNcWIC";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionUnverifiedContract() {
+ /**
+ * soroban --very-verbose contract invoke \
+ --id CAQOBZUNLWA3GRTIKKGH2RT2G3MKEHELBJ4ZII2N25A3IBDSUSUOAUQU \
+ --source SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK \
+ --rpc-url https://soroban-testnet.stellar.org \
+ --network-passphrase 'Test SDF Network ; September 2015' \
+ -- \
+ increment
+ */
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQABxvgALZ/tAAAABAAAAAAAAAAAAAAAAQAAAAAAAAAYAAAAAAAAAAEg4OaNXYGzRmhSjH1GejbYohyLCnmUI03XQbQEcqSo4AAAAAlpbmNyZW1lbnQAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAQAAAAcT4WhYveSrUKAG2/BxciiPPsGdhkDRqFMBbGDBXCURFwAAAAEAAAAGAAAAASDg5o1dgbNGaFKMfUZ6NtiiHIsKeZQjTddBtARypKjgAAAAFAAAAAEAGQovAAADSAAAAIQAAAAAAAANSQAAAAFORm7NAAAAQMeYqOX1HnwH9heyEgce5OcjQEakm+vFFqtXBEdaHMqDvMBVCcy4u8WhVAbOWCvNQf+/wjIaj03un47sRyLJtwc=";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionUnverifiedContractWithTransferFunction() {
+ // from stellar_sdk import Keypair, Network, SorobanServer, TransactionBuilder, scval
+
+ // rpc_server_url = "https://soroban-testnet.stellar.org:443"
+ // soroban_server = SorobanServer(rpc_server_url)
+ // network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
+
+ // alice_kp = Keypair.from_secret(
+ // "SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK"
+ // ) # GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7
+ // bob_kp = Keypair.from_secret(
+ // "SAE52G23WPAS7MIR2OFGILLICLXXR4K6HSXZHMKD6C33JCAVVILIWYAA"
+ // ) # GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX
+ // native_token_contract_id = "CAQOBZUNLWA3GRTIKKGH2RT2G3MKEHELBJ4ZII2N25A3IBDSUSUOAUQU"
+
+ // alice_source = soroban_server.load_account(alice_kp.public_key)
+
+ // args = [
+ // scval.to_address(alice_kp.public_key), # from
+ // scval.to_address(bob_kp.public_key), # spender
+ // scval.to_int128(100 * 10 ** 7), # amount, 100 XLM
+ // scval.to_uint32(2990592)
+ // ]
+
+ // tx = (
+ // TransactionBuilder(alice_source, network_passphrase, base_fee=500)
+ // .add_time_bounds(0, 0)
+ // .append_invoke_contract_function_op(
+ // contract_id=native_token_contract_id,
+ // function_name="approve",
+ // parameters=args,
+ // )
+ // .build()
+ // )
+
+ // print(f"Unsigned XDR:\n{tx.to_xdr()}")
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAAAfQALZ/tAAAACAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAABIODmjV2Bs0ZoUox9Rno22KIciwp5lCNN10G0BHKkqOAAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0AAAASAAAAAAAAAADixoEPm1CbJkvyXF/4SXRbz8x1ZYkZ3do2rKcy5mnoVQAAAAoAAAAAAAAAAAAAAAA7msoAAAAAAwAtogAAAAAAAAAAAAAAAAA=";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionUnverifiedContractWithApproveFunction() {
+ // from stellar_sdk import Keypair, Network, SorobanServer, TransactionBuilder, scval
+
+ // rpc_server_url = "https://soroban-testnet.stellar.org:443"
+ // soroban_server = SorobanServer(rpc_server_url)
+ // network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
+
+ // alice_kp = Keypair.from_secret(
+ // "SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK"
+ // ) # GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7
+ // bob_kp = Keypair.from_secret(
+ // "SAE52G23WPAS7MIR2OFGILLICLXXR4K6HSXZHMKD6C33JCAVVILIWYAA"
+ // ) # GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX
+ // native_token_contract_id = "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"
+
+ // alice_source = soroban_server.load_account(alice_kp.public_key)
+
+ // args = [
+ // scval.to_address(alice_kp.public_key), # from
+ // scval.to_address(bob_kp.public_key), # spender
+ // scval.to_int128(100 * 10 ** 7), # amount, 100 XLM
+ // scval.to_uint32(2990592)
+ // ]
+
+ // tx = (
+ // TransactionBuilder(alice_source, network_passphrase, base_fee=500)
+ // .add_time_bounds(0, 0)
+ // .append_invoke_contract_function_op(
+ // contract_id=native_token_contract_id,
+ // function_name="mock",
+ // parameters=args,
+ // source=alice_kp.public_key
+ // )
+ // .build()
+ // )
+
+ // print(f"Unsigned XDR:\n{tx.to_xdr()}")
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAAAfQALZ/tAAAACwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NAAAAGAAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAEbW9jawAAAAQAAAASAAAAAAAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAAABIAAAAAAAAAAOLGgQ+bUJsmS/JcX/hJdFvPzHVliRnd2jaspzLmaehVAAAACgAAAAAAAAAAAAAAADuaygAAAAADAC2iAAAAAAAAAAAAAAAAAA==";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionAssetTransfer() {
+ // import time
+
+ // from stellar_sdk import Keypair, Network, SorobanServer, TransactionBuilder, scval
+ // from stellar_sdk import xdr as stellar_xdr
+ // from stellar_sdk.exceptions import PrepareTransactionException
+ // from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus
+
+ // rpc_server_url = "https://soroban-testnet.stellar.org:443"
+ // soroban_server = SorobanServer(rpc_server_url)
+ // network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
+
+ // alice_kp = Keypair.from_secret(
+ // "SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK"
+ // ) # GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7
+ // bob_kp = Keypair.from_secret(
+ // "SAE52G23WPAS7MIR2OFGILLICLXXR4K6HSXZHMKD6C33JCAVVILIWYAA"
+ // ) # GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX
+ // native_token_contract_id = "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"
+
+ // alice_source = soroban_server.load_account(alice_kp.public_key)
+
+ // args = [
+ // scval.to_address(alice_kp.public_key), # from
+ // scval.to_address(bob_kp.public_key), # to
+ // scval.to_int128(100 * 10 ** 7), # amount, 100 XLM
+ // ]
+
+ // tx = (
+ // TransactionBuilder(alice_source, network_passphrase, base_fee=500)
+ // .add_time_bounds(0, 0)
+ // .append_invoke_contract_function_op(
+ // contract_id=native_token_contract_id,
+ // function_name="transfer",
+ // parameters=args,
+ // source=alice_kp.public_key
+ // )
+ // .build()
+ // )
+
+ // try:
+ // tx = soroban_server.prepare_transaction(tx)
+ // except PrepareTransactionException as e:
+ // print(f"Got exception: {e.simulate_transaction_response}")
+ // raise e
+
+ // print(f"Unsigned XDR:\n{tx.to_xdr()}")
+
+ // tx.sign(alice_kp)
+ // print(f"Signed XDR:\n{tx.to_xdr()}")
+
+ // send_transaction_data = soroban_server.send_transaction(tx)
+ // print(f"sent transaction: {send_transaction_data}")
+ // if send_transaction_data.status != SendTransactionStatus.PENDING:
+ // raise Exception("send transaction failed")
+ // while True:
+ // print("waiting for transaction to be confirmed...")
+ // get_transaction_data = soroban_server.get_transaction(send_transaction_data.hash)
+ // if get_transaction_data.status != GetTransactionStatus.NOT_FOUND:
+ // break
+ // time.sleep(3)
+
+ // print(f"transaction: {get_transaction_data}")
+
+ // if get_transaction_data.status == GetTransactionStatus.SUCCESS:
+ // assert get_transaction_data.result_meta_xdr is not None
+ // transaction_meta = stellar_xdr.TransactionMeta.from_xdr(
+ // get_transaction_data.result_meta_xdr
+ // )
+ // if transaction_meta.v3.soroban_meta.return_value.type == stellar_xdr.SCValType.SCV_VOID: # type: ignore[union-attr]
+ // print("send success")
+ // else:
+ // print(f"Transaction failed: {get_transaction_data.result_xdr}")
+
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQACOxwALZ/tAAAACwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NAAAAGAAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAIdHJhbnNmZXIAAAADAAAAEgAAAAAAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0AAAASAAAAAAAAAADixoEPm1CbJkvyXF/4SXRbz8x1ZYkZ3do2rKcy5mnoVQAAAAoAAAAAAAAAAAAAAAA7msoAAAAAAQAAAAAAAAAAAAAAAdeSi3LCcDzP6vfrn/TvTVBKVai5efybRQ6iyEK00c5hAAAACHRyYW5zZmVyAAAAAwAAABIAAAAAAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NAAAAEgAAAAAAAAAA4saBD5tQmyZL8lxf+El0W8/MdWWJGd3aNqynMuZp6FUAAAAKAAAAAAAAAAAAAAAAO5rKAAAAAAAAAAABAAAAAAAAAAEAAAAGAAAAAdeSi3LCcDzP6vfrn/TvTVBKVai5efybRQ6iyEK00c5hAAAAFAAAAAEAAAACAAAAAAAAAADixoEPm1CbJkvyXF/4SXRbz8x1ZYkZ3do2rKcy5mnoVQAAAAAAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0ABBGDAAACFAAAAOwAAAAAAAAAOwAAAAA=";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionAssetApprove() {
+ // import time
+
+ // from stellar_sdk import Keypair, Network, SorobanServer, TransactionBuilder, scval
+ // from stellar_sdk import xdr as stellar_xdr
+ // from stellar_sdk.exceptions import PrepareTransactionException
+ // from stellar_sdk.soroban_rpc import GetTransactionStatus, SendTransactionStatus
+
+ // rpc_server_url = "https://soroban-testnet.stellar.org:443"
+ // soroban_server = SorobanServer(rpc_server_url)
+ // network_passphrase = Network.TESTNET_NETWORK_PASSPHRASE
+
+ // alice_kp = Keypair.from_secret(
+ // "SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK"
+ // ) # GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7
+ // bob_kp = Keypair.from_secret(
+ // "SAE52G23WPAS7MIR2OFGILLICLXXR4K6HSXZHMKD6C33JCAVVILIWYAA"
+ // ) # GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX
+ // native_token_contract_id = "CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"
+
+ // alice_source = soroban_server.load_account(alice_kp.public_key)
+
+ // args = [
+ // scval.to_address(alice_kp.public_key), # from
+ // scval.to_address(bob_kp.public_key), # spender
+ // scval.to_int128(1000 * 10 ** 7), # amount, 1000 XLM
+ // scval.to_uint32(2999592)
+ // ]
+
+ // tx = (
+ // TransactionBuilder(alice_source, network_passphrase, base_fee=500)
+ // .add_time_bounds(0, 0)
+ // .append_invoke_contract_function_op(
+ // contract_id=native_token_contract_id,
+ // function_name="approve",
+ // parameters=args,
+ // source=alice_kp.public_key
+ // )
+ // .build()
+ // )
+
+ // try:
+ // tx = soroban_server.prepare_transaction(tx)
+ // except PrepareTransactionException as e:
+ // print(f"Got exception: {e.simulate_transaction_response}")
+ // raise e
+
+ // print(f"Unsigned XDR:\n{tx.to_xdr()}")
+
+ // tx.sign(alice_kp)
+ // print(f"Signed XDR:\n{tx.to_xdr()}")
+
+ // send_transaction_data = soroban_server.send_transaction(tx)
+ // print(f"sent transaction: {send_transaction_data}")
+ // if send_transaction_data.status != SendTransactionStatus.PENDING:
+ // raise Exception("send transaction failed")
+ // while True:
+ // print("waiting for transaction to be confirmed...")
+ // get_transaction_data = soroban_server.get_transaction(send_transaction_data.hash)
+ // if get_transaction_data.status != GetTransactionStatus.NOT_FOUND:
+ // break
+ // time.sleep(3)
+
+ // print(f"transaction: {get_transaction_data}")
+
+ // if get_transaction_data.status == GetTransactionStatus.SUCCESS:
+ // assert get_transaction_data.result_meta_xdr is not None
+ // transaction_meta = stellar_xdr.TransactionMeta.from_xdr(
+ // get_transaction_data.result_meta_xdr
+ // )
+ // if transaction_meta.v3.soroban_meta.return_value.type == stellar_xdr.SCValType.SCV_VOID: # type: ignore[union-attr]
+ // print("send success")
+ // else:
+ // print(f"Transaction failed: {get_transaction_data.result_xdr}")
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQADJ94ALZ/tAAAADAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NAAAAGAAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0AAAASAAAAAAAAAADixoEPm1CbJkvyXF/4SXRbz8x1ZYkZ3do2rKcy5mnoVQAAAAoAAAAAAAAAAAAAAAJUC+QAAAAAAwAtxSgAAAABAAAAAAAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAHYXBwcm92ZQAAAAAEAAAAEgAAAAAAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0AAAASAAAAAAAAAADixoEPm1CbJkvyXF/4SXRbz8x1ZYkZ3do2rKcy5mnoVQAAAAoAAAAAAAAAAAAAAAJUC+QAAAAAAwAtxSgAAAAAAAAAAQAAAAAAAAABAAAABgAAAAHXkotywnA8z+r365/0701QSlWouXn8m0UOoshCtNHOYQAAABQAAAABAAAAAQAAAAYAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAQAAAAAQAAAAIAAAAPAAAACUFsbG93YW5jZQAAAAAAABEAAAABAAAAAgAAAA8AAAAEZnJvbQAAABIAAAAAAAAAAOkziLv9L70RgG3QvVnOqQeefMcM57HhVPEUzf5ORm7NAAAADwAAAAdzcGVuZGVyAAAAABIAAAAAAAAAAOLGgQ+bUJsmS/JcX/hJdFvPzHVliRnd2jaspzLmaehVAAAAAAAEyB8AAAFYAAABLAAAAAAAAHGtAAAAAA==";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opInvokeHostFunctionScvals() {
+ // from stellar_sdk import *
+ // from stellar_sdk import xdr
+
+ // kp0 = Keypair.from_secret("SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK")
+ // source = Account(kp0.public_key, 1234567890)
+
+ // scvals = [
+ // scval.to_bool(True),
+ // scval.to_void(),
+ // scval.to_uint32(1234),
+ // scval.to_int32(12345),
+ // scval.to_uint64(23432453),
+ // scval.to_int64(454546),
+ // scval.to_timepoint(2356623562),
+ // scval.to_duration(34543643),
+ // scval.to_uint128(43543645645645),
+ // scval.to_int128(43543645645645),
+ // scval.to_uint256(24358729874358025473024572),
+ // scval.to_int256(24358729874358025473024572),
+ // scval.to_bytes(b"this is test bytes"),
+ // scval.to_string("hello this is test string"),
+ // scval.to_symbol("testfunc"),
+ // scval.to_vec([scval.to_bool(True), scval.to_bool(False)]),
+ // scval.to_map(
+ // {
+ // scval.to_symbol("true"): scval.to_bool(True),
+ // scval.to_symbol("false"): scval.to_bool(False),
+ // }
+ // ),
+ // scval.to_address(kp0.public_key),
+ // scval.to_address("CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC"),
+ // xdr.SCVal(xdr.SCValType.SCV_LEDGER_KEY_CONTRACT_INSTANCE),
+ // xdr.SCVal(
+ // xdr.SCValType.SCV_LEDGER_KEY_NONCE, nonce_key=xdr.SCNonceKey(xdr.Int64(100))
+ // ),
+ // xdr.SCVal(
+ // xdr.SCValType.SCV_CONTRACT_INSTANCE,
+ // instance=xdr.SCContractInstance(
+ // executable=xdr.ContractExecutable(
+ // xdr.ContractExecutableType.CONTRACT_EXECUTABLE_STELLAR_ASSET
+ // ),
+ // storage=None,
+ // ),
+ // ),
+ // xdr.SCVal(
+ // xdr.SCValType.SCV_CONTRACT_INSTANCE,
+ // instance=xdr.SCContractInstance(
+ // executable=xdr.ContractExecutable(
+ // xdr.ContractExecutableType.CONTRACT_EXECUTABLE_WASM,
+ // wasm_hash=xdr.Hash(
+ // b"\xcf\x88\x84S\xd6`V\xbc\xb6\xaeY*\x91\x90s\xb5\x93\xb5\x96[\xff\xcb\xcf\xc3\x04\xacGT\x9e\xac\xda\xd6"
+ // ),
+ // ),
+ // storage=scval.to_map(
+ // {
+ // scval.to_symbol("true"): scval.to_bool(True),
+ // scval.to_symbol("false"): scval.to_bool(False),
+ // }
+ // ).map,
+ // ),
+ // ),
+ // ]
+ // tx = (
+ // TransactionBuilder(source, Network.TESTNET_NETWORK_PASSPHRASE, 500)
+ // .append_invoke_contract_function_op(
+ // contract_id="CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC",
+ // function_name="test",
+ // parameters=scvals,
+ // )
+ // .add_time_bounds(0, 0)
+ // .build()
+ // )
+
+ // print(tx.to_xdr())
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAAAfQAAAAASZYC0wAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAGAAAAAAAAAAB15KLcsJwPM/q9+uf9O9NUEpVqLl5/JtFDqLIQrTRzmEAAAAEdGVzdAAAABcAAAAAAAAAAQAAAAEAAAADAAAE0gAAAAQAADA5AAAABQAAAAABZY0FAAAABgAAAAAABu+SAAAABwAAAACMdzjKAAAACAAAAAACDxgbAAAACQAAAAAAAAAAAAAnmkuH600AAAAKAAAAAAAAAAAAACeaS4frTQAAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAUJilkdtaR8ljiPAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUJilkdtaR8ljiPAAAAA0AAAASdGhpcyBpcyB0ZXN0IGJ5dGVzAAAAAAAOAAAAGWhlbGxvIHRoaXMgaXMgdGVzdCBzdHJpbmcAAAAAAAAPAAAACHRlc3RmdW5jAAAAEAAAAAEAAAACAAAAAAAAAAEAAAAAAAAAAAAAABEAAAABAAAAAgAAAA8AAAAEdHJ1ZQAAAAAAAAABAAAADwAAAAVmYWxzZQAAAAAAAAAAAAAAAAAAEgAAAAAAAAAA6TOIu/0vvRGAbdC9Wc6pB558xwznseFU8RTN/k5Gbs0AAAASAAAAAdeSi3LCcDzP6vfrn/TvTVBKVai5efybRQ6iyEK00c5hAAAAFAAAABUAAAAAAAAAZAAAABMAAAABAAAAAAAAABMAAAAAz4iEU9ZgVry2rlkqkZBztZO1llv/y8/DBKxHVJ6s2tYAAAABAAAAAgAAAA8AAAAEdHJ1ZQAAAAAAAAABAAAADwAAAAVmYWxzZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opExtendFootprintTtl() {
+ /**
+ * soroban --very-verbose contract bump --ledgers-to-expire 130816 \
+ --durability persistent --id CACEIKVZTU7Z6VKNISE3OO5MXSCKUC7HC2FNCWRO2HJMWSUPUWHDLSJE \
+ --source SAIYWGGWU2WMXYDSK33UBQBMBDKU4TTJVY3ZIFF24H2KQDR7RQW5KAEK \
+ --rpc-url https://soroban-testnet.stellar.org:443 \
+ --network-passphrase 'Test SDF Network ; September 2015'
+ */
+ const xdr = "AAAAAgAAAADpM4i7/S+9EYBt0L1ZzqkHnnzHDOex4VTxFM3+TkZuzQAAn9IALZ/tAAAABQAAAAAAAAAAAAAAAQAAAAAAAAAZAAAAAAAB/wAAAAABAAAAAAAAAAEAAAAGAAAAAQREKrmdP59VTUSJtzusvISqC+cWitFaLtHSy0qPpY41AAAAFAAAAAEAAAAAAAAAAAAAAJgAAAAAAAAAAAAAdogAAAABTkZuzQAAAEAQIX09qLt+SIcA7sOc7XGSWjK98FFURHW77g8uWm4lQirDqZU51B0uatCZe90mSt+RK7r7it3I92JSUL1Ba+EA";
+ return TransactionBuilder.fromXDR(xdr, Networks.TESTNET);
+}
+
+export function opRestoreFootprint() {
+ // TODO: add soroban resource
+ return getCommonTransactionBuilder()
+ .addOperation(
+ Operation.restoreFootprint({
+ source: kp0.publicKey(),
+ })
+ )
+ .build();
+}
+
export function opWithEmptySource() {
return getCommonTransactionBuilder()
.addOperation(
diff --git a/tests_generate_binary/package-lock.json b/tests_generate_binary/package-lock.json
index 40295593..65eb8543 100644
--- a/tests_generate_binary/package-lock.json
+++ b/tests_generate_binary/package-lock.json
@@ -18,7 +18,7 @@
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "stellar-base": "^8.1.0"
+ "@stellar/stellar-base": "^11.0.0"
},
"devDependencies": {
"@types/node": "^17.0.29",
@@ -34,8 +34,8 @@
"tests-common": {
"version": "file:../tests_common_js",
"requires": {
+ "@stellar/stellar-base": "^11.0.0",
"@types/node": "^17.0.29",
- "stellar-base": "^8.1.0",
"typescript": "^4.6.3"
}
}
diff --git a/tests_unit/test_tx_formatter.c b/tests_unit/test_tx_formatter.c
index a75a00e0..2b61c500 100644
--- a/tests_unit/test_tx_formatter.c
+++ b/tests_unit/test_tx_formatter.c
@@ -16,6 +16,7 @@ static const char *testcases[] = {
"../testcases/opPaymentAssetAlphanum4.raw",
"../testcases/opPaymentAssetAlphanum12.raw",
"../testcases/opPaymentWithMuxedDestination.raw",
+ "../testcases/opRestoreFootprint.raw",
"../testcases/opPathPaymentStrictReceive.raw",
"../testcases/opPathPaymentStrictReceiveWithEmptyPath.raw",
"../testcases/opPathPaymentStrictReceiveWithMuxedDestination.raw",
@@ -43,6 +44,16 @@ static const char *testcases[] = {
"../testcases/opAccountMerge.raw",
"../testcases/opAccountMergeWithMuxedDestination.raw",
"../testcases/opInflation.raw",
+ "../testcases/opInvokeHostFunctionAssetApprove.raw",
+ "../testcases/opInvokeHostFunctionScvals.raw",
+ "../testcases/opInvokeHostFunctionAssetTransfer.raw",
+ "../testcases/opInvokeHostFunctionCreateContractNewAsset.raw",
+ "../testcases/opInvokeHostFunctionCreateContractWasmId.raw",
+ "../testcases/opInvokeHostFunctionCreateContractWrapAsset.raw",
+ "../testcases/opInvokeHostFunctionUnverifiedContract.raw",
+ "../testcases/opInvokeHostFunctionUnverifiedContractWithApproveFunction.raw",
+ "../testcases/opInvokeHostFunctionUnverifiedContractWithTransferFunction.raw",
+ "../testcases/opInvokeHostFunctionUploadWasm.raw",
"../testcases/opManageDataAdd.raw",
"../testcases/opManageDataAddWithUnprintableData.raw",
"../testcases/opManageDataRemove.raw",
@@ -57,6 +68,7 @@ static const char *testcases[] = {
"../testcases/opClaimClaimableBalance.raw",
"../testcases/opBeginSponsoringFutureReserves.raw",
"../testcases/opEndSponsoringFutureReserves.raw",
+ "../testcases/opExtendFootprintTtl.raw",
"../testcases/opRevokeSponsorshipAccount.raw",
"../testcases/opRevokeSponsorshipTrustLineWithAsset.raw",
"../testcases/opRevokeSponsorshipTrustLineWithLiquidityPoolId.raw",
diff --git a/tests_unit/test_tx_parser.c b/tests_unit/test_tx_parser.c
index 148e8b92..162b13d3 100644
--- a/tests_unit/test_tx_parser.c
+++ b/tests_unit/test_tx_parser.c
@@ -15,6 +15,7 @@ static const char *testcases[] = {
"../testcases/opPaymentAssetAlphanum4.raw",
"../testcases/opPaymentAssetAlphanum12.raw",
"../testcases/opPaymentWithMuxedDestination.raw",
+ "../testcases/opRestoreFootprint.raw",
"../testcases/opPathPaymentStrictReceive.raw",
"../testcases/opPathPaymentStrictReceiveWithEmptyPath.raw",
"../testcases/opPathPaymentStrictReceiveWithMuxedDestination.raw",
@@ -42,6 +43,16 @@ static const char *testcases[] = {
"../testcases/opAccountMerge.raw",
"../testcases/opAccountMergeWithMuxedDestination.raw",
"../testcases/opInflation.raw",
+ "../testcases/opInvokeHostFunctionAssetApprove.raw",
+ "../testcases/opInvokeHostFunctionScvals.raw",
+ "../testcases/opInvokeHostFunctionAssetTransfer.raw",
+ "../testcases/opInvokeHostFunctionCreateContractNewAsset.raw",
+ "../testcases/opInvokeHostFunctionCreateContractWasmId.raw",
+ "../testcases/opInvokeHostFunctionCreateContractWrapAsset.raw",
+ "../testcases/opInvokeHostFunctionUnverifiedContract.raw",
+ "../testcases/opInvokeHostFunctionUnverifiedContractWithApproveFunction.raw",
+ "../testcases/opInvokeHostFunctionUnverifiedContractWithTransferFunction.raw",
+ "../testcases/opInvokeHostFunctionUploadWasm.raw",
"../testcases/opManageDataAdd.raw",
"../testcases/opManageDataAddWithUnprintableData.raw",
"../testcases/opManageDataRemove.raw",
@@ -56,6 +67,7 @@ static const char *testcases[] = {
"../testcases/opClaimClaimableBalance.raw",
"../testcases/opBeginSponsoringFutureReserves.raw",
"../testcases/opEndSponsoringFutureReserves.raw",
+ "../testcases/opExtendFootprintTtl.raw",
"../testcases/opRevokeSponsorshipAccount.raw",
"../testcases/opRevokeSponsorshipTrustLineWithAsset.raw",
"../testcases/opRevokeSponsorshipTrustLineWithLiquidityPoolId.raw",
diff --git a/tests_unit/testcases/opExtendFootprintTtl.txt b/tests_unit/testcases/opExtendFootprintTtl.txt
new file mode 100644
index 00000000..8c1f55a6
--- /dev/null
+++ b/tests_unit/testcases/opExtendFootprintTtl.txt
@@ -0,0 +1,5 @@
+Network; Testnet
+Max Fee; 0.0040914 XLM
+Sequence Num; 12842214208045061
+Tx Source; GDUTHC..XM2FN7
+Soroban; Extend Footprint TTL
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionAssetApprove.txt b/tests_unit/testcases/opInvokeHostFunctionAssetApprove.txt
new file mode 100644
index 00000000..52276431
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionAssetApprove.txt
@@ -0,0 +1,12 @@
+Network; Testnet
+Max Fee; 0.0206814 XLM
+Sequence Num; 12842214208045068
+Tx Source; GDUTHC..XM2FN7
+Soroban; Invoke Smart Contract
+Contract ID; CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
+Function; approve
+From; GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7
+Spender; GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX
+Amount; 1,000 XLM
+Expiration Ledger; 2999592
+Op Source; GDUTHC..XM2FN7
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionAssetTransfer.txt b/tests_unit/testcases/opInvokeHostFunctionAssetTransfer.txt
new file mode 100644
index 00000000..adea6f31
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionAssetTransfer.txt
@@ -0,0 +1,11 @@
+Network; Testnet
+Max Fee; 0.0146204 XLM
+Sequence Num; 12842214208045067
+Tx Source; GDUTHC..XM2FN7
+Soroban; Invoke Smart Contract
+Contract ID; CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
+Function; transfer
+Transfer; 100 XLM
+From; GDUTHCF37UX32EMANXIL2WOOVEDZ47GHBTT3DYKU6EKM37SOIZXM2FN7
+To; GDRMNAIPTNIJWJSL6JOF76CJORN47TDVMWERTXO2G2WKOMXGNHUFL5QX
+Op Source; GDUTHC..XM2FN7
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionCreateContractNewAsset.txt b/tests_unit/testcases/opInvokeHostFunctionCreateContractNewAsset.txt
new file mode 100644
index 00000000..63225080
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionCreateContractNewAsset.txt
@@ -0,0 +1,6 @@
+Network; Testnet
+Max Fee; 0.0086454 XLM
+Sequence Num; 12842214208045066
+Tx Source; GDUTHC..XM2FN7
+Soroban; Create Smart Contract
+Op Source; GDUTHC..XM2FN7
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionCreateContractWasmId.txt b/tests_unit/testcases/opInvokeHostFunctionCreateContractWasmId.txt
new file mode 100644
index 00000000..777b1c7c
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionCreateContractWasmId.txt
@@ -0,0 +1,5 @@
+Network; Testnet
+Max Fee; 0.01265 XLM
+Sequence Num; 12842214208045058
+Tx Source; GDUTHC..XM2FN7
+Soroban; Create Smart Contract
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionCreateContractWrapAsset.txt b/tests_unit/testcases/opInvokeHostFunctionCreateContractWrapAsset.txt
new file mode 100644
index 00000000..5be5f445
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionCreateContractWrapAsset.txt
@@ -0,0 +1,5 @@
+Network; Testnet
+Max Fee; 0.0418694 XLM
+Sequence Num; 12842214208045059
+Tx Source; GDUTHC..XM2FN7
+Soroban; Create Smart Contract
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionScvals.txt b/tests_unit/testcases/opInvokeHostFunctionScvals.txt
new file mode 100644
index 00000000..0607c11a
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionScvals.txt
@@ -0,0 +1,8 @@
+Network; Testnet
+Max Fee; 0.00005 XLM
+Sequence Num; 1234567891
+Tx Source; GDUTHC..XM2FN7
+Soroban; Invoke Smart Contract
+Contract ID; CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
+Function; test
+RISK WARNING; Unverified contract, will not display details
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionUnverifiedContract.txt b/tests_unit/testcases/opInvokeHostFunctionUnverifiedContract.txt
new file mode 100644
index 00000000..fefa4ec1
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionUnverifiedContract.txt
@@ -0,0 +1,8 @@
+Network; Testnet
+Max Fee; 0.0116472 XLM
+Sequence Num; 12842214208045060
+Tx Source; GDUTHC..XM2FN7
+Soroban; Invoke Smart Contract
+Contract ID; CAQOBZUNLWA3GRTIKKGH2RT2G3MKEHELBJ4ZII2N25A3IBDSUSUOAUQU
+Function; increment
+RISK WARNING; Unverified contract, will not display details
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithApproveFunction.txt b/tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithApproveFunction.txt
new file mode 100644
index 00000000..4f10aa30
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithApproveFunction.txt
@@ -0,0 +1,9 @@
+Network; Testnet
+Max Fee; 0.00005 XLM
+Sequence Num; 12842214208045067
+Tx Source; GDUTHC..XM2FN7
+Soroban; Invoke Smart Contract
+Contract ID; CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
+Function; mock
+RISK WARNING; Unverified contract, will not display details
+Op Source; GDUTHC..XM2FN7
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithTransferFunction.txt b/tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithTransferFunction.txt
new file mode 100644
index 00000000..b1eb5541
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionUnverifiedContractWithTransferFunction.txt
@@ -0,0 +1,8 @@
+Network; Testnet
+Max Fee; 0.00005 XLM
+Sequence Num; 12842214208045064
+Tx Source; GDUTHC..XM2FN7
+Soroban; Invoke Smart Contract
+Contract ID; CAQOBZUNLWA3GRTIKKGH2RT2G3MKEHELBJ4ZII2N25A3IBDSUSUOAUQU
+Function; approve
+RISK WARNING; Unverified contract, will not display details
\ No newline at end of file
diff --git a/tests_unit/testcases/opInvokeHostFunctionUploadWasm.txt b/tests_unit/testcases/opInvokeHostFunctionUploadWasm.txt
new file mode 100644
index 00000000..42687189
--- /dev/null
+++ b/tests_unit/testcases/opInvokeHostFunctionUploadWasm.txt
@@ -0,0 +1,6 @@
+Network; Testnet
+Max Fee; 0.0029143 XLM
+Sequence Num; 12842214208045057
+Tx Source; GDUTHC..XM2FN7
+Soroban; Upload Smart Contract Wasm
+Op Source; GDUTHC..XM2FN7
\ No newline at end of file
diff --git a/tests_unit/testcases/opRestoreFootprint.txt b/tests_unit/testcases/opRestoreFootprint.txt
new file mode 100644
index 00000000..9d212e68
--- /dev/null
+++ b/tests_unit/testcases/opRestoreFootprint.txt
@@ -0,0 +1,7 @@
+Memo Text; hello world
+Max Fee; 0.00001 XLM
+Sequence Num; 103720918407102568
+Valid Before (UTC); 2022-12-12 04:12:12
+Tx Source; GDUTHC..XM2FN7
+Soroban; Restore Footprint
+Op Source; GDUTHC..XM2FN7
\ No newline at end of file
diff --git a/tests_zemu/package-lock.json b/tests_zemu/package-lock.json
index 6d5abd2b..2a56ce5f 100644
--- a/tests_zemu/package-lock.json
+++ b/tests_zemu/package-lock.json
@@ -9,12 +9,14 @@
"version": "1.0.0",
"license": "Apache-2.0",
"devDependencies": {
- "@ledgerhq/hw-app-str": "^6.27.1",
+ "@ledgerhq/hw-app-str": "github:overcat/hw-ledger-str-dev",
"@ledgerhq/hw-transport-http": "^6.28.3",
+ "@stellar/stellar-base": "^11.0.0",
"@types/jest": "^29.2.1",
- "@zondax/zemu": "^0.44.1",
+ "@types/sha.js": "^2.4.4",
+ "@zondax/zemu": "^0.46.2",
"jest": "29.2.2",
- "stellar-base": "^8.1.0",
+ "sha.js": "^2.4.9",
"tests-common": "file:../tests_common_js",
"ts-jest": "^29.0.3",
"typescript": "^4.5.3"
@@ -26,7 +28,7 @@
"dev": true,
"license": "Apache-2.0",
"dependencies": {
- "stellar-base": "^8.1.0"
+ "@stellar/stellar-base": "^11.0.0"
},
"devDependencies": {
"@types/node": "^17.0.29",
@@ -568,18 +570,6 @@
"@babel/core": "^7.0.0-0"
}
},
- "node_modules/@babel/runtime": {
- "version": "7.22.15",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.15.tgz",
- "integrity": "sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==",
- "dev": true,
- "dependencies": {
- "regenerator-runtime": "^0.14.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
"node_modules/@babel/template": {
"version": "7.21.9",
"resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz",
@@ -642,9 +632,9 @@
"dev": true
},
"node_modules/@grpc/grpc-js": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.3.tgz",
- "integrity": "sha512-b8iWtdrYIeT5fdZdS4Br/6h/kuk0PW5EVBUGk1amSbrpL8DlktJD43CdcCWwRdd6+jgwHhADSbL9CsNnm6EUPA==",
+ "version": "1.10.1",
+ "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.1.tgz",
+ "integrity": "sha512-55ONqFytZExfOIjF1RjXPcVmT/jJqFzbbDqxK9jmRV4nxiYWtL9hENSW1Jfx0SdZfrvoqd44YJ/GJTqfRrawSQ==",
"dev": true,
"dependencies": {
"@grpc/proto-loader": "^0.7.8",
@@ -655,9 +645,9 @@
}
},
"node_modules/@grpc/proto-loader": {
- "version": "0.7.9",
- "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.9.tgz",
- "integrity": "sha512-YJsOehVXzgurc+lLAxYnlSMc1p/Gu6VAvnfx0ATi2nzvr0YZcjhmZDeY8SeAKv1M7zE3aEJH0Xo9mK1iZ8GYoQ==",
+ "version": "0.7.10",
+ "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz",
+ "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==",
"dev": true,
"dependencies": {
"lodash.camelcase": "^4.3.0",
@@ -1030,55 +1020,56 @@
"dev": true
},
"node_modules/@ledgerhq/devices": {
- "version": "8.0.7",
- "resolved": "https://registry.npmjs.org/@ledgerhq/devices/-/devices-8.0.7.tgz",
- "integrity": "sha512-BbPyET52lXnVs7CxJWrGYqmtGdbGzj+XnfCqLsDnA7QYr1CZREysxmie+Rr6BKpNDBRVesAovXjtaVaZOn+upw==",
+ "version": "8.2.0",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/@ledgerhq/devices/-/devices-8.2.0.tgz",
+ "integrity": "sha512-XROTW2gTmmuy+YPPDjdtKKTQ3mfxrPtKtV+a9QFbj8f5MnjVMV0Zpy1BIB4CyIMsVVi4z6+nI67auT7IlsM3SQ==",
"dev": true,
"dependencies": {
- "@ledgerhq/errors": "^6.14.0",
- "@ledgerhq/logs": "^6.10.1",
- "rxjs": "6",
+ "@ledgerhq/errors": "^6.16.1",
+ "@ledgerhq/logs": "^6.12.0",
+ "rxjs": "^7.8.1",
"semver": "^7.3.5"
}
},
"node_modules/@ledgerhq/errors": {
- "version": "6.14.0",
- "resolved": "https://registry.npmjs.org/@ledgerhq/errors/-/errors-6.14.0.tgz",
- "integrity": "sha512-ZWJw2Ti6Dq1Ott/+qYqJdDWeZm16qI3VNG5rFlb0TQ3UcAyLIQZbnnzzdcVVwVeZiEp66WIpINd/pBdqsHVyOA==",
+ "version": "6.16.1",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/@ledgerhq/errors/-/errors-6.16.1.tgz",
+ "integrity": "sha512-4D4wKecGzQpIu7sx03Sg4uE1e8g1oZUndWgw9gw776H8h9ov9c5TxPaldTn2j6orPECAERViLf7LTO4L5pE2Cw==",
"dev": true
},
"node_modules/@ledgerhq/hw-app-str": {
- "version": "6.27.15",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-app-str/-/hw-app-str-6.27.15.tgz",
- "integrity": "sha512-UqPvEghLNoEeclIiWiKpyQN0vAbQJKvMnL+d6CChkAVnOzHMcRuMXK1Iu3OCoTkqvk4R1PjPW/ORydIE3nrvuw==",
+ "version": "6.27.20",
+ "resolved": "git+ssh://git@github.com/overcat/hw-ledger-str-dev.git#134b60c16398ea38dd26d788009fa76011bd1d74",
"dev": true,
+ "license": "Apache-2.0",
"dependencies": {
- "@ledgerhq/hw-transport": "^6.28.4",
+ "@ledgerhq/hw-transport": "^6.30.3",
"base32.js": "^0.1.0",
"sha.js": "^2.3.6",
"tweetnacl": "^1.0.3"
}
},
"node_modules/@ledgerhq/hw-transport": {
- "version": "6.28.8",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.28.8.tgz",
- "integrity": "sha512-XxQVl4htd018u/M66r0iu5nlHi+J6QfdPsORzDF6N39jaz+tMqItb7tUlXM/isggcuS5lc7GJo7NOuJ8rvHZaQ==",
+ "version": "6.30.3",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport/-/hw-transport-6.30.3.tgz",
+ "integrity": "sha512-eqtTCGy8wFCxl+hZSEpjVqn1EDjQhFCne/qUyY0aA36efhWUF6bCRAhkq1e5i7g2P6TbxcIM5P5PW67dILuqIQ==",
"dev": true,
"dependencies": {
- "@ledgerhq/devices": "^8.0.7",
- "@ledgerhq/errors": "^6.14.0",
+ "@ledgerhq/devices": "^8.2.0",
+ "@ledgerhq/errors": "^6.16.1",
+ "@ledgerhq/logs": "^6.12.0",
"events": "^3.3.0"
}
},
"node_modules/@ledgerhq/hw-transport-http": {
- "version": "6.28.3",
- "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-http/-/hw-transport-http-6.28.3.tgz",
- "integrity": "sha512-Z+zzK3v+rs/j9V2fc1uDJ38wBviziyU2sSSSHy0F2VnOhdEuE9i82hYsRniwi3c+pi9LThZP9kQrHOyeAnTaow==",
+ "version": "6.29.3",
+ "resolved": "https://registry.npmjs.org/@ledgerhq/hw-transport-http/-/hw-transport-http-6.29.3.tgz",
+ "integrity": "sha512-06uwieqFE2bcav12GjZr534etgn3MAflgwe5ovfPoUzBCPv72YEH3A1FKJqbtxVthPjYthjZXD1SLdL2EKMd6g==",
"dev": true,
"dependencies": {
- "@ledgerhq/errors": "^6.14.0",
- "@ledgerhq/hw-transport": "^6.28.8",
- "@ledgerhq/logs": "^6.10.1",
+ "@ledgerhq/errors": "^6.16.1",
+ "@ledgerhq/hw-transport": "^6.30.3",
+ "@ledgerhq/logs": "^6.12.0",
"axios": "^0.26.1",
"ws": "^7.5.2"
}
@@ -1093,9 +1084,9 @@
}
},
"node_modules/@ledgerhq/logs": {
- "version": "6.10.1",
- "resolved": "https://registry.npmjs.org/@ledgerhq/logs/-/logs-6.10.1.tgz",
- "integrity": "sha512-z+ILK8Q3y+nfUl43ctCPuR4Y2bIxk/ooCQFwZxhtci1EhAtMDzMAx2W25qx8G1PPL9UUOdnUax19+F0OjXoj4w==",
+ "version": "6.12.0",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/@ledgerhq/logs/-/logs-6.12.0.tgz",
+ "integrity": "sha512-ExDoj1QV5eC6TEbMdLUMMk9cfvNKhhv5gXol4SmULRVCx/3iyCPhJ74nsb3S0Vb+/f+XujBEj3vQn5+cwS0fNA==",
"dev": true
},
"node_modules/@protobufjs/aspromise": {
@@ -1186,6 +1177,67 @@
"@sinonjs/commons": "^3.0.0"
}
},
+ "node_modules/@stellar/js-xdr": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@stellar/js-xdr/-/js-xdr-3.1.0.tgz",
+ "integrity": "sha512-mYTyFnhgyQgyvpAYZRO1LurUn2MxcIZRj74zZz/BxKEk7zrL4axhQ1ez0HL2BRi0wlG6cHn5BeD/t9Xcyp7CSQ==",
+ "dev": true
+ },
+ "node_modules/@stellar/stellar-base": {
+ "version": "11.0.0",
+ "resolved": "https://registry.npmjs.org/@stellar/stellar-base/-/stellar-base-11.0.0.tgz",
+ "integrity": "sha512-KPTjaWJCG2m7hMCPRWFGGPaG5qOkgPLWvFVOhe1HUy7dlE4MxxPfdusz0mcLkf6VT7doqhLB1rIt0D9M2GgQcQ==",
+ "dev": true,
+ "dependencies": {
+ "@stellar/js-xdr": "^3.1.0",
+ "base32.js": "^0.1.0",
+ "bignumber.js": "^9.1.2",
+ "buffer": "^6.0.3",
+ "sha.js": "^2.3.6",
+ "tweetnacl": "^1.0.3",
+ "typescript": "^5.3.3"
+ },
+ "optionalDependencies": {
+ "sodium-native": "^4.0.8"
+ }
+ },
+ "node_modules/@stellar/stellar-base/node_modules/buffer": {
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
+ "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "base64-js": "^1.3.1",
+ "ieee754": "^1.2.1"
+ }
+ },
+ "node_modules/@stellar/stellar-base/node_modules/typescript": {
+ "version": "5.3.3",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz",
+ "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
+ "dev": true,
+ "bin": {
+ "tsc": "bin/tsc",
+ "tsserver": "bin/tsserver"
+ },
+ "engines": {
+ "node": ">=14.17"
+ }
+ },
"node_modules/@types/babel__core": {
"version": "7.20.1",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz",
@@ -1282,6 +1334,15 @@
"integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==",
"dev": true
},
+ "node_modules/@types/sha.js": {
+ "version": "2.4.4",
+ "resolved": "https://registry.npmjs.org/@types/sha.js/-/sha.js-2.4.4.tgz",
+ "integrity": "sha512-Qukd+D6S2Hm0wLVt2Vh+/eWBIoUt+wF8jWjBsG4F8EFQRwKtYvtXCPcNl2OEUQ1R+eTr3xuSaBYUyM3WD1x/Qw==",
+ "dev": true,
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/stack-utils": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
@@ -1304,18 +1365,19 @@
"dev": true
},
"node_modules/@zondax/zemu": {
- "version": "0.44.1",
- "resolved": "https://registry.npmjs.org/@zondax/zemu/-/zemu-0.44.1.tgz",
- "integrity": "sha512-GxH+W2rLs36tGQh1EpB5AJu85oqHoTS9ZHp1cGk7Uufm0l/MivOWNUKPfQjzZ11RCYbbhTGKyg2QVVF/m7b9vA==",
+ "version": "0.46.2",
+ "resolved": "https://registry.npmjs.org/@zondax/zemu/-/zemu-0.46.2.tgz",
+ "integrity": "sha512-9BXfgfBk/jPLRDIlReEWHSAT8mWy4umpCGJma2ZfNVfhuMBITSHdIwR62UhMlsuCc/ZFJ9Tj5xqQOdXQEmybYg==",
"dev": true,
"dependencies": {
- "@grpc/grpc-js": "^1.9.3",
- "@grpc/proto-loader": "^0.7.9",
- "axios": "^1.5.0",
- "axios-retry": "^3.7.0",
- "dockerode": "^3.3.1",
+ "@grpc/grpc-js": "^1.9.14",
+ "@grpc/proto-loader": "^0.7.10",
+ "@ledgerhq/hw-transport-http": "^6.29.2",
+ "axios": "^1.6.6",
+ "axios-retry": "^4.0.0",
+ "dockerode": "^4.0.2",
"elfy": "^1.0.0",
- "fs-extra": "^11.0.0",
+ "fs-extra": "^11.2.0",
"get-port": "^5.1.1",
"pngjs": "^7.0.0",
"randomstring": "^1.3.0"
@@ -1393,29 +1455,31 @@
},
"node_modules/asynckit": {
"version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/asynckit/-/asynckit-0.4.0.tgz",
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
},
"node_modules/axios": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz",
- "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==",
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.7.tgz",
+ "integrity": "sha512-/hDJGff6/c7u0hDkvkGxR/oy6CbCs8ziCsC7SqmhjfozqiJGc8Z11wrv9z9lYfY4K8l+H9TpjcMDX0xOZmx+RA==",
"dev": true,
"dependencies": {
- "follow-redirects": "^1.15.0",
+ "follow-redirects": "^1.15.4",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/axios-retry": {
- "version": "3.7.0",
- "resolved": "https://registry.npmjs.org/axios-retry/-/axios-retry-3.7.0.tgz",
- "integrity": "sha512-ZTnCkJbRtfScvwiRnoVskFAfvU0UG3xNcsjwTR0mawSbIJoothxn67gKsMaNAFHRXJ1RmuLhmZBzvyXi3+9WyQ==",
+ "version": "4.0.0",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/axios-retry/-/axios-retry-4.0.0.tgz",
+ "integrity": "sha512-F6P4HVGITD/v4z9Lw2mIA24IabTajvpDZmKa6zq/gGwn57wN5j1P3uWrAV0+diqnW6kTM2fTqmWNfgYWGmMuiA==",
"dev": true,
"dependencies": {
- "@babel/runtime": "^7.15.4",
"is-retry-allowed": "^2.2.0"
+ },
+ "peerDependencies": {
+ "axios": "0.x || 1.x"
}
},
"node_modules/babel-jest": {
@@ -1560,9 +1624,9 @@
"dev": true
},
"node_modules/bignumber.js": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz",
- "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==",
+ "version": "9.1.2",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/bignumber.js/-/bignumber.js-9.1.2.tgz",
+ "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==",
"dev": true,
"engines": {
"node": "*"
@@ -1834,7 +1898,7 @@
},
"node_modules/combined-stream": {
"version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"dependencies": {
@@ -1857,9 +1921,9 @@
"dev": true
},
"node_modules/cpu-features": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.8.tgz",
- "integrity": "sha512-BbHBvtYhUhksqTjr6bhNOjGgMnhwhGTQmOoZGD+K7BCaQDCuZl/Ve1ZxUSMRwVC4D/rkCPQ2MAIeYzrWyK7eEg==",
+ "version": "0.0.9",
+ "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz",
+ "integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==",
"dev": true,
"hasInstallScript": true,
"optional": true,
@@ -1871,15 +1935,6 @@
"node": ">=10.0.0"
}
},
- "node_modules/crc": {
- "version": "3.8.0",
- "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz",
- "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==",
- "dev": true,
- "dependencies": {
- "buffer": "^5.1.0"
- }
- },
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -1928,8 +1983,8 @@
},
"node_modules/delayed-stream": {
"version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/delayed-stream/-/delayed-stream-1.0.0.tgz",
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"dev": true,
"engines": {
"node": ">=0.4.0"
@@ -1954,28 +2009,28 @@
}
},
"node_modules/docker-modem": {
- "version": "3.0.8",
- "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-3.0.8.tgz",
- "integrity": "sha512-f0ReSURdM3pcKPNS30mxOHSbaFLcknGmQjwSfmbcdOw1XWKXVhukM3NJHhr7NpY9BIyyWQb0EBo3KQvvuU5egQ==",
+ "version": "5.0.3",
+ "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.3.tgz",
+ "integrity": "sha512-89zhop5YVhcPEt5FpUFGr3cDyceGhq/F9J+ZndQ4KfqNvfbJpPMfgeixFgUj5OjCYAboElqODxY5Z1EBsSa6sg==",
"dev": true,
"dependencies": {
"debug": "^4.1.1",
"readable-stream": "^3.5.0",
"split-ca": "^1.0.1",
- "ssh2": "^1.11.0"
+ "ssh2": "^1.15.0"
},
"engines": {
"node": ">= 8.0"
}
},
"node_modules/dockerode": {
- "version": "3.3.5",
- "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-3.3.5.tgz",
- "integrity": "sha512-/0YNa3ZDNeLr/tSckmD69+Gq+qVNhvKfAHNeZJBnp7EOP6RGKV8ORrJHkUn20So5wU+xxT7+1n5u8PjHbfjbSA==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.2.tgz",
+ "integrity": "sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w==",
"dev": true,
"dependencies": {
"@balena/dockerignore": "^1.0.2",
- "docker-modem": "^3.0.0",
+ "docker-modem": "^5.0.3",
"tar-fs": "~2.0.1"
},
"engines": {
@@ -2168,9 +2223,9 @@
}
},
"node_modules/follow-redirects": {
- "version": "1.15.2",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz",
- "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==",
+ "version": "1.15.5",
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
+ "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
"dev": true,
"funding": [
{
@@ -2189,7 +2244,7 @@
},
"node_modules/form-data": {
"version": "4.0.0",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"dev": true,
"dependencies": {
@@ -2208,9 +2263,9 @@
"dev": true
},
"node_modules/fs-extra": {
- "version": "11.1.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
- "integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
+ "version": "11.2.0",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/fs-extra/-/fs-extra-11.2.0.tgz",
+ "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
@@ -2480,7 +2535,7 @@
},
"node_modules/is-retry-allowed": {
"version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/is-retry-allowed/-/is-retry-allowed-2.2.0.tgz",
"integrity": "sha512-XVm7LOeLpTW4jV19QSH38vkswxoLud8sQ57YwJVTPWdiaI9I8keEhGFpBlslyVsgdQy4Opg8QOLb8YRgsyZiQg==",
"dev": true,
"engines": {
@@ -3147,25 +3202,6 @@
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
"dev": true
},
- "node_modules/js-xdr": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/js-xdr/-/js-xdr-1.3.0.tgz",
- "integrity": "sha512-fjLTm2uBtFvWsE3l2J14VjTuuB8vJfeTtYuNS7LiLHDWIX2kt0l1pqq9334F8kODUkKPMuULjEcbGbkFFwhx5g==",
- "dev": true,
- "dependencies": {
- "lodash": "^4.17.5",
- "long": "^2.2.3"
- }
- },
- "node_modules/js-xdr/node_modules/long": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/long/-/long-2.4.0.tgz",
- "integrity": "sha512-ijUtjmO/n2A5PaosNG9ZGDsQ3vxJg7ZW8vsY8Kp0f2yIZWhSJvjmegV7t+9RPQKxKrvj8yKGehhS+po14hPLGQ==",
- "dev": true,
- "engines": {
- "node": ">=0.6"
- }
- },
"node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
@@ -3211,7 +3247,7 @@
},
"node_modules/jsonfile": {
"version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dev": true,
"dependencies": {
@@ -3257,12 +3293,6 @@
"node": ">=8"
}
},
- "node_modules/lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
- "dev": true
- },
"node_modules/lodash.camelcase": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz",
@@ -3350,7 +3380,7 @@
},
"node_modules/mime-db": {
"version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/mime-db/-/mime-db-1.52.0.tgz",
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
"dev": true,
"engines": {
@@ -3359,7 +3389,7 @@
},
"node_modules/mime-types": {
"version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/mime-types/-/mime-types-2.1.35.tgz",
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
"dev": true,
"dependencies": {
@@ -3403,9 +3433,9 @@
"dev": true
},
"node_modules/nan": {
- "version": "2.17.0",
- "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz",
- "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==",
+ "version": "2.18.0",
+ "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
+ "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
"dev": true,
"optional": true
},
@@ -3416,9 +3446,9 @@
"dev": true
},
"node_modules/node-gyp-build": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz",
- "integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==",
+ "version": "4.7.1",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/node-gyp-build/-/node-gyp-build-4.7.1.tgz",
+ "integrity": "sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==",
"dev": true,
"optional": true,
"bin": {
@@ -3674,9 +3704,9 @@
}
},
"node_modules/protobufjs": {
- "version": "7.2.5",
- "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.5.tgz",
- "integrity": "sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A==",
+ "version": "7.2.6",
+ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.2.6.tgz",
+ "integrity": "sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@@ -3699,7 +3729,7 @@
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"dev": true
},
@@ -3770,12 +3800,6 @@
"node": ">= 6"
}
},
- "node_modules/regenerator-runtime": {
- "version": "0.14.0",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
- "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==",
- "dev": true
- },
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -3833,15 +3857,12 @@
}
},
"node_modules/rxjs": {
- "version": "6.6.7",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
- "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==",
+ "version": "7.8.1",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/rxjs/-/rxjs-7.8.1.tgz",
+ "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
"dev": true,
"dependencies": {
- "tslib": "^1.9.0"
- },
- "engines": {
- "npm": ">=2.0.0"
+ "tslib": "^2.1.0"
}
},
"node_modules/safe-buffer": {
@@ -3904,9 +3925,9 @@
"dev": true
},
"node_modules/sha.js": {
- "version": "2.4.11",
- "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
- "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+ "version": "2.4.9",
+ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.9.tgz",
+ "integrity": "sha512-G8zektVqbiPHrylgew9Zg1VRB1L/DtXNUVAM6q4QLy8NE3qtHlFXTf8VLL4k1Yl6c7NMjtZUTdXV+X44nFaT6A==",
"dev": true,
"dependencies": {
"inherits": "^2.0.1",
@@ -3959,14 +3980,14 @@
}
},
"node_modules/sodium-native": {
- "version": "3.4.1",
- "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-3.4.1.tgz",
- "integrity": "sha512-PaNN/roiFWzVVTL6OqjzYct38NSXewdl2wz8SRB51Br/MLIJPrbM3XexhVWkq7D3UWMysfrhKVf1v1phZq6MeQ==",
+ "version": "4.0.9",
+ "resolved": "https://registry.npmjs.org/sodium-native/-/sodium-native-4.0.9.tgz",
+ "integrity": "sha512-nuEaJkwQMjzZOgD6N/yTJAWuzeOq+HKnBR7Qo+geZGorf/AkyBEtwIEjnd2YSs21w/TuFKCgbo2i6j7Uv+kVDQ==",
"dev": true,
"hasInstallScript": true,
"optional": true,
"dependencies": {
- "node-gyp-build": "^4.3.0"
+ "node-gyp-build": "^4.6.0"
}
},
"node_modules/source-map": {
@@ -4001,9 +4022,9 @@
"dev": true
},
"node_modules/ssh2": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.13.0.tgz",
- "integrity": "sha512-CIZBFRRY1y9mAZSqBGFE4EB4dNJad2ysT2PqO8OpkiI3UTB/gUZwE5EaN16qVyQ6s/M7EgC/iaV/MnjdlvnuzA==",
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz",
+ "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@@ -4014,8 +4035,8 @@
"node": ">=10.16.0"
},
"optionalDependencies": {
- "cpu-features": "~0.0.7",
- "nan": "^2.17.0"
+ "cpu-features": "~0.0.9",
+ "nan": "^2.18.0"
}
},
"node_modules/stack-utils": {
@@ -4030,24 +4051,6 @@
"node": ">=10"
}
},
- "node_modules/stellar-base": {
- "version": "8.2.2",
- "resolved": "https://registry.npmjs.org/stellar-base/-/stellar-base-8.2.2.tgz",
- "integrity": "sha512-YVCIuJXU1bPn+vU0ded+g0D99DcpYXH9CEXfpYEDc4Gf04h65YjOVhGojQBm1hqVHq3rKT7m1tgfNACkU84FTA==",
- "dev": true,
- "dependencies": {
- "base32.js": "^0.1.0",
- "bignumber.js": "^4.0.0",
- "crc": "^3.5.0",
- "js-xdr": "^1.1.3",
- "lodash": "^4.17.21",
- "sha.js": "^2.3.6",
- "tweetnacl": "^1.0.3"
- },
- "optionalDependencies": {
- "sodium-native": "^3.3.0"
- }
- },
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
@@ -4267,9 +4270,9 @@
}
},
"node_modules/tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+ "version": "2.6.2",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"dev": true
},
"node_modules/tweetnacl": {
@@ -4313,9 +4316,9 @@
}
},
"node_modules/universalify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
- "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
+ "version": "2.0.1",
+ "resolved": "https://mirrors.cloud.tencent.com/npm/universalify/-/universalify-2.0.1.tgz",
+ "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==",
"dev": true,
"engines": {
"node": ">= 10.0.0"
diff --git a/tests_zemu/package.json b/tests_zemu/package.json
index 1aa7215e..7e02e2a7 100644
--- a/tests_zemu/package.json
+++ b/tests_zemu/package.json
@@ -11,12 +11,14 @@
"test": "jest"
},
"devDependencies": {
- "@ledgerhq/hw-app-str": "^6.27.1",
+ "@ledgerhq/hw-app-str": "github:overcat/hw-ledger-str-dev",
"@ledgerhq/hw-transport-http": "^6.28.3",
+ "@stellar/stellar-base": "^11.0.0",
"@types/jest": "^29.2.1",
- "@zondax/zemu": "^0.44.1",
+ "@types/sha.js": "^2.4.4",
+ "@zondax/zemu": "^0.46.2",
"jest": "29.2.2",
- "stellar-base": "^8.1.0",
+ "sha.js": "^2.4.9",
"tests-common": "file:../tests_common_js",
"ts-jest": "^29.0.3",
"typescript": "^4.5.3"
diff --git a/tests_zemu/snapshots/s-op-extend-footprint-ttl/00000.png b/tests_zemu/snapshots/s-op-extend-footprint-ttl/00000.png
new file mode 100644
index 0000000000000000000000000000000000000000..88429892f93b7b0e9cd223636a3660d85014331c
GIT binary patch
literal 379
zcmV->0fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-extend-footprint-ttl/00002.png b/tests_zemu/snapshots/s-op-extend-footprint-ttl/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..2c87ec2bcd5502b05b8eb622b710874ea16546d5
GIT binary patch
literal 379
zcmV->0fhdEP)6oD97gZ4W)EG>4Ujz9ze0N|@^vj;##MCU<7wCz&KBPmaT
z!dU*Z2haiYriZK$Ksc$Lx#tldC>4BTUh-+29p04aXVfftz}skg@y5eh?GA8kyY!Ms
z-Z8hDldu$kU~A6DoK8W>B!068P=tH*`@mMl(j6dBV|194oA|uM5bMt=)7;n#_Xm(Q
z8SW1wVKv+z3^JGro}bHYMR-<*S7
zO(QGxtqg!+?@L&@z!{P2BB;5~v9i;(!&m@q?P#JFel~YVYmuc0&RhO3SPFpe3J6b+
zuuGYmepg3c{jS4O0MVXs<<+)T>qgT6_)PIv&a3p(Dk!E7BKSZuX5Y{
zbvp7oma=fb1aR^~%bu4@@6%Yug*=mPL{RU>W4-Od9EhWnu@s#P!IMw^${+AXTvln%
zEiNWG;k^UOwIiP)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png b/tests_zemu/snapshots/s-op-extend-footprint-ttl/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..97e49b175b787d1469c6cb939a87fe4c5f1968a6
GIT binary patch
literal 404
zcmV;F0c-w=P)8|K=s-d>g0=O@0gMkm3brRHceK0Vkz$lDcORBpcrQEz6W4v42Q|xzfM)LO>gO)07!BS`xJf*Y@NMEE(G>vvf
zE##feGQf$yIa#4|(WD4$quM{91vT;4Upw6z>%U|&8Ya_rY0>7^h50000*d00022;XEEsC~571ynqJYt7csH
z&*~pYI1lId-^)cPDHX;alKCKAkxxJ-ezTS$X-3*q8|Xm63SfeoZ_GD~yHY8AK*0pG
z+Cpkj-G`XSw)zJKK*C=)V^%;2&p|5iu}{vjet+!D1}3Js6T?*O4j0^c3NgHAp797LE1jxx>a8#q-f}G4x_|4O~OinaS
j*&5560ssI202t;AKCIxd7~{N100000NkvXXu0mjfSAVO4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-extend-footprint-ttl/00007.png b/tests_zemu/snapshots/s-op-extend-footprint-ttl/00007.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcbedd829ab5d18cf4b26661621f7acc98d63963
GIT binary patch
literal 428
zcmV;d0aN~oP)emoh2&h$et=Sz
z>+bS?<9B|V2?U^Qe!cx~GE`5uRH0MB*#*3i!G~VTfYS&;Iiu6z86X`n1oc_9d)Jz&
z%q=+}faQZ@GFW!>jK(5QDnPmRWdp*K?^$()QBm2t+D-Bd=D4iyDHcDzJN-ea7)z1ESWKiAQ5900s#j
z>+Y5x)$3t;C#JjmPsG%=1egyzR{aP+d%a)A=7-2
zsUfAUfvioQ0k8cg-z2&n2@N}C^q*!1crqyUaFhx5Aql}zW>saf5Cnb@9E|_~fWZT{
Wbo{{X4Fr7v00000fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00002.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..1d493b1d16ff87939a6288df20a1a6c2052bbb2a
GIT binary patch
literal 385
zcmV-{0e=38P)vFPssQv$p&-EJqSW+zPkih4%5hrJcJo+X`Towf2!H
zu9(A^L5!4uimaB7R-6l#AU@F@xCC$gDPc1+(h8_>N9a6HJn^+_U+={|@h)8ALqdTj6Y3^o#yR>y}F8!{3UN=2P5LrMX$Iv3!bS
zvm|pi^mqakbDo3+)?unrE9JA8vzXeF84@72Ag6YZh?}38+hl8i1RM^G%Ra*Y6@?&*
zuLU*Q1oRIE(Te|`ui*hv1$P$fBjV+
zr@u}|-mj%BoG<~Ly3nfU?b7=;ws9fPq#F^`yYW~br!WWN=wvKK=R)x0Q@`>Dyb+gG
z+G~r8Nltk0fOhSO>-{b^SzSup1VPM6LG6YuV|&&nyGC#kexeNsf-I3ZymtWiivN7|
zoJV9uNH>F&IC=~Z+p&t8#t+-@K@qP+Xp=L6D2*VyOw~JB~kyS
zkzk)bz)g7MT5l`4^h9PCa3TssPB-Ctt0WuK(I2xm(KcK^a;ffJ^#OwiCZJbCN5Z66
zP)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00005.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..34456a081c960ecad9e1633e5c24c3932ad787ef
GIT binary patch
literal 390
zcmV;10eSw3P)<{9aADtmuRrH8SxkA&=R7TZ
z!6woBV6}AH0^~&NA&9>ZU%#m@$@jCYvV}Y7qxe8FmY{s}Huz2#xAxV3uR655DWh5(
z+%|#p4k#Z?^XJYmDf>p3$1Og50%ADc$+Egk9+mwRRDih%%zkojLA*;Wt9-^*9du)r
zb6PQ?*ni4cp(UC4J8zB0w`P0T1VtK<5elHq_U`Ntg^+4wKN!@YC+I>w2|b6+Rm>J=
z6aCeR=v8$ofFb_*ic&*G<&ylQQlwDgqr2&$uasBOlHblMpz1oMa>0#Nl{8!K>aQ(p
zaHGfn0S{2r0>WMWwf9jmi5OS5j%-n+&|4kDNm6a2YXQ!*HcDN*2CrbS7F5+rt8Nd9
kqz{?<5C#AM000=216k?IX*($>;G
zRT+H_T2t3`0NK)cYUzNtoobeSJ$a#9T7iDAwqw=zxwJc-3_30nMS=5TWE7uN%XQbl
zcn6e$sUDKo^Gdmys_C^YHoP3hFkDGq29@{i>t+4qXeM#*4j-V}JRw-93otALdK9yfvoksUX000000Dxx&w@l=KdaEJ200000
LNkvXXu0mjfkzAwe
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00007.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00007.png
new file mode 100644
index 0000000000000000000000000000000000000000..5e62d273fc66868712b0288e2e689618fd49f4f8
GIT binary patch
literal 495
zcmVJ~k
z>-9A2PXsZwTYoUV1~c)u&`i!o-jHfBZvzSgb|6#sWtvf9fVtA&l&dLg8L_K{M0H1x
z$W%uGO?sBfkSN>mIaI!5SydKRq(!L)nvpfS6tJlX`z=FU@D(o4)%U3u7qKOiapmO}
zsG8m?sQ!GdMJh2Tf!_Stb?TXnLj%L1_-YmtaJe!d)e$7)>P=t0i_vcb*HeexJOEY9
zvL$MB9M%$5@wk~EI*lb-FQg{v
zOVgpMqoN$H6%eKAOqz(*>Rh~-8q`XPm5W&*WA3Q2Bh5ONKOAvNaFgq)h_Al)=HLWp
zx?ox^l9voJEEU1;z=Hye{jxm{oJWF+!3jv0a&BBaT9Ezc<=BFn4x(7Bk|xKVdmswi
zd)KL70iv!gJJOxEvNL>196krc>wo6lVZyJ3%g|2Kj^j9v^JDx2-c6-x;5-p}00000NkvXXu0mjfI?eGV
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00009.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00009.png
new file mode 100644
index 0000000000000000000000000000000000000000..d1353b1506b4a386def56826bd64ce32dc9fd9e4
GIT binary patch
literal 498
zcmV6kdH)B_MS5Y!NdbS+;9(lRi=ABq29<+hLvS3&ah}R%Hq&`rX5G!EZQwk<
z23$=Fl2u%i$Rq)Agg>3edC=9?sv9b%LGqLf;}P*G7O3Zae~K@nFL2M|ff7gJ&u#xv
z5u-}n)&ZUv{oP{IJAgegWV{j&ic=MxS})B11OinC)L<6@Js9b3DICc!op}v-$1S#f
zexXZA@|rD;u#13&t_0Rx*JZs-qXUT5iIiMYQ8Bq%%CC}SPF#e+
zt@3@ix!4Bvg367)r1iAjpNO#4zWammGnk2Ip_%+{GV6wttCgl3lWQn~8>C*5
z407ABRoGy$)5&)L*qM{eeLA$?TyxEkD#>E65r~Ps8qK>JUX-(0DOuAm(zPP~_$zld
z!<%vXZ(|Pmc3q)4oHIaenBo9{`-^!QmylutC5l}mFP*49#EE3FUWUS9lnww}MtqP9
zx2-C$`pn-rB_(!9#dhuJX5)b33P~o>rx5B=P=xn5u_TtMRm9}(xcE^BLjKA9E7Zi!
oM*xCmop}0l{0tn&ah&z}0QkIScGrV~G;PhaMn~8P2hfJ~%U;XVdiTrVGE!Vvt4LuI@89WrHWgdc
zClkQ#S+3K9aj-d6)A~N)t)Gh6p>3EMbOO#GJkZ>^@d%Hz7wBS|FEGKH2J3w2ka02S
z1Y8m%XmGNvN5BT$46dx=Dmy|Z+di+
z9r^#UJ_R{IQ~4|F$I>u0tbZ}^K_tjRk$f9@YCI0V(aYPX9GCY<*{D%^P*G$s?+#n1
zu-R3X{h6jr;**`b6~S=FPU4`ul>;Q@PdLj(_aV0fEZIZ$7+7m0H@O|~i#dmp+W`!B
yP$xbO;u@L(<2AIF*JbitLjeE)0000H5q$vsI`)@N>vod>0000B>!
z07xiDp3y(hAUAJqOL67aR-%_~-gFSPuorDb+HEUGYWr~T^1|qI18@S?-j4tYSWk4x
zBl-tc2jB#>oUF^`vaRhTF5$r(bfPb%n{yy9)pwvPGSzp(kecc{!yH7yDijIt;YcVi
z8qx0oh1L!-4WjX&T3EZvJvFD14;Ng_p0(Ld7&PL*up<100Fb_bk$_}X9*55X0F!{<
zQT;d=(Iqem7(9)cZ;+;%C%w=Avq=3hYY|N0o(Lagf?)y(A!J>4NmY|MC1-m200000
LNkvXXu0mjf7s!ED
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00012.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00012.png
new file mode 100644
index 0000000000000000000000000000000000000000..d50319840d7f3e8908040368c0821f499242755f
GIT binary patch
literal 448
zcmV;x0YCnUP)~*WyKCnji|*NrvMFx-
zKr`A#qm80Ye)Jt6lfqvv0zZ4kcn26$y4!nYj28gSJ60G-4pDm9I~ZRh=H;aE2G8D5
zF}3$$h5$%fX7~O?5UvjI8xt|`B(jhvdnYf%-)Nh>>%Ov$b4K4zms=2A{Y0*-C~uWzWZ|!-JzR$_X{4#B1s%C5#yg0?{e_A=<^7Lc
zz5%#o+g_LWkGWM7k~%MyIqgt=TOEKqri}2i;S4ATl8OGLF>=c8Qk2IEHIj}1xPQC2
zu$Y79>`7@tLQ{C`(N1)io
zjO%Bue?gEe0`Q(MNsxLT58`LIyCxpQ18t&tQ-6ehoaRf4Tu3%s+cMY4NQ`Cx7}4WY
z@;Nk4=mACnnBWV+<7fEuNnjV7HF7|AWS{0$)-z+h05s>=^N%=hgK`1uU|dG*%R}QQ
z^t~XlwfDmg0gzO7_x?r@u6FNF#$#ZKuR@mGog9hkbRmQH%W@&!#^FmIuua4#RWJyE
z9Ihfo!6lE}vV1Hjx3=8hIjaO0v2ZtqnlEH)_=~26+A7WS$_D~+f<{HDb@AdVLI`ji
z<%LU}S-Qf_q`}x-##K+rCY6&03Hd5Xd9GGa3V{9`FPk!SC?z9-kY2Qlg&?a5*(*a_
zf;gFYRJ_Vqf3f2B4k-bE9K&^|shf%==*ep%Y%Un5U1nH!CSI57azKhf(Rae;Pty$?
vY#>Kg6^$wGIGeM@pT5*|9LI4S$9c*RfBisES00000NkvXXu0mjfPJ_z*
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00014.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00014.png
new file mode 100644
index 0000000000000000000000000000000000000000..f63e3c1168331849c7a2fb65accac458659d09cb
GIT binary patch
literal 435
zcmV;k0ZjghP)R%G1hyXmts}#srzP*H>sdmlw5>Dt-T8jE3{P$^DQtU@
zASV;~G8sVui1o!D{xS*T?3tqn45oBVH}I+@;9R?UbQM(Z^9=B
zzdXl9^4o8Bwi@MvS01jqEK@w^$S$K29;X!m+xjN{NdO560zDYt(Ul&
zy98bShlwa~UpzA}I*|c$2Oy1#K^*QL(1F-LI{u2urGxk`Z`WFgro~x{JpE70C$a(n
d00000YQDQ?ILS#e?q2`^002ovPDHLkV1j5_yZrzF
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00015.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00015.png
new file mode 100644
index 0000000000000000000000000000000000000000..da4b63b271f543d8382b67b54b38b015d77cab46
GIT binary patch
literal 375
zcmV--0f_#IP)X&1Ad*
zY(_`MjSOew7uSH2;C6z`h!&d=CRhX9X{9_<)?yRFWC^gZvE2)mON=V#m#KBP1TJ@e
z_u~)zud6;Sk^n8l((128M{1}a404bOs!%3Jk+;s@G5fF@NVa<9CcW6Oak90K6t^<^
z-Q;g`D@s$SdmuYD77u6kmNs<=kCdn#+Nn_{tovk{vhg`h0*18mx##BJdqFPGFROfo
zy<4+X;av23tsLmz35-5dKSQ>xQ-TyOP3p;3f;ke71^!*>Wi_F3^86t?k28?a_P8SXFf*?w1N9?;pfj>{Er|coUfR`(0o}>8U+5nnR^E;PI2E%
zi40E%Aa`auhlsLfF_MtJxsCW1wDQzr%JufYE48?OPguc*dX%qM%iKQ8V>&@OeK6e`N!9AIGOrdKkF`QV*F;J+Vhpg*D_)srUpoVR#$sh2HeHdwPTZ
rOToRea5nXxv{ICjmO&5%K>+d#!faZBcYmO}00000NkvXXu0mjf&`Ia4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00017.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00017.png
new file mode 100644
index 0000000000000000000000000000000000000000..d6c8b52c39c3ce6b1c50307fcf71a31f5a0f762f
GIT binary patch
literal 480
zcmV<60U!Q}P)cTP;_!kf0PQy1{6sw>j%2G-}5ClQ6p6BEHS+04ky)+&ySw8-X
zo1N;EQo7u2_4iW7^L+5%i^L0K2Q<_ZtLI$gS$Not)!FnN_I>t;qYuoW!Oq4t_@WoG
z%_NDW4d^lRhh+rRTN3ZbnduGm#pjPN_D7H=oM)Dxw=Y=nJkB}@?0w^V2W$tgX>;GW
zM24jUG1wjx5!4_W6
WEl!z)Pf2+`?zlJmZLg!eom9%i_hAifQ(d|!%pd%~^GzbNv;c=65fveLA
zmS8gkr^ugLKsgsTa`N~s_fucYk%fnnvI}w*npC1u%X9ia;gmIR09l!e^X%4kg}H
z`^b~*<#X|3j_krz^m`>6BWIKWxcmLOJO}43xi0H_$IEvJGZ`>NooGXZDJjTvJt`$R
zX76FDJa=r-Y10h=m>v4bVtciuk13W^x)6RBX0!yYEjVOEa0rCUOCes%YoO8+jBuSDa#ysxtKXc3D`dG+I%y;qP
z>SPxH;Bs>`J_70M=5F0Q-ryO4hI&i&Zg+VRifW|IW-Sx@;%nZ&8lBa_#fQvj<{!O~
zR3jxvn&L%C;}*DOKz$_nS~RjT6Q|(%6NqyO(j@Z8=DXIGJE;#iUarwGC9nrfr|Br9
zXEi#exCKDdGvPBunB9_@q*+^Z#GWh?SEl@0|Ez}!t3F`@va_{6FZ=NR8*ok0`-GnR
zvDy^E73rN|G6pl5R)rD}o$M5YdN?Y+>wh6{jFU47Je}>jD--4%@uRC^caZwM@^J}c
z*_usOab?Y+W4WtyzX=cG5f#lVcR1kz!1GaZS|EN2AkE^nSh!fig$KZ?=GY$U{XqCv
zq1ip4ux2L+AtVEoUj=$~^xt{NxhcLPKK0@-HL>Ae^KT_G21$}6Nia_*5-1`Y?N{{x
O0000044+_)4c#=02|qJ
z0AK)}Ipq_DPIF^3Ez1@AfhOT(4(QE^yj0(TuE;^Kqe=b-H~?g(946J-EHP$70-`BMrsxC*NcMl;SIT}aOq-nWs}
z05Aabg8qwshZ*}dMzG=y2nOZ`*f*Ktm@_lgCUWem+E++8YIHi5Xzt9JCGX
zrQfgvKArVlr`ryCapNVy(e0o!{YU@qKR$2g3i&EoQxi&p5^i%)&p3DrN?c?|6VqhE
z5=pI{g^y57^9~?xzav)=4udnVc)6~2_D(^K@T{f1RulT~m#I4OkuJr)YLSNeL=1
zQ?X=C0#H!*NR{SFNEg6w<{90D$-L1%VzAW)ESrR{#J207*qoM6N<$g8Ln)Z~y=R
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00022.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00022.png
new file mode 100644
index 0000000000000000000000000000000000000000..0dc3dfc0bf92d491a4067aa847cef8f0c946545a
GIT binary patch
literal 408
zcmV;J0cZY+P)|-Uiete0*2g<$o*j48-`?hr^tJ@)Icr8cBJ1BO`Mc!A<~A>8-Y|>UX&fwE-LR
zV!vK~H_yjw;AA6M8p;P@@+%pHapz@Z##(`buy3mO#6+{=V1n-RcQ@b$nsbaW`3N@L
z05Q#%%sdXc2cCq!g&t46$S4g3>6*ABn9r4sxLaJJ0iBS-(@~z<(#1c|Ws4+{mDn#?
zH~I1&cO+?Vm05JJxE93Qz$lVkF-0LDuP*2!M*9<%xX*U)d2iUR
z=7r6+*nl48NwRFvl~%2yGzJHQ%UEncpR=h4c=`?*je$xje0De$qs4$8JAG;et-Vcq
z0vJ1(!;9M$gW^IaxY-pq#;Iy(v=g5sNs=T*d00022;XEEsC~571ynqJYt7csH
z&*~pYI1lId-^)cPDHX;alKCKAkxxJ-ezTS$X-3*q8|Xm63SfeoZ_GD~yHY8AK*0pG
z+Cpkj-G`XSw)zJKK*C=)V^%;2&p|5iu}{vjet+!D1}3Js6T?*O4j0^c3NgHAp797LE1jxx>a8#q-f}G4x_|4O~OinaS
j*&5560ssI202t;AKCIxd7~{N100000NkvXXu0mjfSAVO4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00024.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-approve/00024.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcbedd829ab5d18cf4b26661621f7acc98d63963
GIT binary patch
literal 428
zcmV;d0aN~oP)emoh2&h$et=Sz
z>+bS?<9B|V2?U^Qe!cx~GE`5uRH0MB*#*3i!G~VTfYS&;Iiu6z86X`n1oc_9d)Jz&
z%q=+}faQZ@GFW!>jK(5QDnPmRWdp*K?^$()QBm2t+D-Bd=D4iyDHcDzJN-ea7)z1ESWKiAQ5900s#j
z>+Y5x)$3t;C#JjmPsG%=1egyzR{aP+d%a)A=7-2
zsUfAUfvioQ0k8cg-z2&n2@N}C^q*!1crqyUaFhx5Aql}zW>saf5Cnb@9E|_~fWZT{
Wbo{{X4Fr7v00000fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00002.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..04fc50689b87e18063c50099be39d27a5987b426
GIT binary patch
literal 391
zcmV;20eJq2P)<&>+;
zfQPlby(e%3;YBZbLIBF7PU0SW{b2Nvjd{yoljO*vR6i@T<^#8}^y0?LdD;p{Y#;3-
z(OfZIpH4&yfFi4;qvU6x#fg{q1cpdke-7A_iL?R~W`r)|loFq}1mgKQ6`GE`P=5iU
z$WVV74XL62Vh{sQunT!|?|1mvMGyQh-I!aJC4?DoP5+XaeH07#rnsd<(=GTAdr4)|
z#_EtX%0S=A05JSc!qN%ISl~3GcuU8zYlk~euu_C1M{~~^_I8T$*nC5@f(1Y#RembG
zllKxL)q?n~fTC|#{jN9rt&U#(o+DBKsypEs^-p#K<~RTV002ovPDHLkV1oH(ugm}d
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00003.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00003.png
new file mode 100644
index 0000000000000000000000000000000000000000..0335c7a908846925b846ed1932cb62284ab284cb
GIT binary patch
literal 458
zcmV;*0X6=KP)6keg6mUqFr=qEjRxliOz&?<$x0t$_kk|arzBr&|6zrO_`RxM!UJznMZ
zh}Rj&>$#ML2W$YR9<=Itd-OhoZCuDRd5s9#ukl!K4`C0))yZ0h&V}H`r~bC48
AxBvhE
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00004.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00004.png
new file mode 100644
index 0000000000000000000000000000000000000000..1521826bef487d239c6bd6ee69c5fafedb1b64b7
GIT binary patch
literal 403
zcmV;E0c`$>P)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00005.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..34456a081c960ecad9e1633e5c24c3932ad787ef
GIT binary patch
literal 390
zcmV;10eSw3P)<{9aADtmuRrH8SxkA&=R7TZ
z!6woBV6}AH0^~&NA&9>ZU%#m@$@jCYvV}Y7qxe8FmY{s}Huz2#xAxV3uR655DWh5(
z+%|#p4k#Z?^XJYmDf>p3$1Og50%ADc$+Egk9+mwRRDih%%zkojLA*;Wt9-^*9du)r
zb6PQ?*ni4cp(UC4J8zB0w`P0T1VtK<5elHq_U`Ntg^+4wKN!@YC+I>w2|b6+Rm>J=
z6aCeR=v8$ofFb_*ic&*G<&ylQQlwDgqr2&$uasBOlHblMpz1oMa>0#Nl{8!K>aQ(p
zaHGfn0S{2r0>WMWwf9jmi5OS5j%-n+&|4kDNm6a2YXQ!*HcDN*2CrbS7F5+rt8Nd9
kqz{?<5C#AM000=216k?IX*($>;G
zRT+H_T2t3`0NK)cYUzNtoobeSJ$a#9T7iDAwqw=zxwJc-3_30nMS=5TWE7uN%XQbl
zcn6e$sUDKo^Gdmys_C^YHoP3hFkDGq29@{i>t+4qXeM#*4j-V}JRw-93otALdK9yfvoksUX000000Dxx&w@l=KdaEJ200000
LNkvXXu0mjfkzAwe
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00007.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00007.png
new file mode 100644
index 0000000000000000000000000000000000000000..5e62d273fc66868712b0288e2e689618fd49f4f8
GIT binary patch
literal 495
zcmVJ~k
z>-9A2PXsZwTYoUV1~c)u&`i!o-jHfBZvzSgb|6#sWtvf9fVtA&l&dLg8L_K{M0H1x
z$W%uGO?sBfkSN>mIaI!5SydKRq(!L)nvpfS6tJlX`z=FU@D(o4)%U3u7qKOiapmO}
zsG8m?sQ!GdMJh2Tf!_Stb?TXnLj%L1_-YmtaJe!d)e$7)>P=t0i_vcb*HeexJOEY9
zvL$MB9M%$5@wk~EI*lb-FQg{v
zOVgpMqoN$H6%eKAOqz(*>Rh~-8q`XPm5W&*WA3Q2Bh5ONKOAvNaFgq)h_Al)=HLWp
zx?ox^l9voJEEU1;z=Hye{jxm{oJWF+!3jv0a&BBaT9Ezc<=BFn4x(7Bk|xKVdmswi
zd)KL70iv!gJJOxEvNL>196krc>wo6lVZyJ3%g|2Kj^j9v^JDx2-c6-x;5-p}00000NkvXXu0mjfI?eGV
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00009.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00009.png
new file mode 100644
index 0000000000000000000000000000000000000000..d1353b1506b4a386def56826bd64ce32dc9fd9e4
GIT binary patch
literal 498
zcmV6kdH)B_MS5Y!NdbS+;9(lRi=ABq29<+hLvS3&ah}R%Hq&`rX5G!EZQwk<
z23$=Fl2u%i$Rq)Agg>3edC=9?sv9b%LGqLf;}P*G7O3Zae~K@nFL2M|ff7gJ&u#xv
z5u-}n)&ZUv{oP{IJAgegWV{j&ic=MxS})B11OinC)L<6@Js9b3DICc!op}v-$1S#f
zexXZA@|rD;u#13&t_0Rx*JZs-qXUT5iIiMYQ8Bq%%CC}SPF#e+
zt@3@ix!4Bvg367)r1iAjpNO#4zWammGnk2Ip_%+{GV6wttCgl3lWQn~8>C*5
z407ABRoGy$)5&)L*qM{eeLA$?TyxEkD#>E65r~Ps8qK>JUX-(0DOuAm(zPP~_$zld
z!<%vXZ(|Pmc3q)4oHIaenBo9{`-^!QmylutC5l}mFP*49#EE3FUWUS9lnww}MtqP9
zx2-C$`pn-rB_(!9#dhuJX5)b33P~o>rx5B=P=xn5u_TtMRm9}(xcE^BLjKA9E7Zi!
oM*xCmop}0l{0tn&ah&z}0QkIScGrV~G;PhaMn~8P2hfJ~%U;XVdiTrVGE!Vvt4LuI@89WrHWgdc
zClkQ#S+3K9aj-d6)A~N)t)Gh6p>3EMbOO#GJkZ>^@d%Hz7wBS|FEGKH2J3w2ka02S
z1Y8m%XmGNvN5BT$46dx=Dmy|Z+di+
z9r^#UJ_R{IQ~4|F$I>u0tbZ}^K_tjRk$f9@YCI0V(aYPX9GCY<*{D%^P*G$s?+#n1
zu-R3X{h6jr;**`b6~S=FPU4`ul>;Q@PdLj(_aV0fEZIZ$7+7m0H@O|~i#dmp+W`!B
yP$xbO;u@L(<2AIF*JbitLjeE)0000H5q$vsI`)@N>vod>0000^BGnP!yT!Pa`8W)t?M~Uba5K!eH`RSBain6t%x`~>Qc1gQJ`M5Hgody#kkfjJozf$$TU@(d+
z;2q#{H&10w$p@%c&05t^l>puVQUs*6OgY|Tn>BZDtcemr2qAf=r;sI}_izkC^PoH98Z8Gg?96IU18VVFHKlc<NI(U~L+s+qC_S>E
zUsy7)YegvJk72!SH;|PQ013tsbdhA|uCMV9D^`Fps1;CKwPoJi^?Qu+*^&@K2qA=E
Z@B`quqYTSxiB~*WyKCnji|*NrvMFx-
zKr`A#qm80Ye)Jt6lfqvv0zZ4kcn26$y4!nYj28gSJ60G-4pDm9I~ZRh=H;aE2G8D5
zF}3$$h5$%fX7~O?5UvjI8xt|`B(jhvdnYf%-)Nh>>%Ov$b4K4zms=2A{Y0*-C~uWzWZ|!-JzR$_X{4#B1s%C5#yg0?{e_A=<^7Lc
zz5%#o+g_LWkGWM7k~%MyIqgt=TOEKqri}2i;S4ATl8OGLF>=c8Qk2IEHIj}1xPQC2
zu$Y79>`7@tLQ{C`(N1)io
zjO%Bue?gEe0`Q(MNsxLT58`LIyCxpQ18t&tQ-6ehoaRf4Tu3%s+cMY4NQ`Cx7}4WY
z@;Nk4=mACnnBWV+<7fEuNnjV7HF7|AWS{0$)-z+h05s>=^N%=hgK`1uU|dG*%R}QQ
z^t~XlwfDmg0gzO7_x?r@u6FNF#$#ZKuR@mGog9hkbRmQH%W@&!#^FmIuua4#RWJyE
z9Ihfo!6lE}vV1Hjx3=8hIjaO0v2ZtqnlEH)_=~26+A7WS$_D~+f<{HDb@AdVLI`ji
z<%LU}S-Qf_q`}x-##K+rCY6&03Hd5Xd9GGa3V{9`FPk!SC?z9-kY2Qlg&?a5*(*a_
zf;gFYRJ_Vqf3f2B4k-bE9K&^|shf%==*ep%Y%Un5U1nH!CSI57azKhf(Rae;Pty$?
vY#>Kg6^$wGIGeM@pT5*|9LI4S$9c*RfBisES00000NkvXXu0mjfPJ_z*
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00015.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00015.png
new file mode 100644
index 0000000000000000000000000000000000000000..f63e3c1168331849c7a2fb65accac458659d09cb
GIT binary patch
literal 435
zcmV;k0ZjghP)R%G1hyXmts}#srzP*H>sdmlw5>Dt-T8jE3{P$^DQtU@
zASV;~G8sVui1o!D{xS*T?3tqn45oBVH}I+@;9R?UbQM(Z^9=B
zzdXl9^4o8Bwi@MvS01jqEK@w^$S$K29;X!m+xjN{NdO560zDYt(Ul&
zy98bShlwa~UpzA}I*|c$2Oy1#K^*QL(1F-LI{u2urGxk`Z`WFgro~x{JpE70C$a(n
d00000YQDQ?ILS#e?q2`^002ovPDHLkV1j5_yZrzF
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00016.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00016.png
new file mode 100644
index 0000000000000000000000000000000000000000..da4b63b271f543d8382b67b54b38b015d77cab46
GIT binary patch
literal 375
zcmV--0f_#IP)X&1Ad*
zY(_`MjSOew7uSH2;C6z`h!&d=CRhX9X{9_<)?yRFWC^gZvE2)mON=V#m#KBP1TJ@e
z_u~)zud6;Sk^n8l((128M{1}a404bOs!%3Jk+;s@G5fF@NVa<9CcW6Oak90K6t^<^
z-Q;g`D@s$SdmuYD77u6kmNs<=kCdn#+Nn_{tovk{vhg`h0*18mx##BJdqFPGFROfo
zy<4+X;av23tsLmz35-5dKSQ>xQ-TyOP3p;3f;keiW1
z1~Z9WXePCjH=&yp&eiZ;Z6xiak?YK=j5=NWYD~mU)ijiX+fG}EW+KH65PxChVO$l2
zmJmn*UN-XaS}%WYUg_A^JDPsGkyvPp<1G>nt|E@rx32zk+!BD&1^zDs4hx%MLxKw2
zrNehYd@Hxj`pU~>3rksK$E+c
z^_PY*HLO1v_`nlnAy1A*-k5Hwa3=0i+S8VN82cf6iM2?SZoh2FFHIgBS#eS$nLM_{
z!9)#3$uiO_ir!`Xyja~^y2x!HZ?{XV`fJfa5&FgTDWdzOlx)6~S?|DCIv~#pT^^R(
zH8FObBMkz>=CWYm;`AP9oMnfGh=fkVhxO+ah`XZbIh
zg3=mavPferz{A^s8cln`*0ZcV47xWY&_=@YUu3MU#Dn2?0LZeYW!(jOl6=3*0vO~~
z*|x|4Szq$>HsE~9tuW8da6&t}h-s@GLya6C?-axs)GUb~O?C0KGU-IoPjfDSHSb)}
zpBf?55&esaHSi>=kSF^fFG4ptDVHsIaQR!_KesO4!Y2L>6c6cKl4u~KxG<4KTp%rm
za;~Io(VP;0QOJp#H)`^{SNjFERfVgPwhPtwRIUV3tK)qW-Zsz(7t~(&g0T^^0k#&)48`kmhXI_&^Hy;!fipm{6SWqfvCzAxdl*U+43Rg9E0KP)g`>D|&t1>6{320%Ge4jr6
zDTR+pB{XMwjT14Na0}-&uVuYv4Jcn@YE4)c3OOF^8k!N&rV?H3wEweTcAUlgG;IK+
zO(*jH>=axL?;C>{c!DbAiBBIc&O5J86a+a_F5GC@HB@g^7kpB@wrlQ=;`*!dc8TVF
zq7&Yuh-Hmf_mWj6@61t05hJ2<=!`UqFb_cT!r28W-I!C@^hT*Re>N8eJ8|-Uiete0*2g<$o*j48-`?hr^tJ@)Icr8cBJ1BO`Mc!A<~A>8-Y|>UX&fwE-LR
zV!vK~H_yjw;AA6M8p;P@@+%pHapz@Z##(`buy3mO#6+{=V1n-RcQ@b$nsbaW`3N@L
z05Q#%%sdXc2cCq!g&t46$S4g3>6*ABn9r4sxLaJJ0iBS-(@~z<(#1c|Ws4+{mDn#?
zH~I1&cO+?Vm05JJxE93Qz$lVkF-0LDuP*2!M*9<%xX*U)d2iUR
z=7r6+*nl48NwRFvl~%2yGzJHQ%UEncpR=h4c=`?*je$xje0De$qs4$8JAG;et-Vcq
z0vJ1(!;9M$gW^IaxY-pq#;Iy(v=g5sNs=T*d00022;XEEsC~571ynqJYt7csH
z&*~pYI1lId-^)cPDHX;alKCKAkxxJ-ezTS$X-3*q8|Xm63SfeoZ_GD~yHY8AK*0pG
z+Cpkj-G`XSw)zJKK*C=)V^%;2&p|5iu}{vjet+!D1}3Js6T?*O4j0^c3NgHAp797LE1jxx>a8#q-f}G4x_|4O~OinaS
j*&5560ssI202t;AKCIxd7~{N100000NkvXXu0mjfSAVO4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00023.png b/tests_zemu/snapshots/s-op-invoke-host-function-asset-transfer/00023.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcbedd829ab5d18cf4b26661621f7acc98d63963
GIT binary patch
literal 428
zcmV;d0aN~oP)emoh2&h$et=Sz
z>+bS?<9B|V2?U^Qe!cx~GE`5uRH0MB*#*3i!G~VTfYS&;Iiu6z86X`n1oc_9d)Jz&
z%q=+}faQZ@GFW!>jK(5QDnPmRWdp*K?^$()QBm2t+D-Bd=D4iyDHcDzJN-ea7)z1ESWKiAQ5900s#j
z>+Y5x)$3t;C#JjmPsG%=1egyzR{aP+d%a)A=7-2
zsUfAUfvioQ0k8cg-z2&n2@N}C^q*!1crqyUaFhx5Aql}zW>saf5Cnb@9E|_~fWZT{
Wbo{{X4Fr7v00000fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00002.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..d46d91831d997002292d847287ca540807eb4735
GIT binary patch
literal 383
zcmV-_0f7FAP)laUJPH+Q
zh%lG0cLD=gUi6e53Xo3fAntwT17n2f%q@RSkRytc{mk6N0r#=o#hs_K+X@IAr}mN%
zS4=gg6Dt)!k+q~_DNcjMiH~;zO@ysK7Hnr$S^)|@LZ@{K6Q5faV*fd{G!=QF{sf95
zL;Yz8QbYa8paz~`7xHB6d-%SJ5%?v$MU0smqg&Nev?$GwYKD&(JH;(6nzn)XUs(Z+
zo|cr9dpirj*!d*f=^2h=_E2M3=_D-ng2Ya;-h-=pHe{7{zh7MeD-}TO@*CT5ywSf2
zD;2;3|8h{8<5f@lR~^0k-N$YP$aW`15xb`=uNHvMl=$TQQk$j3)9z-r%cZL!eH;J)
d0000mh94hb{=ghgqB8&h002ovPDHLkV1hI)q@w@;
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00003.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00003.png
new file mode 100644
index 0000000000000000000000000000000000000000..b3154f0e8c0002ef062c759632ab5943110b31d3
GIT binary patch
literal 455
zcmV;&0XY7NP)+iE5#Ht01{Eb(6
zobfsXdB2vjaKHp`>O!lYw@dHa*v5rClWs)N?#5$%oWdN4qm!`=oeRN}PyNat@J3wL
zXs<0HCIu0_1KPDCuJ^0>WNj&N6HH=E3TiiOxwmJ1vTFnv;b*o1lORiE9??61d&Pgg
zH0Kdn5z@^eC5}FahwWI!?WgGY`+PWdn}A}tJS7$zPCya8-ZKyr$vK$GT3Ki}{s;LG
zUh|`ycC+Qx81dL=)ONzPiLywGt)ClgRH8J)iW1%qq<+F*i4Scb@YGL~Xi`@#0V_+Q
z{;rXB9{}JceCJy4E4gSQqYF4Q3PeFS;d-ki8#B-!w>Hr>Tt9ND##0dE#sp|JbR=uL8(L-eO$WnVQFWLU%;}k~Rm1{=v9*0OGTji+pPz*XCnf=Ir53
xL0W+m%s;KH*b-<7(t?{Bt3OGSBuSEFS3bW|V7t}*%ew#o002ovPDHLkV1gH8&Q|~c
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00004.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00004.png
new file mode 100644
index 0000000000000000000000000000000000000000..1521826bef487d239c6bd6ee69c5fafedb1b64b7
GIT binary patch
literal 403
zcmV;E0c`$>P)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00005.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..7fead284df795afe88f1864325dc7409e1f96083
GIT binary patch
literal 408
zcmV;J0cZY+P)i)kLq@Ikys
z2S7x&x=)Ue1>hXV;#iyL4mZ$8@qzT{g+H;am!i
zYcLXYp^;pR%+%0GQ|zXk^l>y?2&$88xk}UK@KW7UD`{{V5hbX79iVu~0U
z&CGqJrb>yLVxG}y7I$BRhI$?%o~mpxMWpr-zphmuMf+M!w8T+r!g4PS^DBuk%u+;+
zGtHn@6ZP}GV2i}O0K8aALlEtwr{($Rj(TEPiRomOSA9+~lGG=Ip@8X0000|-Uiete0*2g<$o*j48-`?hr^tJ@)Icr8cBJ1BO`Mc!A<~A>8-Y|>UX&fwE-LR
zV!vK~H_yjw;AA6M8p;P@@+%pHapz@Z##(`buy3mO#6+{=V1n-RcQ@b$nsbaW`3N@L
z05Q#%%sdXc2cCq!g&t46$S4g3>6*ABn9r4sxLaJJ0iBS-(@~z<(#1c|Ws4+{mDn#?
zH~I1&cO+?Vm05JJxE93Qz$lVkF-0LDuP*2!M*9<%xX*U)d2iUR
z=7r6+*nl48NwRFvl~%2yGzJHQ%UEncpR=h4c=`?*je$xje0De$qs4$8JAG;et-Vcq
z0vJ1(!;9M$gW^IaxY-pq#;Iy(v=g5sNs=T*d00022;XEEsC~571ynqJYt7csH
z&*~pYI1lId-^)cPDHX;alKCKAkxxJ-ezTS$X-3*q8|Xm63SfeoZ_GD~yHY8AK*0pG
z+Cpkj-G`XSw)zJKK*C=)V^%;2&p|5iu}{vjet+!D1}3Js6T?*O4j0^c3NgHAp797LE1jxx>a8#q-f}G4x_|4O~OinaS
j*&5560ssI202t;AKCIxd7~{N100000NkvXXu0mjfSAVO4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00008.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-new-asset/00008.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcbedd829ab5d18cf4b26661621f7acc98d63963
GIT binary patch
literal 428
zcmV;d0aN~oP)emoh2&h$et=Sz
z>+bS?<9B|V2?U^Qe!cx~GE`5uRH0MB*#*3i!G~VTfYS&;Iiu6z86X`n1oc_9d)Jz&
z%q=+}faQZ@GFW!>jK(5QDnPmRWdp*K?^$()QBm2t+D-Bd=D4iyDHcDzJN-ea7)z1ESWKiAQ5900s#j
z>+Y5x)$3t;C#JjmPsG%=1egyzR{aP+d%a)A=7-2
zsUfAUfvioQ0k8cg-z2&n2@N}C^q*!1crqyUaFhx5Aql}zW>saf5Cnb@9E|_~fWZT{
Wbo{{X4Fr7v00000fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00002.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..8d76769aa66c4bb8c0c0a42eb550f6e439ba12d0
GIT binary patch
literal 365
zcmV-z0h0cSP)%z`f`t5du&qbrSbH>Ib2RY|KX5(`~DByLwnd6YXQkGVsIvWvxlq!1XLO+B}tMbNql&}zJD7+yxPFYKYx?Q
z)8D2e@7GoyE?59g-DoxPcI*8Qws|4XM2slvVm#N!Q&f*{tEp!UF)xif3i-6OdOk7x&iAX_93?-RhI;y+)#
z;1OLBB4*GMXOH1xKXwWGDo*0PJ{@;kfTDyPl8YNIKoO(9XCea0HHc)dDs(q~lY9uT
z`KMd&X3M)V;%A@I+i|xh>LMe$eeUp(jA$H%^iTLJ@u8Igzxs)hp4O-*U}s6Rf9fPC
z(+9W-&s^(mEtj6k>IP0kgUIP7TyK@+m^;Q}wkG<9+ea?dy{kUp@WcZ2dgw@+^p5P)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00005.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..7fead284df795afe88f1864325dc7409e1f96083
GIT binary patch
literal 408
zcmV;J0cZY+P)i)kLq@Ikys
z2S7x&x=)Ue1>hXV;#iyL4mZ$8@qzT{g+H;am!i
zYcLXYp^;pR%+%0GQ|zXk^l>y?2&$88xk}UK@KW7UD`{{V5hbX79iVu~0U
z&CGqJrb>yLVxG}y7I$BRhI$?%o~mpxMWpr-zphmuMf+M!w8T+r!g4PS^DBuk%u+;+
zGtHn@6ZP}GV2i}O0K8aALlEtwr{($Rj(TEPiRomOSA9+~lGG=Ip@8X0000*d00022;XEEsC~571ynqJYt7csH
z&*~pYI1lId-^)cPDHX;alKCKAkxxJ-ezTS$X-3*q8|Xm63SfeoZ_GD~yHY8AK*0pG
z+Cpkj-G`XSw)zJKK*C=)V^%;2&p|5iu}{vjet+!D1}3Js6T?*O4j0^c3NgHAp797LE1jxx>a8#q-f}G4x_|4O~OinaS
j*&5560ssI202t;AKCIxd7~{N100000NkvXXu0mjfSAVO4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00007.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wasm-id/00007.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcbedd829ab5d18cf4b26661621f7acc98d63963
GIT binary patch
literal 428
zcmV;d0aN~oP)emoh2&h$et=Sz
z>+bS?<9B|V2?U^Qe!cx~GE`5uRH0MB*#*3i!G~VTfYS&;Iiu6z86X`n1oc_9d)Jz&
z%q=+}faQZ@GFW!>jK(5QDnPmRWdp*K?^$()QBm2t+D-Bd=D4iyDHcDzJN-ea7)z1ESWKiAQ5900s#j
z>+Y5x)$3t;C#JjmPsG%=1egyzR{aP+d%a)A=7-2
zsUfAUfvioQ0k8cg-z2&n2@N}C^q*!1crqyUaFhx5Aql}zW>saf5Cnb@9E|_~fWZT{
Wbo{{X4Fr7v00000fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00002.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..b68d891d7b3fab44d615dbebd00614a7a0a3ab1e
GIT binary patch
literal 387
zcmV-}0et?6P)Nklp{LHx6D~WquzhA$6T}GNU9i{;+hgoagtn%suGY!
z#45La1HiC83G;Gh-;d{`FsV;e$&C*9{Z+J7gy27qUZpZSv{;?E{K^0zcZyIHsz
h!hQh&0002M7=FSP{-y?av=aaT002ovPDHLkV1mrpr&0g_
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00003.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00003.png
new file mode 100644
index 0000000000000000000000000000000000000000..56f0528eade09da4717de6805c83c0dab86af4de
GIT binary patch
literal 453
zcmV;$0XqJPP)95m~_iHH&Cj@{~7h3haU3%Zfc3#Lc=|%+gZhWqfrw{{ibTXErb0PTVQ@`>Dyb+gG
z+G~r8NltiYK)ZIt^?ntbtS%)cK@fAcpf+L4SkBsH*O**{N3;P!kR=j_cLs2;_|I3*
zc|=x(bTdeaqsMTw9jmx~7bpJSKOMUTpeQbf%*BQQD5BSUPDCIXgGkoeg?8h2k`LiE
zKf3j9w!9i69{ZHqj=MHd7HQG-bAvDS5tXBm`U!s}KD2$nQ$JDCle%gNSXmPFpBf4F
z=>yz^N3Qj@l1ooyb^#}%K;(22uD42(=8pcDwTZUj`jJcZK&5&h0KFPIVuW6iAF)Jv
zYZwA4=!$*dP)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00005.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..7fead284df795afe88f1864325dc7409e1f96083
GIT binary patch
literal 408
zcmV;J0cZY+P)i)kLq@Ikys
z2S7x&x=)Ue1>hXV;#iyL4mZ$8@qzT{g+H;am!i
zYcLXYp^;pR%+%0GQ|zXk^l>y?2&$88xk}UK@KW7UD`{{V5hbX79iVu~0U
z&CGqJrb>yLVxG}y7I$BRhI$?%o~mpxMWpr-zphmuMf+M!w8T+r!g4PS^DBuk%u+;+
zGtHn@6ZP}GV2i}O0K8aALlEtwr{($Rj(TEPiRomOSA9+~lGG=Ip@8X0000*d00022;XEEsC~571ynqJYt7csH
z&*~pYI1lId-^)cPDHX;alKCKAkxxJ-ezTS$X-3*q8|Xm63SfeoZ_GD~yHY8AK*0pG
z+Cpkj-G`XSw)zJKK*C=)V^%;2&p|5iu}{vjet+!D1}3Js6T?*O4j0^c3NgHAp797LE1jxx>a8#q-f}G4x_|4O~OinaS
j*&5560ssI202t;AKCIxd7~{N100000NkvXXu0mjfSAVO4
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00007.png b/tests_zemu/snapshots/s-op-invoke-host-function-create-contract-wrap-asset/00007.png
new file mode 100644
index 0000000000000000000000000000000000000000..fcbedd829ab5d18cf4b26661621f7acc98d63963
GIT binary patch
literal 428
zcmV;d0aN~oP)emoh2&h$et=Sz
z>+bS?<9B|V2?U^Qe!cx~GE`5uRH0MB*#*3i!G~VTfYS&;Iiu6z86X`n1oc_9d)Jz&
z%q=+}faQZ@GFW!>jK(5QDnPmRWdp*K?^$()QBm2t+D-Bd=D4iyDHcDzJN-ea7)z1ESWKiAQ5900s#j
z>+Y5x)$3t;C#JjmPsG%=1egyzR{aP+d%a)A=7-2
zsUfAUfvioQ0k8cg-z2&n2@N}C^q*!1crqyUaFhx5Aql}zW>saf5Cnb@9E|_~fWZT{
Wbo{{X4Fr7v00000fhdEP);X?a
z0de~=yk>HjK6hmD2E_AklvVW+oNFx&=(6=+WpaQd|YZbwnuFqAP4RRg%|`$U)uhLCPG8^
zOXBrf4-Ln{Pe6(Ev6_h8n-1$B=jL#K4c%4%TOC>to9$P
zF%dgE8H}05I{Q2zkoZNMPtXGc_6Q+KL1delFhs7OTvvBPvzM^72e}|27+iKDU+jm0
zVw{ZromodV&kA{f-&7SL8n0G}7%NPGo<52GP|SxQr;8`@=IOYiDXrZuURVVH00013
Zhz}pE&G%JE6
z+*M!%AWXWr%e)>U-}6?pwaLqBv!q6z8BsfXeH#l&uhIxDeZ9fR04XFvK4-6DnI%kJ
zMmF;Het|0eG>Y*ChyhFnNcl@pX&e5y~-2lsgy(mdJ5^L&Os~v9xz@&IG2l7(=
z0Te~1`omD9ruu_n3_Rf~z0K7et(b+VC?>?ShMg%)*>Z(mI3bMb0pbS
zsXI0GQXQexhOCqvW7XFb&E`Dph?D_fR)mV`lA0zjlHv(>2tcCswh*<)0C=fEazjmE
tc$xnLp8>hGX|+gCyQ+i`LI@$G8y{=7yxlNq*-rof002ovPDHLkV1jfulrI1P
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00002.png b/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00002.png
new file mode 100644
index 0000000000000000000000000000000000000000..af1506078cc464a9d01793d081f55180bd2b2d7b
GIT binary patch
literal 342
zcmV-c0jd6pP)VnZjZpX|?4u%xQkj90~j@#PmE!DonDu5O+xSibHU07j65
z*d5vzN8ZG|iVzV~ke%{)Y`o=uf>mY!zvvIbDgkI<|9j(+tQJZ^patJGYLEIX+5(_$
oL#u6Tnf+(_Uj_gG006KmAKj|%9#W&v8vpbDc2!bHcVc)*L0RdVKpyXTsk;|(8
zOhxu>C=G9L044`oo_QI1M`LLha1FWvLB1Qd^|BH^AV&vdG0z+bTzv9hd?9a?%QEe`
zMMWhgv@@WL9Wvg}(kIJHkxAghJte42*mNyt`((#3u7sDj0#1Ms@k2WU@T~Cbt2TLw
zED7k=Aw`bvgRvf?OxudaeC^FKn*$OvWfxma=zv7ddQL+)5@0x`!%ASa629Vg%cwCAPm}Fv
zIb=boRip#Hf|cTV={wR+k+%bYeeu}<34gB89IN&^@xavqO+(}D`%}T&=SW-p93Zi#
zq!v9K?+iF-o+I*tNmk!+pJ$vh20;)6K@j{QA5hK#5d+v#ApigX07*qoM6N<$g4PVJ
AP5=M^
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00004.png b/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00004.png
new file mode 100644
index 0000000000000000000000000000000000000000..1521826bef487d239c6bd6ee69c5fafedb1b64b7
GIT binary patch
literal 403
zcmV;E0c`$>P)8k0*i%AvB-o#2qENOncQYxm#jI>C&o7i6D>s=
zOh&$nkM{y{qRL9S*Jb}-o@-m+C)2Rb;CF
z7za{Q{fA)=JYf~`Bo`Un(B_@K66p9sf7Sqqor2|n!G-m2O}sy+J@^@ltJ17rqnlpd
zb|6iE&0OniDlIdd6dybcC0K!i@8)en2d@Ut!I|J^>^eF|ccU$ipAgn`p
xd9lA^(&DQTD|<)9IAw^A_Qn%J2qA>LkRL>u^&K!~g4_TA002ovPDHLkV1jeku2}#8
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00005.png b/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00005.png
new file mode 100644
index 0000000000000000000000000000000000000000..34456a081c960ecad9e1633e5c24c3932ad787ef
GIT binary patch
literal 390
zcmV;10eSw3P)<{9aADtmuRrH8SxkA&=R7TZ
z!6woBV6}AH0^~&NA&9>ZU%#m@$@jCYvV}Y7qxe8FmY{s}Huz2#xAxV3uR655DWh5(
z+%|#p4k#Z?^XJYmDf>p3$1Og50%ADc$+Egk9+mwRRDih%%zkojLA*;Wt9-^*9du)r
zb6PQ?*ni4cp(UC4J8zB0w`P0T1VtK<5elHq_U`Ntg^+4wKN!@YC+I>w2|b6+Rm>J=
z6aCeR=v8$ofFb_*ic&*G<&ylQQlwDgqr2&$uasBOlHblMpz1oMa>0#Nl{8!K>aQ(p
zaHGfn0S{2r0>WMWwf9jmi5OS5j%-n+&|4kDNm6a2YXQ!*HcDN*2CrbS7F5+rt8Nd9
kqz{?<5C#AM000=216k?IX*($>;G
zRT+H_T2t3`0NK)cYUzNtoobeSJ$a#9T7iDAwqw=zxwJc-3_30nMS=5TWE7uN%XQbl
zcn6e$sUDKo^Gdmys_C^YHoP3hFkDGq29@{i>t+4qXeM#*4j-V}JRw-93otALdK9yfvoksUX000000Dxx&w@l=KdaEJ200000
LNkvXXu0mjfkzAwe
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00007.png b/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00007.png
new file mode 100644
index 0000000000000000000000000000000000000000..5e62d273fc66868712b0288e2e689618fd49f4f8
GIT binary patch
literal 495
zcmVJ~k
z>-9A2PXsZwTYoUV1~c)u&`i!o-jHfBZvzSgb|6#sWtvf9fVtA&l&dLg8L_K{M0H1x
z$W%uGO?sBfkSN>mIaI!5SydKRq(!L)nvpfS6tJlX`z=FU@D(o4)%U3u7qKOiapmO}
zsG8m?sQ!GdMJh2Tf!_Stb?TXnLj%L1_-YmtaJe!d)e$7)>P=t0i_vcb*HeexJOEY9
zvL$MB9M%$5@wk~EI*lb-FQg{v
zOVgpMqoN$H6%eKAOqz(*>Rh~-8q`XPm5W&*WA3Q2Bh5ONKOAvNaFgq)h_Al)=HLWp
zx?ox^l9voJEEU1;z=Hye{jxm{oJWF+!3jv0a&BBaT9Ezc<=BFn4x(7Bk|xKVdmswi
zd)KL70iv!gJJOxEvNL>196krc>wo6lVZyJ3%g|2Kj^j9v^JDx2-c6-x;5-p}00000NkvXXu0mjfI?eGV
literal 0
HcmV?d00001
diff --git a/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00009.png b/tests_zemu/snapshots/s-op-invoke-host-function-scvals/00009.png
new file mode 100644
index 0000000000000000000000000000000000000000..d1353b1506b4a386def56826bd64ce32dc9fd9e4
GIT binary patch
literal 498
zcmV6kdH)B_MS5Y!NdbS+;9(lRi=ABq29<+hLvS3&ah}R%Hq&`rX5G!EZQwk<
z23$=Fl2u%i$Rq)Agg>3edC=9?sv9b%LGqLf;}P*G7O3Zae~K@nFL2M|ff7gJ&u#xv
z5u-}n)&ZUv{oP{IJAgegWV{j&ic=MxS})B11OinC)L<6@Js9b3DICc!op}v-$1S#f
zexXZA@|rD;u#13&t_0Rx*JZs-qXUT5iIiMYQ8Bq%%CC}SPF#e+
zt@3@ix!4Bvg367)r1iAjpNO#4zWammGnk2Ip_%+{GV6wttCgl3lWQn~8>C*5
z407ABRoGy$)5&)L*qM{eeLA$?TyxEkD#>E65r~Ps8qK>JUX-(0DOuAm(zPP~_$zld
z!<%vXZ(|Pmc3q)4oHIaenBo9{`-^!QmylutC5l}mFP*49#EE3FUWUS9lnww}MtqP9
zx2-C$`pn-rB_(!9#dhuJX5)b33P~o>rx5B=P=xn5u_TtMRm9}(xcE^BLjKA9E7Zi!
oM*xCmop}0l{0tn&ah&z}0QkIScGrV~G;PhaMn~8P2hfJ~%U;XVdiTrVGE!Vvt4LuI@89WrHWgdc
zClkQ#S+3K9aj-d6)A~N)t)Gh6p>3EMbOO#GJkZ>^@d%Hz7wBS|FEGKH2J3w2ka02S
z1Y8m%XmGNvN5BT$46dx=Dmy|Z+di+
z9r^#UJ_R{IQ~4|F$I>u0tbZ}^K_tjRk$f9@YCI0V(aYPX9GCY<*{D%^P*G$s?+#n1
zu-R3X{h6jr;**`b6~S=FPU4`ul>;Q@PdLj(_aV0fEZIZ$7+7m0H@O|~i#dmp+W`!B
yP$xbO;u@L(<2AIF*JbitLjeE)0000H5q$vsI`)@N>vod>00002oHgfZVfc8;kW8N{U1P005$rl;3~sw{F@VGy9aOmm@a7
zh^d8qwHHvpoj13+xZJgc=vOyw(ukPYvKEojZTU!U4+sCAs2w*3A|SRu8rXn%qH{jl
z3y6+^2q>96m#<`-+r*M^=Nap0C#9D&kQeGNpeZucUq(f0sJ|HOfhIVGG(jHL#Id|T
zE#1#|YX1+Iq^uWJuV8e)d6AdPmkauJ%}!<1Hg0P{$L?2jpUf2TTLEDhw-Hc9BmfUM
mNy604y2CC200000FvbbZB!eXGT+*ii0000