tx · 8g2kQ9eLnVZA1YU4G24NHEQAJQ63gtRVacHafp6gFV21 3N8oGmoNZRYR4iA9586cGgVoFPTPnbKcNds: -0.01400000 Waves 2022.03.05 17:48 [1950805] smart account 3N8oGmoNZRYR4iA9586cGgVoFPTPnbKcNds > SELF 0.00000000 Waves
{ "type": 13, "id": "8g2kQ9eLnVZA1YU4G24NHEQAJQ63gtRVacHafp6gFV21", "fee": 1400000, "feeAssetId": null, "timestamp": 1646491824270, "version": 2, "chainId": 84, "sender": "3N8oGmoNZRYR4iA9586cGgVoFPTPnbKcNds", "senderPublicKey": "CcnrRKYzgAP4VNysQhGczok7xWdHDnijupPd8nTfV8BE", "proofs": [ "56WZBjQ1jSEKRCBFxbMhwHd6qgDuCGt7bsbhydVrGRh9gpqJLLU4CRPvVkFkNAT6KxBjZcts9jSbZaZ3f5LTGrB" ], "script": "base64:AAIDAAAAAAAAAAQIARIAAAAAAAAAAAEAAAABaQEAAAAEU2VuZAAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAZzZW5kZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAPc2VuZGVycHVibGlja2V5CQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQQAAAAGYXNzZXQxAQAAACAIZYS3D/CKahrz4mjoLgiQJMPTJ1gDzSz2Ll4L39oVpAQAAAAHdHhuaGFzaAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkAwkBAAAAAiE9AAAAAggFAAAAA3BtdAAAAAdhc3NldElkBQAAAAZhc3NldDEJAAACAAAAAQIAAABSSW5jb3JyZWN0IGFzc2V0IGF0dGFjaGVkLCBwbGVhc2Ugc2VuZCBabjNjTEhXN2FBVlBtNWFBQ2NUanZnN2U3aUV5MmNLRHRib3dvazVxYTlILgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAMU2VuZGVyX1R4bklEBQAAAAd0eG5oYXNoCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAAB3R4bmhhc2gCAAAAD19TZW5kZXJfQWRkcmVzcwUAAAAGc2VuZGVyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAAB3R4bmhhc2gCAAAADl9TZW5kZXJfcHVia2V5BQAAAA9zZW5kZXJwdWJsaWNrZXkJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAHdHhuaGFzaAIAAAAOX1NlbmRlcl9hbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAAB3R4bmhhc2gCAAAAD19TZW5kZXJfQXNzZXRJRAIAAAArWm4zY0xIVzdhQVZQbTVhQUNjVGp2ZzdlN2lFeTJjS0R0Ym93b2s1cWE5SAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAd0eG5oYXNoAgAAAA5fU2VuZGVyX1N0YXR1cwIAAAAHUEVORElORwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5cbYmFA==", "height": 1950805, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HBxEonqYeSh7jbvree28uKWFh9N1qWRJTMSGzk33aLjH Next: FrW8fdgCb3cJYSPoqeC9Zui2A8UQyJxKFNJQtkmt7oGi Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | let asset1 = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
12 | 12 | let txnhash = toBase58String(i.transactionId) | |
13 | 13 | if ((pmt.assetId != asset1)) | |
14 | - | then throw(("Incorrect asset attached, please send " + toBase58String(asset1))) | |
15 | - | else if ((pmt.amount > 1000000)) | |
16 | - | then throw("Use Less Amount to Attach.") | |
17 | - | else WriteSet([DataEntry("Sender_TxnID", txnhash), DataEntry((txnhash + "_Sender_Address"), sender), DataEntry((txnhash + "_Sender_pubkey"), senderpublickey), DataEntry((txnhash + "_Sender_amount"), pmt.amount), DataEntry((txnhash + "_Sender_AssetID"), asset1), DataEntry((txnhash + "_Sender_Status"), "PENDING")]) | |
18 | - | } | |
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | @Callable(i) | |
23 | - | func Claim (TransactionHash) = { | |
24 | - | let currentKey = toBase58String(i.callerPublicKey) | |
25 | - | let fetchcurrentKey = getStringValue(this, (TransactionHash + "_Sender_pubkey")) | |
26 | - | let fetchAssetID = getStringValue(this, (TransactionHash + "_Sender_AssetID")) | |
27 | - | let fetchAmount = getIntegerValue(this, (TransactionHash + "_Sender_amount")) | |
28 | - | let ActualAmount = fraction(100, fetchAmount, 1) | |
29 | - | if ((currentKey != fetchcurrentKey)) | |
30 | - | then throw("You are not an authorized user to Withdraw Funds or Wrong Public Key.") | |
31 | - | else if ((fetchAmount == 0)) | |
32 | - | then throw("You Already Have Withdraw Funds from This TxnID.") | |
33 | - | else ScriptResult(WriteSet([DataEntry((TransactionHash + "_Sender_Status"), "WITHDRAW_COMPLETED"), DataEntry((TransactionHash + "_Sender_amount"), 0)]), TransferSet([ScriptTransfer(i.caller, ActualAmount, unit)])) | |
14 | + | then throw("Incorrect asset attached, please send Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H.") | |
15 | + | else WriteSet([DataEntry("Sender_TxnID", txnhash), DataEntry((txnhash + "_Sender_Address"), sender), DataEntry((txnhash + "_Sender_pubkey"), senderpublickey), DataEntry((txnhash + "_Sender_amount"), pmt.amount), DataEntry((txnhash + "_Sender_AssetID"), "Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H"), DataEntry((txnhash + "_Sender_Status"), "PENDING")]) | |
34 | 16 | } | |
35 | 17 | ||
36 | 18 |
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(i) | |
7 | 7 | func Send () = { | |
8 | 8 | let pmt = extract(i.payment) | |
9 | 9 | let sender = toBase58String(i.caller.bytes) | |
10 | 10 | let senderpublickey = toBase58String(i.callerPublicKey) | |
11 | 11 | let asset1 = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
12 | 12 | let txnhash = toBase58String(i.transactionId) | |
13 | 13 | if ((pmt.assetId != asset1)) | |
14 | - | then throw(("Incorrect asset attached, please send " + toBase58String(asset1))) | |
15 | - | else if ((pmt.amount > 1000000)) | |
16 | - | then throw("Use Less Amount to Attach.") | |
17 | - | else WriteSet([DataEntry("Sender_TxnID", txnhash), DataEntry((txnhash + "_Sender_Address"), sender), DataEntry((txnhash + "_Sender_pubkey"), senderpublickey), DataEntry((txnhash + "_Sender_amount"), pmt.amount), DataEntry((txnhash + "_Sender_AssetID"), asset1), DataEntry((txnhash + "_Sender_Status"), "PENDING")]) | |
18 | - | } | |
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | @Callable(i) | |
23 | - | func Claim (TransactionHash) = { | |
24 | - | let currentKey = toBase58String(i.callerPublicKey) | |
25 | - | let fetchcurrentKey = getStringValue(this, (TransactionHash + "_Sender_pubkey")) | |
26 | - | let fetchAssetID = getStringValue(this, (TransactionHash + "_Sender_AssetID")) | |
27 | - | let fetchAmount = getIntegerValue(this, (TransactionHash + "_Sender_amount")) | |
28 | - | let ActualAmount = fraction(100, fetchAmount, 1) | |
29 | - | if ((currentKey != fetchcurrentKey)) | |
30 | - | then throw("You are not an authorized user to Withdraw Funds or Wrong Public Key.") | |
31 | - | else if ((fetchAmount == 0)) | |
32 | - | then throw("You Already Have Withdraw Funds from This TxnID.") | |
33 | - | else ScriptResult(WriteSet([DataEntry((TransactionHash + "_Sender_Status"), "WITHDRAW_COMPLETED"), DataEntry((TransactionHash + "_Sender_amount"), 0)]), TransferSet([ScriptTransfer(i.caller, ActualAmount, unit)])) | |
14 | + | then throw("Incorrect asset attached, please send Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H.") | |
15 | + | else WriteSet([DataEntry("Sender_TxnID", txnhash), DataEntry((txnhash + "_Sender_Address"), sender), DataEntry((txnhash + "_Sender_pubkey"), senderpublickey), DataEntry((txnhash + "_Sender_amount"), pmt.amount), DataEntry((txnhash + "_Sender_AssetID"), "Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H"), DataEntry((txnhash + "_Sender_Status"), "PENDING")]) | |
34 | 16 | } | |
35 | 17 | ||
36 | 18 | ||
37 | 19 | @Verifier(tx) | |
38 | 20 | func verify () = match tx { | |
39 | 21 | case _ => | |
40 | 22 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
41 | 23 | } | |
42 | 24 |
github/deemru/w8io/026f985 26.66 ms ◑