tx · FeWUcEb6KDFQVxRM8a39mbS1vvnKKKc3wGRgzGU5RNj7

3MySAzFQjmcgfhBZvgnBs9DrFHU5ACm6Sfj:  -0.01000000 Waves

2020.05.05 19:29 [985052] smart account 3MySAzFQjmcgfhBZvgnBs9DrFHU5ACm6Sfj > SELF 0.00000000 Waves

{ "type": 13, "id": "FeWUcEb6KDFQVxRM8a39mbS1vvnKKKc3wGRgzGU5RNj7", "fee": 1000000, "feeAssetId": null, "timestamp": 1588696214706, "version": 1, "sender": "3MySAzFQjmcgfhBZvgnBs9DrFHU5ACm6Sfj", "senderPublicKey": "2uJ1bUjEoCbZs6GurQQRMVDb7TQ1z9y4yb4SPxk1xRjx", "proofs": [ "hEwrpyKHgR1G1UwtW7Xuiy7GFA8d2zdnPVbKjaXz1Aq48pzFCW1k32zJvVMTHLwKhKFK6Nq3BYpo8BtfjNB2TgX" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAAAAABBvcmFjbGVBY2NvdW50S2V5AgAAAA1vcmFjbGVBY2NvdW50AAAAAA5sYXN0UHJpY2VJZEtleQIAAAALbGFzdFByaWNlSWQAAAAADW9yYWNsZUFjY291bnQJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwUAAAAQb3JhY2xlQWNjb3VudEtleQAAAAALbGFzdFByaWNlSWQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMFAAAADmxhc3RQcmljZUlkS2V5AAAAAgAAAAFpAQAAAARpbml0AAAAAgAAAAFvAAAACnN0YXJ0UHJpY2UJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEG9yYWNsZUFjY291bnRLZXkFAAAAAW8JAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADmxhc3RQcmljZUlkS2V5AAAAAAAAAAAACQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACAgAAAAEwBQAAAApzdGFydFByaWNlBQAAAANuaWwAAAABaQEAAAAJcG9zdFByaWNlAAAAAQAAAAVwcmljZQMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAANb3JhY2xlQWNjb3VudAkAAAIAAAABAgAAAApkaXNhbGxvd2VkBAAAAApjdXJQcmljZUlkCQAAZAAAAAIFAAAAC2xhc3RQcmljZUlkAAAAAAAAAAABCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAA5sYXN0UHJpY2VJZEtleQUAAAAKY3VyUHJpY2VJZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAAaQAAAABBQAAAApjdXJQcmljZUlkBQAAAAVwcmljZQUAAAADbmlsAAAAAK6lPnw=", "chainId": 84, "height": 985052, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let oracleAccountKey = "oracleAccount"
5+
6+let lastPriceIdKey = "lastPriceId"
7+
8+let oracleAccount = addressFromStringValue(getStringValue(this, oracleAccountKey))
9+
10+let lastPriceId = getIntegerValue(this, lastPriceIdKey)
11+
12+@Callable(i)
13+func init (o,startPrice) = WriteSet([DataEntry(oracleAccountKey, o), DataEntry(lastPriceIdKey, 0), DataEntry("0", startPrice)])
14+
15+
16+
17+@Callable(i)
18+func postPrice (price) = if ((i.caller != oracleAccount))
19+ then throw("disallowed")
20+ else {
21+ let curPriceId = (lastPriceId + 1)
22+ WriteSet([DataEntry(lastPriceIdKey, curPriceId), DataEntry(toString(curPriceId), price)])
23+ }
24+
25+

github/deemru/w8io/026f985 
17.24 ms