tx · 3JGejpD9VKQ6YLDtBh9pYXDZ4GymzwT2mG9YSJmzhAaE 3NC2gxrsMW5rEBsJCVMjJwBhcB3nnBrUG4f: -0.01000000 Waves 2023.11.30 02:08 [2865337] smart account 3NC2gxrsMW5rEBsJCVMjJwBhcB3nnBrUG4f > SELF 0.00000000 Waves
{ "type": 13, "id": "3JGejpD9VKQ6YLDtBh9pYXDZ4GymzwT2mG9YSJmzhAaE", "fee": 1000000, "feeAssetId": null, "timestamp": 1701299321136, "version": 2, "chainId": 84, "sender": "3NC2gxrsMW5rEBsJCVMjJwBhcB3nnBrUG4f", "senderPublicKey": "E1AzspvmVgU66Pn9sgPQTc586F4eJ4nnWDadbPWyqqXN", "proofs": [ "t67fyQ5uDqtSyC6aEz6X4wmFV2WLP3KbqkiACzdDqdxSJarXXghHpZ2f9nSfLw9MEXRTBAkFKwTdfBMBzcdGkyP" ], "script": "base64:BgIUCAISBQoDCAgCEgQKAggCEgMKAQgBAAZGSVZFX0sJAGgCAAUAgAgDAWkBD2lzc3VlQW5kU2F2ZU5mdAMEbmFtZQtkZXNjcmlwdGlvbgdjb250ZW50BAVpc3N1ZQkAwggFBQRuYW1lBQtkZXNjcmlwdGlvbgABAAAHBAJpZAkA2AQBCQC4CAEFBWlzc3VlAwkAZgIJAMgBAQUHY29udGVudAkAaAIAAwUGRklWRV9LCQACAQIedG9vIGJpZyBjb250ZW50LCBtYXggMTVLIGJ5dGVzBAJjMAMJAGYCCQDIAQEFB2NvbnRlbnQJAGgCAAIFBkZJVkVfSwQLcGFydFJlc3VsdDEJAPwHBAUEdGhpcwIIc2F2ZVBhcnQJAMwIAgkArAICBQJpZAICXzEJAMwIAgkAyQECCQDKAQIFB2NvbnRlbnQFBkZJVkVfSwUGRklWRV9LBQNuaWwFA25pbAMJAAACBQtwYXJ0UmVzdWx0MQULcGFydFJlc3VsdDEEC3BhcnRSZXN1bHQyCQD8BwQFBHRoaXMCCHNhdmVQYXJ0CQDMCAIJAKwCAgUCaWQCAl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spentComplexity": 0 } View: original | compacted Prev: 9QHYnCp1MV4EcZZd9fZxFZhRfhA4LP1FukHWVCsGY3Pq Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = (5 * 1024) | |
4 | 5 | ||
5 | - | ||
6 | - | @Callable(a) | |
7 | - | func issueAndSaveNft (b,c,d) = { | |
8 | - | let e = Issue(b, c, 1, 0, false) | |
9 | - | let f = toBase58String(calculateAssetId(e)) | |
10 | - | if ((size(d) > (15 * 1024))) | |
6 | + | @Callable(b) | |
7 | + | func issueAndSaveNft (c,d,e) = { | |
8 | + | let f = Issue(c, d, 1, 0, false) | |
9 | + | let g = toBase58String(calculateAssetId(f)) | |
10 | + | if ((size(e) > (3 * a))) | |
11 | 11 | then throw("too big content, max 15K bytes") | |
12 | - | else $Tuple2([e, BinaryEntry(f, d)], f) | |
12 | + | else { | |
13 | + | let h = if ((size(e) > (2 * a))) | |
14 | + | then { | |
15 | + | let i = invoke(this, "savePart", [(g + "_1"), take(drop(e, a), a)], nil) | |
16 | + | if ((i == i)) | |
17 | + | then { | |
18 | + | let j = invoke(this, "savePart", [(g + "_2"), drop(e, (2 * a))], nil) | |
19 | + | if ((j == j)) | |
20 | + | then take(e, a) | |
21 | + | else throw("Strict value is not equal to itself.") | |
22 | + | } | |
23 | + | else throw("Strict value is not equal to itself.") | |
24 | + | } | |
25 | + | else if ((size(e) > a)) | |
26 | + | then { | |
27 | + | let i = invoke(this, "savePart", [(g + "_1"), drop(e, a)], nil) | |
28 | + | if ((i == i)) | |
29 | + | then take(e, a) | |
30 | + | else throw("Strict value is not equal to itself.") | |
31 | + | } | |
32 | + | else e | |
33 | + | $Tuple2([f, BinaryEntry((g + "_0"), h)], g) | |
34 | + | } | |
13 | 35 | } | |
14 | 36 | ||
15 | 37 | ||
16 | 38 | ||
17 | - | @Callable(a) | |
18 | - | func getNftREADONLY (g) = $Tuple2(nil, getBinary(g)) | |
39 | + | @Callable(b) | |
40 | + | func savePart (k,l) = if ((b.caller != this)) | |
41 | + | then throw("permission denied") | |
42 | + | else $Tuple2([BinaryEntry(k, l)], k) | |
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | @Callable(b) | |
47 | + | func getNftREADONLY (m) = { | |
48 | + | let h = getBinaryValue((m + "_0")) | |
49 | + | let n = valueOrElse(getBinary((m + "_1")), base58'') | |
50 | + | let o = valueOrElse(getBinary((m + "_2")), base58'') | |
51 | + | $Tuple2(nil, ((h + n) + o)) | |
52 | + | } | |
19 | 53 | ||
20 | 54 |
github/deemru/w8io/026f985 17.98 ms ◑