tx · 4sq28Gh7mdP28SfANGYjTM57sqpPoYc8YV6iC7v5hU2R 3MwMNZ5PmZeVN8sDprmFuYbjJVeJVxMa46f: -0.00500000 Waves 2022.06.23 15:02 [2109032] smart account 3MwMNZ5PmZeVN8sDprmFuYbjJVeJVxMa46f > SELF 0.00000000 Waves
{ "type": 13, "id": "4sq28Gh7mdP28SfANGYjTM57sqpPoYc8YV6iC7v5hU2R", "fee": 500000, "feeAssetId": null, "timestamp": 1655985809083, "version": 2, "chainId": 84, "sender": "3MwMNZ5PmZeVN8sDprmFuYbjJVeJVxMa46f", "senderPublicKey": "CpLxySPGoDGRVBSTXHBZr9PxDduQz4JU6GK9jSAdpXse", "proofs": [ "5pQXX97FraJCoTyQ5n4etLkdkhi32wmpZSKVavV2s1abWZSnTLsUBtzD7mmEJ1Kuya3653QSb7TGEFHeUaBPhdkW" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAABAAAAAAEbmFtZQIAAAAJWmV0YSBURUFNAQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAQAAAAVjaGVjawAAAAEAAAADcGJrBAAAAAZwYmtfc3QJAAJYAAAAAQUAAAADcGJrBAAAAAZwb2ludHMJAQAAABFAZXh0ck5hdGl2ZSgxMDU4KQAAAAECAAAABnBvaW50cwkBAAAACGNvbnRhaW5zAAAAAgUAAAAGcG9pbnRzBQAAAAZwYmtfc3QAAAAADHNoYXJlVG9rZW5JZAkBAAAABmdldFN0cgAAAAECAAAADlNIQVJFX0FTU0VUX0lEAAAAAQAAAAFpAQAAAAppc3N1ZVRva2VuAAAAAQAAAAZhbW91bnQDCQEAAAAFY2hlY2sAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkDCQEAAAACIT0AAAACBQAAAAxzaGFyZVRva2VuSWQCAAAAAAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMJAAJZAAAAAQUAAAAMc2hhcmVUb2tlbklkBQAAAAZhbW91bnQGBQAAAANuaWwEAAAACnNoYXJlVG9rZW4JAARCAAAABQUAAAAEbmFtZQkAASwAAAACCQABLAAAAAICAAAAE1RlYW0gdG9rZW4gZm9yIHRoZSAFAAAABG5hbWUCAAAAECBjb2xsZWN0aXZlIGZhcm0FAAAABmFtb3VudAAAAAAAAAAACAYJAARMAAAAAgUAAAAKc2hhcmVUb2tlbgkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAA5TSEFSRV9BU1NFVF9JRAkAAlgAAAABCQAEOAAAAAEFAAAACnNoYXJlVG9rZW4FAAAAA25pbAkAAAIAAAABAgAAACBQcml2YXRlIEZhcm0uIEFjY2VzcyBwcm9oaWJpdGVkIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V50mGKXQ==", "height": 2109032, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3rRqscrY91bupF1ZszvbAuPCsU2sAmHAuiWAq9jdbR5u Next: CfvePCJxRBZt8WiXiTx83E6vBFyQSoMj8yigJa2JaWY2 Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let name = "Zeta TEAM" | |
5 | + | ||
6 | + | func getStr (key) = match getString(this, key) { | |
7 | + | case b: String => | |
8 | + | b | |
9 | + | case _ => | |
10 | + | "" | |
11 | + | } | |
4 | 12 | ||
5 | 13 | ||
14 | + | func check (pbk) = { | |
15 | + | let pbk_st = toBase58String(pbk) | |
16 | + | let points = getStringValue("points") | |
17 | + | contains(points, pbk_st) | |
18 | + | } | |
19 | + | ||
20 | + | ||
21 | + | let shareTokenId = getStr("SHARE_ASSET_ID") | |
22 | + | ||
6 | 23 | @Callable(i) | |
7 | - | func call () = { | |
8 | - | func sum (accum,next) = (accum + next) | |
9 | - | ||
10 | - | let arr = [1, 2, 3, 4, 5] | |
11 | - | let res = { | |
12 | - | let $l = arr | |
13 | - | let $s = size($l) | |
14 | - | let $acc0 = 0 | |
15 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
16 | - | then $a | |
17 | - | else sum($a, $l[$i]) | |
18 | - | ||
19 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
20 | - | then $a | |
21 | - | else throw("List size exceeds 5") | |
22 | - | ||
23 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
24 | - | } | |
25 | - | $Tuple2([IntegerEntry("result", res)], res) | |
26 | - | } | |
24 | + | func issueToken (amount) = if (check(i.callerPublicKey)) | |
25 | + | then if ((shareTokenId != "")) | |
26 | + | then [Reissue(fromBase58String(shareTokenId), amount, true)] | |
27 | + | else { | |
28 | + | let shareToken = Issue(name, (("Team token for the " + name) + " collective farm"), amount, 8, true) | |
29 | + | [shareToken, StringEntry("SHARE_ASSET_ID", toBase58String(calculateAssetId(shareToken)))] | |
30 | + | } | |
31 | + | else throw("Private Farm. Access prohibited!") | |
27 | 32 | ||
28 | 33 | ||
29 | 34 | @Verifier(tx) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let name = "Zeta TEAM" | |
5 | + | ||
6 | + | func getStr (key) = match getString(this, key) { | |
7 | + | case b: String => | |
8 | + | b | |
9 | + | case _ => | |
10 | + | "" | |
11 | + | } | |
4 | 12 | ||
5 | 13 | ||
14 | + | func check (pbk) = { | |
15 | + | let pbk_st = toBase58String(pbk) | |
16 | + | let points = getStringValue("points") | |
17 | + | contains(points, pbk_st) | |
18 | + | } | |
19 | + | ||
20 | + | ||
21 | + | let shareTokenId = getStr("SHARE_ASSET_ID") | |
22 | + | ||
6 | 23 | @Callable(i) | |
7 | - | func call () = { | |
8 | - | func sum (accum,next) = (accum + next) | |
9 | - | ||
10 | - | let arr = [1, 2, 3, 4, 5] | |
11 | - | let res = { | |
12 | - | let $l = arr | |
13 | - | let $s = size($l) | |
14 | - | let $acc0 = 0 | |
15 | - | func $f0_1 ($a,$i) = if (($i >= $s)) | |
16 | - | then $a | |
17 | - | else sum($a, $l[$i]) | |
18 | - | ||
19 | - | func $f0_2 ($a,$i) = if (($i >= $s)) | |
20 | - | then $a | |
21 | - | else throw("List size exceeds 5") | |
22 | - | ||
23 | - | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
24 | - | } | |
25 | - | $Tuple2([IntegerEntry("result", res)], res) | |
26 | - | } | |
24 | + | func issueToken (amount) = if (check(i.callerPublicKey)) | |
25 | + | then if ((shareTokenId != "")) | |
26 | + | then [Reissue(fromBase58String(shareTokenId), amount, true)] | |
27 | + | else { | |
28 | + | let shareToken = Issue(name, (("Team token for the " + name) + " collective farm"), amount, 8, true) | |
29 | + | [shareToken, StringEntry("SHARE_ASSET_ID", toBase58String(calculateAssetId(shareToken)))] | |
30 | + | } | |
31 | + | else throw("Private Farm. Access prohibited!") | |
27 | 32 | ||
28 | 33 | ||
29 | 34 | @Verifier(tx) | |
30 | 35 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
31 | 36 |
github/deemru/w8io/169f3d6 33.99 ms ◑