Transaction #909034

Hash b3d0b1de0c0d7008a856578554e748189a7852f81f314b705de6eacc5985a6f7
Status Success
Timestamp 729 days ago - 5/20/2022, 11:35:13 AM UTC+0
Block 862384
Stamps Used 192
Burned Fee 0.01136095 TAU
From 09a37032586bd60ea6bbb0591cbe34eb010e044e6e2dcb4d3d9494d3dce272e5 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 10
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 29fc79ec2a85b87ce395fe43fe1fb9b059b248e839b153e2441d1e23e6e085284e22076c1379c7e605252dec9583bf9117cb9b7001312f4bf21665d5cc62dc04
Stamps Supplied 845
Stamps per TAU 169

Kwargs

code # Initial Total Supply starts at 0. # Attempt to mine a token using the mine() function # Random integer between 1 - 33 chosen, match mints a token # Difficulty subject to change # LST001 balances = Hash(default_value=0) # LST002 metadata = Hash() random.seed() difficulty = Variable() @construct def seed(): # LST002 metadata['token_name'] = "Mine Or Miss" metadata['token_symbol'] = "MoM" metadata['operator'] = ctx.caller # LST002 @export def change_metadata(key: str, value: Any): assert ctx.caller == metadata['operator'], 'Only operator can set metadata!' metadata[key] = value # LST001 @export def set_diff(new_difficulty: int): assert ctx.caller == metadata['operator'], 'Only operator can set diff!' assert new_difficulty >= 1, 'Value must be >= 1' difficulty.set(new_difficulty) # LST001 @export def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' assert balances[ctx.caller] >= amount, 'Not enough coins to send!' balances[ctx.caller] -= amount balances[to] += amount # LST001 @export def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' balances[ctx.caller, to] += amount # LST001 @export def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' assert balances[main_account, ctx.caller] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'\ .format(balances[main_account, ctx.caller], amount) assert balances[main_account] >= amount, 'Not enough coins to send!' balances[main_account, ctx.caller] -= amount balances[main_account] -= amount balances[to] += amount @export def mine(): random_number = random.randint(0, difficulty.get()) if random_number == difficulty.get(): balances[ctx.caller] += 1 return f"Mined!" else: return "missed."
name con_miomi

State Changes

Contract con_miomi
Variable metadata
Key token_name
New Value Mine Or Miss
 
Contract con_miomi
Variable metadata
Key token_symbol
New Value MoM
 
Contract con_miomi
Variable metadata
Key operator
New Value 09a37032586bd60ea6bbb0591cbe34eb010e044e6e2dcb4d3d9494d3dce272e5
 
