tx · AZt6vvMZmHsNEyMMYzWiVYbURRfQA6CAfaBZmearKsan

3MuwmoHDxZZP9bGwExfL3L8JpMU5r95oBr8:  -0.01400000 Waves

2021.12.20 22:16 [1842991] smart account 3MuwmoHDxZZP9bGwExfL3L8JpMU5r95oBr8 > SELF 0.00000000 Waves

{ "type": 13, "id": "AZt6vvMZmHsNEyMMYzWiVYbURRfQA6CAfaBZmearKsan", "fee": 1400000, "feeAssetId": null, "timestamp": 1640027786365, "version": 2, "chainId": 84, "sender": "3MuwmoHDxZZP9bGwExfL3L8JpMU5r95oBr8", "senderPublicKey": "B8mXne2bErXPSLJvpntKVoudEBjypi3Ag6RfxqTr5pEg", "proofs": [ "44KtjX9JNX8cfhszxUX1FXLxFGdihzKzosv2DYVcE5XZNfC3EU3PWcaxWhwkEnVxEpaiLXo5GVfFES2YAVDnhoTb" ], "script": "base64:AAIFAAAAAAAAAU0IAhIGCgQICAgIEgMKAQgSAwoBCBIDCgEIGgwKAWESB25hbWVLZXkaDAoBYhIHbmFtZVVybBoTCgFjEg5kZXNjcmlwdGlvbktleRoQCgFkEgtpcGZzSGFzaEtleRoPCgFlEgphZGRyZXNzS2V5Gg4KAWYSCXN0YXR1c0tleRoMCgFnEgd2b3RlS2V5Gg4KAWgSCWNoZWNrVm90ZRoPCgFpEgpudW1iZXJWb3RlGgsKAWoSBnZvaWNlcxoICgFrEgNpbnYaCQoBbBIEbmFtZRoQCgFtEgtkZXNjcmlwdGlvbhoJCgFuEgRoYXNoGg8KAW8SCmxpc3RWb3RpbmcaDAoBcBIHYWRkcmVzcxoJCgFxEgRsaXN0GgoKAXISBWluZGV4GgwKAXMSByRtYXRjaDAaBgoBdBIBdBoHCgF1EgJ0eBoLCgF2EgZ2ZXJpZnkAAAAHAQAAAAFhAAAAAQAAAAFiCQABLAAAAAIFAAAAAWICAAAABV9uYW1lAQAAAAFjAAAAAQAAAAFiCQABLAAAAAIFAAAAAWICAAAADF9kZXNjcmlwdGlvbgEAAAABZAAAAAE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0AAAACCQACWAAAAAEICAUAAAABawAAAAZjYWxsZXIAAAAFYnl0ZXMJAAJYAAAAAQgFAAAABHRoaXMAAAAFYnl0ZXMJAAACAAAAAQIAAAAPWW91IGRvbid0IG93bmVyAwkBAAAAASEAAAABCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgUAAAABbwUAAAABcAkAAAIAAAABAgAAABlUaGlzIGFkZHJlc3Mgd2Fzbid0IGFkZGVkBAAAAAFyBAAAAAFzCQAETwAAAAIFAAAAAW8FAAAAAXADCQAAAQAAAAIFAAAAAXMCAAAAA0ludAQAAAABdAUAAAABcwUAAAABdAAAAAAAAAAAAAQAAAABcQkABFEAAAACBQAAAAFvBQAAAAFyCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAADXZvdGluZ19tZW1iZXIJAAS5AAAAAgUAAAABcQIAAAABLAUAAAADbmlsAAAAAQAAAAF1AQAAAAF2AAAAAAkAAfQAAAADCAUAAAABdQAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAXUAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAABdQAAAA9zZW5kZXJQdWJsaWNLZXmH9B/5", "height": 1842991, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7gMyjDVw22JVZcbqKEcZikht2mtgvtkPJ9hZmL2QPJ9M Next: DwJhDwmc65yYUnVdkMX4WroSiBhY8DdUnG4EE8cATU6t Diff:
OldNewDifferences
2525
2626
2727 @Callable(inv)
28-func verifyCollection (nameUrl,name,description,hash) = if ((getStringValue(nameKey(nameUrl)) != ""))
28+func verifyCollection (nameUrl,name,description,hash) = if (false)
2929 then throw("This collection was create")
3030 else [StringEntry(nameKey(nameUrl), name), StringEntry(descriptionKey(nameUrl), description), StringEntry(addressKey(nameUrl), toBase58String(inv.caller.bytes)), StringEntry(ipfsHashKey(nameUrl), hash), StringEntry(statusKey(nameUrl), "VOTING"), IntegerEntry(voteKey(nameUrl), 0)]
3131
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func nameKey (nameUrl) = (nameUrl + "_name")
55
66
77 func descriptionKey (nameUrl) = (nameUrl + "_description")
88
99
1010 func ipfsHashKey (nameUrl) = (nameUrl + "_hash")
1111
1212
1313 func addressKey (nameUrl) = (nameUrl + "_address")
1414
1515
1616 func statusKey (nameUrl) = (nameUrl + "_status")
1717
1818
1919 func voteKey (nameUrl) = (nameUrl + "_vote")
2020
2121
2222 func checkVote (numberVote,voices) = if ((voices > (numberVote / 2)))
2323 then "VERIFY"
2424 else "VOTING"
2525
2626
2727 @Callable(inv)
28-func verifyCollection (nameUrl,name,description,hash) = if ((getStringValue(nameKey(nameUrl)) != ""))
28+func verifyCollection (nameUrl,name,description,hash) = if (false)
2929 then throw("This collection was create")
3030 else [StringEntry(nameKey(nameUrl), name), StringEntry(descriptionKey(nameUrl), description), StringEntry(addressKey(nameUrl), toBase58String(inv.caller.bytes)), StringEntry(ipfsHashKey(nameUrl), hash), StringEntry(statusKey(nameUrl), "VOTING"), IntegerEntry(voteKey(nameUrl), 0)]
3131
3232
3333
3434 @Callable(inv)
3535 func vote (nameUrl) = {
3636 let listVoting = split(getStringValue("voting_member"), ",")
3737 if (!(containsElement(listVoting, toBase58String(inv.caller.bytes))))
3838 then throw("You can't vote")
3939 else if ((statusKey(nameUrl) == "VERIFY"))
4040 then throw("Voting was ended")
4141 else {
4242 let voices = (getIntegerValue(voteKey(nameUrl)) + 1)
4343 [IntegerEntry(voteKey(nameUrl), voices), StringEntry(statusKey(nameUrl), checkVote(size(listVoting), voices))]
4444 }
4545 }
4646
4747
4848
4949 @Callable(inv)
5050 func addVoting (address) = {
5151 let listVoting = split(getStringValue("voting_member"), ",")
5252 if ((toBase58String(inv.caller.bytes) != toBase58String(this.bytes)))
5353 then throw("You don't owner")
5454 else if (containsElement(listVoting, address))
5555 then throw("This address was added")
5656 else {
5757 let list = address :: listVoting
5858 [StringEntry("voting_member", makeString(list, ","))]
5959 }
6060 }
6161
6262
6363
6464 @Callable(inv)
6565 func removeVoting (address) = {
6666 let listVoting = split(getStringValue("voting_member"), ",")
6767 if ((toBase58String(inv.caller.bytes) != toBase58String(this.bytes)))
6868 then throw("You don't owner")
6969 else if (!(containsElement(listVoting, address)))
7070 then throw("This address wasn't added")
7171 else {
7272 let index = match indexOf(listVoting, address) {
7373 case t: Int =>
7474 t
7575 case _ =>
7676 0
7777 }
7878 let list = removeByIndex(listVoting, index)
7979 [StringEntry("voting_member", makeString(list, ","))]
8080 }
8181 }
8282
8383
8484 @Verifier(tx)
8585 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8686

github/deemru/w8io/026f985 
38.56 ms