1 |
messages_hash = Hash(default_value=None) |
2 |
|
3 |
@export |
4 |
def send_message(to: str, message: str): |
5 |
sender = ctx.caller |
6 |
|
7 |
counter = messages_hash[sender, to, 'counter'] or 0 |
8 |
counter += 1 |
9 |
|
10 |
messages_hash[sender, to, counter, 'message'] = message |
11 |
messages_hash[sender, to, counter, 'timestamp'] = now |
12 |
messages_hash[sender, to, 'counter'] = counter |
e30000000000000000000000000500000040000000732a000000650064006401640264038d035a016502640183016503650364049c0264056406840483015a046400530029074eda0c636f6e5f6d65737361676573da0d6d657373616765735f686173682903da0d64656661756c745f76616c7565da08636f6e7472616374da046e616d652902da02746fda076d657373616765630200000000000000040000000600000043000000735200000074006a017d0274027c027c00640166031900701664027d037c03640337007d037c0174027c027c007c03640466043c00740374027c027c007c03640566043c007c0374027c027c00640166033c006400530029064eda07636f756e746572e900000000e9010000007207000000da0974696d657374616d702904da03637478da0663616c6c6572da0f5f5f6d657373616765735f68617368da036e6f77290472060000007207000000da0673656e6465727208000000a9007211000000da00da0c73656e645f6d65737361676505000000730c00000000020601120108011001100172130000002905da0448617368720e000000da085f5f6578706f7274da0373747272130000007211000000721100000072110000007212000000da083c6d6f64756c653e010000007306000000060108030601