-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aaf0f17
commit 1f73f20
Showing
15 changed files
with
10,570 additions
and
4,346 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
backend/smart_contracts/artifacts/smart_contract/application.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"hints": { | ||
"hello(string)string": { | ||
"call_config": { | ||
"no_op": "CALL" | ||
} | ||
} | ||
}, | ||
"source": { | ||
"approval": "I3ByYWdtYSB2ZXJzaW9uIDgKaW50Y2Jsb2NrIDAgMQpieXRlY2Jsb2NrIDB4CnR4biBOdW1BcHBBcmdzCmludGNfMCAvLyAwCj09CmJueiBtYWluX2w0CnR4bmEgQXBwbGljYXRpb25BcmdzIDAKcHVzaGJ5dGVzIDB4MDJiZWNlMTEgLy8gImhlbGxvKHN0cmluZylzdHJpbmciCj09CmJueiBtYWluX2wzCmVycgptYWluX2wzOgp0eG4gT25Db21wbGV0aW9uCmludGNfMCAvLyBOb09wCj09CnR4biBBcHBsaWNhdGlvbklECmludGNfMCAvLyAwCiE9CiYmCmFzc2VydApjYWxsc3ViIGhlbGxvY2FzdGVyXzEKaW50Y18xIC8vIDEKcmV0dXJuCm1haW5fbDQ6CnR4biBPbkNvbXBsZXRpb24KaW50Y18wIC8vIE5vT3AKPT0KYm56IG1haW5fbDYKZXJyCm1haW5fbDY6CnR4biBBcHBsaWNhdGlvbklECmludGNfMCAvLyAwCj09CmFzc2VydAppbnRjXzEgLy8gMQpyZXR1cm4KCi8vIGhlbGxvCmhlbGxvXzA6CnByb3RvIDEgMQpieXRlY18wIC8vICIiCnB1c2hieXRlcyAweDQ4NjU2YzZjNmYyYzIwIC8vICJIZWxsbywgIgpmcmFtZV9kaWcgLTEKZXh0cmFjdCAyIDAKY29uY2F0CmZyYW1lX2J1cnkgMApmcmFtZV9kaWcgMApsZW4KaXRvYgpleHRyYWN0IDYgMApmcmFtZV9kaWcgMApjb25jYXQKZnJhbWVfYnVyeSAwCnJldHN1YgoKLy8gaGVsbG9fY2FzdGVyCmhlbGxvY2FzdGVyXzE6CnByb3RvIDAgMApieXRlY18wIC8vICIiCmR1cAp0eG5hIEFwcGxpY2F0aW9uQXJncyAxCmZyYW1lX2J1cnkgMQpmcmFtZV9kaWcgMQpjYWxsc3ViIGhlbGxvXzAKZnJhbWVfYnVyeSAwCnB1c2hieXRlcyAweDE1MWY3Yzc1IC8vIDB4MTUxZjdjNzUKZnJhbWVfZGlnIDAKY29uY2F0CmxvZwpyZXRzdWI=", | ||
"clear": "I3ByYWdtYSB2ZXJzaW9uIDgKcHVzaGludCAwIC8vIDAKcmV0dXJu" | ||
}, | ||
"state": { | ||
"global": { | ||
"num_byte_slices": 0, | ||
"num_uints": 0 | ||
}, | ||
"local": { | ||
"num_byte_slices": 0, | ||
"num_uints": 0 | ||
} | ||
}, | ||
"schema": { | ||
"global": { | ||
"declared": {}, | ||
"reserved": {} | ||
}, | ||
"local": { | ||
"declared": {}, | ||
"reserved": {} | ||
} | ||
}, | ||
"contract": { | ||
"name": "smart_contract", | ||
"methods": [ | ||
{ | ||
"name": "hello", | ||
"args": [ | ||
{ | ||
"type": "string", | ||
"name": "name" | ||
} | ||
], | ||
"returns": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"networks": {} | ||
}, | ||
"bare_call_config": { | ||
"no_op": "CREATE" | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
backend/smart_contracts/artifacts/smart_contract/approval.teal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#pragma version 8 | ||
intcblock 0 1 | ||
bytecblock 0x | ||
txn NumAppArgs | ||
intc_0 // 0 | ||
== | ||
bnz main_l4 | ||
txna ApplicationArgs 0 | ||
pushbytes 0x02bece11 // "hello(string)string" | ||
== | ||
bnz main_l3 | ||
err | ||
main_l3: | ||
txn OnCompletion | ||
intc_0 // NoOp | ||
== | ||
txn ApplicationID | ||
intc_0 // 0 | ||
!= | ||
&& | ||
assert | ||
callsub hellocaster_1 | ||
intc_1 // 1 | ||
return | ||
main_l4: | ||
txn OnCompletion | ||
intc_0 // NoOp | ||
== | ||
bnz main_l6 | ||
err | ||
main_l6: | ||
txn ApplicationID | ||
intc_0 // 0 | ||
== | ||
assert | ||
intc_1 // 1 | ||
return | ||
|
||
// hello | ||
hello_0: | ||
proto 1 1 | ||
bytec_0 // "" | ||
pushbytes 0x48656c6c6f2c20 // "Hello, " | ||
frame_dig -1 | ||
extract 2 0 | ||
concat | ||
frame_bury 0 | ||
frame_dig 0 | ||
len | ||
itob | ||
extract 6 0 | ||
frame_dig 0 | ||
concat | ||
frame_bury 0 | ||
retsub | ||
|
||
// hello_caster | ||
hellocaster_1: | ||
proto 0 0 | ||
bytec_0 // "" | ||
dup | ||
txna ApplicationArgs 1 | ||
frame_bury 1 | ||
frame_dig 1 | ||
callsub hello_0 | ||
frame_bury 0 | ||
pushbytes 0x151f7c75 // 0x151f7c75 | ||
frame_dig 0 | ||
concat | ||
log | ||
retsub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#pragma version 8 | ||
pushint 0 // 0 | ||
return |
Oops, something went wrong.