tx · 2LXaKnU9uus7CRZkBh5uJWfm33XMtp67mz2DzBQ4wvhV
3N2CKLSSEsU5Ytj5w6CURQTVkzdNcaD9GPv: -0.01400000 Waves
2019.10.04 10:23 [704673] smart account 3N2CKLSSEsU5Ytj5w6CURQTVkzdNcaD9GPv > SELF 0.00000000 Waves
{
"type": 13,
"id": "2LXaKnU9uus7CRZkBh5uJWfm33XMtp67mz2DzBQ4wvhV",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1570173715611,
"version": 1,
"sender": "3N2CKLSSEsU5Ytj5w6CURQTVkzdNcaD9GPv",
"senderPublicKey": "HmX87ap8ShKCco9BEfKehDeQCSkWDnCNxmUB9b3aqeJF",
"proofs": [
"kS3NQVWsZYsTTSVyo3iksftTf5Tdt4woLens8XeAn1es76MJ8SNAJqZGdsDvLfroRsQkL8CrtUUfr56NY4pk6qi"
],
"script": "base64:AAIDAAAAAAAAAAAAAAABAAAAAA5vd25lclB1YmxpY0tleQEAAAAg+SKbMFCHyxmmgw+kRua20OvDubqU5gXs1g6PBtRBVGwAAAABAAAAAWkBAAAABHZvdGUAAAABAAAAB3RoZVZvdGUEAAAAD2RhdGFGcm9tU3RvcmFnZQkABB0AAAACBQAAAAR0aGlzCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMJAQAAAAlpc0RlZmluZWQAAAABBQAAAA9kYXRhRnJvbVN0b3JhZ2UJAAACAAAAAQIAAABh0JLRiyDRg9C20LUg0LPQvtC70L7RgdC+0LLQsNC70LghINCf0L7QstGC0L7RgNC+0L3QvtC1INCz0L7Qu9C+0YHQvtCy0LDQvdC40LUg0LfQsNC/0YDQtdGJ0LXQvdC+LgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAAlgAAAABCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAAB3RoZVZvdGUFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGB/Dzzpg=",
"chainId": 84,
"height": 704673,
"spentComplexity": 0
}
View: original | compacted
Prev: EMoyaPo3igsFA7rf4Wk27jhHb6Cc5EK97kSBhmgvPP6f
Next: 8cpdQhhw2RHzb9ju4vKVwRT5c5PooudtWatRNg7McxUt
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | |
---|
| 4 | + | let ownerPublicKey = base58'HmX87ap8ShKCco9BEfKehDeQCSkWDnCNxmUB9b3aqeJF' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func vote (theVote) = { |
---|
|
12 | 12 | | } |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
| 15 | + | @Verifier(tx) |
---|
| 16 | + | func verify () = match tx { |
---|
| 17 | + | case t: SetScriptTransaction => |
---|
| 18 | + | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey) |
---|
| 19 | + | case d: DataTransaction => |
---|
| 20 | + | true |
---|
| 21 | + | case _ => |
---|
| 22 | + | false |
---|
| 23 | + | } |
---|
| 24 | + | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | |
---|
| 4 | + | let ownerPublicKey = base58'HmX87ap8ShKCco9BEfKehDeQCSkWDnCNxmUB9b3aqeJF' |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(i) |
---|
7 | 7 | | func vote (theVote) = { |
---|
8 | 8 | | let dataFromStorage = getString(this, toBase58String(i.callerPublicKey)) |
---|
9 | 9 | | if (isDefined(dataFromStorage)) |
---|
10 | 10 | | then throw("Вы уже голосовали! Повтороное голосование запрещено.") |
---|
11 | 11 | | else WriteSet([DataEntry(toBase58String(i.callerPublicKey), theVote)]) |
---|
12 | 12 | | } |
---|
13 | 13 | | |
---|
14 | 14 | | |
---|
| 15 | + | @Verifier(tx) |
---|
| 16 | + | func verify () = match tx { |
---|
| 17 | + | case t: SetScriptTransaction => |
---|
| 18 | + | sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublicKey) |
---|
| 19 | + | case d: DataTransaction => |
---|
| 20 | + | true |
---|
| 21 | + | case _ => |
---|
| 22 | + | false |
---|
| 23 | + | } |
---|
| 24 | + | |
---|