tx · HBxEonqYeSh7jbvree28uKWFh9N1qWRJTMSGzk33aLjH 3N8oGmoNZRYR4iA9586cGgVoFPTPnbKcNds: -0.01400000 Waves 2022.03.05 11:59 [1950465] smart account 3N8oGmoNZRYR4iA9586cGgVoFPTPnbKcNds > SELF 0.00000000 Waves
{ "type": 13, "id": "HBxEonqYeSh7jbvree28uKWFh9N1qWRJTMSGzk33aLjH", "fee": 1400000, "feeAssetId": null, "timestamp": 1646470816223, "version": 2, "chainId": 84, "sender": "3N8oGmoNZRYR4iA9586cGgVoFPTPnbKcNds", "senderPublicKey": "CcnrRKYzgAP4VNysQhGczok7xWdHDnijupPd8nTfV8BE", "proofs": [ "4zFTs8ERTFfdt6SVu8orjJu9xh4UaHYqRqrfGoR1gcjiHHJb3xyYHW6pvqqLNET4wopAiTEcb6ytwTaJ2uw3Szn7" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQgAAAAAAAAAAgAAAAFpAQAAAARTZW5kAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQEAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA9zZW5kZXJwdWJsaWNrZXkJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BAAAAAZhc3NldDEBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkBAAAAAd0eG5oYXNoCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAABmFzc2V0MQkAAAIAAAABCQABLAAAAAICAAAAJkluY29ycmVjdCBhc3NldCBhdHRhY2hlZCwgcGxlYXNlIHNlbmQgCQACWAAAAAEFAAAABmFzc2V0MQMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQAAAAAAAAPQkAJAAACAAAAAQIAAAAaVXNlI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AAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tledOn/xQ=", "height": 1950465, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A7sqtDNpknuQZPhQTwbNBUfmBC7dgotb3kymKLPtqYNW Next: 8g2kQ9eLnVZA1YU4G24NHEQAJQ63gtRVacHafp6gFV21 Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | let f = toBase58String(a.transactionId) | |
13 | 13 | if ((b.assetId != e)) | |
14 | 14 | then throw(("Incorrect asset attached, please send " + toBase58String(e))) | |
15 | - | else WriteSet([DataEntry("Sender_TxnID", f), DataEntry((f + "_Sender_Address"), c), DataEntry((f + "_Sender_pubkey"), d), DataEntry((f + "_Sender_amount"), b.amount), DataEntry((f + "_Sender_AssetID"), e), DataEntry((f + "_Sender_Status"), "PENDING")]) | |
15 | + | else if ((b.amount > 1000000)) | |
16 | + | then throw("Use Less Amount to Attach.") | |
17 | + | else WriteSet([DataEntry("Sender_TxnID", f), DataEntry((f + "_Sender_Address"), c), DataEntry((f + "_Sender_pubkey"), d), DataEntry((f + "_Sender_amount"), b.amount), DataEntry((f + "_Sender_AssetID"), e), DataEntry((f + "_Sender_Status"), "PENDING")]) | |
16 | 18 | } | |
17 | 19 | ||
18 | 20 | ||
19 | - | @Verifier(g) | |
20 | - | func h () = { | |
21 | - | let i = g | |
22 | - | sigVerify(g.bodyBytes, g.proofs[0], g.senderPublicKey) | |
21 | + | ||
22 | + | @Callable(a) | |
23 | + | func Claim (g) = { | |
24 | + | let h = toBase58String(a.callerPublicKey) | |
25 | + | let i = getStringValue(this, (g + "_Sender_pubkey")) | |
26 | + | let j = getStringValue(this, (g + "_Sender_AssetID")) | |
27 | + | let k = getIntegerValue(this, (g + "_Sender_amount")) | |
28 | + | let l = fraction(100, k, 1) | |
29 | + | if ((h != i)) | |
30 | + | then throw("You are not an authorized user to Withdraw Funds or Wrong Public Key.") | |
31 | + | else if ((k == 0)) | |
32 | + | then throw("You Already Have Withdraw Funds from This TxnID.") | |
33 | + | else ScriptResult(WriteSet([DataEntry((g + "_Sender_Status"), "WITHDRAW_COMPLETED"), DataEntry((g + "_Sender_amount"), 0)]), TransferSet([ScriptTransfer(a.caller, l, unit)])) | |
34 | + | } | |
35 | + | ||
36 | + | ||
37 | + | @Verifier(m) | |
38 | + | func n () = { | |
39 | + | let o = m | |
40 | + | sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey) | |
23 | 41 | } | |
24 | 42 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func Send () = { | |
8 | 8 | let b = extract(a.payment) | |
9 | 9 | let c = toBase58String(a.caller.bytes) | |
10 | 10 | let d = toBase58String(a.callerPublicKey) | |
11 | 11 | let e = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
12 | 12 | let f = toBase58String(a.transactionId) | |
13 | 13 | if ((b.assetId != e)) | |
14 | 14 | then throw(("Incorrect asset attached, please send " + toBase58String(e))) | |
15 | - | else WriteSet([DataEntry("Sender_TxnID", f), DataEntry((f + "_Sender_Address"), c), DataEntry((f + "_Sender_pubkey"), d), DataEntry((f + "_Sender_amount"), b.amount), DataEntry((f + "_Sender_AssetID"), e), DataEntry((f + "_Sender_Status"), "PENDING")]) | |
15 | + | else if ((b.amount > 1000000)) | |
16 | + | then throw("Use Less Amount to Attach.") | |
17 | + | else WriteSet([DataEntry("Sender_TxnID", f), DataEntry((f + "_Sender_Address"), c), DataEntry((f + "_Sender_pubkey"), d), DataEntry((f + "_Sender_amount"), b.amount), DataEntry((f + "_Sender_AssetID"), e), DataEntry((f + "_Sender_Status"), "PENDING")]) | |
16 | 18 | } | |
17 | 19 | ||
18 | 20 | ||
19 | - | @Verifier(g) | |
20 | - | func h () = { | |
21 | - | let i = g | |
22 | - | sigVerify(g.bodyBytes, g.proofs[0], g.senderPublicKey) | |
21 | + | ||
22 | + | @Callable(a) | |
23 | + | func Claim (g) = { | |
24 | + | let h = toBase58String(a.callerPublicKey) | |
25 | + | let i = getStringValue(this, (g + "_Sender_pubkey")) | |
26 | + | let j = getStringValue(this, (g + "_Sender_AssetID")) | |
27 | + | let k = getIntegerValue(this, (g + "_Sender_amount")) | |
28 | + | let l = fraction(100, k, 1) | |
29 | + | if ((h != i)) | |
30 | + | then throw("You are not an authorized user to Withdraw Funds or Wrong Public Key.") | |
31 | + | else if ((k == 0)) | |
32 | + | then throw("You Already Have Withdraw Funds from This TxnID.") | |
33 | + | else ScriptResult(WriteSet([DataEntry((g + "_Sender_Status"), "WITHDRAW_COMPLETED"), DataEntry((g + "_Sender_amount"), 0)]), TransferSet([ScriptTransfer(a.caller, l, unit)])) | |
34 | + | } | |
35 | + | ||
36 | + | ||
37 | + | @Verifier(m) | |
38 | + | func n () = { | |
39 | + | let o = m | |
40 | + | sigVerify(m.bodyBytes, m.proofs[0], m.senderPublicKey) | |
23 | 41 | } | |
24 | 42 |
github/deemru/w8io/169f3d6 39.36 ms ◑