tx · yc97PsrZuyjsZSQYTXJcEsuuCqH8ExS8ynCjZKfNNDk 3N8bFgGAcpHq16dVYvjKD4cDEk4PbKwnx8j: -0.01000000 Waves 2019.11.03 10:36 [748411] smart account 3N8bFgGAcpHq16dVYvjKD4cDEk4PbKwnx8j > SELF 0.00000000 Waves
{ "type": 13, "id": "yc97PsrZuyjsZSQYTXJcEsuuCqH8ExS8ynCjZKfNNDk", "fee": 1000000, "feeAssetId": null, "timestamp": 1572766640030, "version": 1, "sender": "3N8bFgGAcpHq16dVYvjKD4cDEk4PbKwnx8j", "senderPublicKey": "DCmgu7g8zeogV1b7VfHzjun6P4fgi1eYbqyyMB41oigh", "proofs": [ "4cgRYnxPkMC31RBj62MiAZcjuNpnZCFyjntwBbRJVtFt48nXN1ANXnZAp32wEcN38UhCEoHneyPX4SHZDVxzEik8" ], "script": "base64:AAIDAAAAAAAAAA8IARIGCgQICAEIEgMKAQgAAAAAAAAAAgAAAAFpAQAAAAxlbnJvbGxFbXBQYXkAAAAEAAAACGVtcGxveWVlAAAABWVtcElkAAAABmFtb3VudAAAAAtkZXNjcmlwdGlvbgMDCQAAAAAAAAIFAAAABHRoaXMIBQAAAAFpAAAABmNhbGxlcgkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQkABBsAAAACBQAAAAR0aGlzCQABLAAAAAIFAAAACGVtcGxveWVlAgAAAAZfc3RhdGUHCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACGVtcGxveWVlAgAAAAZfc3RhdGUCAAAACGVucm9sbGVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACGVtcGxveWVlAgAAAANfaWQFAAAABWVtcElkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAACGVtcGxveWVlAgAAAAdfYW1vdW50BQAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRy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AAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAGbAAAAAQUAAAAIZW1wbG95ZWUFAAAABmFtb3VudAUAAAAEdW5pdAUAAAADbmlsCQAAAgAAAAECAAAAFUVtcGxveWVlIG5vdCBlbnJvbGxlZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAGOKYCbQ==", "chainId": 84, "height": 748411, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(a) | |
7 | + | func enrollEmpPay (b,c,d,e) = if (if ((this == a.caller)) | |
8 | + | then !(isDefined(getBoolean(this, (b + "_state")))) | |
9 | + | else false) | |
10 | + | then WriteSet([DataEntry((b + "_state"), "enrolled"), DataEntry((b + "_id"), c), DataEntry((b + "_amount"), d), DataEntry((b + "_description"), e), DataEntry((b + "_enrolledBy"), toBase58String(a.caller.bytes))]) | |
11 | + | else throw((("Pay for " + b) + " has already been enrolled or caller is not dApp owner")) | |
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | @Callable(a) | |
16 | + | func payEmp (b) = { | |
17 | + | let f = toBase58String(a.caller.bytes) | |
18 | + | let g = { | |
19 | + | let h = getString(this, (b + "_state")) | |
20 | + | if ($isInstanceOf(h, "Unit")) | |
21 | + | then { | |
22 | + | let i = h | |
23 | + | "unset" | |
24 | + | } | |
25 | + | else if ($isInstanceOf(h, "String")) | |
26 | + | then { | |
27 | + | let i = h | |
28 | + | i | |
29 | + | } | |
30 | + | else throw() | |
31 | + | } | |
32 | + | let d = extract(getInteger(this, (b + "_amount"))) | |
33 | + | if ((g == "enrolled")) | |
34 | + | then ScriptResult(WriteSet([DataEntry((b + "_paidBy"), f)]), TransferSet([ScriptTransfer(Address(toBytes(b)), d, unit)])) | |
35 | + | else throw("Employee not enrolled") | |
36 | + | } | |
37 | + | ||
38 | + | ||
39 | + | @Verifier(j) | |
40 | + | func k () = true | |
41 | + |
github/deemru/w8io/169f3d6 22.23 ms ◑