tx · 5QSWyRyEcsk7YJuDqhP7isHa1DCcUYV5askUkMLVfsH5 3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp: -0.01400000 Waves 2021.03.13 12:29 [1435736] smart account 3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp > SELF 0.00000000 Waves
{ "type": 13, "id": "5QSWyRyEcsk7YJuDqhP7isHa1DCcUYV5askUkMLVfsH5", "fee": 1400000, "feeAssetId": null, "timestamp": 1615627775041, "version": 1, "sender": "3N2wcNfEWihUVJV2S6jKwcw3QDupKgXPBnp", "senderPublicKey": "2Ek8QRiW2SC3s4ZC79pXUmvJbmqU6agaNsjN2wmnzmSs", "proofs": [ "5eMNsxz5ufYNSDQbp33ZeDjUrC6ceyi5VGYKfzHCnZgmk5C536AUHYrva4xLGviwEB1txZd2Di6zQDgcY6HvrmH6" ], "script": "base64:AAIEAAAAAAAAAAgIAhIECgIIAQAAAAcAAAAAEWtVc2VyUG9vbFZvdGVTV09QAgAAAAVfdm90ZQAAAAASa1VzZXJUb3RhbFZvdGVTV09QAgAAABVfdXNlcl90b3RhbF9TV09QX3ZvdGUAAAAADWtQb29sVm90ZVNXT1ACAAAACl92b3RlX1NXT1AAAAAADmtUb3RhbFZvdGVTV09QAgAAAA90b3RhbF92b3RlX1NXT1AAAAAAB2dvdkFkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQTpUX1edzu1C+kk914p42uKvNrLVgR210BAAAAFGlzQ2FsbGVySW5Hb3Zlcm5hbmNlAAAAAQAAAAR1c2VyAwMJAABmAAAAAgkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAdnb3ZBZGRyCQABLAAAAAIJAAQlAAAAAQUAAAAEdXNlcgIAAAAMX1NXT1BfYW1vdW50AAAAAAAAAAAAAAAAAAAAAAAABgkAAGYAAAACCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgkABCUAAAABBQAAAAR1c2V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ABpAAAAAEFAAAAFHVzZXJUb3RhbFZvdGVTV09QTmV3CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgUAAAARa1VzZXJQb29sVm90ZVNXT1ACAAAAAV8FAAAAC3Bvb2xBZGRyZXNzBQAAAA9wb29sVm90ZVNXT1BOZXcJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAEmtVc2VyVG90YWxWb3RlU1dPUAUAAAAUdXNlclRvdGFsVm90ZVNXT1BOZXcJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgUAAAALcG9vbEFkZHJlc3MFAAAADWtQb29sVm90ZVNXT1AFAAAAD3Bvb2xWb3RlU1dPUG5ldwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAOa1RvdGFsVm90ZVNXT1AFAAAAEHRvdGFsVm90ZVNXT1BuZXcFAAAAA25pbAAAAAB+M4iz", "chainId": 84, "height": 1435736, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2FkE548WTBBAkDWGGa5d9Rfgs81tYX3GmRvsRQmyRLZG Next: G5fneV7LBZ1Mpo3NptMCfUNmC6FZJahv8bQPQTmqsg1F Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "_vote" | |
5 | 5 | ||
6 | 6 | let b = "_user_total_SWOP_vote" | |
7 | 7 | ||
8 | 8 | let c = "_vote_SWOP" | |
9 | 9 | ||
10 | 10 | let d = "total_vote_SWOP" | |
11 | 11 | ||
12 | 12 | let e = Address(base58'3MqhxbxHEMtp2Rwy1gUb6cPSJHQepdap1Yp') | |
13 | 13 | ||
14 | 14 | func f (g) = if (if ((valueOrElse(getInteger(e, (toString(g) + "_SWOP_amount")), 0) > 0)) | |
15 | 15 | then true | |
16 | 16 | else (valueOrElse(getInteger(this, (toString(g) + b)), 0) > 0)) | |
17 | 17 | then true | |
18 | 18 | else false | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func h (i) = if ((valueOrElse(getInteger(e, (i + "_startHeight")), 0) > 0)) | |
22 | 22 | then true | |
23 | 23 | else false | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(j) | |
27 | 27 | func votePoolWeight (i,k) = if (!(f(j.caller))) | |
28 | 28 | then throw("This address has 0 SWOP in Governance dApp") | |
29 | 29 | else if (!(h(i))) | |
30 | 30 | then throw("This pool has no _startHeight in Governance dApp") | |
31 | 31 | else { | |
32 | 32 | let l = valueOrElse(getInteger(this, (toString(j.caller) + b)), 0) | |
33 | 33 | let m = valueOrElse(getInteger(this, (((toString(j.caller) + a) + "_") + i)), 0) | |
34 | 34 | let n = valueOrElse(getInteger(this, (i + c)), 0) | |
35 | 35 | let o = valueOrElse(getInteger(this, d), 0) | |
36 | 36 | let p = getIntegerValue(e, (toString(j.caller) + "_SWOP_amount")) | |
37 | 37 | let q = (k - m) | |
38 | 38 | let r = (l + q) | |
39 | 39 | let s = (n + q) | |
40 | 40 | let t = (n + q) | |
41 | 41 | if ((p > r)) | |
42 | 42 | then throw(((((toString(this) + " has ") + toString(p)) + "SWOP in governance. New SWOP in voting ") + toString(r))) | |
43 | 43 | else [IntegerEntry((((toString(j.caller) + a) + "_") + i), k), IntegerEntry((toString(j.caller) + b), r), IntegerEntry((i + c), s), IntegerEntry(d, t)] | |
44 | 44 | } | |
45 | 45 | ||
46 | 46 |
github/deemru/w8io/169f3d6 30.50 ms ◑