Skip to content

Commit f710756

Browse files
author
Semen Medvedev
committed
Fix problem with simulate deploy transaction #279
1 parent 982dcb9 commit f710756

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

proxy/plugin/solana_rest_api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ def eth_call(self, obj, tag):
262262
"""
263263
if not obj['data']: raise Exception("Missing data")
264264
try:
265-
caller_id = obj['from'] if 'from' in obj else "0x0000000000000000000000000000000000000000"
266-
contract_id = obj['to']
267-
data = obj['data'] if 'data' in obj else "None"
268-
value = obj['value'] if 'value' in obj else ""
265+
caller_id = obj.get('from', "0x0000000000000000000000000000000000000000")
266+
contract_id = obj.get('to', 'deploy')
267+
data = obj.get('data', "None")
268+
value = obj.get('value', '')
269269
return "0x"+call_emulated(contract_id, caller_id, data, value)['result']
270270
except Exception as err:
271271
logger.debug("eth_call %s", err)

0 commit comments

Comments
 (0)