tx · Hcsw6mWxJA2Np2NKEUjp5wiwo8B128bnhpCuAxS7W1ZZ
3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN: -0.01400000 Waves
2019.07.25 15:14 [601562] smart account 3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN > SELF 0.00000000 Waves
{
"type": 13,
"id": "Hcsw6mWxJA2Np2NKEUjp5wiwo8B128bnhpCuAxS7W1ZZ",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1564056836777,
"version": 1,
"sender": "3NCEnW5hTnRQ7J9TFQsHS4W92f54PCCWQvN",
"senderPublicKey": "8PUyJHGVRUxhY118c4H5isGCGLYgRBmcSzNYooDAqwh",
"proofs": [
"5DXAc7YHxtob8pw7C77zN7mFyHWPq3trd8934ong9wtrPDhXJBc3Gej35qwHNuQxvV5sstAXjXbsbxquFentpjfT"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAdnZXRMb2NrAAAAAQAAAAhsb2NrTmFtZQQAAAACb2sEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwUAAAAIbG9ja05hbWUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAXQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAAXQICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMGCQAAAAAAAAIFAAAAAXQIBQAAAAR0aGlzAAAABWJ5dGVzBAAAAARVbml0BQAAAAckbWF0Y2gwBgMFAAAAAm9rCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAhsb2NrTmFtZQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAADbmlsCQAAAgAAAAECAAAAGUFscmVhZHkgbG9ja2VkIGJ5IGFub3RoZXIAAAABaQEAAAALcmVsZWFzZUxvY2sAAAABAAAACGxvY2tOYW1lBAAAAAJvawQAAAAHJG1hdGNoMAkABBwAAAACBQAAAAR0aGlzBQAAAAhsb2NrTmFtZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAKQnl0ZVZlY3RvcgQAAAABdAUAAAAHJG1hdGNoMAkAAAAAAAACBQAAAAF0CAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAARVbml0BQAAAAckbWF0Y2gwBwMFAAAAAm9rCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAhsb2NrTmFtZQgFAAAABHRoaXMAAAAFYnl0ZXMFAAAAA25pbAkAAAIAAAABAgAAABFMb2NrZWQgYnkgYW5vdGhlcgAAAABjfhrc",
"chainId": 84,
"height": 601562,
"spentComplexity": 0
}
View: original | compacted
Prev: Ddjn6f6shy9Hh1GnawgUucDcNCN9np8dMhE517RrGa2L
Next: EvN6hmusa3tRNqPWBcGf53Z63wBvFAphHg5htwhaQ4Bm
Diff:
Old | New | | Differences |
---|
7 | 7 | | func getLock (lockName) = { |
---|
8 | 8 | | let ok = match getBinary(this, lockName) { |
---|
9 | 9 | | case t: ByteVector => |
---|
10 | | - | if ((t != i.caller.bytes)) |
---|
| 10 | + | if ((t == i.caller.bytes)) |
---|
11 | 11 | | then true |
---|
12 | 12 | | else (t == this.bytes) |
---|
13 | 13 | | case Unit => |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func getLock (lockName) = { |
---|
8 | 8 | | let ok = match getBinary(this, lockName) { |
---|
9 | 9 | | case t: ByteVector => |
---|
10 | | - | if ((t != i.caller.bytes)) |
---|
| 10 | + | if ((t == i.caller.bytes)) |
---|
11 | 11 | | then true |
---|
12 | 12 | | else (t == this.bytes) |
---|
13 | 13 | | case Unit => |
---|
14 | 14 | | true |
---|
15 | 15 | | } |
---|
16 | 16 | | if (ok) |
---|
17 | 17 | | then WriteSet([DataEntry(lockName, i.caller.bytes)]) |
---|
18 | 18 | | else throw("Already locked by another") |
---|
19 | 19 | | } |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | @Callable(i) |
---|
24 | 24 | | func releaseLock (lockName) = { |
---|
25 | 25 | | let ok = match getBinary(this, lockName) { |
---|
26 | 26 | | case t: ByteVector => |
---|
27 | 27 | | (t == i.caller.bytes) |
---|
28 | 28 | | case Unit => |
---|
29 | 29 | | false |
---|
30 | 30 | | } |
---|
31 | 31 | | if (ok) |
---|
32 | 32 | | then WriteSet([DataEntry(lockName, this.bytes)]) |
---|
33 | 33 | | else throw("Locked by another") |
---|
34 | 34 | | } |
---|
35 | 35 | | |
---|
36 | 36 | | |
---|