Transaction #1264652

Hash ccba35d26c3779d78097280d4f055efe96a5e9750f72e7d1883eff46a88a681d
Status Success
Timestamp 476 days ago - 1/14/2023, 10:16:31 PM UTC+0
Block 1215017
Stamps Used 278
Burned Fee 0.01644970 TAU
From ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 7028
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature b8a942a1a44b69a050778165d403cc093449f075f5d99d54aed273f1d35d1cf5c1f83f5ad736f57d772ba627d41b446cc16484d1a07ccf2809b3dc88577ce901
Stamps Supplied 845
Stamps per TAU 169

Kwargs

code balances = Hash(default_value=0) metadata = Hash() operator = Variable() total_supply = Variable() @construct def seed(owner: str): total_supply.set(0) operator.set(owner) metadata['token_name'] = 'RubixDAO' metadata['token_symbol'] = 'lMKR' metadata['token_logo_url'] = 'image.site' metadata['operator'] = ctx.caller @export def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller assert balances[sender] >= amount, 'Not enough coins to send!' balances[sender] -= amount balances[to] += amount @export def balance_of(account: str): return balances[account] @export def allowance(owner: str, spender: str): return balances[owner, spender] @export def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller balances[sender, to] += amount return balances[sender, to] @export def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller assert balances[main_account] >= amount, 'Not enough coins to send!' assert balances[main_account, sender] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'\ .format(balances[main_account, sender], amount) balances[main_account, sender] -= amount balances[main_account] -= amount balances[to] += amount @export def mint(amount: float): assert_owner() assert amount > 0, 'Cannot mint negative balances!' sender = ctx.caller balances[sender] += amount total = total_supply.get() + amount total_supply.set(total) @export def burn(amount: float): assert amount > 0, 'Cannot burn negative balances!' sender = ctx.caller assert balances[sender] >= amount, 'Not enough coins to burn!' balances[sender] -= amount total = total_supply.get() - amount total_supply.set(total) @export def get_total_supply(): return total_supply.get() @export def change_metadata(key: str, value: Any): assert ctx.caller == metadata['operator'], 'Only operator can set metadata!' metadata[key] = value @export def change_owner(new_owner: str): assert_owner() operator.set(new_owner) def assert_owner(): assert ctx.caller == operator.get(), 'Only operator can call!'
constructor_args {"owner":"ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d"}
name con_tad_tst_001

State Changes

Contract con_tad_tst_001
Variable total_supply
New Value 0
 
Contract con_tad_tst_001
Variable operator
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract con_tad_tst_001
Variable metadata
Key token_name
New Value RubixDAO
 
Contract con_tad_tst_001
Variable metadata
Key token_symbol
New Value lMKR
 
Contract con_tad_tst_001
Variable metadata
Key token_logo_url
New Value image.site
 
