tx · G9s1UWtKRvZpv2H2KcB16kJbkeRZ2VQvMFUkxUU5txsp 3N1kVqVL4USL4Uoy2dEN6Rqk2pXhQgfsqUN: -0.01400000 Waves 2019.09.15 16:33 [677406] smart account 3N1kVqVL4USL4Uoy2dEN6Rqk2pXhQgfsqUN > SELF 0.00000000 Waves
{ "type": 13, "id": "G9s1UWtKRvZpv2H2KcB16kJbkeRZ2VQvMFUkxUU5txsp", "fee": 1400000, "feeAssetId": null, "timestamp": 1568554417179, "version": 1, "sender": "3N1kVqVL4USL4Uoy2dEN6Rqk2pXhQgfsqUN", "senderPublicKey": "6qNq3Wug6srPUuAQrggzvR3nvagzN3AzsR4fABCH1qMm", "proofs": [ "3VG7GKXCQehQaaTdxjnqoF6v5b1gVJ1bR4uJixb58sKscZPjedA8XTHNyZJu27VmVujezUhd3SDh2ZQf5uKfWrse" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAZjcmVhdGUAAAABAAAAAnBrBAAAAAdwYXltZW50CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIIBQAAAAFpAAAAB3BheW1lbnQCAAAAE1doZXJlIGlzIGEgcGF5bWVudD8DCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAB3BheW1lbnQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACRZb3UgY2FuIHVzZSBvbmx5IFdBVkVTIGF0IHRoZSBtb21lbnQEAAAACmNvZGVFeGlzdHMEAAAAByRtYXRjaDAJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACBQAAAAJwawIAAAAFX3VzZWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4EAAAAAWIFAAAAByRtYXRjaDAJAQAAAAEhAAAAAQUAAAABYgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAcJAQAAAAV0aHJvdwAAAAADBQAAAApjb2RlRXhpc3RzCQAAAgAAAAECAAAAD1RoZSBjb2RlIGV4aXN0cw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bGxlcgkAAGQAAAACBQAAAAZhbW91bnQIBQAAAAFpAAAAA2ZlZQUAAAAEdW5pdAUAAAADbmlsAAAAAD0kVE0=", "chainId": 84, "height": 677406, "spentComplexity": 0 } View: original | compacted Prev: 46eWTbMTm2nAfwZk3AAKb3wbtG6gJV6v9DhhDyKmGSEF Next: BGB7PLb3ER7WNHsrj4QHnZrEXMDBEhRgiZ24uW5HXizg Diff:
Old | New | Differences | |
---|---|---|---|
38 | 38 | else (a.feeAssetId != unit)) | |
39 | 39 | then throw("Fee must be less than or equal to 0.005 WAVES") | |
40 | 40 | else { | |
41 | - | let i = sigVerify(a. | |
41 | + | let i = sigVerify(a.callerPublicKey, fromBase58String(g), fromBase58String(b)) | |
42 | 42 | let j = getIntegerValue(this, (b + "_amount")) | |
43 | 43 | ScriptResult(WriteSet([DataEntry((b + "_used"), true)]), TransferSet([ScriptTransfer(a.caller, (j + a.fee), unit)])) | |
44 | 44 | } |
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 create (b) = { | |
8 | 8 | let c = valueOrErrorMessage(a.payment, "Where is a payment?") | |
9 | 9 | if (isDefined(c.assetId)) | |
10 | 10 | then throw("You can use only WAVES at the moment") | |
11 | 11 | else { | |
12 | 12 | let d = { | |
13 | 13 | let e = getBoolean(this, (b + "_used")) | |
14 | 14 | if ($isInstanceOf(e, "Boolean")) | |
15 | 15 | then { | |
16 | 16 | let f = e | |
17 | 17 | !(f) | |
18 | 18 | } | |
19 | 19 | else if ($isInstanceOf(e, "Unit")) | |
20 | 20 | then false | |
21 | 21 | else throw() | |
22 | 22 | } | |
23 | 23 | if (d) | |
24 | 24 | then throw("The code exists") | |
25 | 25 | else WriteSet([DataEntry((b + "_amount"), c.amount), DataEntry((b + "_used"), false)]) | |
26 | 26 | } | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | 31 | @Callable(a) | |
32 | 32 | func withdraw (b,g) = { | |
33 | 33 | let h = valueOrErrorMessage(getBoolean(this, (b + "_used")), "The code doesn't exist") | |
34 | 34 | if (h) | |
35 | 35 | then throw("The code has already been used") | |
36 | 36 | else if (if ((a.fee > 500000)) | |
37 | 37 | then true | |
38 | 38 | else (a.feeAssetId != unit)) | |
39 | 39 | then throw("Fee must be less than or equal to 0.005 WAVES") | |
40 | 40 | else { | |
41 | - | let i = sigVerify(a. | |
41 | + | let i = sigVerify(a.callerPublicKey, fromBase58String(g), fromBase58String(b)) | |
42 | 42 | let j = getIntegerValue(this, (b + "_amount")) | |
43 | 43 | ScriptResult(WriteSet([DataEntry((b + "_used"), true)]), TransferSet([ScriptTransfer(a.caller, (j + a.fee), unit)])) | |
44 | 44 | } | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 |
github/deemru/w8io/026f985 32.63 ms ◑