tx · 14pVteVKiTRcxPkegmndQG8KffChELZBCApzhm2AyfQV

3NCMRpLsF8NsPL6q8VcF6fH88h8gjPHPtvF:  -0.05000000 Waves

2023.10.06 14:53 [2786725] smart account 3NCMRpLsF8NsPL6q8VcF6fH88h8gjPHPtvF > SELF 0.00000000 Waves

{ "type": 13, "id": "14pVteVKiTRcxPkegmndQG8KffChELZBCApzhm2AyfQV", "fee": 5000000, "feeAssetId": null, "timestamp": 1696593232229, "version": 1, "sender": "3NCMRpLsF8NsPL6q8VcF6fH88h8gjPHPtvF", "senderPublicKey": "4AqDEPmpAWKHr1VaXU21GUNwWqqUfJMpS2tdsqaPUxGG", "proofs": [ "5TwVABSaYNr5A2A6i2ti1oU6gJdrM7CgaXimSwUgfAecdC9q7THz8xoBxBU8eq6Wsuau8TySugwHmgnAoCCbe8oW" ], "script": "base64:BgIkCAISCwoJAQEBAQEBCAgIEgQKAggBEgMKAQgSAwoBCBIDCgEIDAEFYXNJbnQBBXZhbHVlBAckbWF0Y2gwBQV2YWx1ZQMJAAECBQckbWF0Y2gwAgNJbnQEA2ludAUHJG1hdGNoMAUDaW50CQACAQIZd3JvbmcgdHlwZSwgZXhwZWN0ZWQ6IEludAEQd3JpdGVDb25zdFN0cmluZwIDa2V5BXZhbHVlAwkBASEBCQEJaXNEZWZpbmVkAQkAnQgCBQR0aGlzBQNrZXkJAQtTdHJpbmdFbnRyeQIFA2tleQUFdmFsdWUJAAIBCQCsAgICFWFscmVhZHkgaW5pdGlhbGl6ZWQ6IAUDa2V5ABJjb25maWdBZGRyZXNzU3RvcmUCBmNvbmZpZwANY29uZmlnQWRkcmVzcwkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCmCAEJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQR0aGlzBRJjb25maWdBZGRyZXNzU3RvcmUCJ2NoaWxkcmVuLm1haW46IGNvbmZpZyBhZGRyZXNzIG5vdCBmb3VuZAIWaW52YWxpZCBjb25maWcgYWRk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XMJAPwHBAUPc3Rha2luZ0NvbnRyYWN0AghzdGFrZUZvcgkAzAgCBQdhZGRyZXNzBQNuaWwJAMwIAgkBD0F0dGFjaGVkUGF5bWVudAIFCnB3ckFzc2V0SWQFBHNraW4FA25pbAMJAAACBQFzBQFzBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEEaW5pdAEEY29uZgkAzAgCCQEQd3JpdGVDb25zdFN0cmluZwIFEmNvbmZpZ0FkZHJlc3NTdG9yZQUEY29uZgUDbmlsAD3DIrc=", "chainId": 84, "height": 2786725, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func a (b) = {
5+ let c = b
6+ if ($isInstanceOf(c, "Int"))
7+ then {
8+ let d = c
9+ d
10+ }
11+ else throw("wrong type, expected: Int")
12+ }
13+
14+
15+func e (f,b) = if (!(isDefined(getString(this, f))))
16+ then StringEntry(f, b)
17+ else throw(("already initialized: " + f))
18+
19+
20+let g = "config"
21+
22+let h = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, g), "children.main: config address not found")), "invalid config address")
23+
24+let i = height
25+
26+func j (k) = invoke(h, "opAllowed", [k], nil)
27+
28+
29+let l = fromBase58String(valueOrErrorMessage(getString(h, "powerAssetId"), "pwr asset id not found"))
30+
31+let m = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(h, "contract_staking"), "no staking_contract")), "invalid staking address")
32+
33+let n = valueOrErrorMessage(getInteger(h, (toString(this) + "_min_power_required_to_project")), "no _min_power_required_to_project")
34+
35+let o = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(h, "contract_children"), "no children_contract")), "invalid children address")
36+
37+let p = valueOrElse(getString(h, "wavesDAO"), "3PEwRcYNAUtoFvKpBhKoiwajnZfdoDR6h4h")
38+
39+let q = valueOrElse(getString(h, "miners_factory"), "3PJVm7xLPabmYohbnvdgGDYHMwnZxF2x18m")
40+
41+@Callable(r)
42+func project (s,t,u,v,w,x,y,z,A) = {
43+ let B = j("project")
44+ if ((B == B))
45+ then {
46+ let C = toString(r.caller)
47+ let D = a(invoke(m, "userPower", [C], nil))
48+ if ((D == D))
49+ then if ((n > D))
50+ then throw(("Not enough staked power to create a project. Required " + toString(n)))
51+ else {
52+ let E = invoke(o, "projectFor", [C, s, t, u, v, w, x, y, z, A], nil)
53+ if ((E == E))
54+ then nil
55+ else throw("Strict value is not equal to itself.")
56+ }
57+ else throw("Strict value is not equal to itself.")
58+ }
59+ else throw("Strict value is not equal to itself.")
60+ }
61+
62+
63+
64+@Callable(r)
65+func commit (F,G) = {
66+ let B = j("commit")
67+ if ((B == B))
68+ then {
69+ let H = toString(r.caller)
70+ let I = invoke(m, "unstakeFrom", [H, G], nil)
71+ if ((I == I))
72+ then {
73+ let J = invoke(o, "commitFor", [F, H], [AttachedPayment(l, G)])
74+ if ((J == J))
75+ then nil
76+ else throw("Strict value is not equal to itself.")
77+ }
78+ else throw("Strict value is not equal to itself.")
79+ }
80+ else throw("Strict value is not equal to itself.")
81+ }
82+
83+
84+
85+@Callable(r)
86+func commitForMiner (K) = if ((toString(r.caller) != q))
87+ then throw("denied")
88+ else {
89+ let J = invoke(o, "commitForMiner", [p, K], r.payments)
90+ if ((J == J))
91+ then nil
92+ else throw("Strict value is not equal to itself.")
93+ }
94+
95+
96+
97+@Callable(r)
98+func undoCommit (F) = {
99+ let L = j("undoCommit")
100+ if ((L == L))
101+ then {
102+ let M = toString(r.caller)
103+ let s = a(invoke(o, "undoCommitFor", [F, M], nil))
104+ if ((s == s))
105+ then {
106+ let I = invoke(m, "stakeFor", [M], [AttachedPayment(l, s)])
107+ if ((I == I))
108+ then nil
109+ else throw("Strict value is not equal to itself.")
110+ }
111+ else throw("Strict value is not equal to itself.")
112+ }
113+ else throw("Strict value is not equal to itself.")
114+ }
115+
116+
117+
118+@Callable(r)
119+func init (N) = [e(g, N)]
120+
121+

github/deemru/w8io/169f3d6 
15.49 ms