tx · GnNM93ngjiQFQ46MmSebqgjdTxq33QXgksZH56PcMtrJ

3PH2KWQ4aPVZQo27CKYvA3wtLFpocJ9oSxR:  -0.00400000 Waves

2022.10.03 15:39 [3321654] smart account 3PH2KWQ4aPVZQo27CKYvA3wtLFpocJ9oSxR > SELF 0.00000000 Waves

{ "type": 13, "id": "GnNM93ngjiQFQ46MmSebqgjdTxq33QXgksZH56PcMtrJ", "fee": 400000, "feeAssetId": null, "timestamp": 1664800845968, "version": 2, "chainId": 87, "sender": "3PH2KWQ4aPVZQo27CKYvA3wtLFpocJ9oSxR", "senderPublicKey": "F2oYoje2nsMBbUbhBJwpyE7Xdc5HsMi7BmkNW22i7Syi", "proofs": [ "5fFBJHArxHoYA35Azvo6WiN2jmZTRGbuHdUAv4EuAjXcHVwB4iZjuivKR4AXTBAZjhN3oH3vmpzzh5Zao1HHZ3Q9" ], "script": "base64:AAIFAAAAAAAAAA8IAhIFCgMIAQgSBAoCCAEAAAATAAAAAAhDb3Vyc2VJZAAAAAAAAAAAAAAAAAAQYmFja2VuZFB1YmxpY0tleQEAAAAgWfw+o16bck5csjvuo75l3fBL85OUGiBdbOKUSjbPGWIAAAAAC1VzZG5Bc3NldElkAQAAACC2JinDBPXOU5GkDkt1JC9kjFGx+t+vVCm9SNIdKrKq0QAAAAAKVXNkbkFtb3VudAAAAAAAAIlUQAAAAAAMV2F2ZXNBc3NldElkBQAAAAR1bml0AAAAAAlXWEFzc2V0SWQBAAAAIJMBHKupx24lV85mnnG2vapr+DzoWAsq7tmgTrs83BSxAAAAAAxWaXJlc0Fzc2V0SWQBAAAAILja4jcBYnBfmqhbshkMvQ/DZa91BrZYLd0Hk1ap3amXAAAAAAtTd29wQXNzZXRJZAEAAAAgy5Y+heb1k1ZPj3mDERR4TyZ+jN5UknzW4a3AXGioruwAAAAACkVHR0Fzc2V0SWQBAAAAIKOff08jclHRLOIhkmKITQwL8+oiboHVr/wLkxfObbHJAAAAABBXYXZlc1Bvb2xBZGRyZXNzA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cwAAAAhjb3Vyc2VJZAQAAAAQa1VzZXJDb3Vyc2VWYWx1ZQkBAAAAFmdldFVzZXJBbHJlYWR5RmluaXNoZWQAAAACBQAAAAdhZGRyZXNzBQAAAAhjb3Vyc2VJZAQAAAASa1VzZXJSZXdhcmRlZFZhbHVlCQEAAAAWZ2V0VXNlckFscmVhZHlSZXdhcmRlZAAAAAIFAAAAB2FkZHJlc3MFAAAACGNvdXJzZUlkAwkAAAAAAAACBQAAABBrVXNlckNvdXJzZVZhbHVlBwkAAAIAAAABAgAAAB1Vc2VyIGRpZG4ndCBmaW5pc2ggdGhlIGNvdXJzZQMJAAAAAAAAAgUAAAASa1VzZXJSZXdhcmRlZFZhbHVlBgkAAAIAAAABAgAAABlVc2VyIHdhcyBhbHJlYWR5IHJld2FyZGVkCQEAAAAQY2FsY3VsYXRlUmV3YXJkcwAAAAAAAAAA8USGmw==", "height": 3321654, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Cs8Q1jDTz4LAUinPxBSMq4Y5VxRig7155XYQ5Agi8vp8 Next: 8jG1A8DcD4q7r3Xop7bqmrY6pvXyoLrSpao8Z3FfFCBs Diff:
OldNewDifferences
4141 if ((u == u))
4242 then {
4343 let v = wavesBalance(this).available
44- throw(("Echange amount: " + toString((v - t))))
44+[StringEntry("__debug", ("Exchange amount: " + toString((v - t))))]
4545 }
4646 else throw("Strict value is not equal to itself.")
4747 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 0
55
66 let b = base58'74GNYyhC5BPLvUUT8DoisXVQ8AMhcWCGM5D3jJJ2F9cu'
77
88 let c = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
99
1010 let d = 9000000
1111
1212 let e = unit
1313
1414 let f = base58'Atqv59EYzjFGuitKVnMRk6H8FukjoV3ktPorbEys25on'
1515
1616 let g = base58'DSbbhLsSTeDg5Lsiufk2Aneh3DjVqJuPr2M9uU1gwy5p'
1717
1818 let h = base58'Ehie5xYpeN8op1Cctc6aGUrqx8jq3jtf1DSjXDbfm7aT'
1919
2020 let i = base58'C1iWsKGqLwjHUndiQ7iXpdmPum9PeCDFfyXBdJJosDRS'
2121
2222 let j = base58'3PHaNgomBkrvEL2QnuJarQVJa71wjw9qiqG'
2323
2424 let k = base58'3PKi4G3VX2k42ZSmNNrmvgdDH7JzRaUhY7R'
2525
2626 let l = base58'3PEeJQRJT4v4XvSUBPmxhdWKz439nae7KtQ'
2727
2828 let m = base58'3P27S9V36kw2McjWRZ37AxTx8iwkd7HXw6W'
2929
3030 let n = base58'3PJ48P3p2wvWUjgQaQiZ2cFbr8qmxMokBGd'
3131
3232 func o (p,q) = ((p + "_course_") + toString(a))
3333
3434
3535 func r (p,q) = (((p + "_course_") + toString(a)) + "_rewarded")
3636
3737
3838 func s () = {
3939 let t = wavesBalance(this).available
4040 let u = invoke(Address(j), "exchange", [1], [AttachedPayment(c, 3000000)])
4141 if ((u == u))
4242 then {
4343 let v = wavesBalance(this).available
44- throw(("Echange amount: " + toString((v - t))))
44+[StringEntry("__debug", ("Exchange amount: " + toString((v - t))))]
4545 }
4646 else throw("Strict value is not equal to itself.")
4747 }
4848
4949
5050 func w (x,q) = {
5151 let y = o(x, q)
5252 let z = getBoolean(y)
5353 if ($isInstanceOf(z, "Boolean"))
5454 then {
5555 let A = z
5656 A
5757 }
5858 else false
5959 }
6060
6161
6262 func B (x,q) = {
6363 let C = r(x, q)
6464 let z = getBoolean(C)
6565 if ($isInstanceOf(z, "Boolean"))
6666 then {
6767 let A = z
6868 A
6969 }
7070 else false
7171 }
7272
7373
7474 @Callable(D)
7575 func payForCertificate (E,q,F) = {
7676 let x = toString(D.originCaller)
7777 let G = w(x, q)
7878 let H = ((E + toString(q)) + x)
7979 if ((sigVerify_8Kb(toBytes(H), fromBase58String(F), b) == false))
8080 then throw("Backend proof is not correct")
8181 else if ((value(value(D.payments[0]).assetId) != c))
8282 then throw("10 USDN should be attached")
8383 else if ((value(value(D.payments[0]).amount) != d))
8484 then throw((("At least " + toString(d)) + " USDN should be attached"))
8585 else if (G)
8686 then throw("User already got a certificate!")
8787 else [BooleanEntry(o(x, q), true)]
8888 }
8989
9090
9191
9292 @Callable(D)
9393 func payToUser (p,q) = {
9494 let G = w(p, q)
9595 let I = B(p, q)
9696 if ((G == false))
9797 then throw("User didn't finish the course")
9898 else if ((I == true))
9999 then throw("User was already rewarded")
100100 else s()
101101 }
102102
103103

github/deemru/w8io/6500d08 
45.26 ms