Contract con_mintorburn_gov


Contract Code


  
1 # -> MintOrBurn.com Governance Token <-
2 # -> Decisions can be made about Future MOB Percentage (Start 2%), Farms, Vaults and more <-
3 # LST001
4 balances = Hash(default_value=0)
5 # LST002
6 metadata = Hash()
7 total_supply = Variable()
8 # LST001
9 # LST002
10 @construct
11 def seed():
12 # LST001
13 balances[ctx.caller] = 1000000
14 # LST002
15 metadata['token_name'] = 'MOB Governance'
16 metadata['token_symbol'] = 'MOBGOV'
17 metadata['token_logo_url'] = 'https://mintorburn.com/logo.png'
18 metadata['operator'] = ctx.caller
19 metadata['token_website'] = "https://mintorburn.com/"
20 total_supply.set(1000000)
21 @export
22 def total_supply():
23 return int(total_supply.get())
24 # LST002
25 @export
26 def change_metadata(key: str, value: Any):
27 assert ctx.caller == metadata['operator'
28 ], 'Only operator can set metadata!'
29 metadata[key] = value
30 @export
31 def allowance(owner: str, spender: str):
32 return balances[owner, spender]
33 # LST001
34 @export
35 def approve(amount: float, to: str):
36 assert amount > 0, 'Cannot send negative balances!'
37 balances[ctx.caller, to] += amount
38 return balances[ctx.caller, to]
39 # LST001
40 @export
41 def transfer(amount: float, to: str):
42 assert amount > 0, 'Cannot send negative balances!'
43 sender = ctx.caller
44 assert balances[sender] >= amount, 'Not enough coins to send!'
45 balances[sender] -= amount
46 balances[to] += amount
47 # LST001
48 @export
49 def transfer_from(amount: float, to: str, main_account: str):
50 assert amount > 0, 'Cannot send negative balances!'
51 sender = ctx.caller
52 assert balances[main_account, sender
53 ] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'.format(
54 balances[main_account, sender], amount)
55 assert balances[main_account] >= amount, 'Not enough coins to send!'
56 balances[main_account, sender] -= amount
57 balances[main_account] -= amount
58 balances[to] += amount

Byte Code

e3000000000000000000000000050000004000000073bc000000650064006401640264038d035a0165006401640464058d025a0265036401640664058d025a046407640884005a0565066401830164096406840083015a0765066401830165086509640a9c02640b640c840483015a0a65066401830165086508640d9c02640e640f840483015a0b650664018301650c650864109c0264116412840483015a0d650664018301650c650864109c0264136414840483015a0e650664018301650c6508650864159c0364166417840483015a0f641853002919e900000000da12636f6e5f6d696e746f726275726e5f676f76da0862616c616e6365732903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d65da086d65746164617461290272050000007206000000da0c746f74616c5f737570706c7963000000000000000000000000030000004300000073420000006401740074016a023c006402740364033c006404740364053c006406740364073c0074016a02740364083c0064097403640a3c0074046a0564018301010064005300290b4e6940420f007a0e4d4f4220476f7665726e616e6365da0a746f6b656e5f6e616d65da064d4f42474f56da0c746f6b656e5f73796d626f6c7a1f68747470733a2f2f6d696e746f726275726e2e636f6d2f6c6f676f2e706e67da0e746f6b656e5f6c6f676f5f75726cda086f70657261746f727a1768747470733a2f2f6d696e746f726275726e2e636f6d2fda0d746f6b656e5f776562736974652906da0a5f5f62616c616e636573da03637478da0663616c6c6572da0a5f5f6d65746164617461da0e5f5f746f74616c5f737570706c79da03736574a90072150000007215000000da00da045f5f5f5f07000000730e00000000010a010801080108010a0108017217000000630000000000000000000000000200000043000000730c000000740074016a0283008301530029014e2903da03696e747213000000da036765747215000000721500000072150000007216000000720800000011000000730200000000022902da036b6579da0576616c7565630200000000000000020000000300000043000000732200000074006a017402640119006b02731674036402830182017c0174027c003c006400530029034e720d0000007a1f4f6e6c79206f70657261746f722063616e20736574206d65746164617461212904721000000072110000007212000000da0e417373657274696f6e4572726f722902721a000000721b000000721500000072150000007216000000da0f6368616e67655f6d65746164617461160000007306000000000210010601721d0000002902da056f776e6572da077370656e646572630200000000000000020000000300000043000000730c00000074007c007c0166021900530029014e2901720f0000002902721e000000721f000000721500000072150000007216000000da09616c6c6f77616e63651d0000007302000000000272200000002902da06616d6f756e74da02746f63020000000000000002000000040000004300000073340000007c0064016b0473107400640283018201740174026a037c016602050019007c00370003003c00740174026a037c0166021900530029034e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573212904721c000000720f00000072100000007211000000290272210000007222000000721500000072150000007216000000da07617070726f76652200000073060000000002100116017223000000630200000000000000030000000400000043000000734e0000007c0064016b047310740064028301820174016a027d0274037c0219007c006b05732a740064038301820174037c02050019007c00380003003c0074037c01050019007c00370003003c006400530029044e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f2073656e64212904721c00000072100000007211000000720f000000290372210000007222000000da0673656e646572721500000072150000007216000000da087472616e7366657229000000730a000000000210010601140110017225000000290372210000007222000000da0c6d61696e5f6163636f756e74630300000000000000040000000500000043000000738a0000007c0064016b047310740064028301820174016a027d0374037c027c03660219007c006b05733e740064036a0474037c027c03660219007c0083028301820174037c0219007c006b057352740064048301820174037c027c036602050019007c00380003003c0074037c02050019007c00380003003c0074037c01050019007c00370003003c006400530029054e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a494e6f7420656e6f75676820636f696e7320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d7a194e6f7420656e6f75676820636f696e7320746f2073656e64212905721c00000072100000007211000000720f000000da06666f726d617429047221000000722200000072260000007224000000721500000072150000007216000000da0d7472616e736665725f66726f6d3200000073120000000002100106010a010c01120114011401100172280000004e2910da0448617368720f0000007212000000da085661726961626c6572130000007217000000da085f5f6578706f72747208000000da03737472da03416e79721d0000007220000000da05666c6f61747223000000722500000072280000007215000000721500000072150000007216000000da083c6d6f64756c653e01000000731e000000060108010c010c03080a1005060112060601120406011206060112080601