tx · BmS46pwbqGWrxsWd138XdaD2uR8jZ7AhC9RLXN5Q2r3Y 3N7cKXykq32Xk6z4jSbECdcjyswJy84iSLZ: -0.05000000 Waves 2019.09.08 09:41 [666765] smart account 3N7cKXykq32Xk6z4jSbECdcjyswJy84iSLZ > SELF 0.00000000 Waves
{ "type": 13, "id": "BmS46pwbqGWrxsWd138XdaD2uR8jZ7AhC9RLXN5Q2r3Y", "fee": 5000000, "feeAssetId": null, "timestamp": 1567924939725, "version": 1, "sender": "3N7cKXykq32Xk6z4jSbECdcjyswJy84iSLZ", "senderPublicKey": "3bC9HyDT8KaxdVq6EzZLqW53SX9MrALqoWf8zBXEBc2R", "proofs": [ "26BJ9Z1JeBxKuVkmAzu8pmxVsm1MKDCNNHCLddPqz1SYunp6rptp1K5bujpzVaHvfH41JTXiyFDiCpwXnEA19AH8" ], "script": "base64:AAIDAAAAAAAAAAAAAAAIAAAAAARob3VyCQAAaAAAAAIAAAAAAAAAADwAAAAAAAAAADwAAAAAEXN0YXJ2ZVRvRGVhdGhUaW1lCQAAaAAAAAIJAABoAAAAAgUAAAAEaG91cgAAAAAAAAAAGAAAAAAAAAAABwAAAAAMYmFua0NvbnRyYWN0CQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNON3FRNGFkazY4czJjcVJuVXpIRlJQUUIySlgxQ1B4aGNOAAAAAA9mZWVkaW5nQ29udHJhY3QJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM043cVE0YWRrNjhzMmNxUm5VekhGUlBRQjJKWDFDUHhoY04AAAAACXBpZ2d5QmFuawkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTjY0dFo0N1JhNFB3OXVGQ1hIeWFITVF6bkJyUXZ4ZzRzQQAAAAAEdHlwZQIAAAADQ2F0AQAAABJub3JtYWxpemVUaW1lc3RhbXAAAAABAAAACXRpbWVzdG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uawgFAAAAA3BtdAAAAAZhbW91bnQIBQAAAANwbXQAAAAHYXNzZXRJZAUAAAADbmlsBAAAAAxmZWVkaW5nUHJpY2UAAAAAAAAAAAEDCQAAZgAAAAIFAAAADGZlZWRpbmdQcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAwSW5zdWZpY2llbnQgYW1vdW50IG9mIFdhdmVzIHRvIGZlZWQgdGhlIGNyZWF0dXJlBAAAAAl0aW1lc3RhbXAJAQAAAANtYXgAAAACBQAAABBjdXJyZW50VGltZXN0YW1wBQAAABRsYXN0RmVlZGluZ1RpbWVzdGFtcAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAICAAAADGxhc3RfZmVlZGluZwkBAAAAEm5vcm1hbGl6ZVRpbWVzdGFtcAAAAAEFAAAACXRpbWVzdGFtcAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGJhbmtDb250cmFjdAgFAAAAA3BtdAAAAAZhbW91bnQFAAAABHVuaXQFAAAAA25pbAAAAADh2WGJ", "chainId": 84, "height": 666765, "spentComplexity": 0 } View: original | compacted Prev: EfvCmhui79eoXCWAdHR6VQmFVBfo2sd7Rv1DLxY7Cd9J Next: 5PVvJbM4NAsKhJfy9zejyhfZPz3mnT7o9vo7Ef2TQx3m Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | else if (isDefined(m.assetId)) | |
50 | 50 | then TransferSet([ScriptTransfer(e, m.amount, m.assetId)]) | |
51 | 51 | else { | |
52 | - | let s = | |
52 | + | let s = 1 | |
53 | 53 | if ((s > m.amount)) | |
54 | 54 | then throw("Insuficient amount of Waves to feed the creature") | |
55 | 55 | else { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = (60 * 60) | |
5 | 5 | ||
6 | 6 | let b = ((a * 24) * 7) | |
7 | 7 | ||
8 | 8 | let c = addressFromStringValue("3N7qQ4adk68s2cqRnUzHFRPQB2JX1CPxhcN") | |
9 | 9 | ||
10 | 10 | let d = addressFromStringValue("3N7qQ4adk68s2cqRnUzHFRPQB2JX1CPxhcN") | |
11 | 11 | ||
12 | 12 | let e = addressFromStringValue("3N64tZ47Ra4Pw9uFCXHyaHMQznBrQvxg4sA") | |
13 | 13 | ||
14 | 14 | let f = "Cat" | |
15 | 15 | ||
16 | 16 | func g (h) = if ((h > b)) | |
17 | 17 | then b | |
18 | 18 | else h | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func i (j,k) = if ((j > k)) | |
22 | 22 | then j | |
23 | 23 | else k | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(l) | |
27 | 27 | func feed () = { | |
28 | 28 | let m = extract(l.payment) | |
29 | 29 | let n = { | |
30 | 30 | let o = blockInfoByHeight(extract(transactionHeightById(l.transactionId))) | |
31 | 31 | if ($isInstanceOf(o, "BlockInfo")) | |
32 | 32 | then { | |
33 | 33 | let p = o | |
34 | 34 | p.timestamp | |
35 | 35 | } | |
36 | 36 | else throw() | |
37 | 37 | } | |
38 | 38 | let q = { | |
39 | 39 | let o = getInteger(this, "last_feeding") | |
40 | 40 | if ($isInstanceOf(o, "Int")) | |
41 | 41 | then { | |
42 | 42 | let r = o | |
43 | 43 | r | |
44 | 44 | } | |
45 | 45 | else (n + (b / 2)) | |
46 | 46 | } | |
47 | 47 | if ((n > (q + b))) | |
48 | 48 | then throw("The creature is dead =(") | |
49 | 49 | else if (isDefined(m.assetId)) | |
50 | 50 | then TransferSet([ScriptTransfer(e, m.amount, m.assetId)]) | |
51 | 51 | else { | |
52 | - | let s = | |
52 | + | let s = 1 | |
53 | 53 | if ((s > m.amount)) | |
54 | 54 | then throw("Insuficient amount of Waves to feed the creature") | |
55 | 55 | else { | |
56 | 56 | let h = i(n, q) | |
57 | 57 | ScriptResult(WriteSet([DataEntry("last_feeding", g(h))]), TransferSet([ScriptTransfer(c, m.amount, unit)])) | |
58 | 58 | } | |
59 | 59 | } | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 |
github/deemru/w8io/169f3d6 34.37 ms ◑