Transaction #2080

Hash db0aaaf25ba4c7afdbf88089010f653fe9e119cd0abf69389d935416c0ebc0d0
Status Success
Timestamp 342 days ago - 5/19/2023, 1:40:14 AM UTC+0
Block 2080
Stamps Used 151
Burned Fee 0.00893491 TAU
From 42019189421e3a8f0e5db17eefeabfdd0cfcb06c482b6cf6ccadab992d044fa5 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 4
Processor ffd7182fcfd0d84ca68845fb11bafad11abca2f9aca8754a6d9cad7baa39d28b
Signature c5aae7cf038d3d51659a9d5fb893c60a8499eecef24c5fa4f4158d728c208708cf7fb79a066748df405be84da5d476f372d49de8e6334882d568bcbace256702
Stamps Supplied 653
Stamps per TAU 169

Kwargs

code # Initialize a state hash that uses a tuple of strings as keys and an empty dictionary as the default value users = Hash(default_value={}) @export def register_user(username: str): # Ensure the username hasn't already been registered assert username not in users, 'This username is already registered' # Create a new entry in the users hash for this username users[username] = {'contacts': [], 'addresses': [], 'documents': [], 'links': []} @export def add_data(username: str, category: str, item: str): # Ensure the username has been registered assert username in users, 'This username is not registered' # Ensure the category is valid assert category in users[username], 'This category does not exist' # Add the new item to the user's specified category users[username][category].append(item) @export def remove_data(username: str, category: str, item: str): # Ensure the username has been registered assert username in users, 'This username is not registered' # Ensure the category is valid assert category in users[username], 'This category does not exist' # Remove the item from the user's specified category users[username][category].remove(item) @export def get_data(username: str, category: str): # Ensure the username has been registered assert username in users, 'This username is not registered' # Ensure the category is valid assert category in users[username], 'This category does not exist' # Return the user's data for the specified category return users[username][category] @export def count_users(): # Return the total number of registered users return len(users) @export def count_category_items(username: str, category: str): # Ensure the username has been registered assert username in users, 'This username is not registered' # Ensure the category is valid assert category in users[username], 'This category does not exist' # Return the number of items in the user's specified category return len(users[username][category]) @export def verify_user(username: str): # Check if the username is registered return username in users
name con_test_f0f3

State Changes

Contract con_test_f0f3
Variable __code__
New Value __users = Hash(default_value={}, contract='con_test_f0f3', name='users') @__export('con_test_f0f3') def register_user(username: str): assert username not in __users, 'This username is already registered' __users[username] = {'contacts': [], 'addresses': [], 'documents': [], 'links': []} @__export('con_test_f0f3') def add_data(username: str, category: str, item: str): assert username in __users, 'This username is not registered' assert category in __users[username], 'This category does not exist' __users[username][category].append(item) @__export('con_test_f0f3') def remove_data(username: str, category: str, item: str): assert username in __users, 'This username is not registered' assert category in __users[username], 'This category does not exist' __users[username][category].remove(item) @__export('con_test_f0f3') def get_data(username: str, category: str): assert username in __users, 'This username is not registered' assert category in __users[username], 'This category does not exist' return __users[username][category] @__export('con_test_f0f3') def count_users(): return len(__users) @__export('con_test_f0f3') def count_category_items(username: str, category: str): assert username in __users, 'This username is not registered' assert category in __users[username], 'This category does not exist' return len(__users[username][category]) @__export('con_test_f0f3') def verify_user(username: str): return username in __users
 
Contract con_test_f0f3
Variable __compiled__
New Value e3000000000000000000000000050000004000000073b2000000650069006400640164028d035a01650264008301650364039c0164046405840483015a0465026400830165036503650364069c0364076408840483015a0565026400830165036503650364069c036409640a840483015a0665026400830165036503640b9c02640c640d840483015a07650264008301640e640f840083015a0865026400830165036503640b9c0264106411840483015a09650264008301650364039c0164126413840483015a0a641453002915da0d636f6e5f746573745f66306633da0575736572732903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d652901da08757365726e616d6563010000000000000001000000050000004300000073260000007c0074006b0773107401640183018201670067006700670064029c0474007c003c006400530029034e7a235468697320757365726e616d6520697320616c726561647920726567697374657265642904da08636f6e7461637473da09616464726573736573da09646f63756d656e7473da056c696e6b732902da075f5f7573657273da0e417373657274696f6e4572726f7229017206000000a900720d000000da00da0d72656769737465725f75736572040000007306000000000210010601720f00000029037206000000da0863617465676f7279da046974656d630300000000000000030000000300000043000000733a0000007c0074006b06731074016401830182017c0174007c0019006b067324740164028301820174007c0019007c0119006a027c02830101006400530029034e7a1f5468697320757365726e616d65206973206e6f7420726567697374657265647a1c546869732063617465676f727920646f6573206e6f742065786973742903720b000000720c000000da06617070656e642903720600000072100000007211000000720d000000720d000000720e000000da086164645f646174610b00000073060000000002100114017213000000630300000000000000030000000300000043000000733a0000007c0074006b06731074016401830182017c0174007c0019006b067324740164028301820174007c0019007c0119006a027c02830101006400530029034e7a1f5468697320757365726e616d65206973206e6f7420726567697374657265647a1c546869732063617465676f727920646f6573206e6f742065786973742903720b000000720c000000da0672656d6f76652903720600000072100000007211000000720d000000720d000000720e000000da0b72656d6f76655f64617461120000007306000000000210011401721500000029027206000000721000000063020000000000000002000000030000004300000073300000007c0074006b06731074016401830182017c0174007c0019006b067324740164028301820174007c0019007c011900530029034e7a1f5468697320757365726e616d65206973206e6f7420726567697374657265647a1c546869732063617465676f727920646f6573206e6f742065786973742902720b000000720c000000290272060000007210000000720d000000720d000000720e000000da086765745f6461746119000000730600000000021001140172160000006300000000000000000000000002000000430000007308000000740074018301530029014e2902da036c656e720b000000720d000000720d000000720d000000720e000000da0b636f756e745f75736572732000000073020000000002721800000063020000000000000002000000030000004300000073340000007c0074006b06731074016401830182017c0174007c0019006b0673247401640283018201740274007c0019007c0119008301530029034e7a1f5468697320757365726e616d65206973206e6f7420726567697374657265647a1c546869732063617465676f727920646f6573206e6f742065786973742903720b000000720c0000007217000000290272060000007210000000720d000000720d000000720e000000da14636f756e745f63617465676f72795f6974656d73250000007306000000000210011401721900000063010000000000000001000000020000004300000073080000007c0074006b06530029014e2901720b00000029017206000000720d000000720d000000720e000000da0b7665726966795f757365722c00000073020000000002721a0000004e290bda0448617368720b000000da085f5f6578706f7274da03737472720f00000072130000007215000000721600000072180000007219000000721a000000720d000000720d000000720d000000720e000000da083c6d6f64756c653e01000000731a0000000e03060110060601140606011406060112061005060112060601
 
Contract con_test_f0f3
Variable __developer__
New Value 42019189421e3a8f0e5db17eefeabfdd0cfcb06c482b6cf6ccadab992d044fa5
 
Contract con_test_f0f3
Variable __owner__
New Value null
 
Contract con_test_f0f3
Variable __submitted__
New Value 2023,5,19,1,40,15,0
 
Contract currency
Variable balances
Key 42019189421e3a8f0e5db17eefeabfdd0cfcb06c482b6cf6ccadab992d044fa5
New Value 623.77691987000002370