Skip to content

Commit

Permalink
Add failing transaction as example
Browse files Browse the repository at this point in the history
  • Loading branch information
nielstron committed Feb 17, 2024
1 parent ce492d8 commit f2596d8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/pycardano/test_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class Test(MapCBORSerializable):

def test_empty_value_transaction_deserialize():
"""
This should not crash because there is an empty value in the transaction
This should not crash though there is an empty value in the transaction
"""
pycardano.Transaction.from_cbor(
"84a300818258202c9d507f93b5e46e9c807aff51e7bf0d015430fe1df0d2c6866df5c21febaf23020183a400581d707959ca93792ac3025823f706e9b12e8201d841bb96aed97a62db62a801821a009abef6a0028201d81843d8798003d818590859820259085459085101000032323232323232323222232325333008323232323232323232325333012002100114a0a666022a66602266e1c00d200113371e00e6eb8c024c03cc008c03c038528099b8f005375c6004601e6004601e01c2940c94ccc044cdc3a400000226464a66602c6032004266e3c004dd718059808980598088080b1bae30170013758602c602e602e602e602e602e602e602e602e601e6012601e018264646464646464646464646464a66603c66e24dd69807980e1806180e180b180e00d9991191919299981199b8748008004520001375a60506042004604200264a66604466e1d200200114c103d87a8000132323300100100222533302800114c103d87a800013232323253330293371e014004266e9520003302d375000297ae0133006006003375a60540066eb8c0a0008c0b0008c0a8004dd598139810001181000099198008008051129998128008a6103d87a800013232323253330263371e010004266e9520003302a374c00297ae01330060060033756604e0066eb8c094008c0a4008c09c004dd7180b180e180b180e1806180e180b180e00d9bae300f301c3016301c300c301c3016301c01b1323300100100422533302300114a226464a666044646600200200c44a66604e00229404c8c94ccc098cdc78010030a51133004004001302b002375c60520022660080080022940c09c008dd718128008a503322323300100100322533302400110031330253026001330020023027001330213015301b3015301b300b301b3015301b01a4bd70180180099299980e99b87480052000100113233333009002014001222325333022300e00114c103d87a800013374a9000198131ba60014bd701999980580080aa400244464a66604a66e1c005200014c103d87a800013374a9000198149ba80014bd7019b8000100200e00b3232002323300100100222533302300114984c94ccc09000452613232323232323253330283370e9000000899805005198160030028b1813000998098010009bae3026003375c604a0066052006604e004604c004604c0026604266ec0dd4808a6010120004bd6f7b6301bab300d301a300d301a3232325333022302500210011630230013300c3758602a603600246464a66604066e1d200000114a02944c078004c058c070c058c070c03cc070004c050c06805cc0040108c008004c004004894ccc07400452f5c026603c6036603e002660040046040002664464646466600200200497adef6c60222533302100210011333003003302400232323330010010030022225333025002100113233300400430290033333300e002375c60480026eacc094004888c94ccc09cc04c0045300103d87a800013374a9000198159ba60014bd70191998008008018011112999816001080089919980200218180019999980a0011bae302b001375a605800244464a66605c66e1c005200014c0103d87a800013374a9000198191ba80014bd7019b80002001017302e002010302700237566046004646600200200444a66603e002297ae0133020374c6eacc034c068c084004cc008008c088004cc020dd61803980b800919baf30123018301230180013374a90001980f1ba90034bd701bae300f3015300f3015014300f3015012222223233001001006225333020001133021337606ea4018dd4002a5eb7bdb1804c8c8c8c94ccc084cdd799803805001260103d8798000133025337606ea4028dd40048028a99981099b8f00a0021323253330233370e900000089981399bb037520186050604200400a200a604200266601001401200226604a66ec0dd48011ba800133006006003375a60440066eb8c080008c090008c08800488888c8cc004004018894ccc07c0044cc080cdd81ba9006374c00a97adef6c6013232323253330203375e6600e01400498103d8798000133024337606ea4028dd30048028a99981019b8f00a0021323253330223370e900000089981319bb03752018604e604000400a200a604000266601001401200226604866ec0dd48011ba600133006006003375660420066eb8c07c008c08c008c08400494ccc0600045288a50225333015337200040022980103d8798000153330153371e0040022980103d87a800014c103d87b8000230183019301900122323300100100322533301800114bd7009919299980b980280109980d80119802002000899802002000980e001180d00098078061180a980b0009bad30130013013002375c602200260220046eb8c03c004c8c8c94ccc03cc048008400458dd618080009919198008008011129998080008a5eb804c8ccc888c8cc00400400c894ccc058004400c4c8cc060dd39980c1ba90063301837526eb8c054004cc060dd41bad30160014bd7019801801980d001180c0009bae300f00137566020002660060066028004602400264646600200200444a666020002297adef6c6013232323253330113371e9101000021003133015337606ea4008dd3000998030030019bab3012003375c6020004602800460240026eacc03cc040c040c040c040c020004c004c01c0108c038004526136563253330083370e90000008a99980598030020a4c2c2a66601066e1d20020011533300b300600414985858c01800cc8c94ccc020cdc3a4000002264646464a66601e60240042646493180380119299980699b87480000044c8c8c8c8c8c94ccc058c0640084c9263253330143370e9000000899191919299980d980f00109924c60240062c6eb4c070004c070008c068004c04800858c04800458c05c004c05c008dd7180a800980a8011bae3013001300b00416300b0031630100013010002300e001300600516300600423253330083370e9000000899191919299980798090010a4c2c6eb8c040004c040008dd7180700098030010b1803000918029baa001230033754002ae6955ceaab9e5573eae815d0aba21a400581d707959ca93792ac3025823f706e9b12e8201d841bb96aed97a62db62a801821a005788a2a0028201d81843d8798003d81859045b820259045659045301000033232323232323232322322253330073232323232323232533300f00114a22646464a66602a60300042646464646464646464a666036a666036a666036002200a2940400852808018a50533301a533301a3370e01a9001099b8f011375c6026603000a29404cdc78079bae3003301800514a066e212000375a6004602e6014602e00c66e1cc8c8c8c94ccc070cdc3a40040022900009bad3021301a002301a00132533301b3370e90010008a6103d87a8000132323300100100222533302100114c103d87a800013232323253330223371e02e004266e95200033026375000297ae0133006006003375a60460066eb8c084008c094008c08c004dd59810180c801180c800991980080080111299980f0008a6103d87a8000132323232533301f3371e02c004266e95200033023374c00297ae0133006006003375660400066eb8c078008c088008c080004dd59800980b0038059180e980f0009991191980080080191299980e8008a5013232533301c3371e00400a29444cc010010004c084008dd7180f8009bac301b301c301c301c301c301c301c301c301c3014300f3014010375c601e602800660340026034004603000260206644a66602866e1d20043013001132325333019301c0021320023253330173370e9000000899191919299980f18108010991924c601400464a66603866e1d2000001132323232323253330253028002132498c94ccc08ccdc3a4000002264646464a666054605a00426493180a8018b1bad302b001302b002302900130210021630210011630260013026002375c604800260480046eb8c088004c06801058c06800c58c07c004c07c008c074004c05400858c05400458c068004c048004588c94ccc050cdc3a4000002264646464a666036603c0042930b1bae301c001301c002375c603400260240042c6024002600660200022c602c00264646600200200444a66602c002297ae0132325333015323253330173370e9001000899b8f013375c6038602a0042940c054004c038c04cc038c04c0084cc064008cc0100100044cc010010004c068008c060004dd618009807180498070051180a980b180b00099b8700148004dd6980900098090011bae30100013010002375c601c002646464a66601c602200420022c6eb0c03c004c8c8cc004004008894ccc03c00452f5c0264666444646600200200644a66602a00220062646602e6e9ccc05cdd48031980b9ba9375c60280026602e6ea0dd6980a800a5eb80cc00c00cc064008c05c004dd718070009bab300f001330030033013002301100132323300100100222533300f00114bd6f7b630099191919299980819b8f489000021003133014337606ea4008dd3000998030030019bab3011003375c601e004602600460220026eacc038c03cc03cc03cc03cc01c004c004c0180088c03400452613656375c0024600a6ea80048c00cdd5000ab9a5573aaae7955cfaba05742ae8930011e581c44942234591eee784947f20ab51826428bac8589b372aa9086ee49ee0001825839002b630067f4997129c6fcaea188d4535b1e69fa5860382ba1d2889c3ff3c5cf4a64da3d8d3ac295c3bcbe125961078cdb83080c2a722ef03b1b000000024ab36c59021a0004c829a1008182582064e1867f2c8e8da2e7f5bc06c2224dfdb51b9a40d895d556045ba696483c69685840525f47c570dcfee996eb41a726d1a25e19f46730dccc8e3c05b7dbcf98ceede1ce7931e3b7e0eee9f06b15351042c7285412ac8e4e624ee71805d1a926c65f02f5f6"
Expand All @@ -316,8 +316,17 @@ def test_empty_value_transaction_deserialize():

def test_certificate_transaction_deserialize():
"""
This should not crash because there is an empty value in the transaction
This should not crash though there is a certificate in the transaction
"""
pycardano.Transaction.from_cbor(
"84a6008282582060a6ad87d0bb0a1f6153d908c003a63a2e29d80d64ea243e8a7c322a322b62a700825820c8337cabe7956bf5e903f2591b7cbe1e50bc4dc3402aadd075d4b5eded9ee70d0001818258393025094314c7b532cc1d35f8acd9f7eb307ac0cf49e012e17fd974a03a0f09a6c0f72ebc76d0db9bad8667a24f58734a8f7a8b2839ec1cc8461a00bc5a50021a0002d249031a03178183048282008201581c0f09a6c0f72ebc76d0db9bad8667a24f58734a8f7a8b2839ec1cc84683028201581c0f09a6c0f72ebc76d0db9bad8667a24f58734a8f7a8b2839ec1cc846581c376a90568c7ac62662147f919fc5a919a1ad9ed853e056d244f74b630800a2008382582047cfd2ef0b24eb9316127bb7b0b8d6befafdfd56f37c2892e6098fdc4539a7f7584039abdea2179a593027d5f8249356865cd6ab184063c0196daa4051d8e75ee2ea36648aa190f133e61220798cb8cb0a6e573f339e4ac9938f712577bc38e381028258206864b22adc8d2aa625bd28e7165459bce9057b712026269e53ce372117f6762658402c84d426f506bd76fd35fa4ca7edbb4bea5b2ca0d585894dacf6470bf07117fe61b1c5c137188b93913ca0df7dd8e0ef8a29c75c1a168f370e3ea5120909c804825820d00dcafc4918495980b0768361d051f3ece94cccb887a9f22b9480f9cda0bae75840a257e022f60953bb293af406cc5b399d283a9daf6e787baade74e603476f8474302217d33573dc7029689ac1cc55e5b85fadb39e7ed7104f17949d738417950801838201818200581cf08a3f7f85aea5f58540c6705eefd580efb67e03597d9154b832ac4e8201818200581c74005c045440ef7604f3ebe8bd8a90660024459754eec6a13656a8ad8201818200581c6f3f457a6e4a8b2b23aac8c9b7a010b3631b2cf990ef444a9ef4142ff5f6"
)


def test_list_raw_plutus_data_transaction_deserialize():
"""
This should not crash though there is a plutus datum in the form of a list in the transaction
"""
pycardano.Transaction.from_cbor(
"84aa0085825820cf69ace84bb11650813bed306d7ab55ecf8e30ca303efc35208d895464c503a50382582077a03b1ac220ced7211b0d16ef2533383774ccf65e6f34e188522e075ca2f59100825820ad16558f48a534608636cab57d8ef619a714b453e593df479a1b854b8dd4524802825820c02dcfbae41b5a39548b3254510bf0b5db834c9a948e0cab490902dc3cf21e3c0282582057352f803d09d6639e4ea9dadd83d6b5fa57f590e4719456edba65b81c0746a3030186a300583910c11b04bc32929b539e970a1fae63f54edced2c624935d4500d6132e38092d0486dba790c512c9acb1d444ad05a506289bec7423e8a749c7801821a0018011ea1581ce0e670576f5805ce026413d74fe9adb13e37609c1b7d3742af46cda3a1480014df10745241471905dc028201d8185856d87a9fd8799fd8799f581ce6e11610416c2749c9f0406dbf899fc1193834ec2f34fe4c35b8330effd8799fd8799fd8799f581ccfcbaffea5370dcd1dc246583292ebc6c5770758396e3b911031db3cffffffff18c4ffa300583910c11b04bc32929b539e970a1fae63f54edced2c624935d4500d6132e38092d0486dba790c512c9acb1d444ad05a506289bec7423e8a749c7801821a0012cf14a1581c65dce71b24ae9279a86618eaa4068b3ef282fda08b33d19fa55d475fa14001028201d81852d8799f1901f41b0000018da4aa461818c4ff83583900e6e11610416c2749c9f0406dbf899fc1193834ec2f34fe4c35b8330ecfcbaffea5370dcd1dc246583292ebc6c5770758396e3b911031db3c821a0013ed4aa1581c5b47f9c164ecc97e8cb8412281b0e1541c7fc5017af988b368f06ee9a1457446555a451a0002fda05820a646e534be141a5ea622eb4e0588e4219cef8469002ebf8e2fae6f476691fa408258390091356ba39eee09a7812c9e5599fc5320b3b026a5170a6d0201efd427e89060ae65c9befeb770a9bedbad7d1bd84c712dc9d448aad09ef0b6821a0011f436a1581c5b47f9c164ecc97e8cb8412281b0e1541c7fc5017af988b368f06ee9a1457446555a451b0000000afe5e707882583900e6e11610416c2749c9f0406dbf899fc1193834ec2f34fe4c35b8330ecfcbaffea5370dcd1dc246583292ebc6c5770758396e3b911031db3c821a0014e9d4a2581c5b47f9c164ecc97e8cb8412281b0e1541c7fc5017af988b368f06ee9a1457446555a451b000000d54fa63410581ce0e670576f5805ce026413d74fe9adb13e37609c1b7d3742af46cda3a1480014df10745241471a0001b93c82583900e6e11610416c2749c9f0406dbf899fc1193834ec2f34fe4c35b8330ecfcbaffea5370dcd1dc246583292ebc6c5770758396e3b911031db3c1a2f9695ca021a00089867031a031c39bf0b58201b44441e80cd51e5f106f33f9f79dd4b265223d6aec7878db040146a171241700d818258203a34f59a1687925e9bcb3c7c52f96add18dbbdab15d9b85bec6476717c27cf04030e81581ce6e11610416c2749c9f0406dbf899fc1193834ec2f34fe4c35b8330e1082583900e6e11610416c2749c9f0406dbf899fc1193834ec2f34fe4c35b8330ecfcbaffea5370dcd1dc246583292ebc6c5770758396e3b911031db3c1a76b4eedb111a000ce49b128682582077a03b1ac220ced7211b0d16ef2533383774ccf65e6f34e188522e075ca2f59101825820cf69ace84bb11650813bed306d7ab55ecf8e30ca303efc35208d895464c503a504825820cf69ace84bb11650813bed306d7ab55ecf8e30ca303efc35208d895464c503a503825820cf69ace84bb11650813bed306d7ab55ecf8e30ca303efc35208d895464c503a502825820cf69ace84bb11650813bed306d7ab55ecf8e30ca303efc35208d895464c503a501825820cf69ace84bb11650813bed306d7ab55ecf8e30ca303efc35208d895464c503a505a30082825820d1868f0748daa3678e1dbf22d26c204a5cd448df94f6c021d73a95232fab7b82584018eb6e65cddb9d3c3de3cab9d2095f682fc50247ccf19e909d8d3d2e95004779d7c0acf6f79c4e2f0f3339d26d79d550bd0d5f16cc54c04bafec9b8ad1c10307825820fc06064df60a11761ed7ac55a811f599e4e1795f8b0e476a090c35c33c6386c35840288723290657183a88b7b55096d112fb8e5155166741b41d8e0a8f54874c65248910b19e8126cebc7f5e1b3cbc47cc8b81743c2a7e23fe26b27f6f8e65a2fa04049f9fd8799f582077a03b1ac220ced7211b0d16ef2533383774ccf65e6f34e188522e075ca2f591ff00ffff0582840001d87a9f1901f4ff821a001bb0171a2769b59d840004d87a9f1901f4ff821a0020712e1a30141a82f5f6"
)

0 comments on commit f2596d8

Please sign in to comment.