Contract con_new_contract654
Creator | ff61544ea94eaaeb5df08ed863c4a938e9129aba6ceee5f31b6681bdede11b89 |
Creation Hash | a0db7257bd893ecb11c5c67aacc6f7d186d9211bb12a3955322acf4d77921da6 |
Created On | 375 days ago - 3/18/2023, 2:04:26 PM UTC+0 |
Contract Code
1
@construct
2
def seed():
3
pass
4
5
@export
6
def get(contract_name: str, amount: float, recipient: str):
7
# Get a reference to the driver object for the current contract
8
driver = Hash()
9
10
# Get a reference to the driver object for the target contract
11
target_driver = driver.from_contract(contract_name)
12
13
# Get the current state of the target contract
14
target_state = target_driver.get('state', {})
15
16
# Modify the state
17
recipient_balance = target_state.get(recipient + '_balance', 0)
18
target_state[recipient + '_balance'] = recipient_balance + amount
19
20
# Save the modified state back to the target contract's driver
21
target_driver.set('state', target_state)
Byte Code
e3000000000000000000000000050000004000000073260000006400640184005a0065016402830165026503650264039c0364046405840483015a0464065300290763000000000000000000000000010000004300000073040000006400530029014ea900720100000072010000007201000000da00da045f5f5f5f01000000730200000000017203000000da13636f6e5f6e65775f636f6e74726163743635342903da0d636f6e74726163745f6e616d65da06616d6f756e74da09726563697069656e74630300000000000000070000000400000043000000735200000074006401640264038d027d037c036a017c0083017d047c046a026404690083027d057c056a027c0264051700640683027d067c067c0117007c057c02640517003c007c046a0364047c05830201006400530029074e7204000000da066472697665722902da08636f6e7472616374da046e616d65da057374617465da085f62616c616e6365e9000000002904da0448617368da0d66726f6d5f636f6e7472616374da03676574da037365742907720500000072060000007207000000da085f5f647269766572da0d7461726765745f647269766572da0c7461726765745f7374617465da11726563697069656e745f62616c616e6365720100000072010000007202000000721000000005000000730c00000000020c010a010c011001100172100000004e29057203000000da085f5f6578706f7274da03737472da05666c6f617472100000007201000000720100000072010000007202000000da083c6d6f64756c653e01000000730400000008040601