tx · D6MbMuk1EUqS8UQ3Z34NeEFBv5rSJm8YteXRWvNRWAxH

3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD:  -0.00400000 Waves

2022.07.14 19:44 [2139648] smart account 3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD > SELF 0.00000000 Waves

{ "type": 13, "id": "D6MbMuk1EUqS8UQ3Z34NeEFBv5rSJm8YteXRWvNRWAxH", "fee": 400000, "feeAssetId": null, "timestamp": 1657817146931, "version": 2, "chainId": 84, "sender": "3N2HzcM61QM3LsUrsq4UBvi2btJMHyxvVMD", "senderPublicKey": "CU5wMqCBg4bC4Zgs8QGiqjjvmeMkSiKo3Ff6k5axJZwr", "proofs": [ "mWJx8ySEeJs1iPSwVRpXo55sc5kW3LhDwvm9g3TLTEwhFWeu9j3KBvtDoynt2fztF4PwVoN9PeS5oDMxKnSJ5AV" ], "script": "base64:AAIDAAAAAAAAABQIARIAEgMKAQESAwoBARIECgIBCAAAAAAAAAAEAAAAAWkBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAhY2FuIGhvZGwgd2F2ZXMgb25seSBhdCB0aGUgbW9tZW50BAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAEnh4eEludmVzdG9yQmFsYW5jZQkAASwAAAACCQABLAAAAAIFAAAACmN1cnJlbnRLZXkCAAAAAV8CAAAAAmliBAAAAA1jdXJyZW50QW1vdW50BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAEnh4eEludmVzdG9yQmFsYW5jZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW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Vm90ZXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAALY3VycmVudEZ1bmQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAOeHh4U3RhcnR1cEZ1bmQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAMJAABnAAAAAgAAAAAAAAAAAAUAAAAGYW1vdW50CQAAAgAAAAECAAAAHkNhbid0IHdpdGhkcmF3IG5lZ2F0aXZlIGFtb3VudAMJAABmAAAAAgUAAAAGYW1vdW50BQAAAA1jdXJyZW50QW1vdW50CQAAAgAAAAECAAAAE05vdCBlbm91Z2ggYmFsYW5jZSEDCQAAZgAAAAIFAAAABGZsYWcAAAAAAAAAAAAJAAACAAAAAQIAAAAmT25seSBvbmUgdm90ZSBwZXIgcHJvamVjdCBpcyBwb3NzaWJsZSEJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAEnh4eEludmVzdG9yQmFsYW5jZQkAAGUAAAACBQAAAA1jdXJyZW50QW1vdW50BQAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAD3h4eFN0YXJ0dXBWb3RlcwkAAGQAAAACBQAAAAxjdXJyZW50Vm90ZXMAAAAAAAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAAB2ZsYWdLZXkAAAAAAAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADnh4eFN0YXJ0dXBGdW5kCQAAZAAAAAIFAAAAC2N1cnJlbnRGdW5kBQAAAAZhbW91bnQFAAAAA25pbAAAAAAzz6it", "height": 2139648, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5F3pKCFMx5YJiFho5YYn7tbZJNyXQLWLeJXdLVpRVf6K Next: 4jZtWxoN6tUH5MYMiM5BnwrsZBowbxskuGTKnWc69MUe Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h'
54
6-@Callable(b)
5+
6+@Callable(a)
77 func deposit () = {
8- let c = extract(b.payment)
9- if ((c.assetId != a))
10- then throw("ggToken 8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h tokens only at the moment")
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("can hodl waves only at the moment")
1111 else {
12- let d = toBase58String(b.caller.bytes)
12+ let c = toBase58String(a.caller.bytes)
13+ let d = ((c + "_") + "ib")
1314 let e = {
1415 let f = getInteger(this, d)
1516 if ($isInstanceOf(f, "Int"))
1920 }
2021 else 0
2122 }
22- let h = (e + c.amount)
23+ let h = (e + b.amount)
2324 WriteSet([DataEntry(d, h)])
2425 }
2526 }
2627
2728
2829
29-@Callable(b)
30+@Callable(a)
3031 func withdraw (i) = {
31- let d = toBase58String(b.caller.bytes)
32+ let c = toBase58String(a.caller.bytes)
33+ let d = ((c + "_") + "ib")
3234 let e = {
3335 let f = getInteger(this, d)
3436 if ($isInstanceOf(f, "Int"))
4345 then throw("Can't withdraw negative amount")
4446 else if ((0 > h))
4547 then throw("Not enough balance")
46- else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(b.caller, i, unit)]))
48+ else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(a.caller, i, unit)]))
49+ }
50+
51+
52+
53+@Callable(a)
54+func getFunds (i) = {
55+ let j = 2
56+ let c = toBase58String(a.caller.bytes)
57+ let k = ((c + "_") + "sf")
58+ let l = ((c + "_") + "sv")
59+ let e = {
60+ let f = getInteger(this, k)
61+ if ($isInstanceOf(f, "Int"))
62+ then {
63+ let g = f
64+ g
65+ }
66+ else 0
67+ }
68+ let m = {
69+ let f = getInteger(this, l)
70+ if ($isInstanceOf(f, "Int"))
71+ then {
72+ let g = f
73+ g
74+ }
75+ else 0
76+ }
77+ let h = (e - i)
78+ if ((0 > i))
79+ then throw("Can't withdraw negative amount")
80+ else if ((0 > h))
81+ then throw("Not enough balance")
82+ else if ((j > m))
83+ then throw("Not enough votes. At least 2 votes required!")
84+ else ScriptResult(WriteSet([DataEntry(k, h)]), TransferSet([ScriptTransfer(a.caller, i, unit)]))
85+ }
86+
87+
88+
89+@Callable(a)
90+func vote (i,n) = {
91+ let c = toBase58String(a.caller.bytes)
92+ let d = ((c + "_") + "ib")
93+ let k = ((n + "_") + "sf")
94+ let l = ((n + "_") + "sv")
95+ let o = ((n + "_") + c)
96+ let p = {
97+ let f = getInteger(this, o)
98+ if ($isInstanceOf(f, "Int"))
99+ then {
100+ let g = f
101+ g
102+ }
103+ else 0
104+ }
105+ let e = {
106+ let f = getInteger(this, d)
107+ if ($isInstanceOf(f, "Int"))
108+ then {
109+ let g = f
110+ g
111+ }
112+ else 0
113+ }
114+ let q = {
115+ let f = getInteger(this, l)
116+ if ($isInstanceOf(f, "Int"))
117+ then {
118+ let g = f
119+ g
120+ }
121+ else 0
122+ }
123+ let r = {
124+ let f = getInteger(this, k)
125+ if ($isInstanceOf(f, "Int"))
126+ then {
127+ let g = f
128+ g
129+ }
130+ else 0
131+ }
132+ if ((0 >= i))
133+ then throw("Can't withdraw negative amount")
134+ else if ((i > e))
135+ then throw("Not enough balance!")
136+ else if ((p > 0))
137+ then throw("Only one vote per project is possible!")
138+ else WriteSet([DataEntry(d, (e - i)), DataEntry(l, (q + 1)), DataEntry(o, 1), DataEntry(k, (r + i))])
47139 }
48140
49141
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h'
54
6-@Callable(b)
5+
6+@Callable(a)
77 func deposit () = {
8- let c = extract(b.payment)
9- if ((c.assetId != a))
10- then throw("ggToken 8Dyidvq8ykWxmv6CxZZXQtdj1aktiwPv4ibgGWTgxo5h tokens only at the moment")
8+ let b = extract(a.payment)
9+ if (isDefined(b.assetId))
10+ then throw("can hodl waves only at the moment")
1111 else {
12- let d = toBase58String(b.caller.bytes)
12+ let c = toBase58String(a.caller.bytes)
13+ let d = ((c + "_") + "ib")
1314 let e = {
1415 let f = getInteger(this, d)
1516 if ($isInstanceOf(f, "Int"))
1617 then {
1718 let g = f
1819 g
1920 }
2021 else 0
2122 }
22- let h = (e + c.amount)
23+ let h = (e + b.amount)
2324 WriteSet([DataEntry(d, h)])
2425 }
2526 }
2627
2728
2829
29-@Callable(b)
30+@Callable(a)
3031 func withdraw (i) = {
31- let d = toBase58String(b.caller.bytes)
32+ let c = toBase58String(a.caller.bytes)
33+ let d = ((c + "_") + "ib")
3234 let e = {
3335 let f = getInteger(this, d)
3436 if ($isInstanceOf(f, "Int"))
3537 then {
3638 let g = f
3739 g
3840 }
3941 else 0
4042 }
4143 let h = (e - i)
4244 if ((0 > i))
4345 then throw("Can't withdraw negative amount")
4446 else if ((0 > h))
4547 then throw("Not enough balance")
46- else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(b.caller, i, unit)]))
48+ else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(a.caller, i, unit)]))
49+ }
50+
51+
52+
53+@Callable(a)
54+func getFunds (i) = {
55+ let j = 2
56+ let c = toBase58String(a.caller.bytes)
57+ let k = ((c + "_") + "sf")
58+ let l = ((c + "_") + "sv")
59+ let e = {
60+ let f = getInteger(this, k)
61+ if ($isInstanceOf(f, "Int"))
62+ then {
63+ let g = f
64+ g
65+ }
66+ else 0
67+ }
68+ let m = {
69+ let f = getInteger(this, l)
70+ if ($isInstanceOf(f, "Int"))
71+ then {
72+ let g = f
73+ g
74+ }
75+ else 0
76+ }
77+ let h = (e - i)
78+ if ((0 > i))
79+ then throw("Can't withdraw negative amount")
80+ else if ((0 > h))
81+ then throw("Not enough balance")
82+ else if ((j > m))
83+ then throw("Not enough votes. At least 2 votes required!")
84+ else ScriptResult(WriteSet([DataEntry(k, h)]), TransferSet([ScriptTransfer(a.caller, i, unit)]))
85+ }
86+
87+
88+
89+@Callable(a)
90+func vote (i,n) = {
91+ let c = toBase58String(a.caller.bytes)
92+ let d = ((c + "_") + "ib")
93+ let k = ((n + "_") + "sf")
94+ let l = ((n + "_") + "sv")
95+ let o = ((n + "_") + c)
96+ let p = {
97+ let f = getInteger(this, o)
98+ if ($isInstanceOf(f, "Int"))
99+ then {
100+ let g = f
101+ g
102+ }
103+ else 0
104+ }
105+ let e = {
106+ let f = getInteger(this, d)
107+ if ($isInstanceOf(f, "Int"))
108+ then {
109+ let g = f
110+ g
111+ }
112+ else 0
113+ }
114+ let q = {
115+ let f = getInteger(this, l)
116+ if ($isInstanceOf(f, "Int"))
117+ then {
118+ let g = f
119+ g
120+ }
121+ else 0
122+ }
123+ let r = {
124+ let f = getInteger(this, k)
125+ if ($isInstanceOf(f, "Int"))
126+ then {
127+ let g = f
128+ g
129+ }
130+ else 0
131+ }
132+ if ((0 >= i))
133+ then throw("Can't withdraw negative amount")
134+ else if ((i > e))
135+ then throw("Not enough balance!")
136+ else if ((p > 0))
137+ then throw("Only one vote per project is possible!")
138+ else WriteSet([DataEntry(d, (e - i)), DataEntry(l, (q + 1)), DataEntry(o, 1), DataEntry(k, (r + i))])
47139 }
48140
49141

github/deemru/w8io/169f3d6 
161.57 ms