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/FEdjB7WHX3k6igBAAAAAtVU0RUQXNz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EwAAAACCQEAAAAEQnVybgAAAAIFAAAADUJhbGxldEFzc2V0SUQIBQAAAANwbXQAAAAGYW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABRUb3RhbF9Jc3N1ZWRfQmFsbGV0OgUAAAARVG90YWxJc3N1ZWRCYWxsZXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAG1RvdGFsX0JhbGxldF9SZXNlcnZlX0luX1ROOgUAAAASQmFsbGV0UmVzZXJ2ZVZhbHVlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAABpCYWxsZXRfQmFja3VwX1ZhbHVlX0luX1ROOgUAAAARQmFsbGV0QmFja3VwUHJpY2UJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABJjYWxjdWxhdGVidXJudmFsdWUFAAAABHVuaXQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleSHLWXA=", "height": 1653941, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6zzsp2igfp6Tu9AcGADCJ52b5vMupYkGhQEveDNigLct Next: H7jNsPsXfTMJb3cM3Xz6H2kgg6Xfo3aoKv3xKGP2r76K Diff:
OldNewDifferences
1717 let g = value(e.payments[0])
1818 let h = value(e.payments[1])
1919 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"))
2526 then throw("This Voting Pair already Exist")
2627 else if ((44 > size(b)))
2728 then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.")
2829 else if ((size(e.payments) != 2))
2930 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 != j))
31+ else if ((g.assetId != k))
3132 then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.")
3233 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)]
3538 }
3639
3740
3841
3942 @Callable(e)
4043 func IssueBallet () = {
41- let n = value(e.payments[0])
42- let m = toBase58String(e.caller.bytes)
43- let j = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
44- let o = getIntegerValue(this, "BALLET/TN")
45- let p = fraction(100000, n.amount, o)
46- let q = getIntegerValue(this, "Total_Issued_Ballet:")
47- let r = (q + p)
48- let s = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
49- let t = (s + n.amount)
50- let u = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
51- let v = fraction(100000, t, r)
52- let w = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
53- if (isDefined(n.assetId))
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))
5457 then throw("Incorrect asset attached, please attach TN.")
55- else if ((5000000 > n.amount))
58+ else if ((5000000 > o.amount))
5659 then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.")
57- else [IntegerEntry("Total_Issued_Ballet:", r), IntegerEntry("Total_Ballet_Reserve_In_TN:", t), IntegerEntry("Ballet_Backup_Value_In_TN:", v), StringEntry("message", "<h1>Ballet Issued Successfully!</h1><br>"), Reissue(j, p, true), ScriptTransfer(e.caller, ((p * 99) / 100), j), ScriptTransfer(addressFromPublicKey(w), ((p * 1) / 100), j)]
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)]
5861 }
5962
6063
6164
6265 @Callable(e)
6366 func Liquidate () = {
64- let m = toBase58String(e.callerPublicKey)
65- let n = value(e.payments[0])
66- let j = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
67- let q = getIntegerValue(this, "Total_Issued_Ballet:")
68- let r = (q - n.amount)
69- let s = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
70- let u = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
71- let x = fraction(u, n.amount, 100000)
72- let t = (s - x)
73- let v = fraction(100000, t, r)
74- if ((n.assetId != j))
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))
7578 then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).")
76- else if ((100000 > n.amount))
79+ else if ((100000 > o.amount))
7780 then throw("Attach Amount must be greater than 0.001 Ballet.")
78- else [Burn(j, n.amount), IntegerEntry("Total_Issued_Ballet:", r), IntegerEntry("Total_Ballet_Reserve_In_TN:", t), IntegerEntry("Ballet_Backup_Value_In_TN:", v), ScriptTransfer(e.caller, x, unit)]
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)]
7982 }
8083
8184
82-@Verifier(y)
83-func z () = {
84- let c = y
85- sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
85+@Verifier(z)
86+func A () = {
87+ let c = z
88+ sigVerify(z.bodyBytes, z.proofs[0], z.senderPublicKey)
8689 }
8790
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = {
55 let c = getString(this, b)
66 if ($isInstanceOf(c, "String"))
77 then {
88 let d = c
99 d
1010 }
1111 else "NONE"
1212 }
1313
1414
1515 @Callable(e)
1616 func Voting (b,f) = {
1717 let g = value(e.payments[0])
1818 let h = value(e.payments[1])
1919 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"))
2526 then throw("This Voting Pair already Exist")
2627 else if ((44 > size(b)))
2728 then throw("Wrong AssetID1 is Entered for Voting. Please Enter a Valid AssetID1. Probably you entered an ASSETID1 less than 44 Chars.")
2829 else if ((size(e.payments) != 2))
2930 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 != j))
31+ else if ((g.assetId != k))
3132 then throw("Incorrect asset attached for Voting in payment[1], please attach 1000 Ballet Token only.")
3233 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)]
3538 }
3639
3740
3841
3942 @Callable(e)
4043 func IssueBallet () = {
41- let n = value(e.payments[0])
42- let m = toBase58String(e.caller.bytes)
43- let j = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
44- let o = getIntegerValue(this, "BALLET/TN")
45- let p = fraction(100000, n.amount, o)
46- let q = getIntegerValue(this, "Total_Issued_Ballet:")
47- let r = (q + p)
48- let s = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
49- let t = (s + n.amount)
50- let u = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
51- let v = fraction(100000, t, r)
52- let w = base58'8d4zGuTjT3h67Z4DatzMXdXXW1GvoQhMTjwCGFxJuene'
53- if (isDefined(n.assetId))
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))
5457 then throw("Incorrect asset attached, please attach TN.")
55- else if ((5000000 > n.amount))
58+ else if ((5000000 > o.amount))
5659 then throw("Please Attach minimum 0.05 TN To Issue Ballet Asset.")
57- else [IntegerEntry("Total_Issued_Ballet:", r), IntegerEntry("Total_Ballet_Reserve_In_TN:", t), IntegerEntry("Ballet_Backup_Value_In_TN:", v), StringEntry("message", "<h1>Ballet Issued Successfully!</h1><br>"), Reissue(j, p, true), ScriptTransfer(e.caller, ((p * 99) / 100), j), ScriptTransfer(addressFromPublicKey(w), ((p * 1) / 100), j)]
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)]
5861 }
5962
6063
6164
6265 @Callable(e)
6366 func Liquidate () = {
64- let m = toBase58String(e.callerPublicKey)
65- let n = value(e.payments[0])
66- let j = base58'44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y'
67- let q = getIntegerValue(this, "Total_Issued_Ballet:")
68- let r = (q - n.amount)
69- let s = getIntegerValue(this, "Total_Ballet_Reserve_In_TN:")
70- let u = getIntegerValue(this, "Ballet_Backup_Value_In_TN:")
71- let x = fraction(u, n.amount, 100000)
72- let t = (s - x)
73- let v = fraction(100000, t, r)
74- if ((n.assetId != j))
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))
7578 then throw("Kindly Deposit Only 44Mq8KqUhM94t93MiBq3S22iiuGczMxpKmse5dBy2w5y (Ballet).")
76- else if ((100000 > n.amount))
79+ else if ((100000 > o.amount))
7780 then throw("Attach Amount must be greater than 0.001 Ballet.")
78- else [Burn(j, n.amount), IntegerEntry("Total_Issued_Ballet:", r), IntegerEntry("Total_Ballet_Reserve_In_TN:", t), IntegerEntry("Ballet_Backup_Value_In_TN:", v), ScriptTransfer(e.caller, x, unit)]
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)]
7982 }
8083
8184
82-@Verifier(y)
83-func z () = {
84- let c = y
85- sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey)
85+@Verifier(z)
86+func A () = {
87+ let c = z
88+ sigVerify(z.bodyBytes, z.proofs[0], z.senderPublicKey)
8689 }
8790

github/deemru/w8io/169f3d6 
64.38 ms