tx · AKvtQWdNoihHmJfZxPyqaRkW2HsJ4yUccREPgNE4PP9m

3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT:  -0.03000000 Waves

2021.05.20 11:47 [1533777] smart account 3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT > SELF 0.00000000 Waves

{ "type": 13, "id": "AKvtQWdNoihHmJfZxPyqaRkW2HsJ4yUccREPgNE4PP9m", "fee": 3000000, "feeAssetId": null, "timestamp": 1621500519653, "version": 2, "chainId": 84, "sender": "3MqZkBUDKbXPKEq2sMtxtSahzX5n8AVDTyT", "senderPublicKey": "5CSJYiEQvEGm3vH52UCQRkmhw7TV5ZzRhWptXi2hjM7T", "proofs": [ "qaYmHoeR4crgkR1nn3UGKQzDCyD82aqLS7qoYbXUuyFfHZpiFHw3h3K8MU7WYPMLu5ZVCESfeJb5UYGQnczuvbM" ], "script": "base64:AAIDAAAAAAAAACEIARIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAJAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAJaXNNYW5hZ2VyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAGGlzTWVtYmVyc2hpcFdvcmtpbmdHcm91cAAAAAEAAAABYQkAAAAAAAACCQEA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AAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAABAAAAAt2b3RpbmdTdGF0ZQkBAAAADXRyeUdldEludGVnZXIAAAABBQAAAAl2b3RpbmdLZXkEAAAADm5ld1ZvdGluZ1N0YXRlCQAAZAAAAAIFAAAAC3ZvdGluZ1N0YXRlBQAAAAx2b3RlVmFsdWVJbnQDCQEAAAAYaXNNZW1iZXJzaGlwV29ya2luZ0dyb3VwAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkBAAAAHWlzTWVtYmVyc2hpcFZvdGVkRm9yQ2FuZGlkYXRlAAAAAgUAAAARbWVtYmVyc2hpcEFkZHJlc3MFAAAAEGNhbmRpZGF0ZUFkZHJlc3MJAAACAAAAAQIAAAAWWW91IGhhdmUgYWxyZWFkeSB2b3RlZAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAAEW1lbWJlcnNoaXBBZGRyZXNzAgAAAAdfdm90ZWRfBQAAABBjYW5kaWRhdGVBZGRyZXNzAAAAAAAAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAl2b3RpbmdLZXkFAAAADm5ld1ZvdGluZ1N0YXRlCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAh2b3RlZEtleQUAAAAIdm90ZWRWYWwFAAAAA25pbAkAAAIAAAABAgAAABJZb3UgaGF2ZSBubyByaWdodHMAAAAAFHyhsg==", "height": 1533777, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2F57F9kM2cYbt8CaMkCAyV5X5atCV4agp3NJBJcJs9FH Next: DnpksS99tmhBCCDBaXXBU1ZJ4hBQ98wJSNYn5rmFg7Ld Diff:
OldNewDifferences
120120 let newGroup = ((group + ";") + address)
121121 let groupSize = tryGetInteger("dao_mwg_size")
122122 let newGroupSize = (groupSize + 1)
123- WriteSet([DataEntry((("dao_mwg__member_" + address) + "_status"), "approved"), DataEntry("dao_mwg_members", newGroup), DataEntry("dao_mwg_size", newGroupSize)])
123+ WriteSet([DataEntry((("dao_mwg_member_" + address) + "_status"), "approved"), DataEntry("dao_mwg_members", newGroup), DataEntry("dao_mwg_size", newGroupSize)])
124124 }
125125
126126
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetString (key) = {
55 let val = match getString(this, key) {
66 case b: String =>
77 b
88 case _ =>
99 ""
1010 }
1111 val
1212 }
1313
1414
1515 func isManager (address) = (address == this)
1616
1717
1818 func tryGetInteger (key) = {
1919 let val = match getInteger(this, key) {
2020 case b: Int =>
2121 b
2222 case _ =>
2323 0
2424 }
2525 val
2626 }
2727
2828
2929 func isMembershipWorkingGroup (a) = (tryGetString((("membership_" + toString(a)) + "_status")) == "approved")
3030
3131
3232 func isWorkingGroup (a) = (tryGetString((("working_group_" + toString(a)) + "_status")) == "approved")
3333
3434
3535 func isDAOMember (a) = (tryGetString((("dao_member_" + toString(a)) + "_status")) == "approved")
3636
3737
3838 func isMembershipVotedForCandidate (membershipAddress,candidateAddress) = (tryGetInteger(((membershipAddress + "_voted_") + candidateAddress)) > 0)
3939
4040
4141 func getDAOMember () = {
4242 let val = match getString(this, "dao_members") {
4343 case b: String =>
4444 b
4545 case _ =>
4646 ""
4747 }
4848 val
4949 }
5050
5151
5252 func getVoteValue (s) = if ((s == "like"))
5353 then 1
5454 else if ((s == "dislike"))
5555 then -1
5656 else throw(("You need to vote with 'like' or 'dislike' value. You specified:" + s))
5757
5858
5959 @Callable(i)
6060 func aProposeCandidateForDAOMember (address) = if ((tryGetInteger((("member_" + address) + "_voting_state")) != 0))
6161 then throw("This user already exists")
6262 else {
6363 let group = getDAOMember()
6464 let newGroup = ((group + ";") + address)
6565 let groupSize = tryGetInteger("dao_members_size")
6666 let newGroupSize = (groupSize + 1)
6767 WriteSet([DataEntry((("dao_member_" + address) + "_status"), "propose"), DataEntry("dao_members", newGroup), DataEntry("dao_members_size", newGroupSize)])
6868 }
6969
7070
7171
7272 @Callable(i)
7373 func mRejectDAOMember (address) = if (!(isManager(i.caller)))
7474 then throw("access only to the DAO Manager")
7575 else WriteSet([DataEntry((("dao_member_" + address) + "_status"), "rejected")])
7676
7777
7878
7979 @Callable(i)
8080 func mAddDAOMember (address) = if (!(isManager(i.caller)))
8181 then throw("access only to the DAO Manager")
8282 else {
8383 let group = getDAOMember()
8484 let newGroup = ((group + ";") + address)
8585 let groupSize = tryGetInteger("dao_members_size")
8686 let newGroupSize = (groupSize + 1)
8787 WriteSet([DataEntry((("dao_member_" + address) + "_status"), "approved"), DataEntry("dao_members", newGroup), DataEntry("dao_members_size", newGroupSize)])
8888 }
8989
9090
9191
9292 @Callable(i)
9393 func mAddWorkingGroup (address) = if (!(isManager(i.caller)))
9494 then throw("access only to the DAO Manager")
9595 else {
9696 let group = match getString(this, "dao_wg_members") {
9797 case b: String =>
9898 b
9999 case _ =>
100100 ""
101101 }
102102 let newGroup = ((group + ";") + address)
103103 let groupSize = tryGetInteger("dao_wg_size")
104104 let newGroupSize = (groupSize + 1)
105105 WriteSet([DataEntry((("dao_wg_member_" + address) + "_status"), "approved"), DataEntry("dao_wg_members", newGroup), DataEntry("dao_wg_size", newGroupSize)])
106106 }
107107
108108
109109
110110 @Callable(i)
111111 func mAddMembershipWorkingGroup (address) = if (!(isManager(i.caller)))
112112 then throw("access only to the DAO Manager")
113113 else {
114114 let group = match getString(this, "dao_mwg_members") {
115115 case b: String =>
116116 b
117117 case _ =>
118118 ""
119119 }
120120 let newGroup = ((group + ";") + address)
121121 let groupSize = tryGetInteger("dao_mwg_size")
122122 let newGroupSize = (groupSize + 1)
123- WriteSet([DataEntry((("dao_mwg__member_" + address) + "_status"), "approved"), DataEntry("dao_mwg_members", newGroup), DataEntry("dao_mwg_size", newGroupSize)])
123+ WriteSet([DataEntry((("dao_mwg_member_" + address) + "_status"), "approved"), DataEntry("dao_mwg_members", newGroup), DataEntry("dao_mwg_size", newGroupSize)])
124124 }
125125
126126
127127
128128 @Callable(i)
129129 func wmgMembershipVoteForDAOMember (candidateAddress,voteValue) = {
130130 let membershipAddress = toString(i.caller)
131131 let voteValueInt = getVoteValue(voteValue)
132132 let votingKey = (("dao_member_" + candidateAddress) + "_vote")
133133 let votedKey = (("dao_member_" + candidateAddress) + "_voted")
134134 let votedVal = match getString(this, votedKey) {
135135 case b: String =>
136136 b
137137 case _ =>
138138 ""
139139 }
140140 let votingState = tryGetInteger(votingKey)
141141 let newVotingState = (votingState + voteValueInt)
142142 if (isMembershipWorkingGroup(i.caller))
143143 then if (isMembershipVotedForCandidate(membershipAddress, candidateAddress))
144144 then throw("You have already voted")
145145 else WriteSet([DataEntry(((membershipAddress + "_voted_") + candidateAddress), 1), DataEntry(votingKey, newVotingState), DataEntry(votedKey, votedVal)])
146146 else throw("You have no rights")
147147 }
148148
149149

github/deemru/w8io/026f985 
28.06 ms