tx · 7f4vParKhQUsPFZP4FRWDJgjwzhB8e7uhjTcYL6SwsZ

3N97iacRapbKQMwDxobcwAvNk8WSb3TPwjx:  -0.01400000 Waves

2021.02.11 19:11 [1393735] smart account 3N97iacRapbKQMwDxobcwAvNk8WSb3TPwjx > SELF 0.00000000 Waves

{ "type": 13, "id": "7f4vParKhQUsPFZP4FRWDJgjwzhB8e7uhjTcYL6SwsZ", "fee": 1400000, "feeAssetId": null, "timestamp": 1613059917291, "version": 1, "sender": "3N97iacRapbKQMwDxobcwAvNk8WSb3TPwjx", "senderPublicKey": "6RttBzUchMjQFMqxH2grVxeG8ERZuE7pWYnGiuC2yrJu", "proofs": [ "2Nczj5nB8yqFExNib3PzifxGpDVCJJn4R4idq5RGyBubNfnsXBQK1N6H8eCnWpaEiBP8YgUKNGggiD776wPR3S9X" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQgAAAAHAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAEAAAAHaXNPd25lcgAAAAEAAAAHYWRkcmVzcwkAAAAAAAACBQAAAAdhZGRyZXNzBQAAAAR0aGlzAQAAAAhnZXRHcm91cAAAAAAEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzAgAAABV3b3JraW5nX2dyb3VwX21lbWJlcnMDCQAAAQAAA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IFAAAACWdyb3VwU2l6ZQAAAAAAAAAAAQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAAVd29ya2luZ19ncm91cF9tZW1iZXJzBQAAAAhuZXdHcm91cAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgIAAAASd29ya2luZ19ncm91cF9zaXplBQAAAAxuZXdHcm91cFNpemUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAABV3b3JraW5nX2dyb3VwX21lbWJlcl8FAAAADW1lbWJlckFkZHJlc3MCAAAAB193ZWlnaHQAAAAAAAAAAAEFAAAAA25pbAAAAAC0Ay8t", "chainId": 84, "height": 1393735, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FRedv8wfWVKvmyJ7sdCd79tVzLhnykq7EsrW4mJmys1G Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetInteger (key) = {
55 let val = match getInteger(this, key) {
66 case b: Int =>
77 b
88 case _ =>
99 0
1010 }
1111 val
1212 }
1313
1414
1515 func tryGetString (key) = {
1616 let val = match getString(this, key) {
1717 case b: String =>
1818 b
1919 case _ =>
2020 ""
2121 }
2222 val
2323 }
2424
2525
2626 func isOwner (address) = (address == this)
2727
2828
2929 func getGroup () = {
3030 let val = match getString(this, "working_group_members") {
3131 case b: String =>
3232 b
3333 case _ =>
3434 ""
3535 }
3636 val
3737 }
3838
3939
4040 func getMembers () = {
4141 let val = match getString(this, "dao_members") {
4242 case b: String =>
4343 b
4444 case _ =>
4545 ""
4646 }
4747 val
4848 }
4949
5050
5151 func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0)
5252
5353
5454 func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0)
5555
5656
5757 @Callable(i)
5858 func addDAOMember (memberAddress) = if (!(isOwner(i.caller)))
5959 then throw("access only to the DAO owner")
6060 else if ((tryGetInteger((("dao_member_" + memberAddress) + "_weight")) == 1))
6161 then throw("This user already exists")
6262 else {
6363 let group = getMembers()
6464 let newGroup = ((group + ";") + memberAddress)
6565 let groupSize = tryGetInteger("dao_size")
6666 let newGroupSize = (groupSize + 1)
6767 WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry((("dao_member_" + memberAddress) + "_weight"), 1)])
6868 }
6969
7070
7171
7272 @Callable(i)
7373 func addGroupMember (memberAddress) = if (!(isOwner(i.caller)))
7474 then throw("access only to the DAO owner")
7575 else if ((tryGetInteger((("working_group_member_" + memberAddress) + "_weight")) == 1))
7676 then throw("This user already exists")
7777 else {
7878 let group = getGroup()
7979 let newGroup = ((group + ";") + memberAddress)
8080 let groupSize = tryGetInteger("working_group_size")
8181 let newGroupSize = (groupSize + 1)
8282 WriteSet([DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)])
8383 }
8484
8585

github/deemru/w8io/026f985 
25.39 ms