tx · DvgvZRAdgZXqXooAKKiNCFP7ifqzdoqocpMuGtMFhj73 3MxmeHuUkgf1qYRiaZnn4kqL418s6G2i56t: -0.01000000 Waves 2023.11.08 17:18 [2834483] smart account 3MxmeHuUkgf1qYRiaZnn4kqL418s6G2i56t > SELF 0.00000000 Waves
{ "type": 13, "id": "DvgvZRAdgZXqXooAKKiNCFP7ifqzdoqocpMuGtMFhj73", "fee": 1000000, "feeAssetId": null, "timestamp": 1699453159636, "version": 2, "chainId": 84, "sender": "3MxmeHuUkgf1qYRiaZnn4kqL418s6G2i56t", "senderPublicKey": "HJ4hmeK33qGvDwPEv5TChJq8CmRjtktm9xmzsgKAy5hY", "proofs": [ "3qRXRyiHCKqZYPa8f9jpucA9HRMYwha4BkXhnLC6ipLKMYNyTWhRvZ6tcX2BkRuTNDVoS98qwZi4aAnwNKy8X64A" ], "script": "base64:BgIcCAISABIAEgASABIAEgASABIAEgASABIECgIIAQIBBHRlc3QBAWkJAGgCBQFpAAoAAXgA6AcLAWkBBmFjdGlvbgAJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBARoBRGEgiD7dmCCYI+fKYzRf8aQsuaQwfSJmFgCA0NvD9AIFBHVuaXQFA25pbAFpARByZXR1cm5DYWxsZXJEYXRhAAkAlAoCBQNuaWwJAKwCAgkApQgBCAUBaQZjYWxsZXIJANgEAQgFAWkPY2FsbGVyUHVibGljS2V5AWkBB2RlZmF1bHQACQDMCAIJAQtEZWxldGVFbnRyeQECAmlkBQNuaWwBaQEDc2V0AAkAzAgCCQEMSW50ZWdlckVudHJ5AgICaWQAAQUDbmlsAWkBEGlzc3VlQW5kVHJhbnNmZXIABAVpc3N1ZQkAwwgHAgRuYW1lAgtkZXNjcmlwdGlvbgDoBwABBgUEdW5pdAAACQCUCgIJAMwIAgUFaXNzdWUJAMwIAgkBC0JpbmFyeUVudHJ5AgIFYXNzZXQJALgIAQUFaXNzdWUJAMwIAgkBDEludGVnZXJFbnRyeQICB2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gdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEHcmVpc3N1ZQAEBWFzc2V0CQERQGV4dHJOYXRpdmUoMTA1NykBAgVhc3NldAQHcmVpc3N1ZQkBB1JlaXNzdWUDBQVhc3NldADQDwYJAMwIAgUHcmVpc3N1ZQUDbmlsAWkBBGJ1cm4ABAVhc3NldAkBEUBleHRyTmF0aXZlKDEwNTcpAQIFYXNzZXQEBGJ1cm4JAQRCdXJuAgUFYXNzZXQACgkAzAgCBQRidXJuBQNuaWwBaQEJbGVhc2V0ZXN0AgdhZGRyZXNzBmFtb3VudAQFbGVhc2UJAMQIAgkBB0FkZHJlc3MBCQDZBAEFB2FkZHJlc3MFBmFtb3VudAQCaWQJALkIAQUFbGVhc2UJAMwIAgUFbGVhc2UJAMwIAgkBC0JpbmFyeUVudHJ5AgUHYWRkcmVzcwUCaWQJAMwIAgkBDEludGVnZXJFbnRyeQICBmFtb3VudAUGYW1vdW50BQNuaWwAtQAPXA==", "height": 2834483, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: H9qZUom2KSHaVVyFRA29BUWaX2eZgeLHPAHda99Smt3k Next: none Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func test (i) = (i * 10) | |
4 | 5 | ||
6 | + | ||
7 | + | let x = 1000 | |
5 | 8 | ||
6 | 9 | @Callable(i) | |
7 | 10 | func action () = [ScriptTransfer(Address(base58'3FXMzYAi9KmbpTVVCB5SxzpyTw4jzqRhufj'), 100000000000, unit)] | |
9 | 12 | ||
10 | 13 | ||
11 | 14 | @Callable(i) | |
12 | - | func default () = nil | |
15 | + | func returnCallerData () = $Tuple2(nil, (toString(i.caller) + toBase58String(i.callerPublicKey))) | |
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | @Callable(i) | |
20 | + | func default () = [DeleteEntry("id")] | |
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | @Callable(i) | |
25 | + | func set () = [IntegerEntry("id", 1)] | |
13 | 26 | ||
14 | 27 | ||
15 | 28 | ||
16 | 29 | @Callable(i) | |
17 | 30 | func issueAndTransfer () = { | |
18 | 31 | let issue = Issue("name", "description", 1000, 1, true, unit, 0) | |
19 | - | $Tuple2([issue | |
32 | + | $Tuple2([issue, BinaryEntry("asset", calculateAssetId(issue)), IntegerEntry("balance", assetBalance(Address(base58'3FQPBARYST3ajfGcba55SyYfzxbEBijTNGf'), calculateAssetId(issue)))], assetBalance(Address(base58'3FQPBARYST3ajfGcba55SyYfzxbEBijTNGf'), calculateAssetId(issue))) | |
20 | 33 | } | |
21 | 34 | ||
22 | 35 | ||
23 | 36 | ||
24 | 37 | @Callable(i) | |
25 | - | func | |
26 | - | let r = invoke( | |
38 | + | func balance () = { | |
39 | + | let r = invoke(i.originCaller, "default", nil, [AttachedPayment(unit, 100)]) | |
27 | 40 | if ((r == r)) | |
28 | 41 | then nil | |
42 | + | else throw("Strict value is not equal to itself.") | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | @Callable(i) | |
48 | + | func bal () = { | |
49 | + | let a = getBinaryValue("asset") | |
50 | + | [IntegerEntry("bal", assetBalance(Address(base58'3FQPBARYST3ajfGcba55SyYfzxbEBijTNGf'), a))] | |
51 | + | } | |
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | @Callable(i) | |
56 | + | func irl () = { | |
57 | + | let issue = Issue("name", "description", 1000, 1, true, unit, 0) | |
58 | + | let reissue = Reissue(calculateAssetId(issue), 2000, true) | |
59 | + | let lease = Lease(Address(base58'3FYRBXZtiiegAiCUvTgJMdGvDz1Gkeqgdax'), 10000000) | |
60 | + | let id = calculateLeaseId(lease) | |
61 | + | let z = invoke(this, "default", nil, nil) | |
62 | + | if ((z == z)) | |
63 | + | then [issue, ScriptTransfer(i.caller, 100, calculateAssetId(issue)), reissue, SponsorFee(calculateAssetId(issue), 1), Burn(calculateAssetId(issue), 400), lease, BinaryEntry("id", id)] | |
29 | 64 | else throw("Strict value is not equal to itself.") | |
30 | 65 | } | |
31 | 66 | ||
48 | 83 | } | |
49 | 84 | ||
50 | 85 | ||
86 | + | ||
87 | + | @Callable(i) | |
88 | + | func leasetest (address,amount) = { | |
89 | + | let lease = Lease(Address(fromBase58String(address)), amount) | |
90 | + | let id = calculateLeaseId(lease) | |
91 | + | [lease, BinaryEntry(address, id), IntegerEntry("amount", amount)] | |
92 | + | } | |
93 | + | ||
94 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func test (i) = (i * 10) | |
4 | 5 | ||
6 | + | ||
7 | + | let x = 1000 | |
5 | 8 | ||
6 | 9 | @Callable(i) | |
7 | 10 | func action () = [ScriptTransfer(Address(base58'3FXMzYAi9KmbpTVVCB5SxzpyTw4jzqRhufj'), 100000000000, unit)] | |
8 | 11 | ||
9 | 12 | ||
10 | 13 | ||
11 | 14 | @Callable(i) | |
12 | - | func default () = nil | |
15 | + | func returnCallerData () = $Tuple2(nil, (toString(i.caller) + toBase58String(i.callerPublicKey))) | |
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | @Callable(i) | |
20 | + | func default () = [DeleteEntry("id")] | |
21 | + | ||
22 | + | ||
23 | + | ||
24 | + | @Callable(i) | |
25 | + | func set () = [IntegerEntry("id", 1)] | |
13 | 26 | ||
14 | 27 | ||
15 | 28 | ||
16 | 29 | @Callable(i) | |
17 | 30 | func issueAndTransfer () = { | |
18 | 31 | let issue = Issue("name", "description", 1000, 1, true, unit, 0) | |
19 | - | $Tuple2([issue | |
32 | + | $Tuple2([issue, BinaryEntry("asset", calculateAssetId(issue)), IntegerEntry("balance", assetBalance(Address(base58'3FQPBARYST3ajfGcba55SyYfzxbEBijTNGf'), calculateAssetId(issue)))], assetBalance(Address(base58'3FQPBARYST3ajfGcba55SyYfzxbEBijTNGf'), calculateAssetId(issue))) | |
20 | 33 | } | |
21 | 34 | ||
22 | 35 | ||
23 | 36 | ||
24 | 37 | @Callable(i) | |
25 | - | func | |
26 | - | let r = invoke( | |
38 | + | func balance () = { | |
39 | + | let r = invoke(i.originCaller, "default", nil, [AttachedPayment(unit, 100)]) | |
27 | 40 | if ((r == r)) | |
28 | 41 | then nil | |
42 | + | else throw("Strict value is not equal to itself.") | |
43 | + | } | |
44 | + | ||
45 | + | ||
46 | + | ||
47 | + | @Callable(i) | |
48 | + | func bal () = { | |
49 | + | let a = getBinaryValue("asset") | |
50 | + | [IntegerEntry("bal", assetBalance(Address(base58'3FQPBARYST3ajfGcba55SyYfzxbEBijTNGf'), a))] | |
51 | + | } | |
52 | + | ||
53 | + | ||
54 | + | ||
55 | + | @Callable(i) | |
56 | + | func irl () = { | |
57 | + | let issue = Issue("name", "description", 1000, 1, true, unit, 0) | |
58 | + | let reissue = Reissue(calculateAssetId(issue), 2000, true) | |
59 | + | let lease = Lease(Address(base58'3FYRBXZtiiegAiCUvTgJMdGvDz1Gkeqgdax'), 10000000) | |
60 | + | let id = calculateLeaseId(lease) | |
61 | + | let z = invoke(this, "default", nil, nil) | |
62 | + | if ((z == z)) | |
63 | + | then [issue, ScriptTransfer(i.caller, 100, calculateAssetId(issue)), reissue, SponsorFee(calculateAssetId(issue), 1), Burn(calculateAssetId(issue), 400), lease, BinaryEntry("id", id)] | |
29 | 64 | else throw("Strict value is not equal to itself.") | |
30 | 65 | } | |
31 | 66 | ||
32 | 67 | ||
33 | 68 | ||
34 | 69 | @Callable(i) | |
35 | 70 | func reissue () = { | |
36 | 71 | let asset = getBinaryValue("asset") | |
37 | 72 | let reissue = Reissue(asset, 2000, true) | |
38 | 73 | [reissue] | |
39 | 74 | } | |
40 | 75 | ||
41 | 76 | ||
42 | 77 | ||
43 | 78 | @Callable(i) | |
44 | 79 | func burn () = { | |
45 | 80 | let asset = getBinaryValue("asset") | |
46 | 81 | let burn = Burn(asset, 10) | |
47 | 82 | [burn] | |
48 | 83 | } | |
49 | 84 | ||
50 | 85 | ||
86 | + | ||
87 | + | @Callable(i) | |
88 | + | func leasetest (address,amount) = { | |
89 | + | let lease = Lease(Address(fromBase58String(address)), amount) | |
90 | + | let id = calculateLeaseId(lease) | |
91 | + | [lease, BinaryEntry(address, id), IntegerEntry("amount", amount)] | |
92 | + | } | |
93 | + | ||
94 | + |
github/deemru/w8io/026f985 29.82 ms ◑