tx · 3NHwcZZ1t57S5W2ZdovYAvqq8z4AeiPKZVjJ6L1PWw7S

3N4uWa2T9W2p4WgDwLPo3kWRp8eXRatp4vv:  -0.01000000 Waves

2021.12.28 11:44 [1853867] smart account 3N4uWa2T9W2p4WgDwLPo3kWRp8eXRatp4vv > SELF 0.00000000 Waves

{ "type": 13, "id": "3NHwcZZ1t57S5W2ZdovYAvqq8z4AeiPKZVjJ6L1PWw7S", "fee": 1000000, "feeAssetId": null, "timestamp": 1640681122593, "version": 2, "chainId": 84, "sender": "3N4uWa2T9W2p4WgDwLPo3kWRp8eXRatp4vv", "senderPublicKey": "6pUz5KTgi8pySNF2EuYHUMBkXbTyxL7R7YWGgb2PkhgU", "proofs": [ "2ipqALLHePA7sNmATHo7CENPtYs9qLLqpBGMvhdeSEoe4aWbScxNZET8Ua5quZVwc3cBvqs54zLH3X75EaUXzcdL" ], "script": "base64:AAIFAAAAAAAAA+gIAhIAEgMKAQgaCAoBQRIDZ2VuGhIKAUISDWdldFJhbmRvbU5hbWUaEgoBQxINamFja3BvdFJhbmRvbRoPCgFEEgp0eXBlUmFuZG9tGhAKAUUSC2NvbG9yUmFuZG9tGgoKAUYSBWNvbG9yGhoKAUcSFWNvdW50RWdnc05lZWRlZEFtb3VudBoVCgFIEhB0b3RhbER1Y2tzQW1vdW50GgYKAUkSAW4aBgoBShIBZxoGCgFLEgF0GgoKAUwSBXByaWNlGgYKAU0SAWkaDwoBThIKZWdnc05lZWRlZBoRCgFPEgxmaXJzdFBheW1lbnQaDAoBUBIHcmVzdWx0cxoMCgFREgd0eElkU3RyGhYKAVISEWhhdGNoaW5nU3RhdHVzS2V5GhQKAVMSD2ZpbmlzaEhlaWdodEtleRoOCgFUEglkdWNrSWRLZXkaEQoBVRIMZHVja0Zyb21CYWJ5GhUKAVYSEGhhdGNoaW5nVHhTdGF0dXMaCwoBVxIGZHVja0lkGg0KAVgSCG5hbWVEYXRhGgwKAVkSB2R1Y2tHZW4aDAoBWhIHZmFybUdlb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AAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJhZQAAAA9zZW5kZXJQdWJsaWNLZXlr1bNP", "height": 1853867, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6d77RbPSXSqwXUdHk2bKgv6MwHqT8jXEzUYvq5NsFTY9 Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'2cf6jyVG19oHU79R8iHfqFEesjstr3e7nSYEUhb2WagB'
5+
6+let b = 2
7+
8+let c = 10
9+
10+let d = 9
11+
12+let e = 5
13+
14+let f = "ADOPTION_STARTED"
15+
16+let g = "ADOPTION_FINISHED"
17+
18+func h (i,j) = (((i + "_") + toBase58String(j)) + "_status")
19+
20+
21+func k (i,j) = (((i + "_") + toBase58String(j)) + "_fh")
22+
23+
24+func l (i,j) = (((i + "_") + toBase58String(j)) + "_di")
25+
26+
27+func m (n) = (("stats_" + n) + "_amount")
28+
29+
30+func o (p) = {
31+ let q = {
32+ let r = getInteger(this, p)
33+ if ($isInstanceOf(r, "Int"))
34+ then {
35+ let s = r
36+ s
37+ }
38+ else 0
39+ }
40+ q
41+ }
42+
43+
44+func t (u,j,v,w) = {
45+ let x = value(blockInfoByHeight((v - 1)))
46+ let y = sha256((j + value(x.vrf)))
47+ (toInt(y, (w * 8)) % u)
48+ }
49+
50+
51+func z (A) = o(m(A))
52+
53+
54+func B (j,v) = {
55+ let C = t(500, j, v, 0)
56+ if (if ((C == 111))
57+ then (z("DUCK-WWWWWWWM-JU") == 0)
58+ else false)
59+ then $Tuple2("DUCK-WWWWWWWM-JU", "8W-J")
60+ else {
61+ let D = t(4, j, v, 0)
62+ let E = t(4, j, v, 1)
63+ let F = if ((E == 0))
64+ then "Y"
65+ else if ((E == 1))
66+ then "G"
67+ else if ((E == 2))
68+ then "B"
69+ else "R"
70+ if ((D == 0))
71+ then $Tuple2(("DUCK-FFFFFFFF-G" + F), "8F-G")
72+ else if ((D == 1))
73+ then $Tuple2(("DUCK-HHHHHHHH-G" + F), "8H-G")
74+ else if ((D == 2))
75+ then $Tuple2(("DUCK-GGGGGGGG-G" + F), "8G-G")
76+ else $Tuple2(("DUCK-IIIIIIII-G" + F), "8I-G")
77+ }
78+ }
79+
80+
81+func G (H) = {
82+ let I = H
83+ let J = c
84+ let K = d
85+ let L = pow((100 + ((I * J) / (10 * K))), 2, 5, 1, 2, DOWN)
86+ (L * 1000000)
87+ }
88+
89+
90+@Callable(M)
91+func startDuckHatching () = {
92+ let H = o("ducks_amount")
93+ let N = G(H)
94+ let O = value(M.payments[0])
95+ let P = [StringEntry(h(toString(M.originCaller), M.transactionId), f), IntegerEntry(k(toString(M.originCaller), M.transactionId), (height + b)), IntegerEntry("ducks_amount", (H + 1)), IntegerEntry("ducks_last_price", (N / 1000000))]
96+ if ((O.assetId != a))
97+ then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(a)))
98+ else if ((N > O.amount))
99+ then throw(("To hatch a duck you currently need the following amount of EGGlets: " + toString(N)))
100+ else (P ++ [ScriptTransfer(M.caller, (O.amount - N), a)])
101+ }
102+
103+
104+
105+@Callable(M)
106+func finishDuckHatching (Q) = {
107+ let j = fromBase58String(Q)
108+ let R = h(toString(M.caller), j)
109+ let S = k(toString(M.caller), j)
110+ let T = l(toString(M.caller), j)
111+ let U = {
112+ let r = getBoolean((("hatching_" + Q) + "_babyDuck"))
113+ if ($isInstanceOf(r, "Boolean"))
114+ then {
115+ let K = r
116+ K
117+ }
118+ else false
119+ }
120+ let V = getStringValue(this, R)
121+ let v = getIntegerValue(this, S)
122+ if ((V == g))
123+ then {
124+ let W = getStringValue(this, l(toString(M.caller), j))
125+ throw(("The duck was hatched and claimed already, here is the folowing: " + W))
126+ }
127+ else if ((v > height))
128+ then throw((((("Hatching is not finished yet " + toString((v - height))) + " blocks remaining, it will take around ") + toString((v - height))) + " minutes"))
129+ else {
130+ let X = B(j, v)
131+ let Y = X._1
132+ let Z = X._2
133+ let aa = (("{\"genotype\": \"" + Y) + "\", \"crossbreeding\": true}")
134+ let ab = Issue(Y, aa, 1, 0, false, unit, v)
135+ let ac = calculateAssetId(ab)
136+ let ad = (o(m(Y)) + 1)
137+[StringEntry(R, g), StringEntry(T, toBase58String(ac)), StringEntry(toBase58String(ac), T), BooleanEntry((("duck_" + toBase58String(ac)) + "_grown"), U), IntegerEntry(m(Y), ad), IntegerEntry((("stats_" + Z) + "_quantity"), (o((("stats_" + Z) + "_quantity")) + 1)), ab, ScriptTransfer(M.caller, 1, ac)]
138+ }
139+ }
140+
141+
142+@Verifier(ae)
143+func af () = sigVerify(ae.bodyBytes, ae.proofs[0], ae.senderPublicKey)
144+

github/deemru/w8io/fabc49c 
33.44 ms