tx · FUjz2gTHMT43JYYS5X4qdW3po2aDmVS1c8NxBqTH8j6D

3NBLecFWuYaQuc56Nt6nZm8jdPt9f8vfyFr:  -0.01400000 Waves

2023.03.13 14:13 [2488175] smart account 3NBLecFWuYaQuc56Nt6nZm8jdPt9f8vfyFr > SELF 0.00000000 Waves

{ "type": 13, "id": "FUjz2gTHMT43JYYS5X4qdW3po2aDmVS1c8NxBqTH8j6D", "fee": 1400000, "feeAssetId": null, "timestamp": 1678706107617, "version": 2, "chainId": 84, "sender": "3NBLecFWuYaQuc56Nt6nZm8jdPt9f8vfyFr", "senderPublicKey": "GV3FbBXZru1WpaCa9x1zhwSWrXSDrxKMVEV7BML6EzY1", "proofs": [ "hQXa88SGHx1deNeUu8QVSTi1jdwB2AgYqq8Pkxp1vouWrp7T5tWgVrDmtcMP8XPMuPzJbWJhVbn9DLCM3W9JJBM" ], "script": "base64:AAIEAAAAAAAAAAsIAhIFCgMBAQESAAAAAA0AAAAABFZPVEUBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkAAAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AQAAACAbvUu+h+2As3kugOhMQC3bvgebie3kDmlbUlrvLFQPbQAAAAASY29udHJvbGxlcl9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAxsYXVuY2hfZXJyb3ICAAAAJERhcHAgd2lsbCBzdGFydCBWb3RpbmcgYXQgVGltZXN0YW1wIAAAAAADbXNnAgAAAC08aDE+WW91IFZvdGUgU3VibWl0dGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4AAAAACXB5bXRlcnJvcgIAAAAsREFwcCBOZWVkIDEgVk9URSBUb2tlbiBhcyBBdHRhY2ggcGF5bWVudFsxXS4AAAAAC21pbmJhbGVycm9yAgAAAF5NaW4uID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wAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAXVXNlcl9Ub3RhbF9Bc3NldF9Wb3Rlc18FAAAABnB1YmtleQIAAAABXwUAAAAHVm90ZUFzdAUAAAAFVVRWRkEJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQUAAAADbXNnBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleV4IdNA=", "height": 2488175, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7vd6VeeiRNV4YxG5cbMNdbmzzTamZ7ynynS3aerfeRra Next: E5kiUeHyKV9F7vGadeFsTYDN4qaqbb8GVvGWAGQeLiLG Diff:
OldNewDifferences
3333 let totalvotes = (Previoustotalvotes + 1)
3434
3535 @Callable(i)
36-func SetVotingTimeStamps (Voting_Start_TimeStamp,Voting_End_TimeStamp) = {
36+func SetVotingTimeStamps (Voting_Start_TimeStamp,Voting_End_TimeStamp,Total_Distrbuted_Tokens) = {
3737 let StartTS = Voting_Start_TimeStamp
3838 let EndTS = Voting_End_TimeStamp
3939 if ((i.caller != controller_address))
4040 then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it."))
41- else [IntegerEntry("Voting_Start_TimeStamp", StartTS), IntegerEntry("Voting_End_TimeStamp", EndTS)]
41+ else [IntegerEntry("Voting_Start_TimeStamp", StartTS), IntegerEntry("Voting_End_TimeStamp", EndTS), IntegerEntry("Total_Tokens_Distributed", Total_Distrbuted_Tokens)]
4242 }
4343
4444
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VOTE = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
55
66 let voting_timestamp_controller_pubkey = base58'2sHRUrJCMpDhAQEcN7Zhk3LqnD9zizebpxeQXpPoscQU'
77
88 let controller_address = addressFromPublicKey(voting_timestamp_controller_pubkey)
99
1010 let launch_error = "Dapp will start Voting at Timestamp "
1111
1212 let msg = "<h1>You Vote Submitted Successfully!</h1><br>"
1313
1414 let pymterror = "DApp Need 1 VOTE Token as Attach payment[1]."
1515
1616 let minbalerror = "Min. 1 VOTE required on Your Address to Vote. Please Mint or hold min. 1 VOTE on this Address."
1717
1818 let asseterr = (("Incorrect asset attach, please attach " + toBase58String(VOTE)) + " AssetID Only.")
1919
2020 let minamterr = "Please Attach Exact 1 VOTE To Vote."
2121
2222 let voteErr = "Voting is Over for this Dapp."
2323
2424 let AlreadyVotedErr = "You have Already Voted from this address."
2525
2626 let Previoustotalvotes = match getInteger(this, "Total_Votes") {
2727 case a: Int =>
2828 a
2929 case _ =>
3030 0
3131 }
3232
3333 let totalvotes = (Previoustotalvotes + 1)
3434
3535 @Callable(i)
36-func SetVotingTimeStamps (Voting_Start_TimeStamp,Voting_End_TimeStamp) = {
36+func SetVotingTimeStamps (Voting_Start_TimeStamp,Voting_End_TimeStamp,Total_Distrbuted_Tokens) = {
3737 let StartTS = Voting_Start_TimeStamp
3838 let EndTS = Voting_End_TimeStamp
3939 if ((i.caller != controller_address))
4040 then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it."))
41- else [IntegerEntry("Voting_Start_TimeStamp", StartTS), IntegerEntry("Voting_End_TimeStamp", EndTS)]
41+ else [IntegerEntry("Voting_Start_TimeStamp", StartTS), IntegerEntry("Voting_End_TimeStamp", EndTS), IntegerEntry("Total_Tokens_Distributed", Total_Distrbuted_Tokens)]
4242 }
4343
4444
4545
4646 @Callable(i)
4747 func Option1 () = {
4848 let VoteAst = "OPTION_1"
4949 let StartTS = getIntegerValue(this, "Voting_Start_TimeStamp")
5050 let EndTS = getIntegerValue(this, "Voting_End_TimeStamp")
5151 let pubkey = toBase58String(i.caller.bytes)
5252 let pmt = if ((size(i.payments) == 1))
5353 then i.payments[0]
5454 else throw(pymterror)
5555 let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
5656 let Previous_User_total_Votes = match getInteger(this, ("User_Total_Votes_" + pubkey)) {
5757 case a: Int =>
5858 a
5959 case _ =>
6060 0
6161 }
6262 let User_total_Votes = (Previous_User_total_Votes + 1)
6363 let UWVFA = match getInteger(this, ((("User_Total_Votes_" + pubkey) + "-") + VoteAst)) {
6464 case a: Int =>
6565 a
6666 case _ =>
6767 0
6868 }
6969 let UTWVFA = (UWVFA + 1)
7070 let FUVFA = match getInteger(this, ((("User_Total_Asset_Votes_" + pubkey) + "_") + VoteAst)) {
7171 case a: Int =>
7272 a
7373 case _ =>
7474 0
7575 }
7676 let UTVFA = (FUVFA + 1)
7777 let FTVO = match getInteger(this, ("Total_Votes_" + VoteAst)) {
7878 case a: Int =>
7979 a
8080 case _ =>
8181 0
8282 }
8383 let ATVO = (FTVO + 1)
8484 if ((StartTS > lastBlock.timestamp))
8585 then throw((launch_error + toString(StartTS)))
8686 else if ((1 > assetbal))
8787 then throw(minbalerror)
8888 else if ((pmt.assetId != VOTE))
8989 then throw(asseterr)
9090 else if ((pmt.amount != 1))
9191 then throw(minamterr)
9292 else if ((User_total_Votes > 1))
9393 then throw(AlreadyVotedErr)
9494 else if ((lastBlock.timestamp > EndTS))
9595 then throw(voteErr)
9696 else [IntegerEntry("Total_Votes", totalvotes), IntegerEntry(("Total_Votes_" + VoteAst), ATVO), IntegerEntry(("User_Total_Votes_" + pubkey), User_total_Votes), IntegerEntry(((("User_Total_Votes_" + pubkey) + "-") + VoteAst), UTWVFA), IntegerEntry(((("User_Total_Asset_Votes_" + pubkey) + "_") + VoteAst), UTVFA), StringEntry("message", msg)]
9797 }
9898
9999
100100 @Verifier(tx)
101101 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
102102

github/deemru/w8io/169f3d6 
34.24 ms