Transaction #1245626

Hash d34463b660c64ac36590496ed43c3cf1d2f9c9f523ff7288578f88295234bf88
Status Success
Timestamp 500 days ago - 1/3/2023, 6:46:24 PM UTC+0
Block 1196168
Stamps Used 249
Burned Fee 0.01473373 TAU
From ff61544ea94eaaeb5df08ed863c4a938e9129aba6ceee5f31b6681bdede11b89 
Contract Name submission
Function Name submit_contract

Additional Info
SubBlock Number 0
Nonce 2653
Processor 5b09493df6c18d17cc883ebce54fcb1f5afbd507533417fe32c006009a9c3c4a
Signature 75c43b21792120fd65de9e20a99be689ce252aa010de4728278e8bdd580f6afe20f00dc3fadda28d214b1bc82872f08f5d0711ddd1b904ba1d9614250b30280f
Stamps Supplied 845
Stamps per TAU 169

Kwargs

code I = importlib nameservice_contract = Variable() owner = Variable() name_info = Hash(default_value=None) allowed_keys = Variable() change_price = Variable() trt_contract = Variable() @construct def seed(): nameservice_contract.set("con_nameservice_v3") owner.set(ctx.caller) allowed_keys.set(["twitter"]) change_price.set(1.0) trt_contract.set("con_trt") @export def set_data(name:str, key:str, value: str): names_balances = ForeignHash(foreign_contract=nameservice_contract.get(), foreign_name='collection_balances') assert names_balances[ctx.caller, name] != 0, "You do not own this name" assert key in allowed_keys.get(), "This data is not allowed" token = I.import_module(trt_contract.get()) token.transfer_from(amount=change_price.get(), to=owner.get(), main_account=ctx.caller) name_info[name, key] = value @export def clear_data(name:str): names_balances = ForeignHash(foreign_contract=nameservice_contract.get(), foreign_name='collection_balances') assert names_balances[ctx.caller, name] != 0, "You do not own this name" for key in allowed_keys.get(): name_info[name, key] = None @export def set_change_price(new_change_price:float): assert ctx.caller == owner.get(), "You are not the owner" change_price.set(new_change_price) @export def set_trt_contract(new_trt_contract:float): assert ctx.caller == owner.get(), "You are not the owner" trt_contract.set(new_trt_contract) @export def set_owner(new_owner:str): assert ctx.caller == owner.get(), "You are not the owner" owner.set(new_owner) @export def set_nameservice_contract(new_contract:str): assert ctx.caller == owner.get(), "You are not the owner" nameservice_contract.set(new_contract) @export def set_allowed_keys(new_allowed_keys:list): assert ctx.caller == owner.get(), "You are not the owner" allowed_keys.set(new_allowed_keys)
name con_nameservice_info_v1

State Changes

Contract con_nameservice_info_v1
Variable nameservice_contract
New Value con_nameservice_v3
 
Contract con_nameservice_info_v1
Variable owner
New Value ff61544ea94eaaeb5df08ed863c4a938e9129aba6ceee5f31b6681bdede11b89
 
Contract con_nameservice_info_v1
Variable allowed_keys
New Value ["twitter"]
 
Contract con_nameservice_info_v1
Variable change_price
New Value 1.0
 
Contract con_nameservice_info_v1
Variable trt_contract
New Value con_trt
 
