tx · D8WRDwhjJkzCy86rnzSUG2EKdf2RVzhQNqdzEaB5LzQb 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT: -0.01400000 Waves 2023.04.06 12:57 [2522553] smart account 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT > SELF 0.00000000 Waves
{ "type": 13, "id": "D8WRDwhjJkzCy86rnzSUG2EKdf2RVzhQNqdzEaB5LzQb", "fee": 1400000, "feeAssetId": null, "timestamp": 1680775089311, "version": 2, "chainId": 84, "sender": "3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT", "senderPublicKey": "86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb", "proofs": [ "542WaDXj1EXpoZHatpt11bSZpA15kHAsLxaAkmB2sDe5q42nucNZxyfaQ2DDtERSh51QpEG97M6DDvWrhPVo3ZNP" ], "script": "base64:AAIEAAAAAAAAABMIAhIFCgMIAQESAwoBARIDCgEIAAAACQAAAAAEVk9URQEAAAAgCGWEtw/wimoa8+Jo6C4IkCTD0ydYA80s9i5eC9/aFaQAAAAAInZvdGluZ190aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIGl6zIeiOlMGHeqkOihniSsWqxS66z2RjuIqrEqU/hxoAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAInZvdGluZ190aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkAAAAADGxhdW5jaF9lcnJvcgIAAAAkRGFwcCB3aWxsIHN0YXJ0IFZvdGluZyBhdCBUaW1lc3RhbXAgAAAAAANtc2cCAAAALjxoMT5Zb3VyIFZvdGUgU3VibWl0dGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4AAAAACXB5bXRlcnJvcgIAAAA1REFwcCBOZWVkIDAuMDAwMDAwMDEgVk9URSBUb2tlbiBhcyBBdHRhY2ggcGF5bWVudFsxXS4AAAAAC21pbmJhbGVycm9yAg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AAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleeOmBRY=", "height": 2522553, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9iz5brSsZsp6rLBWzsT5Svc3wTGuqHPQgdpqywWbEJBj Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 4 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
5 | + | ||
6 | + | let b = base58'86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb' | |
7 | + | ||
8 | + | let c = addressFromPublicKey(b) | |
9 | + | ||
10 | + | let d = "Dapp will start Voting at Timestamp " | |
11 | + | ||
12 | + | let e = "<h1>Your Vote Submitted Successfully!</h1><br>" | |
13 | + | ||
14 | + | let f = "DApp Need 0.00000001 VOTE Token as Attach payment[1]." | |
15 | + | ||
16 | + | let g = "Min. 0.00000001 VOTE required on Your Address to Vote. Please Mint or hold min. 0.00000001 VOTE on this Address." | |
17 | + | ||
18 | + | let h = (("Incorrect asset attach, please attach " + toBase58String(a)) + " AssetID Only.") | |
19 | + | ||
20 | + | let i = "Voting is Over for this Dapp." | |
21 | + | ||
22 | + | @Callable(j) | |
23 | + | func SetVotingTimeStamps (k,l,m) = { | |
24 | + | let n = l | |
25 | + | let o = m | |
26 | + | let p = toBase58String(j.caller.bytes) | |
27 | + | let q = { | |
28 | + | let r = getInteger(this, "Total_Proposals") | |
29 | + | if ($isInstanceOf(r, "Int")) | |
30 | + | then { | |
31 | + | let s = r | |
32 | + | s | |
33 | + | } | |
34 | + | else 0 | |
35 | + | } | |
36 | + | let t = (q + 1) | |
37 | + | if ((size(k) > 5100)) | |
38 | + | then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.") | |
39 | + | else if ((j.caller != c)) | |
40 | + | 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)] | |
42 | + | } | |
43 | + | ||
44 | + | ||
45 | + | ||
46 | + | @Callable(j) | |
47 | + | func Yes (u) = { | |
48 | + | let v = "Yes" | |
49 | + | let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
50 | + | let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
51 | + | let p = toBase58String(j.caller.bytes) | |
52 | + | let w = if ((size(j.payments) == 1)) | |
53 | + | then j.payments[0] | |
54 | + | else throw(f) | |
55 | + | let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a) | |
56 | + | let y = { | |
57 | + | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
58 | + | if ($isInstanceOf(r, "Int")) | |
59 | + | then { | |
60 | + | let s = r | |
61 | + | s | |
62 | + | } | |
63 | + | else 0 | |
64 | + | } | |
65 | + | let z = (y + w.amount) | |
66 | + | let A = { | |
67 | + | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
68 | + | if ($isInstanceOf(r, "Int")) | |
69 | + | then { | |
70 | + | let s = r | |
71 | + | s | |
72 | + | } | |
73 | + | else 0 | |
74 | + | } | |
75 | + | let B = (A + w.amount) | |
76 | + | if ((n > lastBlock.timestamp)) | |
77 | + | then throw((d + toString(n))) | |
78 | + | else if ((1 > x)) | |
79 | + | then throw(g) | |
80 | + | else if ((w.assetId != a)) | |
81 | + | then throw(h) | |
82 | + | else if ((lastBlock.timestamp > o)) | |
83 | + | then throw(i) | |
84 | + | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_Votes_" + v) + "_") + toString(u)), B), StringEntry("message", e)] | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | ||
89 | + | @Callable(j) | |
90 | + | func DeleteKey (C) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(C)] | |
91 | + | ||
92 | + | ||
93 | + | @Verifier(D) | |
94 | + | func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) | |
95 | + |
github/deemru/w8io/026f985 25.48 ms ◑