tx · 8HLEwWkBP4ym9A2RGGSUNX8VjYswX2FLiBRkgtniDhTe 3MqpRA12epGbUr77DaY49oG6vThLgDfYAqu: -0.01000000 Waves 2022.06.02 14:12 [2078634] smart account 3MqpRA12epGbUr77DaY49oG6vThLgDfYAqu > SELF 0.00000000 Waves
{ "type": 13, "id": "8HLEwWkBP4ym9A2RGGSUNX8VjYswX2FLiBRkgtniDhTe", "fee": 1000000, "feeAssetId": null, "timestamp": 1654168398924, "version": 2, "chainId": 84, "sender": "3MqpRA12epGbUr77DaY49oG6vThLgDfYAqu", "senderPublicKey": "5zTdxm2C13mhCkkD8hK2mjmPyKaS4qvJ3iSNYSgDFUsZ", "proofs": [ "21bH33QwiLZ1e6FTJNH8veBC3yPQewRuGmXFmyUa37nZzhbMkxoaVUqdF5ojXiwbUsnfkhuR59fGfhHe1BAxu3Jr" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgUKAwgBAgAAAAoAAAAADGxvY2tpbmdTdG9yZQIAAAAMbG9ja2luZ1N0b3JlAQAAAARnZXRJAAAAAQAAAANrZXkJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAARnZXRTAAAAAQAAAANrZXkJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAAVnZXRJVgAAAAEAAAADa2V5CQEAAAAFdmFsdWUAAAABCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAFZ2V0U1YAAAABAAAAA2tleQkBAAAABXZhbHVlAAAAAQkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkBAAAACHdyaXRlSW50AAAAAgAAAANrZXkAAAAFdmFsdWUDCQAAZgAAAAIAAAAAAAAAAAAFAAAABXZhbHVlCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAF3dyaXRpbmcgbmVnYXRpdmUgdmFsdWUgCQABpAAAAAEFAAAABXZhbHVlAgAAAAkgZm9yIGtleSAFAAAAA2tleQkBAAAADEludGVnZXJFbnRyeQ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nAAAAAgUAAAAMbG9ja2luZ1N0b3JlBQAAAA1wTG9ja2luZ1N0b3JlBQAAAANuaWwAAAABaQEAAAAQdHJhbnNmZXJJbnRlcmVzdAAAAAMAAAAEdXNlcgAAAAZhbW91bnQAAAAHYXNzZXRJRAQAAAAGY2hlY2tzCQEAAAAQbG9ja2luZ1N0b3JlT25seQAAAAEFAAAAAWkDCQAAAAAAAAIFAAAABmNoZWNrcwUAAAAGY2hlY2tzCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABHVzZXIFAAAABmFtb3VudAUAAAAHYXNzZXRJRAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAAI3Eri", "height": 2078634, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: fhqpcfiB5g4n7KPn3yQ7GXSyLdik54Vs7ZowXpGtz1z Next: 356sQahzvBgozx3ijCuH6SALVRhPtG9EzsZANw2hfpLd Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lockingStore = "lockingStore" | |
5 | 5 | ||
6 | 6 | func getI (key) = getInteger(this, key) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func getS (key) = getString(this, key) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func getIV (key) = value(getInteger(this, key)) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getSV (key) = value(getString(this, key)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func writeInt (key,value) = if ((0 > value)) | |
19 | 19 | then throw(((("writing negative value " + toString(value)) + " for key ") + key)) | |
20 | 20 | else IntegerEntry(key, value) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func writeStr (key,value) = if ((" " == value)) | |
24 | 24 | then throw(("writing an empty string " + value)) | |
25 | 25 | else StringEntry(key, value) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func writeConstString (key,value) = if (!(isDefined(getS(key)))) | |
29 | 29 | then writeStr(key, value) | |
30 | 30 | else throw(("already initialized: " + key)) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func writeConstInteger (key,value) = if (!(isDefined(getS(key)))) | |
34 | 34 | then writeInt(key, value) | |
35 | 35 | else throw(("already initialized: " + key)) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func lockingStoreOnly (i) = if ((toString(i.caller) != valueOrElse(getString(this, lockingStore), "no store address"))) | |
39 | 39 | then throw("only the staker contract can call this function") | |
40 | 40 | else true | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(i) | |
44 | 44 | func init (pLockingStore) = [writeConstString(lockingStore, pLockingStore)] | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | ||
48 | 48 | @Callable(i) | |
49 | 49 | func transferInterest (user,amount,assetID) = { | |
50 | 50 | let checks = lockingStoreOnly(i) | |
51 | 51 | if ((checks == checks)) | |
52 | 52 | then [ScriptTransfer(addressFromStringValue(user), amount, assetID)] | |
53 | 53 | else throw("Strict value is not equal to itself.") | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 |
github/deemru/w8io/169f3d6 38.39 ms ◑