Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Group resource shared accounts handling #1591

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions api/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,17 @@ func TestFetchTransactions(t *testing.T) {
loadTransactionFromFile("test_resources/app_call_inner_acfg.response"),
},
},
{
name: "Conditionally index into shared addresses when sharing resources across a group",
txnBytes: [][]byte{
loadResourceFileOrPanic("test_resources/resource_sharing_1.txn"),
loadResourceFileOrPanic("test_resources/resource_sharing_2.txn"),
},
response: []generated.Transaction{
loadTransactionFromFile("test_resources/resource_sharing_1.response"),
loadTransactionFromFile("test_resources/resource_sharing_2.response"),
},
},
{
name: "State Proof Txn",
txnBytes: [][]byte{
Expand Down
1 change: 1 addition & 0 deletions api/test_resources/resource_sharing_1.response
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"application-transaction":{"accounts":["EDEQH62ERDNLASADCOKJLXUMYCP2S2CPKXFHB72OQKR6IXOQFAYFSHK53M"],"application-args":["IMkD+0SI2rBIAxOUld6MwJ+paE9VynD/ToKj5F3QKDA="],"application-id":1001,"foreign-apps":[],"foreign-assets":[],"global-state-schema":{"num-byte-slice":0,"num-uint":0},"local-state-schema":{"num-byte-slice":0,"num-uint":0},"on-completion":"noop"},"close-rewards":0,"closing-amount":0,"confirmed-round":1,"fee":1000,"first-valid":1351,"group":"JTcCx8AgKTI2VSTUnW7nDbimwramhGQrFEdMr+pWDWY=","id":"CDMG3FIQ6BN7B5POTZC5BKIA3MG2PJKLLBAPV7TG6V6ZICVSBK4A","intra-round-offset":2,"last-valid":2351,"local-state-delta":[{"address":"EDEQH62ERDNLASADCOKJLXUMYCP2S2CPKXFHB72OQKR6IXOQFAYFSHK53M","delta":[{"key":"a2V5","value":{"action":1,"bytes":"SIVReg6hjevVNotXmOooUYxm55kMwYeBgiWI/f0lhbA=","uint":0}}]}],"receiver-rewards":0,"round-time":1704475560,"sender":"OBQEUTTE5HSAXNYDZ2XWPZHBPZKCIVSUGTDVBJ2O7SA2TUD2BPMCJMZ2TQ","sender-rewards":0,"signature":{"sig":"SaR0dSN0FKoUGq2gGD9DQeBdNeAex7Ywa6E96EsrFj0/9v10POQ0FSjV13sNfp1+2eHR4yZxXqTW2rgc4ePUBw=="},"tx-type":"appl"}
1 change: 1 addition & 0 deletions api/test_resources/resource_sharing_1.txn
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ƒ¢dt¢ld£key‚¢at¢bsÙ H…Qz¡ëÕ6‹W˜ê(QŒfç™ Á‡‚%ˆýý%…°£sigÄ@I¤tu#tª­ ?CAà]5àǶ0k¡=èK+=?öýt<ä4(Õ×{~~ÙáÑã&q^¤ÖÚ¸áãÔ£txn‰¤apaa‘Ä ÉûDˆÚ°H”•ÞŒÀŸ©hOUÊpÿN‚£ä]Ð(0¤apat‘Ä ÉûDˆÚ°H”•ÞŒÀŸ©hOUÊpÿN‚£ä]Ð(0¤apidÍé£feeÍè¢fvÍG£grpÄ %7ÇÀ )26U$ԝn縦¶¦„d+GL¯êVf¢lvÍ /£sndÄ p`JNdéä ·ίgäá~T$VT4ÇP§Nü©Ðz ؤtype¤appl
Expand Down
1 change: 1 addition & 0 deletions api/test_resources/resource_sharing_2.response
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"application-transaction":{"accounts":[],"application-args":["IMkD+0SI2rBIAxOUld6MwJ+paE9VynD/ToKj5F3QKDA="],"application-id":1001,"foreign-apps":[],"foreign-assets":[],"global-state-schema":{"num-byte-slice":0,"num-uint":0},"local-state-schema":{"num-byte-slice":0,"num-uint":0},"on-completion":"noop"},"close-rewards":0,"closing-amount":0,"confirmed-round":1,"fee":1000,"first-valid":1351,"group":"JTcCx8AgKTI2VSTUnW7nDbimwramhGQrFEdMr+pWDWY=","id":"IJAXJSCF5QBIKSCAV5QFSTPJRY32LHYV24WL4372EJZYSHEXQFFA","intra-round-offset":2,"last-valid":2351,"local-state-delta":[{"address":"EDEQH62ERDNLASADCOKJLXUMYCP2S2CPKXFHB72OQKR6IXOQFAYFSHK53M","delta":[{"key":"a2V5","value":{"action":1,"bytes":"MOR8jSb/U6XxPy6v2NbXqqBnRg2Eu/A/G2RdJ2kAwGU=","uint":0}}]}],"receiver-rewards":0,"round-time":1704475560,"sender":"OBQEUTTE5HSAXNYDZ2XWPZHBPZKCIVSUGTDVBJ2O7SA2TUD2BPMCJMZ2TQ","sender-rewards":0,"signature":{"sig":"xFP3/rHrizQo7Luo/TJgc9yXgs5Sy+2WwmffUUakRl6+r4S68USBRNh9CeySpGW87y4LAzhcF/YeRO6SJmIWAw=="},"tx-type":"appl"}
Binary file added api/test_resources/resource_sharing_2.txn
Binary file not shown.
Loading