File tree Expand file tree Collapse file tree 3 files changed +69
-32
lines changed Expand file tree Collapse file tree 3 files changed +69
-32
lines changed Original file line number Diff line number Diff line change 1
1
hicetnuncDAO smart contracts
2
2
3
- hicetnunc protocol: https://better-call.dev/mainnet/KT1LCDCSGBHdKcxp7ZsRKNqmdgYourimhCmG
4
- hicetnunc baker oracle: https://better-call.dev/mainnet/KT1LG5kyGzoGRzrNLZWp44nQjXMbs5N52CBg/operations
5
- hicetnuncDAO sample: https://better-call.dev/mainnet/KT1VjEfVuwA4A1cuHvugTwrtZSvhPv9JwwbR
6
- FA2: https://better-call.dev/mainnet/KT1FaKvzjgVGZtiA7yyx97txY8J5cE5qpjQ1
3
+ hicetnunc protocol: https://better-call.dev/mainnet/KT1Q72pNNiCnBamwttWvXGE9N2yuz6c7guSD
4
+ hicetnunc baker oracle: https://better-call.dev/mainnet/KT1PdHb2tnTuyMo7JC8jcj1uw3A41QuWEeii
5
+ hicetnuncDAO sample: https://better-call.dev/mainnet/KT1UcPh3S1K1GAFqUt212H9qjFVdxEnca1qk
6
+ FA2: https://better-call.dev/mainnet/KT1Ex8LrDbCrZuTgmWin8eEo7HFw74jAqTvz
Original file line number Diff line number Diff line change @@ -56,15 +56,19 @@ def update_oracle(self, params):
56
56
def update_meta (self , params ):
57
57
sp .verify (sp .sender == self .data .admin )
58
58
self .data .meta = params
59
-
59
+
60
+ @sp .entry_point
61
+ def update_admin (self , params ):
62
+ sp .verify (sp .sender == self .data .admin )
63
+ self .data .admin = params
64
+
60
65
#oracle/admin staking
61
66
@sp .entry_point
62
67
def set_baker (self , params ):
63
68
sp .verify ((sp .sender == self .data .oracle ) | (sp .sender == self .data .admin ))
64
69
65
70
sp .set_delegate (sp .some (params ))
66
-
67
-
71
+
68
72
@sp .entry_point
69
73
def withdraw (self , params ):
70
74
sp .verify (sp .sender == self .data .admin ) # comment for testing
Original file line number Diff line number Diff line change 19
19
IF_SOME
20
20
{}
21
21
{
22
- PUSH int 114 ;
22
+ PUSH int 119 ;
23
23
FAILWITH;
24
24
};
25
25
COMPARE;
39
39
IF_SOME
40
40
{}
41
41
{
42
- PUSH int 117 ;
42
+ PUSH int 122 ;
43
43
FAILWITH;
44
44
};
45
45
PUSH mutez 0;
113
113
PUSH mutez 0;
114
114
NONE key_hash;
115
115
CREATE_CONTRACT
116
- { parameter (or (or (unit %contribute) (key_hash %set_baker)) (or (string %update_meta) (or (address %update_oracle) (pair %withdraw (address %address) (mutez %amount)))));
116
+ { parameter (or (or (unit %contribute) (or ( key_hash %set_baker) (address %update_admin) )) (or (string %update_meta) (or (address %update_oracle) (pair %withdraw (address %address) (mutez %amount)))));
117
117
storage (pair (pair (pair (mutez %achieved) (address %admin)) (pair (mutez %goal) (string %meta))) (pair (pair (address %oracle) (address %protocol)) (pair (timestamp %time_lock) (nat %token_id))));
118
118
code
119
119
{
@@ -199,16 +199,39 @@ code
199
199
CONS;
200
200
}
201
201
{
202
- SWAP;
203
- DUP;
204
- DUG 2;
205
- CDAAR;
206
- SENDER;
207
- COMPARE;
208
- EQ;
209
- IF
202
+ IF_LEFT
210
203
{
211
- PUSH bool True;
204
+ SWAP;
205
+ DUP;
206
+ DUG 2;
207
+ CDAAR;
208
+ SENDER;
209
+ COMPARE;
210
+ EQ;
211
+ IF
212
+ {
213
+ PUSH bool True;
214
+ }
215
+ {
216
+ SWAP;
217
+ DUP;
218
+ DUG 2;
219
+ CAADR;
220
+ SENDER;
221
+ COMPARE;
222
+ EQ;
223
+ };
224
+ IF
225
+ {}
226
+ {
227
+ PUSH string "WrongCondition: (sp.sender == self.data.oracle) | (sp.sender == self.data.admin)";
228
+ FAILWITH;
229
+ };
230
+ SOME;
231
+ SET_DELEGATE;
232
+ NIL operation;
233
+ SWAP;
234
+ CONS;
212
235
}
213
236
{
214
237
SWAP;
@@ -218,18 +241,28 @@ code
218
241
SENDER;
219
242
COMPARE;
220
243
EQ;
244
+ IF
245
+ {}
246
+ {
247
+ PUSH string "WrongCondition: sp.sender == self.data.admin";
248
+ FAILWITH;
249
+ };
250
+ SWAP;
251
+ DUP;
252
+ CDR;
253
+ SWAP;
254
+ CAR;
255
+ DUP;
256
+ CDR;
257
+ SWAP;
258
+ CAAR;
259
+ DIG 3;
260
+ SWAP;
261
+ PAIR;
262
+ PAIR;
263
+ PAIR;
264
+ NIL operation;
221
265
};
222
- IF
223
- {}
224
- {
225
- PUSH string "WrongCondition: (sp.sender == self.data.oracle) | (sp.sender == self.data.admin)";
226
- FAILWITH;
227
- };
228
- SOME;
229
- SET_DELEGATE;
230
- NIL operation;
231
- SWAP;
232
- CONS;
233
266
};
234
267
}
235
268
{
345
378
IF_SOME
346
379
{}
347
380
{
348
- PUSH int 71 ;
381
+ PUSH int 76 ;
349
382
FAILWITH;
350
383
};
351
384
DIG 2;
381
414
IF_SOME
382
415
{}
383
416
{
384
- PUSH int 93 ;
417
+ PUSH int 98 ;
385
418
FAILWITH;
386
419
};
387
420
DIG 5;
You can’t perform that action at this time.
0 commit comments