tx · CdzxdMPGrZUMgn92KFbiHUBv7BvXJDZABBdf6ykgYztq 3N4o2HTw9N9b1aw59zmfmvtSA3uUZTgRMRZ: -0.01400000 Waves 2021.06.09 22:02 [1563230] smart account 3N4o2HTw9N9b1aw59zmfmvtSA3uUZTgRMRZ > SELF 0.00000000 Waves
{ "type": 13, "id": "CdzxdMPGrZUMgn92KFbiHUBv7BvXJDZABBdf6ykgYztq", "fee": 1400000, "feeAssetId": null, "timestamp": 1623265422368, "version": 2, "chainId": 84, "sender": "3N4o2HTw9N9b1aw59zmfmvtSA3uUZTgRMRZ", "senderPublicKey": "ShSztE3JWeTwsqzeYxpBsdD1GNeC5sSL3zbipUmxuR1", "proofs": [ "4NdxjHWEbQkTtWU2bAP8xwf7gwAH7PfoMVxPCKE4mq5cKKPct7LxUdLpzpeebgAVyAMuUx6Jo747x2REbUhMwbu3" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQgAAAAAAAAAAgAAAAFpAQAAAAlSS01UdG9LU1MAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAGc2VuZGVyCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAD3NlbmRlcnB1YmxpY2tleQkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkEAAAABmFzc2V0MQEAAAAg7W6ezmGUnP3O5hqSHS3e4uYtkMJNmB8HvATDD5acfHEEAAAAB3R4bmhhc2gJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAMJAQAAAAIhPQAAAAIIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAAGYXNzZXQxCQAAAgAAAAECAAAAWkluY29ycmVjdCBhc3NldCBhdHRhY2hlZCwgcGxlYXNlIHNlbmQgR3lxVFlEZWEzRFdCYUF5UXM1UzV1SDIyMjN1Y0VMWUZhekpwWkxDZk16blUgKFJLTVQpLgkBAAAACFdyaX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exity": 0 } View: original | compacted Prev: 4LxbFLgt5aKZV9hJE7TpfvkKY2UTbnZcTmPUM59v9Xr4 Next: 3nHbnMhNNhgDWPp5CrktiZhmU4CUSKiu5jQZXXEhA9sU Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | ||
20 | 20 | @Callable(a) | |
21 | 21 | func withdraw (g) = { | |
22 | - | let h = toBase58String(a. | |
22 | + | let h = toBase58String(a.callerPublicKey) | |
23 | 23 | let i = getStringValue(this, (g + "_Sender_pubkey")) | |
24 | 24 | let j = getStringValue(this, (g + "_Sender_AssetID")) | |
25 | 25 | let k = getIntegerValue(this, (g + "_Sender_amount")) | |
26 | - | let l = "GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU" | |
27 | 26 | if ((h != i)) | |
28 | 27 | then throw("You are not an authorized user to Withdraw Funds or Wrong Public Key.") | |
29 | 28 | else if ((0 > k)) | |
32 | 31 | } | |
33 | 32 | ||
34 | 33 | ||
35 | - | @Verifier( | |
36 | - | func | |
37 | - | let | |
38 | - | sigVerify( | |
34 | + | @Verifier(l) | |
35 | + | func m () = { | |
36 | + | let n = l | |
37 | + | sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
39 | 38 | } | |
40 | 39 |
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 RKMTtoKSS () = { | |
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'GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU' | |
12 | 12 | let f = toBase58String(a.transactionId) | |
13 | 13 | if ((b.assetId != e)) | |
14 | 14 | then throw("Incorrect asset attached, please send GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU (RKMT).") | |
15 | 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"), "GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU"), DataEntry((f + "_Sender_Status"), "PENDING")]) | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | ||
20 | 20 | @Callable(a) | |
21 | 21 | func withdraw (g) = { | |
22 | - | let h = toBase58String(a. | |
22 | + | let h = toBase58String(a.callerPublicKey) | |
23 | 23 | let i = getStringValue(this, (g + "_Sender_pubkey")) | |
24 | 24 | let j = getStringValue(this, (g + "_Sender_AssetID")) | |
25 | 25 | let k = getIntegerValue(this, (g + "_Sender_amount")) | |
26 | - | let l = "GyqTYDea3DWBaAyQs5S5uH2223ucELYFazJpZLCfMznU" | |
27 | 26 | if ((h != i)) | |
28 | 27 | then throw("You are not an authorized user to Withdraw Funds or Wrong Public Key.") | |
29 | 28 | else if ((0 > k)) | |
30 | 29 | then throw("fetch amount can't be Zero") | |
31 | 30 | else ScriptResult(WriteSet([DataEntry((g + "_Sender_Status"), "WITHDRAW_COMPLETED"), DataEntry((g + "_Sender_amount"), 0)]), TransferSet([ScriptTransfer(a.caller, k, unit)])) | |
32 | 31 | } | |
33 | 32 | ||
34 | 33 | ||
35 | - | @Verifier( | |
36 | - | func | |
37 | - | let | |
38 | - | sigVerify( | |
34 | + | @Verifier(l) | |
35 | + | func m () = { | |
36 | + | let n = l | |
37 | + | sigVerify(l.bodyBytes, l.proofs[0], l.senderPublicKey) | |
39 | 38 | } | |
40 | 39 |
github/deemru/w8io/169f3d6 44.07 ms ◑