Contract con_neb_treasury_001


Contract Code

1 # NEBULA TREASURY
2
3 I = importlib
4
5 dex = Variable()
6 owners = Variable()
7
8 @construct
9 def seed():
10 dex.set('con_rocketswap_official_v1_1')
11
12 owners.set([
13 'ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d',
14 'e787ed5907742fa8d50b3ca2701ab8e03ec749ced806a15cdab800a127d7f863'
15 ])
16
17 @export
18 def add_owner(address: str):
19 assert_owner()
20
21 owner_list = owners.get()
22
23 if address not in owner_list:
24 owner_list.append(address)
25 owners.set(owner_list)
26
27 @export
28 def remove_owner(address: str):
29 assert_owner()
30
31 owner_list = owners.get()
32
33 if address in owner_list:
34 owner_list.remove(address)
35 owners.set(owner_list)
36
37 @export
38 def send_token(token_contract: str, amount: float, to: str):
39 I.import_module(token_contract).transfer(amount, to)
40 assert_owner()
41
42 @export
43 def send_token_to_me(token_contract: str, amount: float):
44 I.import_module(token_contract).transfer(amount, ctx.caller)
45 assert_owner()
46
47 @export
48 def send_lp(token_contract: str, amount: float, to: str):
49 I.import_module(dex.get()).transfer_liquidity(token_contract, to, amount)
50 assert_owner()
51
52 @export
53 def send_lp_to_me(token_contract: str, amount: float):
54 I.import_module(dex.get()).transfer_liquidity(token_contract, ctx.caller, amount)
55 assert_owner()
56
57 @export
58 def set_dex_contract(dex_contract: str):
59 dex.set(dex_contract)
60 assert_owner()
61
62 def assert_owner():
63 assert ctx.caller in owners.get(), 'Only executable by Nebula (NEB) team!'
64

Byte Code

e3000000000000000000000000050000004000000073d600000065005a0165026400640164028d025a0365026400640364028d025a046404640584005a05650664008301650764069c0164076408840483015a08650664008301650764069c016409640a840483015a096506640083016507650a6507640b9c03640c640d840483015a0b6506640083016507650a640e9c02640f6410840483015a0c6506640083016507650a6507640b9c0364116412840483015a0d6506640083016507650a640e9c0264136414840483015a0e650664008301650764159c0164166417840483015a0f6418641984005a10641a5300291bda14636f6e5f6e65625f74726561737572795f303031da036465782902da08636f6e7472616374da046e616d65da066f776e657273630000000000000000000000000300000043000000731c00000074006a0164018301010074026a01640264036702830101006400530029044eda1c636f6e5f726f636b6574737761705f6f6666696369616c5f76315f31da4061653764313464366439623834343366383831626136323434373237623639623638313031306537383264346665343832646266623062366163613032643564da40653738376564353930373734326661386435306233636132373031616238653033656337343963656438303661313563646162383030613132376437663836332903da055f5f646578da03736574da085f5f6f776e657273a900720c000000720c000000da00da045f5f5f5f06000000730800000000010a0104010201720e0000002901da0761646472657373630100000000000000020000000200000043000000732e00000074008300010074016a0283007d017c007c016b07722a7c016a037c008301010074016a047c01830101006400530029014e2905da0e5f5f6173736572745f6f776e6572720b000000da03676574da06617070656e64720a0000002902720f000000da0a6f776e65725f6c697374720c000000720c000000720d000000da096164645f6f776e65720d000000730a00000000020601080108010a017214000000630100000000000000020000000200000043000000732e00000074008300010074016a0283007d017c007c016b06722a7c016a037c008301010074016a047c01830101006400530029014e29057210000000720b0000007211000000da0672656d6f7665720a0000002902720f0000007213000000720c000000720c000000720d000000da0c72656d6f76655f6f776e657216000000730a00000000020601080108010a0172160000002903da0e746f6b656e5f636f6e7472616374da06616d6f756e74da02746f630300000000000000030000000300000043000000731c00000074006a017c0083016a027c017c02830201007403830001006400530029014e2904da0149da0d696d706f72745f6d6f64756c65da087472616e7366657272100000002903721700000072180000007219000000720c000000720c000000720d000000da0a73656e645f746f6b656e1f000000730400000000021201721d000000290272170000007218000000630200000000000000020000000300000043000000731e00000074006a017c0083016a027c0174036a04830201007405830001006400530029014e2906721a000000721b000000721c000000da03637478da0663616c6c65727210000000290272170000007218000000720c000000720c000000720d000000da1073656e645f746f6b656e5f746f5f6d65250000007304000000000214017220000000630300000000000000030000000400000043000000732200000074006a0174026a03830083016a047c007c027c01830301007405830001006400530029014e2906721a000000721b00000072090000007211000000da127472616e736665725f6c697175696469747972100000002903721700000072180000007219000000720c000000720c000000720d000000da0773656e645f6c702b0000007304000000000218017222000000630200000000000000020000000400000043000000732400000074006a0174026a03830083016a047c0074056a067c01830301007407830001006400530029014e2908721a000000721b000000720900000072110000007221000000721e000000721f0000007210000000290272170000007218000000720c000000720c000000720d000000da0d73656e645f6c705f746f5f6d6531000000730600000000021401060172230000002901da0c6465785f636f6e7472616374630100000000000000010000000200000043000000731400000074006a017c00830101007402830001006400530029014e29037209000000720a000000721000000029017224000000720c000000720c000000720d000000da107365745f6465785f636f6e747261637438000000730400000000020a017225000000630000000000000000000000000200000043000000731a00000074006a0174026a0383006b06731674046401830182016400530029024e7a254f6e6c792065786563757461626c65206279204e6562756c6120284e454229207465616d212905721e000000721f000000720b0000007211000000da0e417373657274696f6e4572726f72720c000000720c000000720c000000720d00000072100000003e00000073040000000001100172100000004e2911da09696d706f72746c6962721a000000da085661726961626c657209000000720b000000720e000000da085f5f6578706f7274da0373747272140000007216000000da05666c6f6174721d00000072200000007222000000722300000072250000007210000000720c000000720c000000720c000000720d000000da083c6d6f64756c653e01000000732400000004010c010c03080706011008060110080601140506011205060114050601120606011005