tx · 8oHgXYgRrJW3nK8ZkE3CqQ7fEiVVzk1ShjLurnKBxwQX

3N5YzdqDE6FDdsLNGXU4G4yrmirb2oiifEc:  -0.01000000 Waves

2022.10.19 14:13 [2279199] smart account 3N5YzdqDE6FDdsLNGXU4G4yrmirb2oiifEc > SELF 0.00000000 Waves

{ "type": 13, "id": "8oHgXYgRrJW3nK8ZkE3CqQ7fEiVVzk1ShjLurnKBxwQX", "fee": 1000000, "feeAssetId": null, "timestamp": 1666178073384, "version": 2, "chainId": 84, "sender": "3N5YzdqDE6FDdsLNGXU4G4yrmirb2oiifEc", "senderPublicKey": "E3rsNDJ7CyVzRYUkm1k4GYLuZYYxzQioRgWedzPYXTSL", "proofs": [ "35vfV3fzPhABYRRAGEn6YkKtM2EaYth9qkjivvgtiRFpTfpa7uTAqSDs7qsrww4k8GzKdgkvKAx9ZD1ZaRbwHhfp" ], "script": "base64:AAIFAAAAAAAAABIIAhIDCgEIEgQKAgEBEgMKAQgAAAAGAAAAAAl2b3RlQXNzZXQBAAAAIC03E4HTJDddn+FvdtPRD5PvLCz03YmtXEpW6HzJAXIbAAAAAA9uZXdQdXJwb3NlUHJpY2UAAAAAAlQL5AAAAAAADHZvdGVEdXJhdGlvbgkAAGgAAAACAAAAAAAAAAAHAAAAAAAAAAWgAAAAAA1uZXdQdXJwb3NlS2V5AgAAAAdwdXJwb3NlAAAAAAxwdXJwb3NlSWRLZXkCAAAACXB1cnBvc2VJZAEAAAALaXNQYXltZW50T2sAAAABAAAAAWkEAAAAEWFjY2VwdGFibGVBc3NldElkBQAAAAl2b3RlQXNzZXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAA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AA9fZmlyc3RWb3RlQmxvY2sFAAAADWZpcnN0Vm90ZUNhc3QJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAA1uZXdQdXJwb3NlS2V5AgAAAAFfCQABpAAAAAEFAAAACXB1cnBvc2VJZAIAAAABXwUAAAAKY3VycmVudEtleQIAAAAQX3dhbGxldFRvdGFsVm90ZQkAAGQAAAACBQAAAAZhbW91bnQFAAAAD3dhbGxldFRvdGFsVm90ZQUAAAADbmlsCQAAAgAAAAECAAAAF25vdGhpbmcgdG8gZG8gbXkgZnJpZW5kAAAAAWkBAAAABkRlbGV0ZQAAAAEAAAAFZW50cnkJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAAFZW50cnkFAAAAA25pbAAAAAD4xdkV", "height": 2279199, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4w2f1F8Q6euT75xyLoeUkKyZNXfCgBzppjffUBQiVkiV Next: DqxG63K5xoEFF5R8BjxZ6dfTZoB8yP2VNptftX2yftze Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS'
55
66 let b = 10000000000
77
88 let c = (7 * 1440)
99
1010 let d = "purpose"
1111
1212 let e = "purposeId"
1313
1414 func f (g) = {
1515 let h = a
1616 if ((size(g.payments) == 0))
1717 then throw("Payment not attached")
1818 else {
1919 let i = g.payments[0]
2020 let j = i.assetId
2121 if ($isInstanceOf(j, "ByteVector"))
2222 then {
2323 let k = j
2424 if ((k == h))
2525 then (i.amount == b)
2626 else false
2727 }
2828 else throw("Wrong payment asset")
2929 }
3030 }
3131
3232
3333 @Callable(g)
3434 func newPurpose (l) = {
3535 let m = size(toBytes(l))
3636 let n = toBase58String(g.caller.bytes)
3737 let o = valueOrElse(getInteger(this, e), 0)
3838 if (if ((m > 200))
3939 then true
4040 else (10 > m))
4141 then throw("Purpose text cannot be more than 200")
4242 else if (!(f(g)))
4343 then throw(("you have to pay " + toString(b)))
4444 else {
4545 let p = height
4646 let q = (height + c)
4747 let r = toBase64String(toBytes(l))
4848 let s = (o + 1)
4949 [StringEntry((((d + "_") + toString(s)) + "_text"), r), IntegerEntry(e, s), StringEntry((((d + "_") + toString(s)) + "_duration"), ((toString(p) + "_") + toString(q))), StringEntry((((d + "_") + toString(s)) + "_owner"), n)]
5050 }
5151 }
5252
5353
5454
5555 @Callable(g)
5656 func vote4EnnoDAO (o,t) = {
5757 let u = valueOrErrorMessage(getString(this, (((d + "_") + toString(o)) + "_duration")), "purpose not found")
5858 let v = split(u, "_")
5959 let p = valueOrElse(parseInt(v[0]), 0)
6060 let q = valueOrElse(parseInt(v[1]), 0)
6161 let n = toBase58String(g.caller.bytes)
6262 if (if ((p > height))
6363 then true
6464 else (height > q))
6565 then throw(("voting period is over for purpose: " + toString(o)))
6666 else if (if ((0 >= t))
6767 then true
6868 else (t > 2))
6969 then throw("vote must be yes or no")
7070 else {
7171 let w = g.payments[0].amount
7272 let x = (height + c)
7373 if (if ((0 >= w))
7474 then true
7575 else (g.payments[0].assetId != a))
7676 then throw("invalid token attached")
7777 else {
7878 let y = valueOrElse(getInteger(this, (((d + "_") + toString(o)) + "_totalVote")), 0)
7979 let z = valueOrElse(getInteger(this, ((((d + "_") + toString(o)) + n) + "_walletTotalVote")), 0)
8080 let A = valueOrElse(getInteger(this, (((((d + "_") + toString(o)) + "_") + n) + "_firstVoteBlock")), height)
8181 if ((t == 1))
8282 then {
8383 let B = valueOrElse(getInteger(this, (((d + "_") + toString(o)) + "_yes")), 0)
8484 let C = valueOrElse(getInteger(this, (((((d + "_") + toString(o)) + "_") + n) + "_yes")), 0)
8585 let D = (B + w)
8686 [IntegerEntry((((((d + "_") + toString(o)) + "_") + n) + "_yes"), (C + w)), IntegerEntry((((d + "_") + toString(o)) + "_yes"), D), IntegerEntry((((d + "_") + toString(o)) + "_totalVote"), (w + y)), IntegerEntry((((((d + "_") + toString(o)) + "_") + n) + "_firstVoteBlock"), A), IntegerEntry((((((d + "_") + toString(o)) + "_") + n) + "_walletTotalVote"), (w + z))]
8787 }
8888 else if ((t == 2))
8989 then {
9090 let E = valueOrElse(getInteger(this, (((d + "_") + toString(o)) + "_no")), 0)
9191 let F = valueOrElse(getInteger(this, (((((d + "_") + toString(o)) + "_") + n) + "_no")), 0)
9292 let D = (E + w)
9393 [IntegerEntry((((((d + "_") + toString(o)) + "_") + n) + "_no"), (F + w)), IntegerEntry((((d + "_") + toString(o)) + "_no"), D), IntegerEntry((((d + "_") + toString(o)) + "_totalVote"), (w + y)), IntegerEntry((((((d + "_") + toString(o)) + "_") + n) + "_firstVoteBlock"), A), IntegerEntry((((((d + "_") + toString(o)) + "_") + n) + "_walletTotalVote"), (w + z))]
9494 }
9595 else throw("nothing to do my friend")
9696 }
9797 }
9898 }
9999
100100
101101
102102 @Callable(g)
103103 func Delete (G) = [DeleteEntry(G)]
104104
105105

github/deemru/w8io/026f985 
26.46 ms