Transaction #2060

Hash d34cb206f36b79d7502cc208c6c8546511528251988e2a6abd0d6801a039b818
Status Failed
Error Message AssertionError('The cost has exceeded the stamp supplied!\n',)
Timestamp 360 days ago - 5/19/2023, 1:01:20 AM UTC+0
Block 2060
Stamps Used 65
Burned Fee 0.00384615 TAU
From 42019189421e3a8f0e5db17eefeabfdd0cfcb06c482b6cf6ccadab992d044fa5 
Contract Name submission
Function Name submit_contract

Additional Info
Nonce 1
Processor 9d2dbfcc8cd20c8e41b24db367f215e4ac527dc6a2a0acdb4b6008d13d043ef8
Signature 766cc8480c94a648e92635a112f899d50ae19a22c1d81c332d16d6bc1eabf5364db1e8ea41e4e25c1bdb53e899dd2ab62939d5fdb780d30dbc4dae3f32a69404
Stamps Supplied 65
Stamps per TAU 169

Kwargs

code state = Hash(default_value=None) @construct def init(): # Initialize an empty dictionary for each user # Each dictionary will hold different categories of data # This contract could be expanded to have additional categories state['users'] = {} @export def register_user(username: str): # Register a new user # The user's data will be stored in a dictionary assert username not in state['users'], 'This username is already registered' state['users'][username] = {'contacts': [], 'addresses': [], 'documents': [], 'links': []} @export def add_data(username: str, category: str, item: str): # Add a new item to a user's category assert username in state['users'], 'This username is not registered' assert category in state['users'][username], 'This category does not exist' state['users'][username][category].append(item) @export def remove_data(username: str, category: str, item: str): # Remove an item from a user's category assert username in state['users'], 'This username is not registered' assert category in state['users'][username], 'This category does not exist' state['users'][username][category].remove(item) @export def get_data(username: str, category: str): # Get all items in a user's category assert username in state['users'], 'This username is not registered' assert category in state['users'][username], 'This category does not exist' return state['users'][username][category] @export def count_users(): # Count the number of registered users return len(state['users']) @export def count_category_items(username: str, category: str): # Count the number of items in a specific category for a specific user assert username in state['users'], 'This username is not registered' assert category in state['users'][username], 'This category does not exist' return len(state['users'][username][category]) @export def verify_user(username: str): # Verify if a user is registered return username in state['users']
name con_test_f0f

State Changes

Contract currency
Variable balances
Key 42019189421e3a8f0e5db17eefeabfdd0cfcb06c482b6cf6ccadab992d044fa5
New Value 679.31538149846155940