Contract con_tad_tst_001
Variable metadata
Key operator
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract con_tad_tst_001
Variable __code__
New Value __balances = Hash(default_value=0, contract='con_tad_tst_001', name='balances') __metadata = Hash(contract='con_tad_tst_001', name='metadata') __operator = Variable(contract='con_tad_tst_001', name='operator') __total_supply = Variable(contract='con_tad_tst_001', name='total_supply') def ____(owner: str): __total_supply.set(0) __operator.set(owner) __metadata['token_name'] = 'RubixDAO' __metadata['token_symbol'] = 'lMKR' __metadata['token_logo_url'] = 'image.site' __metadata['operator'] = ctx.caller @__export('con_tad_tst_001') def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller assert __balances[sender] >= amount, 'Not enough coins to send!' __balances[sender] -= amount __balances[to] += amount @__export('con_tad_tst_001') def balance_of(account: str): return __balances[account] @__export('con_tad_tst_001') def allowance(owner: str, spender: str): return __balances[owner, spender] @__export('con_tad_tst_001') def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller __balances[sender, to] += amount return __balances[sender, to] @__export('con_tad_tst_001') def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' sender = ctx.caller assert __balances[main_account] >= amount, 'Not enough coins to send!' assert __balances[main_account, sender ] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'.format( __balances[main_account, sender], amount) __balances[main_account, sender] -= amount __balances[main_account] -= amount __balances[to] += amount @__export('con_tad_tst_001') def mint(amount: float): __assert_owner() assert amount > 0, 'Cannot mint negative balances!' sender = ctx.caller __balances[sender] += amount total = __total_supply.get() + amount __total_supply.set(total) @__export('con_tad_tst_001') def burn(amount: float): assert amount > 0, 'Cannot burn negative balances!' sender = ctx.caller assert __balances[sender] >= amount, 'Not enough coins to burn!' __balances[sender] -= amount total = __total_supply.get() - amount __total_supply.set(total) @__export('con_tad_tst_001') def get_total_supply(): return __total_supply.get() @__export('con_tad_tst_001') def change_metadata(key: str, value: Any): assert ctx.caller == __metadata['operator' ], 'Only operator can set metadata!' __metadata[key] = value @__export('con_tad_tst_001') def change_owner(new_owner: str): __assert_owner() __operator.set(new_owner) def __assert_owner(): assert ctx.caller == __operator.get(), 'Only operator can call!'
 
