tx · 6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb

3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT:  -0.01400000 Waves

2023.04.06 13:40 [2522594] smart account 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT > SELF 0.00000000 Waves

{ "type": 13, "id": "6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb", "fee": 1400000, "feeAssetId": null, "timestamp": 1680777674636, "version": 2, "chainId": 84, "sender": "3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT", "senderPublicKey": "86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb", "proofs": [ "2XAhzkhYGW34wVsUboJ1faQWYDhWUDPYmbzVxb4CK7pmgicgAdAFP2Cu2QZBJKBaMVkSkjED6NB3R7a1tqLNozRs" ], "script": "base64:AAIEAAAAAAAAAB0IAhIFCgMIAQESAwoBARIDCgEBEgMKAQESAwoBCAAAAAkAAAAABFZPVEUBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkAAAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AQAAACAbvUu+h+2As3kugOhMQC3bvgebie3kDmlbUlrvLFQPbQAAAAASY29udHJvbGxlcl9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAxsYXVuY2hfZXJyb3ICAAAAJERhcHAgd2lsbCBzdGFydCBWb3RpbmcgYXQgVGltZXN0YW1wIAAAAAADbXNnAgAAAC48aDE+WW91ciBWb3RlIFN1Ym1pdHRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+AAAAAAlweW10ZXJyb3ICAAAANURBcHAgTmVlZCAwLjAwMDAwMDAxIFZPVEUgVG9rZW4gYXMgQXR0YWNoIHBheW1lbnRbMV0uAAA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Adhc3NldElkBQAAAARWT1RFCQAAAgAAAAEFAAAACGFzc2V0ZXJyAwkAAGYAAAACCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAUAAAAFRW5kVFMJAAACAAAAAQUAAAAHdm90ZUVycgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxUb3RhbF9Wb3Rlc18JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQFAAAACnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABlRvdGFsXwUAAAAHVm90ZUFzdAIAAAABXwkAAaQAAAABBQAAAAtQb3Jwb3NhbF9JRAUAAAAEQVRWTwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlBQAAAANtc2cFAAAAA25pbAAAAAFpAQAAAAlEZWxldGVLZXkAAAABAAAAA0tleQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANLZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5wJ3I3g==", "height": 2522594, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: wD2p5ZBm8gnseXiTBiGBtcPvVg2qN6WWqcXMzhYqPZV Next: HVorMwhDZHkQKKnP24ugFM6dngYt6SUmmnYn2YjTFLYq Diff:
OldNewDifferences
3838 then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
3939 else if ((j.caller != c))
4040 then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it."))
41- else [StringEntry(("Proposal_Data_" + toString(t)), k), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), n), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), o)]
41+ else [StringEntry(("Proposal_Text_" + toString(t)), k), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), n), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), o)]
4242 }
4343
4444
8787
8888
8989 @Callable(j)
90-func DeleteKey (C) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(C)]
90+func No (u) = {
91+ let v = "No"
92+ let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
93+ let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
94+ let p = toBase58String(j.caller.bytes)
95+ let w = if ((size(j.payments) == 1))
96+ then j.payments[0]
97+ else throw(f)
98+ let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a)
99+ let y = {
100+ let r = getInteger(this, ("Total_Votes_" + toString(u)))
101+ if ($isInstanceOf(r, "Int"))
102+ then {
103+ let s = r
104+ s
105+ }
106+ else 0
107+ }
108+ let z = (y + w.amount)
109+ let A = {
110+ let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
111+ if ($isInstanceOf(r, "Int"))
112+ then {
113+ let s = r
114+ s
115+ }
116+ else 0
117+ }
118+ let B = (A + w.amount)
119+ if ((n > lastBlock.timestamp))
120+ then throw((d + toString(n)))
121+ else if ((1 > x))
122+ then throw(g)
123+ else if ((w.assetId != a))
124+ then throw(h)
125+ else if ((lastBlock.timestamp > o))
126+ then throw(i)
127+ else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)]
128+ }
129+
130+
131+
132+@Callable(j)
133+func Abstain (u) = {
134+ let v = "Abstain"
135+ let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
136+ let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
137+ let p = toBase58String(j.caller.bytes)
138+ let w = if ((size(j.payments) == 1))
139+ then j.payments[0]
140+ else throw(f)
141+ let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a)
142+ let y = {
143+ let r = getInteger(this, ("Total_Votes_" + toString(u)))
144+ if ($isInstanceOf(r, "Int"))
145+ then {
146+ let s = r
147+ s
148+ }
149+ else 0
150+ }
151+ let z = (y + w.amount)
152+ let A = {
153+ let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
154+ if ($isInstanceOf(r, "Int"))
155+ then {
156+ let s = r
157+ s
158+ }
159+ else 0
160+ }
161+ let B = (A + w.amount)
162+ if ((n > lastBlock.timestamp))
163+ then throw((d + toString(n)))
164+ else if ((1 > x))
165+ then throw(g)
166+ else if ((w.assetId != a))
167+ then throw(h)
168+ else if ((lastBlock.timestamp > o))
169+ then throw(i)
170+ else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)]
171+ }
172+
173+
174+
175+@Callable(j)
176+func DeleteKey (C) = [DeleteEntry(C)]
91177
92178
93179 @Verifier(D)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
55
66 let b = base58'2sHRUrJCMpDhAQEcN7Zhk3LqnD9zizebpxeQXpPoscQU'
77
88 let c = addressFromPublicKey(b)
99
1010 let d = "Dapp will start Voting at Timestamp "
1111
1212 let e = "<h1>Your Vote Submitted Successfully!</h1><br>"
1313
1414 let f = "DApp Need 0.00000001 VOTE Token as Attach payment[1]."
1515
1616 let g = "Min. 0.00000001 VOTE required on Your Address to Vote. Please Mint or hold min. 0.00000001 VOTE on this Address."
1717
1818 let h = (("Incorrect asset attach, please attach " + toBase58String(a)) + " AssetID Only.")
1919
2020 let i = "Voting is Over for this Dapp."
2121
2222 @Callable(j)
2323 func SetVotingTimeStamps (k,l,m) = {
2424 let n = l
2525 let o = m
2626 let p = toBase58String(j.caller.bytes)
2727 let q = {
2828 let r = getInteger(this, "Total_Proposals")
2929 if ($isInstanceOf(r, "Int"))
3030 then {
3131 let s = r
3232 s
3333 }
3434 else 0
3535 }
3636 let t = (q + 1)
3737 if ((size(k) > 5100))
3838 then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
3939 else if ((j.caller != c))
4040 then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it."))
41- else [StringEntry(("Proposal_Data_" + toString(t)), k), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), n), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), o)]
41+ else [StringEntry(("Proposal_Text_" + toString(t)), k), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), n), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), o)]
4242 }
4343
4444
4545
4646 @Callable(j)
4747 func Yes (u) = {
4848 let v = "Yes"
4949 let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
5050 let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
5151 let p = toBase58String(j.caller.bytes)
5252 let w = if ((size(j.payments) == 1))
5353 then j.payments[0]
5454 else throw(f)
5555 let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a)
5656 let y = {
5757 let r = getInteger(this, ("Total_Votes_" + toString(u)))
5858 if ($isInstanceOf(r, "Int"))
5959 then {
6060 let s = r
6161 s
6262 }
6363 else 0
6464 }
6565 let z = (y + w.amount)
6666 let A = {
6767 let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
6868 if ($isInstanceOf(r, "Int"))
6969 then {
7070 let s = r
7171 s
7272 }
7373 else 0
7474 }
7575 let B = (A + w.amount)
7676 if ((n > lastBlock.timestamp))
7777 then throw((d + toString(n)))
7878 else if ((1 > x))
7979 then throw(g)
8080 else if ((w.assetId != a))
8181 then throw(h)
8282 else if ((lastBlock.timestamp > o))
8383 then throw(i)
8484 else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)]
8585 }
8686
8787
8888
8989 @Callable(j)
90-func DeleteKey (C) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(C)]
90+func No (u) = {
91+ let v = "No"
92+ let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
93+ let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
94+ let p = toBase58String(j.caller.bytes)
95+ let w = if ((size(j.payments) == 1))
96+ then j.payments[0]
97+ else throw(f)
98+ let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a)
99+ let y = {
100+ let r = getInteger(this, ("Total_Votes_" + toString(u)))
101+ if ($isInstanceOf(r, "Int"))
102+ then {
103+ let s = r
104+ s
105+ }
106+ else 0
107+ }
108+ let z = (y + w.amount)
109+ let A = {
110+ let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
111+ if ($isInstanceOf(r, "Int"))
112+ then {
113+ let s = r
114+ s
115+ }
116+ else 0
117+ }
118+ let B = (A + w.amount)
119+ if ((n > lastBlock.timestamp))
120+ then throw((d + toString(n)))
121+ else if ((1 > x))
122+ then throw(g)
123+ else if ((w.assetId != a))
124+ then throw(h)
125+ else if ((lastBlock.timestamp > o))
126+ then throw(i)
127+ else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)]
128+ }
129+
130+
131+
132+@Callable(j)
133+func Abstain (u) = {
134+ let v = "Abstain"
135+ let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
136+ let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
137+ let p = toBase58String(j.caller.bytes)
138+ let w = if ((size(j.payments) == 1))
139+ then j.payments[0]
140+ else throw(f)
141+ let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a)
142+ let y = {
143+ let r = getInteger(this, ("Total_Votes_" + toString(u)))
144+ if ($isInstanceOf(r, "Int"))
145+ then {
146+ let s = r
147+ s
148+ }
149+ else 0
150+ }
151+ let z = (y + w.amount)
152+ let A = {
153+ let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
154+ if ($isInstanceOf(r, "Int"))
155+ then {
156+ let s = r
157+ s
158+ }
159+ else 0
160+ }
161+ let B = (A + w.amount)
162+ if ((n > lastBlock.timestamp))
163+ then throw((d + toString(n)))
164+ else if ((1 > x))
165+ then throw(g)
166+ else if ((w.assetId != a))
167+ then throw(h)
168+ else if ((lastBlock.timestamp > o))
169+ then throw(i)
170+ else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)]
171+ }
172+
173+
174+
175+@Callable(j)
176+func DeleteKey (C) = [DeleteEntry(C)]
91177
92178
93179 @Verifier(D)
94180 func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey)
95181

github/deemru/w8io/169f3d6 
34.94 ms