Contract con_nameservice_info_v1
Variable __code__
New Value I = importlib __nameservice_contract = Variable(contract='con_nameservice_info_v1', name= 'nameservice_contract') __owner = Variable(contract='con_nameservice_info_v1', name='owner') __name_info = Hash(default_value=None, contract='con_nameservice_info_v1', name='name_info') __allowed_keys = Variable(contract='con_nameservice_info_v1', name= 'allowed_keys') __change_price = Variable(contract='con_nameservice_info_v1', name= 'change_price') __trt_contract = Variable(contract='con_nameservice_info_v1', name= 'trt_contract') def ____(): __nameservice_contract.set('con_nameservice_v3') __owner.set(ctx.caller) __allowed_keys.set(['twitter']) __change_price.set(decimal('1.0')) __trt_contract.set('con_trt') @__export('con_nameservice_info_v1') def set_data(name: str, key: str, value: str): __names_balances = ForeignHash(foreign_contract=__nameservice_contract. get(), foreign_name='collection_balances', contract= 'con_nameservice_info_v1', name='names_balances') assert __names_balances[ctx.caller, name] != 0, 'You do not own this name' assert key in __allowed_keys.get(), 'This data is not allowed' token = I.import_module(__trt_contract.get()) token.transfer_from(amount=__change_price.get(), to=__owner.get(), main_account=ctx.caller) __name_info[name, key] = value @__export('con_nameservice_info_v1') def clear_data(name: str): __names_balances = ForeignHash(foreign_contract=__nameservice_contract. get(), foreign_name='collection_balances', contract= 'con_nameservice_info_v1', name='names_balances') assert __names_balances[ctx.caller, name] != 0, 'You do not own this name' for key in __allowed_keys.get(): __name_info[name, key] = None @__export('con_nameservice_info_v1') def set_change_price(new_change_price: float): assert ctx.caller == __owner.get(), 'You are not the owner' __change_price.set(new_change_price) @__export('con_nameservice_info_v1') def set_trt_contract(new_trt_contract: float): assert ctx.caller == __owner.get(), 'You are not the owner' __trt_contract.set(new_trt_contract) @__export('con_nameservice_info_v1') def set_owner(new_owner: str): assert ctx.caller == __owner.get(), 'You are not the owner' __owner.set(new_owner) @__export('con_nameservice_info_v1') def set_nameservice_contract(new_contract: str): assert ctx.caller == __owner.get(), 'You are not the owner' __nameservice_contract.set(new_contract) @__export('con_nameservice_info_v1') def set_allowed_keys(new_allowed_keys: list): assert ctx.caller == __owner.get(), 'You are not the owner' __allowed_keys.set(new_allowed_keys)
 
