tx · 8sEBtxK1UrpCq3bHgLLBS4WXECye2Mgc6n7yFg7tGa9j 3MxaubN2nHCzE5spNox3ZCbPbDMfczSFrZS: -0.01400000 Waves 2021.10.25 01:14 [1760990] smart account 3MxaubN2nHCzE5spNox3ZCbPbDMfczSFrZS > SELF 0.00000000 Waves
{ "type": 13, "id": "8sEBtxK1UrpCq3bHgLLBS4WXECye2Mgc6n7yFg7tGa9j", "fee": 1400000, "feeAssetId": null, "timestamp": 1635113691090, "version": 1, "sender": "3MxaubN2nHCzE5spNox3ZCbPbDMfczSFrZS", "senderPublicKey": "FWDMjbKuHyuUuAo4utnjwDgcbsiysMPDjX835SxvtLHq", "proofs": [ "2UPPzaYWiwPWzeZwhHJNB1UhR2jsZEV2hTGHFCvHjL55rKZJpStXDC9VaPFe2nF6vokUrEapwer8cWADWrgQV1Gx" ], "script": "base64:AAIFAAAAAAAAABAIAhIAEgASAwoBARIDCgEBAAAAFgAAAAAHYmFsYW5jZQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVMiyryG3C7/Yidq0/9LPxzKMhegBrag41AAAAAARU1dPUGdvdmVybmFuY2VBZHIJAAQmAAAAAQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2JhbGFuY2UCAAAAD1NXT1BfZ292ZXJuYW5jZQIAAAAVRW1wdHkgU1dPUF9nb3Zlcm5hbmNlAAAAAA1XYXZlc1VzZG5Qb29sCQEAAAAFdmFsdWUAAAABCQAEJgAAAAEJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAdiYWxhbmNlAgAAAA9XQVZFU19VU0ROX1Bvb2wCAAAAFUVtcHR5IFdBVkVTX1VTRE5fUG9vbAAAAAAXZGVmaWhlbHBlck1hbmFnZXJQdWJLZXkJAAJZAAAAAQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABB0AAAACBQAAAAdiYWxhbmNlAgAAABlkZWZpaGVscGVyX21hbmF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AAALY2xhaW1BbW91bnQJAAACAAAAAQIAAAAqQW1vdW50IHRvIGNsYWltIGlzIGxlc3MgdGhhbiBtaW5TV09QcmV3YXJkBAAAAAF6CQAD/AAAAAQFAAAADmdvdmVybmFuY2VBZGRyAgAAABFjbGFpbUFuZFN0YWtlU1dPUAUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAAAXoFAAAAAXoEAAAAAXkJAAP8AAAABAUAAAAHYmFsYW5jZQIAAAAKZXh0cmFjdEZlZQkABEwAAAACBQAAAAtwcm90b2NvbEZlZQUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAAAXkFAAAAAXkFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAWkBAAAAEmdvdmVybmFuY2VXaXRoZHJhdwAAAAEAAAANYW10VG9XaXRoZHJhdwMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAFb3duZXIJAAACAAAAAQIAAAAhT25seSBvd25lciBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uBAAAAAF6CQAD/AAAAAQFAAAADmdvdmVybmFuY2VBZGRyAgAAAAx3aXRoZHJhd1NXT1AJAARMAAAAAgUAAAANYW10VG9XaXRoZHJhdwUAAAADbmlsBQAAAANuaWwDCQAAAAAAAAIFAAAAAXoFAAAAAXoJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1hbXRUb1dpdGhkcmF3BQAAAARTV09QBQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAACslAak=", "chainId": 84, "height": 1760990, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: QxeGZwg1YtKN9D3oHkZy36REht5146qMa4xwRtZuYbi Next: xuk9xavMRoD98x9o469dHZrYxJzMXMnzwCN4oodWaFo Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | ||
30 | 30 | let n = "_last_interest" | |
31 | 31 | ||
32 | - | let o = base58' | |
32 | + | let o = base58'Ccgesc9iWMSg1f8CqFP5nZwgF6xsGirReDhpvNp1JAWW' | |
33 | 33 | ||
34 | 34 | let p = 100000000 | |
35 | 35 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = Address(base58'3N8DGyUZufuYfENW6HZovoKaTkD3ESpAPj1') | |
5 | 5 | ||
6 | 6 | let b = addressFromString(valueOrErrorMessage(getString(a, "SWOP_governance"), "Empty SWOP_governance")) | |
7 | 7 | ||
8 | 8 | let c = value(addressFromString(valueOrErrorMessage(getString(a, "WAVES_USDN_Pool"), "Empty WAVES_USDN_Pool"))) | |
9 | 9 | ||
10 | 10 | let d = fromBase58String(valueOrElse(getString(a, "defihelper_manager_PubKey"), "Empty key defihelper_manager_PubKey")) | |
11 | 11 | ||
12 | 12 | let e = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv' | |
13 | 13 | ||
14 | 14 | let f = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv' | |
15 | 15 | ||
16 | 16 | let g = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv' | |
17 | 17 | ||
18 | 18 | let h = "owner" | |
19 | 19 | ||
20 | 20 | let i = Address(base58'3N5W8da2iiijVieA6qLGo7KzCJj8B19smWU') | |
21 | 21 | ||
22 | 22 | let j = addressFromString(valueOrErrorMessage(getString(this, "keyOwner"), "Empty keyOwner")) | |
23 | 23 | ||
24 | 24 | let k = valueOrErrorMessage(getBoolean(a, "isProtocolActive"), "Empty key isProtocolActive") | |
25 | 25 | ||
26 | 26 | let l = "last_interest" | |
27 | 27 | ||
28 | 28 | let m = "_SWOP_amount" | |
29 | 29 | ||
30 | 30 | let n = "_last_interest" | |
31 | 31 | ||
32 | - | let o = base58' | |
32 | + | let o = base58'Ccgesc9iWMSg1f8CqFP5nZwgF6xsGirReDhpvNp1JAWW' | |
33 | 33 | ||
34 | 34 | let p = 100000000 | |
35 | 35 | ||
36 | 36 | func q () = { | |
37 | 37 | let r = valueOrElse(getInteger(i, l), 0) | |
38 | 38 | r | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func s () = { | |
43 | 43 | let t = valueOrErrorMessage(getInteger(c, "B_asset_balance"), "Empty B_asset_balance") | |
44 | 44 | let u = valueOrErrorMessage(getInteger(c, "A_asset_balance"), "Empty A_asset_balance") | |
45 | 45 | let v = valueOrErrorMessage(getInteger(a, "protocol_fee_in_usdn"), "Empty protocol_fee_in_usdn") | |
46 | 46 | let w = fraction(t, v, u) | |
47 | 47 | w | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func x (y) = valueOrElse(getInteger(i, (toString(y) + m)), 0) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func z (y,r) = { | |
55 | 55 | let A = x(y) | |
56 | 56 | let B = getInteger(i, (toString(y) + n)) | |
57 | 57 | let C = { | |
58 | 58 | let D = B | |
59 | 59 | if ($isInstanceOf(D, "Int")) | |
60 | 60 | then { | |
61 | 61 | let B = D | |
62 | 62 | B | |
63 | 63 | } | |
64 | 64 | else r | |
65 | 65 | } | |
66 | 66 | $Tuple2(C, A) | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func E (F) = { | |
71 | 71 | let r = q() | |
72 | 72 | let G = z(F, r) | |
73 | 73 | let B = G._1 | |
74 | 74 | let H = G._2 | |
75 | 75 | let I = fraction(H, (r - B), p) | |
76 | 76 | let J = r | |
77 | 77 | $Tuple2(J, I) | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | let K = s() | |
82 | 82 | ||
83 | 83 | @Callable(L) | |
84 | 84 | func init () = if (isDefined(getString(this, h))) | |
85 | 85 | then throw("Contract already initialized") | |
86 | 86 | else if ((size(L.payments) == 0)) | |
87 | 87 | then [StringEntry(h, toString(L.caller))] | |
88 | 88 | else if ((size(L.payments) == 1)) | |
89 | 89 | then { | |
90 | 90 | let M = $Tuple2(L.payments[0].amount, L.payments[0].assetId) | |
91 | 91 | let N = M._1 | |
92 | 92 | let O = M._2 | |
93 | 93 | if ((O != o)) | |
94 | 94 | then throw("Only SWOP payment available in init()") | |
95 | 95 | else { | |
96 | 96 | let P = invoke(i, "lockSWOP", nil, [AttachedPayment(o, N)]) | |
97 | 97 | if ((P == P)) | |
98 | 98 | then [StringEntry(h, toString(L.caller))] | |
99 | 99 | else throw("Strict value is not equal to itself.") | |
100 | 100 | } | |
101 | 101 | } | |
102 | 102 | else throw("Incorrect paynemt. You should attach SWOP or empty payment") | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(L) | |
107 | 107 | func governanceLockSWOP () = { | |
108 | 108 | let Q = $Tuple2(L.payments[0].amount, L.payments[0].assetId) | |
109 | 109 | let N = Q._1 | |
110 | 110 | let O = Q._2 | |
111 | 111 | if ((O != o)) | |
112 | 112 | then throw("Only SWOP payment available in governanceLockSWOP()") | |
113 | 113 | else { | |
114 | 114 | let P = invoke(i, "lockSWOP", nil, [AttachedPayment(o, N)]) | |
115 | 115 | if ((P == P)) | |
116 | 116 | then nil | |
117 | 117 | else throw("Strict value is not equal to itself.") | |
118 | 118 | } | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(L) | |
124 | 124 | func governanceClaimAndStake (R) = if (if ((L.caller != j)) | |
125 | 125 | then (L.callerPublicKey != d) | |
126 | 126 | else false) | |
127 | 127 | then throw("Only owner or admin can call this function") | |
128 | 128 | else { | |
129 | 129 | let I = E(this)._2 | |
130 | 130 | if ((R > I)) | |
131 | 131 | then throw("Amount to claim is less than minSWOPreward") | |
132 | 132 | else { | |
133 | 133 | let P = invoke(i, "claimAndStakeSWOP", nil, nil) | |
134 | 134 | if ((P == P)) | |
135 | 135 | then { | |
136 | 136 | let S = invoke(a, "extractFee", [K], nil) | |
137 | 137 | if ((S == S)) | |
138 | 138 | then nil | |
139 | 139 | else throw("Strict value is not equal to itself.") | |
140 | 140 | } | |
141 | 141 | else throw("Strict value is not equal to itself.") | |
142 | 142 | } | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(L) | |
148 | 148 | func governanceWithdraw (T) = if ((L.caller != j)) | |
149 | 149 | then throw("Only owner can call this function") | |
150 | 150 | else { | |
151 | 151 | let P = invoke(i, "withdrawSWOP", [T], nil) | |
152 | 152 | if ((P == P)) | |
153 | 153 | then [ScriptTransfer(L.caller, T, o)] | |
154 | 154 | else throw("Strict value is not equal to itself.") | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 |
github/deemru/w8io/169f3d6 33.21 ms ◑