tx · 48hxMfCL8TNrzrJCnch2GK4WKo7D8AU3xXgnPfFHV3vo 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv: -0.01400000 Waves 2021.08.11 19:26 [1653941] smart account 3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv > SELF 0.00000000 Waves
{ "type": 13, "id": "48hxMfCL8TNrzrJCnch2GK4WKo7D8AU3xXgnPfFHV3vo", "fee": 1400000, "feeAssetId": null, "timestamp": 1628699217193, "version": 2, "chainId": 84, "sender": "3Mrnje6z2xa3xuXyU2Lk6ynKy8tsRnnt4Bv", "senderPublicKey": "28sGn7FYnmxceAmnGYiDiKuMK1QyXiqX8zQXfKDnrc8t", "proofs": [ "Xd7fS62bvqD3UBLoDDWHXbYBU6fgKgvAA2jsBM4cn1YjspJpvB28nbxsi3AdKdt3YdiouC83EXRjqAdrQePZoKy" ], "script": "base64:AAIEAAAAAAAAAAwIAhIECgIIARIAEgAAAAABAQAAAA9jaGVja1ZvdGluZ1BhaXIAAAABAAAACEFzc2V0SUQxBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAACEFzc2V0SUQxAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWECAAAABE5PTkUAAAADAAAAAWkBAAAABlZvdGluZwAAAAIAAAAIQXNzZXRJRDEAAAAEZGF5cwQAAAAEcG10MQkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAEcG10MgkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQQAAAARbWF4aW11bXZvdGluZ2RheXMAAAAAAAAAAFoEAAAAAlROAQAAAAAEAAAADUJhbGxldEFzc2V0SUQBAAAAIC1vWwG5neVKbxqEaKeT7hMXlhgC7/FEdjB7WHX3k6igBAAAAAtVU0RUQXNzZ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wAAAACCQEAAAAEQnVybgAAAAIFAAAADUJhbGxldEFzc2V0SUQIBQAAAANwbXQAAAAGYW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABRUb3RhbF9Jc3N1ZWRfQmFsbGV0OgUAAAARVG90YWxJc3N1ZWRCYWxsZXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAG1RvdGFsX0JhbGxldF9SZXNlcnZlX0luX1ROOgUAAAASQmFsbGV0UmVzZXJ2ZVZhbHVlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpCYWxsZXRfQmFja3VwX1ZhbHVlX0luX1ROOgUAAAARQmFsbGV0QmFja3VwUHJpY2UJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABJjYWxjdWxhdGVidXJudmFsdWUFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleSHLWXA=", "height": 1653941, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6zzsp2igfp6Tu9AcGADCJ52b5vMupYkGhQEveDNigLct Next: H7jNsPsXfTMJb3cM3Xz6H2kgg6Xfo3aoKv3xKGP2r76K Diff:
Old | New | Differences | |
---|---|---|---|
17 | 17 | let g = value(e.payments[0]) | |
18 | 18 | let h = value(e.payments[1]) | |
19 | 19 | let i = 90 | |
20 | - | let j = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
21 | - | let k = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
22 | - | let l = a(b) | |
23 | - | let m = toBase58String(e.caller.bytes) | |
24 | - | if ((l != "NONE")) | |
20 | + | let j = base58'' | |
21 | + | let k = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
22 | + | let l = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
23 | + | let m = a(b) | |
24 | + | let n = toBase58String(e.caller.bytes) | |
25 | + | if ((m != "NONE")) | |
25 | 26 | then throw("This Voting Pair already Exist") | |
26 | 27 | else if ((44 > size(b))) | |
27 | 28 | then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.") | |
28 | 29 | else if ((size(e.payments) != 2)) | |
29 | 30 | then throw("Two attached assets expected as payment. Kindly Attach payment1 = Ballet Token and payment2 = Token You want to add to List for Voting.") | |
30 | - | else if ((g.assetId != | |
31 | + | else if ((g.assetId != k)) | |
31 | 32 | then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.") | |
32 | 33 | else if ((h.assetId == j)) | |
33 | - | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
34 | - | else [StringEntry("TRDToUSDN_Swap_Address", m), IntegerEntry("TRDToUSDN_Swap_Height", height)] | |
34 | + | then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].") | |
35 | + | else if ((h.assetId == k)) | |
36 | + | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
37 | + | else [StringEntry("TRDToUSDN_Swap_Address", n), IntegerEntry("TRDToUSDN_Swap_Height", height)] | |
35 | 38 | } | |
36 | 39 | ||
37 | 40 | ||
38 | 41 | ||
39 | 42 | @Callable(e) | |
40 | 43 | func IssueBallet () = { | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | let | |
49 | - | let | |
50 | - | let | |
51 | - | let | |
52 | - | let | |
53 | - | if (isDefined( | |
44 | + | let o = value(e.payments[0]) | |
45 | + | let n = toBase58String(e.caller.bytes) | |
46 | + | let k = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
47 | + | let p = getIntegerValue(this, "BALLET/TN") | |
48 | + | let q = fraction(100000, o.amount, p) | |
49 | + | let r = getIntegerValue(this, "Total_Issued_Ballet:") | |
50 | + | let s = (r + q) | |
51 | + | let t = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
52 | + | let u = (t + o.amount) | |
53 | + | let v = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
54 | + | let w = fraction(100000, u, s) | |
55 | + | let x = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
56 | + | if (isDefined(o.assetId)) | |
54 | 57 | then throw("Incorrect asset attached, please attach TN.") | |
55 | - | else if ((5000000 > | |
58 | + | else if ((5000000 > o.amount)) | |
56 | 59 | then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.") | |
57 | - | else [IntegerEntry("Total_Issued_Ballet:", | |
60 | + | else [IntegerEntry("Total_Issued_Ballet:", s), IntegerEntry("Total_Ballet_Reserve_In_TN:", u), IntegerEntry("Ballet_Backup_Value_In_TN:", w), StringEntry("message", "<h1>Ballet Issued Successfully!</h1><br>"), Reissue(k, q, true), ScriptTransfer(e.caller, ((q * 99) / 100), k), ScriptTransfer(addressFromPublicKey(x), ((q * 1) / 100), k)] | |
58 | 61 | } | |
59 | 62 | ||
60 | 63 | ||
61 | 64 | ||
62 | 65 | @Callable(e) | |
63 | 66 | func Liquidate () = { | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | let | |
72 | - | let | |
73 | - | let | |
74 | - | if (( | |
67 | + | let n = toBase58String(e.callerPublicKey) | |
68 | + | let o = value(e.payments[0]) | |
69 | + | let k = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
70 | + | let r = getIntegerValue(this, "Total_Issued_Ballet:") | |
71 | + | let s = (r - o.amount) | |
72 | + | let t = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
73 | + | let v = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
74 | + | let y = fraction(v, o.amount, 100000) | |
75 | + | let u = (t - y) | |
76 | + | let w = fraction(100000, u, s) | |
77 | + | if ((o.assetId != k)) | |
75 | 78 | then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).") | |
76 | - | else if ((100000 > | |
79 | + | else if ((100000 > o.amount)) | |
77 | 80 | then throw("Attach Amount must be greater than 0.001 Ballet.") | |
78 | - | else [Burn( | |
81 | + | else [Burn(k, o.amount), IntegerEntry("Total_Issued_Ballet:", s), IntegerEntry("Total_Ballet_Reserve_In_TN:", u), IntegerEntry("Ballet_Backup_Value_In_TN:", w), ScriptTransfer(e.caller, y, unit)] | |
79 | 82 | } | |
80 | 83 | ||
81 | 84 | ||
82 | - | @Verifier( | |
83 | - | func | |
84 | - | let c = | |
85 | - | sigVerify( | |
85 | + | @Verifier(z) | |
86 | + | func A () = { | |
87 | + | let c = z | |
88 | + | sigVerify(z.bodyBytes, z.proofs[0], z.senderPublicKey) | |
86 | 89 | } | |
87 | 90 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b) = { | |
5 | 5 | let c = getString(this, b) | |
6 | 6 | if ($isInstanceOf(c, "String")) | |
7 | 7 | then { | |
8 | 8 | let d = c | |
9 | 9 | d | |
10 | 10 | } | |
11 | 11 | else "NONE" | |
12 | 12 | } | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | @Callable(e) | |
16 | 16 | func Voting (b,f) = { | |
17 | 17 | let g = value(e.payments[0]) | |
18 | 18 | let h = value(e.payments[1]) | |
19 | 19 | let i = 90 | |
20 | - | let j = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
21 | - | let k = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
22 | - | let l = a(b) | |
23 | - | let m = toBase58String(e.caller.bytes) | |
24 | - | if ((l != "NONE")) | |
20 | + | let j = base58'' | |
21 | + | let k = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
22 | + | let l = base58'7RB3BWayeCVPq3kkpkeJZAFv2DYCB5gEwnutEpRofaw4' | |
23 | + | let m = a(b) | |
24 | + | let n = toBase58String(e.caller.bytes) | |
25 | + | if ((m != "NONE")) | |
25 | 26 | then throw("This Voting Pair already Exist") | |
26 | 27 | else if ((44 > size(b))) | |
27 | 28 | then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.") | |
28 | 29 | else if ((size(e.payments) != 2)) | |
29 | 30 | then throw("Two attached assets expected as payment. Kindly Attach payment1 = Ballet Token and payment2 = Token You want to add to List for Voting.") | |
30 | - | else if ((g.assetId != | |
31 | + | else if ((g.assetId != k)) | |
31 | 32 | then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.") | |
32 | 33 | else if ((h.assetId == j)) | |
33 | - | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
34 | - | else [StringEntry("TRDToUSDN_Swap_Address", m), IntegerEntry("TRDToUSDN_Swap_Height", height)] | |
34 | + | then throw("You Attached TN Asset ID for Voting, please attach the Token You want to list in payment[2].") | |
35 | + | else if ((h.assetId == k)) | |
36 | + | then throw("You Attached Ballet asset for Voting in both payments, please attach the Token You want to list in payment[2].") | |
37 | + | else [StringEntry("TRDToUSDN_Swap_Address", n), IntegerEntry("TRDToUSDN_Swap_Height", height)] | |
35 | 38 | } | |
36 | 39 | ||
37 | 40 | ||
38 | 41 | ||
39 | 42 | @Callable(e) | |
40 | 43 | func IssueBallet () = { | |
41 | - | let | |
42 | - | let | |
43 | - | let | |
44 | - | let | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | let | |
49 | - | let | |
50 | - | let | |
51 | - | let | |
52 | - | let | |
53 | - | if (isDefined( | |
44 | + | let o = value(e.payments[0]) | |
45 | + | let n = toBase58String(e.caller.bytes) | |
46 | + | let k = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
47 | + | let p = getIntegerValue(this, "BALLET/TN") | |
48 | + | let q = fraction(100000, o.amount, p) | |
49 | + | let r = getIntegerValue(this, "Total_Issued_Ballet:") | |
50 | + | let s = (r + q) | |
51 | + | let t = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
52 | + | let u = (t + o.amount) | |
53 | + | let v = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
54 | + | let w = fraction(100000, u, s) | |
55 | + | let x = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene' | |
56 | + | if (isDefined(o.assetId)) | |
54 | 57 | then throw("Incorrect asset attached, please attach TN.") | |
55 | - | else if ((5000000 > | |
58 | + | else if ((5000000 > o.amount)) | |
56 | 59 | then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.") | |
57 | - | else [IntegerEntry("Total_Issued_Ballet:", | |
60 | + | else [IntegerEntry("Total_Issued_Ballet:", s), IntegerEntry("Total_Ballet_Reserve_In_TN:", u), IntegerEntry("Ballet_Backup_Value_In_TN:", w), StringEntry("message", "<h1>Ballet Issued Successfully!</h1><br>"), Reissue(k, q, true), ScriptTransfer(e.caller, ((q * 99) / 100), k), ScriptTransfer(addressFromPublicKey(x), ((q * 1) / 100), k)] | |
58 | 61 | } | |
59 | 62 | ||
60 | 63 | ||
61 | 64 | ||
62 | 65 | @Callable(e) | |
63 | 66 | func Liquidate () = { | |
64 | - | let | |
65 | - | let | |
66 | - | let | |
67 | - | let | |
68 | - | let | |
69 | - | let | |
70 | - | let | |
71 | - | let | |
72 | - | let | |
73 | - | let | |
74 | - | if (( | |
67 | + | let n = toBase58String(e.callerPublicKey) | |
68 | + | let o = value(e.payments[0]) | |
69 | + | let k = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y' | |
70 | + | let r = getIntegerValue(this, "Total_Issued_Ballet:") | |
71 | + | let s = (r - o.amount) | |
72 | + | let t = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:") | |
73 | + | let v = getIntegerValue(this, "Ballet_Backup_Value_In_TN:") | |
74 | + | let y = fraction(v, o.amount, 100000) | |
75 | + | let u = (t - y) | |
76 | + | let w = fraction(100000, u, s) | |
77 | + | if ((o.assetId != k)) | |
75 | 78 | then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).") | |
76 | - | else if ((100000 > | |
79 | + | else if ((100000 > o.amount)) | |
77 | 80 | then throw("Attach Amount must be greater than 0.001 Ballet.") | |
78 | - | else [Burn( | |
81 | + | else [Burn(k, o.amount), IntegerEntry("Total_Issued_Ballet:", s), IntegerEntry("Total_Ballet_Reserve_In_TN:", u), IntegerEntry("Ballet_Backup_Value_In_TN:", w), ScriptTransfer(e.caller, y, unit)] | |
79 | 82 | } | |
80 | 83 | ||
81 | 84 | ||
82 | - | @Verifier( | |
83 | - | func | |
84 | - | let c = | |
85 | - | sigVerify( | |
85 | + | @Verifier(z) | |
86 | + | func A () = { | |
87 | + | let c = z | |
88 | + | sigVerify(z.bodyBytes, z.proofs[0], z.senderPublicKey) | |
86 | 89 | } | |
87 | 90 |
github/deemru/w8io/169f3d6 64.38 ms ◑