Contract con_nameservice_info_v1
Variable __compiled__
New Value e3000000000000000000000000050000004000000073f800000065005a0165026400640164028d025a0365026400640364028d025a04650564046400640564068d035a0665026400640764028d025a0765026400640864028d025a0865026400640964028d025a09640a640b84005a0a650b64008301650c650c650c640c9c03640d640e840483015a0d650b64008301650c640f9c0164106411840483015a0e650b64008301650f64129c0164136414840483015a10650b64008301650f64159c0164166417840483015a11650b64008301650c64189c016419641a840483015a12650b64008301650c641b9c01641c641d840483015a13650b640083016514641e9c01641f6420840483015a15640453002921da17636f6e5f6e616d65736572766963655f696e666f5f7631da146e616d65736572766963655f636f6e74726163742902da08636f6e7472616374da046e616d65da056f776e65724eda096e616d655f696e666f2903da0d64656661756c745f76616c756572030000007204000000da0c616c6c6f7765645f6b657973da0c6368616e67655f7072696365da0c7472745f636f6e7472616374630000000000000000000000000300000043000000733e00000074006a0164018301010074026a0174036a048301010074056a01640267018301010074066a017407640383018301010074086a016404830101006400530029054eda12636f6e5f6e616d65736572766963655f7633da07747769747465727a03312e30da07636f6e5f7472742909da165f5f6e616d65736572766963655f636f6e7472616374da03736574da075f5f6f776e6572da03637478da0663616c6c6572da0e5f5f616c6c6f7765645f6b657973da0e5f5f6368616e67655f7072696365da07646563696d616cda0e5f5f7472745f636f6e7472616374a90072170000007217000000da00da045f5f5f5f0f000000730a00000000010a010c010c010e01721900000029037204000000da036b6579da0576616c7565630300000000000000050000000600000043000000737a000000740074016a02830064016402640364048d047d037c0374036a047c006602190064056b03732e74056406830182017c0174066a0283006b067342740564078301820174076a0874096a02830083017d047c046a0a740b6a028300740c6a02830074036a0464088d0301007c02740d7c007c0166023c006400530029094eda13636f6c6c656374696f6e5f62616c616e6365737201000000da0e6e616d65735f62616c616e6365732904da10666f726569676e5f636f6e7472616374da0c666f726569676e5f6e616d6572030000007204000000e9000000007a18596f7520646f206e6f74206f776e2074686973206e616d657a18546869732064617461206973206e6f7420616c6c6f7765642903da06616d6f756e74da02746fda0c6d61696e5f6163636f756e74290eda0b466f726569676e48617368720e000000da0367657472110000007212000000da0e417373657274696f6e4572726f727213000000da0149da0d696d706f72745f6d6f64756c657216000000da0d7472616e736665725f66726f6d72140000007210000000da0b5f5f6e616d655f696e666f29057204000000721a000000721b000000da105f5f6e616d65735f62616c616e636573da05746f6b656e721700000072170000007218000000da087365745f646174611700000073120000000002080102010a011a0114010e0110010a01722d000000290172040000006301000000000000000300000006000000430000007350000000740074016a02830064016402640364048d047d017c0174036a047c006602190064056b03732e7405640683018201781c74066a02830044005d107d02640074077c007c0266023c00713857006400530029074e721c0000007201000000721d0000002904721e000000721f0000007203000000720400000072200000007a18596f7520646f206e6f74206f776e2074686973206e616d6529087224000000720e00000072250000007211000000721200000072260000007213000000722a00000029037204000000722b000000721a000000721700000072170000007218000000da0a636c6561725f6461746124000000730c0000000002080102010a011a010e01722e0000002901da106e65775f6368616e67655f7072696365630100000000000000010000000200000043000000732400000074006a0174026a0383006b027316740464018301820174056a067c00830101006400530029024e7a15596f7520617265206e6f7420746865206f776e65722907721100000072120000007210000000722500000072260000007214000000720f0000002901722f000000721700000072170000007218000000da107365745f6368616e67655f70726963652e00000073040000000002160172300000002901da106e65775f7472745f636f6e7472616374630100000000000000010000000200000043000000732400000074006a0174026a0383006b027316740464018301820174056a067c00830101006400530029024e7a15596f7520617265206e6f7420746865206f776e65722907721100000072120000007210000000722500000072260000007216000000720f00000029017231000000721700000072170000007218000000da107365745f7472745f636f6e74726163743400000073040000000002160172320000002901da096e65775f6f776e6572630100000000000000010000000200000043000000732400000074006a0174026a0383006b027316740464018301820174026a057c00830101006400530029024e7a15596f7520617265206e6f7420746865206f776e6572290672110000007212000000721000000072250000007226000000720f00000029017233000000721700000072170000007218000000da097365745f6f776e65723a00000073040000000002160172340000002901da0c6e65775f636f6e7472616374630100000000000000010000000200000043000000732400000074006a0174026a0383006b027316740464018301820174056a067c00830101006400530029024e7a15596f7520617265206e6f7420746865206f776e6572290772110000007212000000721000000072250000007226000000720e000000720f00000029017235000000721700000072170000007218000000da187365745f6e616d65736572766963655f636f6e74726163744000000073040000000002160172360000002901da106e65775f616c6c6f7765645f6b657973630100000000000000010000000200000043000000732400000074006a0174026a0383006b027316740464018301820174056a067c00830101006400530029024e7a15596f7520617265206e6f7420746865206f776e65722907721100000072120000007210000000722500000072260000007213000000720f00000029017237000000721700000072170000007218000000da107365745f616c6c6f7765645f6b6579734600000073040000000002160172380000002916da09696d706f72746c69627227000000da085661726961626c65720e0000007210000000da0448617368722a0000007213000000721400000072160000007219000000da085f5f6578706f7274da03737472722d000000722e000000da05666c6f61747230000000723200000072340000007236000000da046c69737472380000007217000000721700000072170000007218000000da083c6d6f64756c653e0100000073340000000401040108010c010601080104010801040108010401080308080601140c06011009060110050601100506011005060110050601
 
Contract con_nameservice_info_v1
Variable __owner__
New Value null
 
Contract con_nameservice_info_v1
Variable __submitted__
New Value 2023,1,3,18,46,25,0
 
Contract con_nameservice_info_v1
Variable __developer__
New Value ff61544ea94eaaeb5df08ed863c4a938e9129aba6ceee5f31b6681bdede11b89
 
Contract currency
Variable balances
Key ff61544ea94eaaeb5df08ed863c4a938e9129aba6ceee5f31b6681bdede11b89
New Value 589.366969370994907826828260563046