ava-labs / awm-relayer

Service for relaying Avalanche Warp Messages between Subnets
Other
21 stars 16 forks source link

Add max gas limit to config #432

Closed cam-schultz closed 3 weeks ago

cam-schultz commented 1 month ago

Context and scope https://github.com/ava-labs/awm-relayer/pull/430 added a hardcoded gas limit to prevent invalid transactions from being sent. That hardcoded limit is based on the 15 million block gas cap for the C-Chain. However, subnet-evm chains can define their own gas limit, so it would make sense to make this configurable.

Open questions Where should this live in the config? RequiredGasLimit is a TeleporterMessage field, so SourceBlockchain.MessageContracts would fit there. OTOH, the gas limit is determined by the destination chain, so DestinationBlockchain is also an option.