Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ def lambda_handler(event, context):
amount = event.get('amount')

nonce = event.get('nonce')
# get the call data
data = event.get('data')

# optional params
chainid = event.get('chainid')
type = event.get('type')
gas_limit = event.get('gas_limit')
max_fee_per_gas = event.get('max_fee_per_gas')
max_priority_fee_per_gas = event.get('max_priority_fee_per_gas')

Expand All @@ -77,8 +80,10 @@ def lambda_handler(event, context):
nonce=nonce,
chainid=chainid,
type=type,
gas_limit=gas_limit,
max_fee_per_gas=max_fee_per_gas,
max_priority_fee_per_gas=max_priority_fee_per_gas)
max_priority_fee_per_gas=max_priority_fee_per_gas,
data=data)

# assemble Ethereum transaction and sign it offline
raw_tx_signed_hash, raw_tx_signed_payload = assemble_tx(tx_params=tx_params,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ def get_recovery_id(msg_hash: bytes, r: int, s: int, eth_checksum_addr: str, cha


def get_tx_params(dst_address: str, amount: int, nonce: int,
chainid: int, type: int, max_fee_per_gas: int, max_priority_fee_per_gas: int) -> dict:
chainid: int, type: int, gas_limit: int, max_fee_per_gas: int, max_priority_fee_per_gas: int, data: str) -> dict:
transaction = {
'nonce': nonce,
'to': dst_address,
'value': w3.toWei(amount, 'ether'),
'data': '0x00',
'gas': 160000,
'data': data,
'gas': gas_limit,
'maxFeePerGas': max_fee_per_gas,
'maxPriorityFeePerGas': max_priority_fee_per_gas,
'type': type,
Expand Down