Contract con_new_contract123412
Creator | db5ced8cbad008d58216d3fc4ca6cb9eb1cb5ed40c976ec8e191dd6329882fb1 |
Creation Hash | 7506fe9cf0e413d880fe955800e18420331fe366f188920877a706e0ea22ed90 |
Created On | 1073 days ago - 4/21/2021, 3:27:48 AM UTC+0 |
Contract Code
1
"""Create a global variable that will store key/value pairs on the blockchain"""
2
__yourState = Hash(default_value='', contract='con_new_contract123412',
3
name='yourState')
4
"""Define smart contract methods to alter state"""
5
6
7
@__export('con_new_contract123412')
8
def set_value(key_name: str, key_value: str):
9
__yourState[key_name] = key_value
10
11
12
@__export('con_new_contract123412')
13
def set_value_for_sender(key_value: str):
14
sender = ctx.caller
15
__yourState[sender] = key_value
16
17
18
""" Current state can be read from the masternode API """
19
Byte Code
e30000000000000000000000000500000040000000734400000064005a00650164016402640364048d035a026503640283016504650464059c0264066407840483015a05650364028301650464089c016409640a840483015a06640b5300290c7a4a437265617465206120676c6f62616c207661726961626c6520746861742077696c6c2073746f7265206b65792f76616c7565207061697273206f6e2074686520626c6f636b636861696eda00da16636f6e5f6e65775f636f6e7472616374313233343132da09796f757253746174652903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d652902da086b65795f6e616d65da096b65795f76616c7565630200000000000000020000000300000043000000730c0000007c0174007c003c006400530029014e2901da0b5f5f796f75725374617465290272070000007208000000a900720a0000007201000000da097365745f76616c75650700000073020000000002720b00000029017208000000630100000000000000020000000300000043000000731200000074006a017d017c0074027c013c006400530029014e2903da03637478da0663616c6c6572720900000029027208000000da0673656e646572720a000000720a0000007201000000da147365745f76616c75655f666f725f73656e6465720c000000730400000000020601720f0000004e2907da075f5f646f635f5fda04486173687209000000da085f5f6578706f7274da03737472720b000000720f000000720a000000720a000000720a0000007201000000da083c6d6f64756c653e01000000730e0000000401060108040601120406011005