Contract con_miomi
Variable __code__
New Value __balances = Hash(default_value=0, contract='con_miomi', name='balances') __metadata = Hash(contract='con_miomi', name='metadata') random.seed() __difficulty = Variable(contract='con_miomi', name='difficulty') def ____(): __metadata['token_name'] = 'Mine Or Miss' __metadata['token_symbol'] = 'MoM' __metadata['operator'] = ctx.caller @__export('con_miomi') def change_metadata(key: str, value: Any): assert ctx.caller == __metadata['operator' ], 'Only operator can set metadata!' __metadata[key] = value @__export('con_miomi') def set_diff(new_difficulty: int): assert ctx.caller == __metadata['operator'], 'Only operator can set diff!' assert new_difficulty >= 1, 'Value must be >= 1' __difficulty.set(new_difficulty) @__export('con_miomi') def transfer(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' assert __balances[ctx.caller] >= amount, 'Not enough coins to send!' __balances[ctx.caller] -= amount __balances[to] += amount @__export('con_miomi') def approve(amount: float, to: str): assert amount > 0, 'Cannot send negative balances!' __balances[ctx.caller, to] += amount @__export('con_miomi') def transfer_from(amount: float, to: str, main_account: str): assert amount > 0, 'Cannot send negative balances!' assert __balances[main_account, ctx.caller ] >= amount, 'Not enough coins approved to send! You have {} and are trying to spend {}'.format( __balances[main_account, ctx.caller], amount) assert __balances[main_account] >= amount, 'Not enough coins to send!' __balances[main_account, ctx.caller] -= amount __balances[main_account] -= amount __balances[to] += amount @__export('con_miomi') def mine(): random_number = random.randint(0, __difficulty.get()) if random_number == __difficulty.get(): __balances[ctx.caller] += 1 return f'Mined!' else: return 'missed.'
 
Contract con_miomi
Variable __compiled__
New Value e3000000000000000000000000050000004000000073c2000000650064006401640264038d035a0165006401640464058d025a0265036a048300010065056401640664058d025a066407640884005a076508640183016509650a64099c02640a640b840483015a0b650864018301650c640c9c01640d640e840483015a0d650864018301650e6509640f9c0264106411840483015a0f650864018301650e6509640f9c0264126413840483015a10650864018301650e6509650964149c0364156416840483015a1165086401830164176418840083015a1264195300291ae900000000da09636f6e5f6d696f6d69da0862616c616e6365732903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d65da086d65746164617461290272050000007206000000da0a646966666963756c7479630000000000000000000000000300000043000000731e0000006401740064023c006403740064043c0074016a02740064053c006400530029064e7a0c4d696e65204f72204d697373da0a746f6b656e5f6e616d65da034d6f4dda0c746f6b656e5f73796d626f6cda086f70657261746f722903da0a5f5f6d65746164617461da03637478da0663616c6c6572a90072100000007210000000da00da045f5f5f5f07000000730600000000010801080172120000002902da036b6579da0576616c7565630200000000000000020000000300000043000000732200000074006a017402640119006b02731674036402830182017c0174027c003c006400530029034e720c0000007a1f4f6e6c79206f70657261746f722063616e20736574206d65746164617461212904720e000000720f000000720d000000da0e417373657274696f6e4572726f72290272130000007214000000721000000072100000007211000000da0f6368616e67655f6d657461646174610d000000730600000000021001060172160000002901da0e6e65775f646966666963756c7479630100000000000000010000000300000043000000733400000074006a017402640119006b02731674036402830182017c0064036b057326740364048301820174046a057c00830101006400530029054e720c0000007a1b4f6e6c79206f70657261746f722063616e20736574206469666621e9010000007a1256616c7565206d757374206265203e3d20312906720e000000720f000000720d0000007215000000da0c5f5f646966666963756c7479da0373657429017217000000721000000072100000007211000000da087365745f64696666140000007306000000000216011001721b0000002902da06616d6f756e74da02746f630200000000000000020000000400000043000000734c0000007c0064016b0473107400640283018201740174026a0319007c006b0573267400640383018201740174026a03050019007c00380003003c0074017c01050019007c00370003003c006400530029044e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a194e6f7420656e6f75676820636f696e7320746f2073656e642129047215000000da0a5f5f62616c616e636573720e000000720f0000002902721c000000721d000000721000000072100000007211000000da087472616e736665721b00000073080000000002100116011201721f000000630200000000000000020000000400000043000000732a0000007c0064016b0473107400640283018201740174026a037c016602050019007c00370003003c006400530029034e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e6365732129047215000000721e000000720e000000720f0000002902721c000000721d000000721000000072100000007211000000da07617070726f76652300000073040000000002100172200000002903721c000000721d000000da0c6d61696e5f6163636f756e74630300000000000000030000000500000043000000738a0000007c0064016b047310740064028301820174017c0274026a03660219007c006b05733c740064036a0474017c0274026a03660219007c0083028301820174017c0219007c006b057350740064048301820174017c0274026a036602050019007c00380003003c0074017c02050019007c00380003003c0074017c01050019007c00370003003c006400530029054e72010000007a1e43616e6e6f742073656e64206e656761746976652062616c616e636573217a494e6f7420656e6f75676820636f696e7320617070726f76656420746f2073656e642120596f752068617665207b7d20616e642061726520747279696e6720746f207370656e64207b7d7a194e6f7420656e6f75676820636f696e7320746f2073656e642129057215000000721e000000720e000000720f000000da06666f726d61742903721c000000721d0000007221000000721000000072100000007211000000da0d7472616e736665725f66726f6d290000007310000000000210010c010c0114011401160110017223000000630000000000000000010000000400000043000000733a00000074006a01640174026a03830083027d007c0074026a0383006b027232740474056a06050019006402370003003c0064035300640453006400530029054e720100000072180000007a064d696e6564217a076d69737365642e2907da0672616e646f6dda0772616e64696e747219000000da03676574721e000000720e000000720f0000002901da0d72616e646f6d5f6e756d626572721000000072100000007211000000da046d696e6535000000730a000000000210010c011201040272280000004e2913da0448617368721e000000720d0000007224000000da0473656564da085661726961626c6572190000007212000000da085f5f6578706f7274da03737472da03416e797216000000da03696e74721b000000da05666c6f6174721f0000007220000000722300000072280000007210000000721000000072100000007211000000da083c6d6f64756c653e01000000731e0000000e010c0108010c030806060112060601100606011207060112050601140b
 
Contract con_miomi
Variable __owner__
New Value null
 
Contract con_miomi
Variable __submitted__
New Value 2022,5,20,11,35,13,0
 
Contract con_miomi
Variable __developer__
New Value 09a37032586bd60ea6bbb0591cbe34eb010e044e6e2dcb4d3d9494d3dce272e5
 
Contract currency
Variable balances
Key 09a37032586bd60ea6bbb0591cbe34eb010e044e6e2dcb4d3d9494d3dce272e5
New Value 123.34644948213017745