tx · 8uoey7f4qrhoorfPJaNKvh4HGrZUKExBcKhTNAk6aCgx
3Ms8akLnoxa9mwSeWGkMhpowR5zeLQZ9cPT: -0.01400000 Waves
2022.09.10 14:48 [2222977] smart account 3Ms8akLnoxa9mwSeWGkMhpowR5zeLQZ9cPT > SELF 0.00000000 Waves
{
"type": 13,
"id": "8uoey7f4qrhoorfPJaNKvh4HGrZUKExBcKhTNAk6aCgx",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1662810520433,
"version": 2,
"chainId": 84,
"sender": "3Ms8akLnoxa9mwSeWGkMhpowR5zeLQZ9cPT",
"senderPublicKey": "2QxxRX4t27XWvcwhfJbvgoppWbH1rYGfYbFdDtF53Abv",
"proofs": [
"3EhN9VQkDF7fyhZqnS4ofFnebRRen2qaM6YPjs5zyeMTRhxCFnX7WB876xEySnAHDk4vDfHTtdFbmGQYab7ceoNQ"
],
"script": "base64:BgIHCAISAwoBCAEABW93bmVyASAU/1CPvprc+ikrAt+zMDQpSV8vt9KA6ZibikQnPp+iPQEBaQEEdm90ZQEBdgQMZXhpc3RpbmdWb3RlCQCdCAIFBHRoaXMJANgEAQgFAWkPY2FsbGVyUHVibGljS2V5AwkBCWlzRGVmaW5lZAEFDGV4aXN0aW5nVm90ZQkAAgECDUFscmVhZHkgdm90ZWQJAMwIAgkBC1N0cmluZ0VudHJ5AgkA2AQBCAUBaQ9jYWxsZXJQdWJsaWNLZXkFAXYFA25pbAECdHgBBnZlcmlmeQAEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACFFNldFNjcmlwdFRyYW5zYWN0aW9uCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQVvd25lcgMJAAECBQckbWF0Y2gwAhdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgYDCQABAgUHJG1hdGNoMAIPRGF0YVRyYW5zYWN0aW9uBgcIsVdv",
"height": 2222977,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: C54YUT1HojHVjFhEjp69F9DstAeS1Le5M2sg5z3h8VRc
Next: none
Diff:
Old | New | | Differences |
---|
1 | | - | {-# STDLIB_VERSION 5 #-} |
---|
| 1 | + | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let owner = base58'2QxxRX4t27XWvcwhfJbvgoppWbH1rYGfYbFdDtF53Abv' |
---|
5 | 5 | | |
---|
| 6 | + | @Callable(i) |
---|
| 7 | + | func vote (v) = { |
---|
| 8 | + | let existingVote = getString(this, toBase58String(i.callerPublicKey)) |
---|
| 9 | + | if (isDefined(existingVote)) |
---|
| 10 | + | then throw("Already voted") |
---|
| 11 | + | else [StringEntry(toBase58String(i.callerPublicKey), v)] |
---|
| 12 | + | } |
---|
| 13 | + | |
---|
6 | 14 | | |
---|
7 | 15 | | @Verifier(tx) |
---|
8 | 16 | | func verify () = match tx { |
---|
9 | | - | case t: SetScriptTransaction => |
---|
| 17 | + | case _: SetScriptTransaction => |
---|
10 | 18 | | sigVerify(tx.bodyBytes, tx.proofs[0], owner) |
---|
| 19 | + | case _: InvokeScriptTransaction => |
---|
| 20 | + | true |
---|
| 21 | + | case _: DataTransaction => |
---|
| 22 | + | true |
---|
11 | 23 | | case _ => |
---|
12 | 24 | | false |
---|
13 | 25 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | | - | {-# STDLIB_VERSION 5 #-} |
---|
| 1 | + | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let owner = base58'2QxxRX4t27XWvcwhfJbvgoppWbH1rYGfYbFdDtF53Abv' |
---|
5 | 5 | | |
---|
| 6 | + | @Callable(i) |
---|
| 7 | + | func vote (v) = { |
---|
| 8 | + | let existingVote = getString(this, toBase58String(i.callerPublicKey)) |
---|
| 9 | + | if (isDefined(existingVote)) |
---|
| 10 | + | then throw("Already voted") |
---|
| 11 | + | else [StringEntry(toBase58String(i.callerPublicKey), v)] |
---|
| 12 | + | } |
---|
| 13 | + | |
---|
6 | 14 | | |
---|
7 | 15 | | @Verifier(tx) |
---|
8 | 16 | | func verify () = match tx { |
---|
9 | | - | case t: SetScriptTransaction => |
---|
| 17 | + | case _: SetScriptTransaction => |
---|
10 | 18 | | sigVerify(tx.bodyBytes, tx.proofs[0], owner) |
---|
| 19 | + | case _: InvokeScriptTransaction => |
---|
| 20 | + | true |
---|
| 21 | + | case _: DataTransaction => |
---|
| 22 | + | true |
---|
11 | 23 | | case _ => |
---|
12 | 24 | | false |
---|
13 | 25 | | } |
---|
14 | 26 | | |
---|