Contract con_tad_tst_001
Variable __compiled__
New Value e30000000000000000000000000500000040000000732e010000650064006401640264038d035a0165006401640464058d025a0265036401640664058d025a0465036401640764058d025a05650664089c016409640a84045a0765086401830165096506640b9c02640c640d840483015a0a6508640183016506640e9c01640f6410840483015a0b6508640183016506650664119c0264126413840483015a0c65086401830165096506640b9c0264146415840483015a0d65086401830165096506650664169c0364176418840483015a0e650864018301650964199c01641a641b840483015a0f650864018301650964199c01641c641d840483015a10650864018301641e641f840083015a116508640183016506651264209c0264216422840483015a13650864018301650664239c0164246425840483015a146426642784005a15642853002929e900000000da0f636f6e5f7461645f7473745f303031da0862616c616e6365732903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d65da086d65746164617461290272050000007206000000da086f70657261746f72da0c746f74616c5f737570706c792901da056f776e6572630100000000000000010000000300000043000000733a00000074006a0164018301010074026a017c00830101006402740364033c006404740364053c006406740364073c0074046a05740364083c006400530029094e7201000000da08527562697844414fda0a746f6b656e5f6e616d65da046c4d4b52da0c746f6b656e5f73796d626f6c7a0a696d6167652e73697465da0e746f6b656e5f6c6f676f5f75726c72080000002906da0e5f5f746f74616c5f737570706c79da03736574da0a5f5f6f70657261746f72da0a5f5f6d65746164617461da03637478da0663616c6c65722901720a000000a9007216000000da00da045f5f5f5f07000000730c00000000010a010a0108010801080172180000002902da06616d6f756e74da02746f630200000000000000030000000400000043000000734e0000007c0064016b047310740064028301820174016a027d0274037c0219007c006b05732a740064038301820174037c02050019007c00380003003c0074037c01050019007c00370003003c006400530029044e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f2073656e64212904da0e417373657274696f6e4572726f7272140000007215000000da0a5f5f62616c616e63657329037219000000721a000000da0673656e646572721600000072160000007217000000da087472616e7366657210000000730a00000000021001060114011001721e0000002901da076163636f756e74630100000000000000010000000200000043000000730800000074007c001900530029014e2901721c0000002901721f000000721600000072160000007217000000da0a62616c616e63655f6f66190000007302000000000272200000002902720a000000da077370656e646572630200000000000000020000000300000043000000730c00000074007c007c0166021900530029014e2901721c0000002902720a0000007221000000721600000072160000007217000000da09616c6c6f77616e63651e00000073020000000002722200000063020000000000000003000000040000004300000073360000007c0064016b047310740064028301820174016a027d0274037c027c016602050019007c00370003003c0074037c027c0166021900530029034e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573212904721b00000072140000007215000000721c00000029037219000000721a000000721d000000721600000072160000007217000000da07617070726f76652300000073080000000002100106011401722300000029037219000000721a000000da0c6d61696e5f6163636f756e74630300000000000000040000000500000043000000738a0000007c0064016b047310740064028301820174016a027d0374037c0219007c006b05732a740064038301820174037c027c03660219007c006b057352740064046a0474037c027c03660219007c0083028301820174037c027c036602050019007c00380003003c0074037c02050019007c00380003003c0074037c01050019007c00370003003c006400530029054e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f2073656e64217a494e6f7420656e6f75676820636f696e7320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d2905721b00000072140000007215000000721c000000da06666f726d617429047219000000721a0000007224000000721d000000721600000072160000007217000000da0d7472616e736665725f66726f6d2b000000731200000000021001060114010a010c0112011401100172260000002901721900000063010000000000000003000000040000004300000073460000007400830001007c0064016b047316740164028301820174026a037d0174047c01050019007c00370003003c0074056a0683007c0017007d0274056a077c02830101006400530029034e72010000007a1e43616e6e6f74206d696e74206e656761746976652062616c616e636573212908da0e5f5f6173736572745f6f776e6572721b00000072140000007215000000721c0000007210000000da03676574721100000029037219000000721d000000da05746f74616c721600000072160000007217000000da046d696e7438000000730c000000000206011001060110010c01722a00000063010000000000000003000000040000004300000073540000007c0064016b047310740064028301820174016a027d0174037c0119007c006b05732a740064038301820174037c01050019007c00380003003c0074046a0583007c0018007d0274046a067c02830101006400530029044e72010000007a1e43616e6e6f74206275726e206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f206275726e212907721b00000072140000007215000000721c00000072100000007228000000721100000029037219000000721d0000007229000000721600000072160000007217000000da046275726e42000000730c000000000210010601140110010c01722b000000630000000000000000000000000100000043000000730800000074006a018300530029014e2902721000000072280000007216000000721600000072160000007217000000da106765745f746f74616c5f737570706c794c00000073020000000002722c0000002902da036b6579da0576616c7565630200000000000000020000000300000043000000732200000074006a017402640119006b02731674036402830182017c0174027c003c006400530029034e72080000007a1f4f6e6c79206f70657261746f722063616e20736574206d65746164617461212904721400000072150000007213000000721b0000002902722d000000722e000000721600000072160000007217000000da0f6368616e67655f6d65746164617461510000007306000000000210010601722f0000002901da096e65775f6f776e6572630100000000000000010000000200000043000000731400000074008300010074016a027c00830101006400530029014e290372270000007212000000721100000029017230000000721600000072160000007217000000da0c6368616e67655f6f776e6572580000007304000000000206017231000000630000000000000000000000000200000043000000731a00000074006a0174026a0383006b02731674046401830182016400530029024e7a174f6e6c79206f70657261746f722063616e2063616c6c2129057214000000721500000072120000007228000000721b000000721600000072160000007216000000721700000072270000005e0000007302000000000172270000004e2916da0448617368721c0000007213000000da085661726961626c6572120000007210000000da037374727218000000da085f5f6578706f7274da05666c6f6174721e0000007220000000722200000072230000007226000000722a000000722b000000722c000000da03416e79722f000000723100000072270000007216000000721600000072160000007217000000da083c6d6f64756c653e0100000073300000000e010c010c010c030e09060112080601100406011204060112070601140c060110090601100910050601120606011005
 
Contract con_tad_tst_001
Variable __owner__
New Value null
 
Contract con_tad_tst_001
Variable __submitted__
New Value 2023,1,14,22,16,32,0
 
Contract con_tad_tst_001
Variable __developer__
New Value ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
 
Contract currency
Variable balances
Key ae7d14d6d9b8443f881ba6244727b69b681010e782d4fe482dbfb0b6aca02d5d
New Value 8814.733084465889601267270386475186