tx · D1cnBVk7CdnsmhyNrbEjWpwDUCZv5dkzSMefLHCd4M7Z

3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN:  -0.01400000 Waves

2020.02.06 13:10 [887206] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves

{ "type": 13, "id": "D1cnBVk7CdnsmhyNrbEjWpwDUCZv5dkzSMefLHCd4M7Z", "fee": 1400000, "feeAssetId": null, "timestamp": 1580983786857, "version": 1, "sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh", "proofs": [ "5sq9dKpQs3ofEu4fhD3bz4KRZD5vWjHdAPuzLwTEF9evBG6ASHjjedoHh2xGdniP1wdfHS3MMY36LMt8J59z1PLP" ], "script": "base64:AAIDAAAAAAAAAAcIARIDCgEIAAAAAQAAAAAQYWxsb3dlZEFkZHJlc3NlcwkABEwAAAACAgAAACMzTkNFblc1aFRuUlE3SjlURlFzSFM0VzkyZjU0UENDV1F2TgkABEwAAAACAgAAACMzTjdqaDJIenJBR2hYTkN0Nml2V0NlSjMyNW95N3hmVVZtRwUAAAADbmlsAAAAAQAAAAFpAQAAABR0cnlHZXQ2MDBTZWNvbmRzTG9jawAAAAEAAAAIbG9ja05hbWUEAAAADWxvY2tVbnRpbE5hbWUJAAEsAAAAAgUAAAAIbG9ja05hbWUCAAAABi91bnRpbAoBAAAAHmNoZWNrT25lQWxsb3dlZEFkZGVyZXNzZXNFbnRyeQAAAAIAAAAFZm91bmQAAAAHYWRkcmVzcwMFAAAABWZvdW5kBgkAAAAAAAACCAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAdhZGRyZXNzAAAABWJ5dGVzCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAA1pbkFsbG93ZWRMaXN0BAAAAAskbGlzdDQ2NzUzMQUAAAA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1hdGNoMAUAAAABYggIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAALbG9ja2VkVW50aWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAANbG9ja1VudGlsTmFtZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAV1bnRpbAUAAAAHJG1hdGNoMAUAAAAFdW50aWwAAAAAAAAAAAAEAAAAB2NhbkxvY2sDCQAAZgAAAAIFAAAAA25vdwUAAAALbG9ja2VkVW50aWwGCQAAAAAAAAIFAAAACGxvY2tlZEJ5CAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwUAAAAHY2FuTG9jawkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAIbG9ja05hbWUICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADWxvY2tVbnRpbE5hbWUJAABkAAAAAgUAAAADbm93AAAAAAAACSfABQAAAANuaWwJAAACAAAAAQIAAAAZQWxyZWFkeSBsb2NrZWQgYnkgYW5vdGhlcgAAAAAJ3ZAC", "chainId": 84, "height": 887206, "spentComplexity": 0 } View: original | compacted Prev: W8MCsbjMoyEDj4vhLsWUZRoSHm6CNzo6doWc9v5WCZ2 Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let allowedAddresses = ["3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "3N7jh2HzrAGhXNCt6ivWCeJ325oy7xfUVmG"]
55
66 @Callable(i)
77 func tryGet600SecondsLock (lockName) = {
88 let lockUntilName = (lockName + "/until")
9+ func checkOneAllowedAdderessesEntry (found,address) = if (found)
10+ then true
11+ else (addressFromStringValue(address).bytes == i.caller.bytes)
12+
13+ let inAllowedList = {
14+ let $list467531 = allowedAddresses
15+ let $size467531 = size($list467531)
16+ let $acc0467531 = false
17+ if (($size467531 == 0))
18+ then $acc0467531
19+ else {
20+ let $acc1467531 = checkOneAllowedAdderessesEntry($acc0467531, $list467531[0])
21+ if (($size467531 == 1))
22+ then $acc1467531
23+ else {
24+ let $acc2467531 = checkOneAllowedAdderessesEntry($acc1467531, $list467531[1])
25+ if (($size467531 == 2))
26+ then $acc2467531
27+ else {
28+ let $acc3467531 = checkOneAllowedAdderessesEntry($acc2467531, $list467531[2])
29+ throw("List size exceed 2")
30+ }
31+ }
32+ }
33+ }
934 let now = match blockInfoByHeight(height) {
1035 case b: BlockInfo =>
1136 b.timestamp
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let allowedAddresses = ["3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN", "3N7jh2HzrAGhXNCt6ivWCeJ325oy7xfUVmG"]
55
66 @Callable(i)
77 func tryGet600SecondsLock (lockName) = {
88 let lockUntilName = (lockName + "/until")
9+ func checkOneAllowedAdderessesEntry (found,address) = if (found)
10+ then true
11+ else (addressFromStringValue(address).bytes == i.caller.bytes)
12+
13+ let inAllowedList = {
14+ let $list467531 = allowedAddresses
15+ let $size467531 = size($list467531)
16+ let $acc0467531 = false
17+ if (($size467531 == 0))
18+ then $acc0467531
19+ else {
20+ let $acc1467531 = checkOneAllowedAdderessesEntry($acc0467531, $list467531[0])
21+ if (($size467531 == 1))
22+ then $acc1467531
23+ else {
24+ let $acc2467531 = checkOneAllowedAdderessesEntry($acc1467531, $list467531[1])
25+ if (($size467531 == 2))
26+ then $acc2467531
27+ else {
28+ let $acc3467531 = checkOneAllowedAdderessesEntry($acc2467531, $list467531[2])
29+ throw("List size exceed 2")
30+ }
31+ }
32+ }
33+ }
934 let now = match blockInfoByHeight(height) {
1035 case b: BlockInfo =>
1136 b.timestamp
1237 case _ =>
1338 0
1439 }
1540 let lockedBy = match getBinary(this, lockName) {
1641 case b: ByteVector =>
1742 b
1843 case _ =>
1944 i.caller.bytes
2045 }
2146 let lockedUntil = match getInteger(this, lockUntilName) {
2247 case until: Int =>
2348 until
2449 case _ =>
2550 0
2651 }
2752 let canLock = if ((now > lockedUntil))
2853 then true
2954 else (lockedBy == i.caller.bytes)
3055 if (canLock)
3156 then WriteSet([DataEntry(lockName, i.caller.bytes), DataEntry(lockUntilName, (now + 600000))])
3257 else throw("Already locked by another")
3358 }
3459
3560

github/deemru/w8io/026f985 
42.65 ms