tx · EQsk4kmittQy7Re7ZRkQgomcom7JZ6LGj5QAvDvA6xyp 3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6: -0.01000000 Waves 2023.02.24 11:31 [2463516] smart account 3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6 > SELF 0.00000000 Waves
{ "type": 13, "id": "EQsk4kmittQy7Re7ZRkQgomcom7JZ6LGj5QAvDvA6xyp", "fee": 1000000, "feeAssetId": null, "timestamp": 1677227576450, "version": 2, "chainId": 84, "sender": "3N37eLdtWjhS31FGHvu2HpGLreF11i58Bv6", "senderPublicKey": "3pW4h7e3NAcqGkvc1AyziZLMPSsG2eXvCGU7vLxPXkaq", "proofs": [ "zKPYcAwjM9gKFSA6j8WAwThkdc1gCrYopMT7WBRZtKXqUmnvAvcm2U9MMjYUHbEbukjs97XYnLW9kWFJE7MHpAU" ], "script": "base64:BgIKCAISABIECgIBAQMAFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkCDmJzdFVzZHRBc3NldElkABZic3RTdXJmQXNzZXRTdG9yYWdlS2V5Ag5ic3RTdXJmQXNzZXRJZAEGdW53cmFwAQRkYXRhBAckbWF0Y2gwBQRkYXRhAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAXYFByRtYXRjaDAFAXYJAAIBAiFFeHBlY3RlZCB0aGF0IGRhdGEgd2lsbCBiZSBzdHJpbmcCAWkBC2lzc3VlQXNzZXRzAAQHYnN0VXNkdAkAwwgHAgxic3RVc2R0VGVzdDECAACAreIEAAYGBQR1bml0AAAEDmJzdFVzZHRBc3NldElkCQC4CAEFB2JzdFVzZHQEB2JzdFN1cmYJAMMIBwIMYnN0U3VyZlRlc3QxAgAAgK3iBAAGBgUEdW5pdAABBA5ic3RTdXJmQXNzZXRJZAkAuAgBBQdic3RTdXJmCQDMCAIJAQtEZWxldGVFbnRyeQEFFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkJAMwIAgkBC0RlbGV0ZUVudHJ5AQUWYnN0U3VyZkFzc2V0U3RvcmFnZUtleQkAzAgCCQELQmluYXJ5RW50cnkCBRZic3RVc2R0QXNzZXRTdG9yYWdlS2V5BQ5ic3RVc2R0QXNzZXRJZAkAzAgCCQELQmluYXJ5RW50cnkCBRZic3RTdXJmQXNzZXRTdG9yYWdlS2V5BQ5ic3RTdXJmQXNzZXRJZAkAzAgCBQdic3RVc2R0CQDMCAIFB2JzdFN1cmYFA25pbAFpAR1zZW5kSW50ZXJuYWxBc3NldHNUb1RoZUNhbGxlcgICaWQGYW1vdW50BAdhc3NldElkAwkAAAIFAmlkAAAJAQZ1bndyYXABCQChCAEFFmJzdFVzZHRBc3NldFN0b3JhZ2VLZXkDCQAAAgUCaWQAAQkBBnVud3JhcAEJAKEIAQUWYnN0U3VyZkFzc2V0U3RvcmFnZUtleQkAAgECDldyb25nIEFzc2V0IElkBAdiYWxhbmNlCQDwBwIFBHRoaXMFB2Fzc2V0SWQDCQBnAgUHYmFsYW5jZQUGYW1vdW50CQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUGYW1vdW50BQdhc3NldElkBQNuaWwJAAIBAhJJbnN1ZmZpY2llbnQgZnVuZHMBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V58LU5Jg==", "height": 2463516, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9ipHkRPdWWm6MTNR77qg3gn8tcF2VW3mdGFFBRk5XGsg Next: oBAdq27BP79QYqV5tJoQQHvRwaBv5d3Q9QNvHK3Em7u Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = d | |
10 | - | if ($isInstanceOf(e, " | |
10 | + | if ($isInstanceOf(e, "ByteVector")) | |
11 | 11 | then { | |
12 | 12 | let f = e | |
13 | - | | |
13 | + | f | |
14 | 14 | } | |
15 | 15 | else throw("Expected that data will be string") | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(g) | |
20 | - | func | |
21 | - | let h = Issue(" | |
20 | + | func issueAssets () = { | |
21 | + | let h = Issue("bstUsdtTest1", "", 10000000, 6, true, unit, 0) | |
22 | 22 | let i = calculateAssetId(h) | |
23 | - | [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), h] | |
23 | + | let j = Issue("bstSurfTest1", "", 10000000, 6, true, unit, 1) | |
24 | + | let k = calculateAssetId(j) | |
25 | + | [DeleteEntry(a), DeleteEntry(b), BinaryEntry(a, i), BinaryEntry(b, k), h, j] | |
24 | 26 | } | |
25 | 27 | ||
26 | 28 | ||
27 | 29 | ||
28 | 30 | @Callable(g) | |
29 | - | func issueAssets () = { | |
30 | - | let j = Issue("bstUsdtTest1", "", 1000000, 6, true, unit, 0) | |
31 | - | let k = calculateAssetId(j) | |
32 | - | let l = Issue("bstSurfTest1", "", 1000000, 6, true, unit, 1) | |
33 | - | let m = calculateAssetId(l) | |
34 | - | [StringEntry(a, toBase58String(k)), StringEntry(b, toBase58String(m)), BinaryEntry("TestData", m), j, l] | |
31 | + | func sendInternalAssetsToTheCaller (l,m) = { | |
32 | + | let n = if ((l == 0)) | |
33 | + | then c(getBinary(a)) | |
34 | + | else if ((l == 1)) | |
35 | + | then c(getBinary(b)) | |
36 | + | else throw("Wrong Asset Id") | |
37 | + | let o = assetBalance(this, n) | |
38 | + | if ((o >= m)) | |
39 | + | then [ScriptTransfer(g.caller, m, n)] | |
40 | + | else throw("Insufficient funds") | |
35 | 41 | } | |
36 | 42 | ||
37 | 43 | ||
38 | - | ||
39 | - | @Callable(g) | |
40 | - | func sendInternalAssetsToTheCaller (n,o) = { | |
41 | - | let i = if ((n == 0)) | |
42 | - | then getString(a) | |
43 | - | else if ((n == 1)) | |
44 | - | then getString(b) | |
45 | - | else throw("Wrong Asset Id") | |
46 | - | let p = assetBalance(this, c(i)) | |
47 | - | if ((p >= o)) | |
48 | - | then [ScriptTransfer(g.caller, o, c(i))] | |
49 | - | else [ScriptTransfer(g.caller, o, c(i))] | |
50 | - | } | |
51 | - | ||
52 | - | ||
53 | - | @Verifier(q) | |
54 | - | func r () = sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) | |
44 | + | @Verifier(p) | |
45 | + | func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey) | |
55 | 46 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "bstUsdtAssetId" | |
5 | 5 | ||
6 | 6 | let b = "bstSurfAssetId" | |
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = d | |
10 | - | if ($isInstanceOf(e, " | |
10 | + | if ($isInstanceOf(e, "ByteVector")) | |
11 | 11 | then { | |
12 | 12 | let f = e | |
13 | - | | |
13 | + | f | |
14 | 14 | } | |
15 | 15 | else throw("Expected that data will be string") | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | @Callable(g) | |
20 | - | func | |
21 | - | let h = Issue(" | |
20 | + | func issueAssets () = { | |
21 | + | let h = Issue("bstUsdtTest1", "", 10000000, 6, true, unit, 0) | |
22 | 22 | let i = calculateAssetId(h) | |
23 | - | [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), h] | |
23 | + | let j = Issue("bstSurfTest1", "", 10000000, 6, true, unit, 1) | |
24 | + | let k = calculateAssetId(j) | |
25 | + | [DeleteEntry(a), DeleteEntry(b), BinaryEntry(a, i), BinaryEntry(b, k), h, j] | |
24 | 26 | } | |
25 | 27 | ||
26 | 28 | ||
27 | 29 | ||
28 | 30 | @Callable(g) | |
29 | - | func issueAssets () = { | |
30 | - | let j = Issue("bstUsdtTest1", "", 1000000, 6, true, unit, 0) | |
31 | - | let k = calculateAssetId(j) | |
32 | - | let l = Issue("bstSurfTest1", "", 1000000, 6, true, unit, 1) | |
33 | - | let m = calculateAssetId(l) | |
34 | - | [StringEntry(a, toBase58String(k)), StringEntry(b, toBase58String(m)), BinaryEntry("TestData", m), j, l] | |
31 | + | func sendInternalAssetsToTheCaller (l,m) = { | |
32 | + | let n = if ((l == 0)) | |
33 | + | then c(getBinary(a)) | |
34 | + | else if ((l == 1)) | |
35 | + | then c(getBinary(b)) | |
36 | + | else throw("Wrong Asset Id") | |
37 | + | let o = assetBalance(this, n) | |
38 | + | if ((o >= m)) | |
39 | + | then [ScriptTransfer(g.caller, m, n)] | |
40 | + | else throw("Insufficient funds") | |
35 | 41 | } | |
36 | 42 | ||
37 | 43 | ||
38 | - | ||
39 | - | @Callable(g) | |
40 | - | func sendInternalAssetsToTheCaller (n,o) = { | |
41 | - | let i = if ((n == 0)) | |
42 | - | then getString(a) | |
43 | - | else if ((n == 1)) | |
44 | - | then getString(b) | |
45 | - | else throw("Wrong Asset Id") | |
46 | - | let p = assetBalance(this, c(i)) | |
47 | - | if ((p >= o)) | |
48 | - | then [ScriptTransfer(g.caller, o, c(i))] | |
49 | - | else [ScriptTransfer(g.caller, o, c(i))] | |
50 | - | } | |
51 | - | ||
52 | - | ||
53 | - | @Verifier(q) | |
54 | - | func r () = sigVerify(q.bodyBytes, q.proofs[0], q.senderPublicKey) | |
44 | + | @Verifier(p) | |
45 | + | func q () = sigVerify(p.bodyBytes, p.proofs[0], p.senderPublicKey) | |
55 | 46 |
github/deemru/w8io/169f3d6 40.32 ms ◑