diff --git a/go.mod b/go.mod index c25cabc9f..fbf137d3a 100644 --- a/go.mod +++ b/go.mod @@ -43,7 +43,7 @@ require ( github.com/smartcontractkit/chain-selectors v1.0.67 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 - github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9 + github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260109153816-3c03e686173c github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 github.com/smartcontractkit/chainlink-protos/workflows/go v0.0.0-20260106052706-6dd937cb5ec6 diff --git a/go.sum b/go.sum index 6de10abe7..c15a7ebbe 100644 --- a/go.sum +++ b/go.sum @@ -334,8 +334,8 @@ github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 h1:FJAFgXS9 github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10/go.mod h1:oiDa54M0FwxevWwyAX773lwdWvFYYlYHHQV1LQ5HpWY= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4 h1:GCzrxDWn3b7jFfEA+WiYRi8CKoegsayiDoJBCjYkneE= github.com/smartcontractkit/chainlink-protos/billing/go v0.0.0-20251024234028-0988426d98f4/go.mod h1:HHGeDUpAsPa0pmOx7wrByCitjQ0mbUxf0R9v+g67uCA= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9 h1:QRWXJusIj/IRY5Pl3JclNvDre0cZPd/5NbILwc4RV2M= -github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251124151448-0448aefdaab9/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260109153816-3c03e686173c h1:DnQmpJe1RsD3aRDkOqXPmoNredL64FEEFKpDPwLJtIk= +github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260109153816-3c03e686173c/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b h1:QuI6SmQFK/zyUlVWEf0GMkiUYBPY4lssn26nKSd/bOM= github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b/go.mod h1:qSTSwX3cBP3FKQwQacdjArqv0g6QnukjV4XuzO6UyoY= github.com/smartcontractkit/chainlink-protos/storage-service v0.3.0 h1:B7itmjy+CMJ26elVw/cAJqqhBQ3Xa/mBYWK0/rQ5MuI= diff --git a/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go b/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go index 4d1303cef..665c594ec 100644 --- a/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go +++ b/pkg/capabilities/v2/chain-capabilities/evm/client.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.0 // source: capabilities/blockchain/evm/v1alpha/client.proto package evm @@ -1547,8 +1547,11 @@ func (x *WriteReportRequest) GetGasConfig() *GasConfig { } type GasConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - GasLimit uint64 `protobuf:"varint,1,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + GasLimit uint64 `protobuf:"varint,1,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Maximum gas price (in wei) the user is willing to pay for this transaction. + // If not specified, the value configured in GasEstimator will be used. + MaxGasPrice *pb.BigInt `protobuf:"bytes,2,opt,name=max_gas_price,json=maxGasPrice,proto3,oneof" json:"max_gas_price,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1590,6 +1593,13 @@ func (x *GasConfig) GetGasLimit() uint64 { return 0 } +func (x *GasConfig) GetMaxGasPrice() *pb.BigInt { + if x != nil { + return x.MaxGasPrice + } + return nil +} + type WriteReportReply struct { state protoimpl.MessageState `protogen:"open.v1"` TxStatus TxStatus `protobuf:"varint,1,opt,name=tx_status,json=txStatus,proto3,enum=capabilities.blockchain.evm.v1alpha.TxStatus" json:"tx_status,omitempty"` @@ -1767,9 +1777,11 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x06report\x18\x02 \x01(\v2\x1b.sdk.v1alpha.ReportResponseR\x06report\x12R\n" + "\n" + "gas_config\x18\x03 \x01(\v2..capabilities.blockchain.evm.v1alpha.GasConfigH\x00R\tgasConfig\x88\x01\x01B\r\n" + - "\v_gas_config\"(\n" + + "\v_gas_config\"v\n" + "\tGasConfig\x12\x1b\n" + - "\tgas_limit\x18\x01 \x01(\x04R\bgasLimit\"\xd9\x03\n" + + "\tgas_limit\x18\x01 \x01(\x04R\bgasLimit\x12:\n" + + "\rmax_gas_price\x18\x02 \x01(\v2\x11.values.v1.BigIntH\x00R\vmaxGasPrice\x88\x01\x01B\x10\n" + + "\x0e_max_gas_price\"\xd9\x03\n" + "\x10WriteReportReply\x12J\n" + "\ttx_status\x18\x01 \x01(\x0e2-.capabilities.blockchain.evm.v1alpha.TxStatusR\btxStatus\x12\x96\x01\n" + "\"receiver_contract_execution_status\x18\x02 \x01(\x0e2D.capabilities.blockchain.evm.v1alpha.ReceiverContractExecutionStatusH\x00R\x1freceiverContractExecutionStatus\x88\x01\x01\x12\x1c\n" + @@ -1791,7 +1803,7 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\bTxStatus\x12\x13\n" + "\x0fTX_STATUS_FATAL\x10\x00\x12\x16\n" + "\x12TX_STATUS_REVERTED\x10\x01\x12\x15\n" + - "\x11TX_STATUS_SUCCESS\x10\x022\x99\x0e\n" + + "\x11TX_STATUS_SUCCESS\x10\x022\xc5\x11\n" + "\x06Client\x12\x80\x01\n" + "\fCallContract\x128.capabilities.blockchain.evm.v1alpha.CallContractRequest\x1a6.capabilities.blockchain.evm.v1alpha.CallContractReply\x12z\n" + "\n" + @@ -1803,8 +1815,10 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "\x0eHeaderByNumber\x12:.capabilities.blockchain.evm.v1alpha.HeaderByNumberRequest\x1a8.capabilities.blockchain.evm.v1alpha.HeaderByNumberReply\x12v\n" + "\n" + "LogTrigger\x12<.capabilities.blockchain.evm.v1alpha.FilterLogTriggerRequest\x1a(.capabilities.blockchain.evm.v1alpha.Log0\x01\x12}\n" + - "\vWriteReport\x127.capabilities.blockchain.evm.v1alpha.WriteReportRequest\x1a5.capabilities.blockchain.evm.v1alpha.WriteReportReply\x1a\xde\x04\x82\xb5\x18\xd9\x04\b\x01\x12\tevm@1.0.0\x1a\xc9\x04\n" + - "\rChainSelector\x12\xb7\x04\x12\xb4\x04\n" + + "\vWriteReport\x127.capabilities.blockchain.evm.v1alpha.WriteReportRequest\x1a5.capabilities.blockchain.evm.v1alpha.WriteReportReply\x1a\x8a\b\x82\xb5\x18\x85\b\b\x01\x12\tevm@1.0.0\x1a\xf5\a\n" + + "\rChainSelector\x12\xe3\a\x12\xe0\a\n" + + "$\n" + + "\x17apechain-testnet-curtis\x10\xc1ô\xf8\x8dĒ\xb2\x89\x01\n" + "\x1d\n" + "\x11avalanche-mainnet\x10\xd5\xe7\x8a\xc0\xe1\u0558\xa4Y\n" + "#\n" + @@ -1827,12 +1841,34 @@ const file_capabilities_blockchain_evm_v1alpha_client_proto_rawDesc = "" + "#ethereum-testnet-sepolia-arbitrum-1\x10\xea\xce\xee\xff궄\xa30\n" + ",\n" + "\x1fethereum-testnet-sepolia-base-1\x10\xb8ʹ\xef\xf6\x90\xaeȏ\x01\n" + + ",\n" + + " ethereum-testnet-sepolia-linea-1\x10\xeb\xaa\xd4\xfe\x82\xf9\xe6\xafO\n" + "/\n" + "#ethereum-testnet-sepolia-optimism-1\x10\x9f\x86š\xbe\xd8\xc3\xc0H\n" + + "1\n" + + "%ethereum-testnet-sepolia-worldchain-1\x10\xba\xdf\xe0\xc5ǩ\xf3\xc5I\n" + + "-\n" + + "!ethereum-testnet-sepolia-zksync-1\x10\xb7\xc1\xfc\xfd\xf2Ā\xde_\n" + + "\x1d\n" + + "\x11etherlink-testnet\x10ϥ\xf1\xce\xfe\x90\xf0\xc0\x1a\n" + + "\x1f\n" + + "\x13hyperliquid-testnet\x10\x88\xce\xddȗ\xe0ɽ;\n" + + " \n" + + "\x13ink-testnet-sepolia\x10\xe8\xf4\xa7\xa5\xf3\xe6\x96\xc0\x87\x01\n" + + "\x19\n" + + "\rjovay-testnet\x10\xe4ϊ\x84\u07b2ގ\r\n" + + "\x1a\n" + + "\x0epharos-testnet\x10\x86\xb9\xe7\xdd\xe2\xbf\xd6\xd77\n" + + "\x1a\n" + + "\x0eplasma-testnet\x10՛\xbf\xa5ô\x99\x877\n" + "\x1b\n" + "\x0fpolygon-mainnet\x10\xb1\xab\xe4\U0001a486\x9d8\n" + "!\n" + - "\x14polygon-testnet-amoy\x10͏\xd6\xdf\xf1ǐ\xfa\xe1\x01b\x06proto3" + "\x14polygon-testnet-amoy\x10͏\xd6\xdf\xf1ǐ\xfa\xe1\x01\n" + + "$\n" + + "\x18private-testnet-andesite\x10Ԧ\x98\xa5\xc1\x8f\xdc\xfc_\n" + + "\x19\n" + + "\rtempo-testnet\x10\xba\xa8\xf7\xeb\xe9\xfdр7b\x06proto3" var ( file_capabilities_blockchain_evm_v1alpha_client_proto_rawDescOnce sync.Once @@ -1907,32 +1943,33 @@ var file_capabilities_blockchain_evm_v1alpha_client_proto_depIdxs = []int32{ 29, // 22: capabilities.blockchain.evm.v1alpha.Header.block_number:type_name -> values.v1.BigInt 30, // 23: capabilities.blockchain.evm.v1alpha.WriteReportRequest.report:type_name -> sdk.v1alpha.ReportResponse 27, // 24: capabilities.blockchain.evm.v1alpha.WriteReportRequest.gas_config:type_name -> capabilities.blockchain.evm.v1alpha.GasConfig - 2, // 25: capabilities.blockchain.evm.v1alpha.WriteReportReply.tx_status:type_name -> capabilities.blockchain.evm.v1alpha.TxStatus - 1, // 26: capabilities.blockchain.evm.v1alpha.WriteReportReply.receiver_contract_execution_status:type_name -> capabilities.blockchain.evm.v1alpha.ReceiverContractExecutionStatus - 29, // 27: capabilities.blockchain.evm.v1alpha.WriteReportReply.transaction_fee:type_name -> values.v1.BigInt - 5, // 28: capabilities.blockchain.evm.v1alpha.Client.CallContract:input_type -> capabilities.blockchain.evm.v1alpha.CallContractRequest - 7, // 29: capabilities.blockchain.evm.v1alpha.Client.FilterLogs:input_type -> capabilities.blockchain.evm.v1alpha.FilterLogsRequest - 13, // 30: capabilities.blockchain.evm.v1alpha.Client.BalanceAt:input_type -> capabilities.blockchain.evm.v1alpha.BalanceAtRequest - 15, // 31: capabilities.blockchain.evm.v1alpha.Client.EstimateGas:input_type -> capabilities.blockchain.evm.v1alpha.EstimateGasRequest - 17, // 32: capabilities.blockchain.evm.v1alpha.Client.GetTransactionByHash:input_type -> capabilities.blockchain.evm.v1alpha.GetTransactionByHashRequest - 20, // 33: capabilities.blockchain.evm.v1alpha.Client.GetTransactionReceipt:input_type -> capabilities.blockchain.evm.v1alpha.GetTransactionReceiptRequest - 23, // 34: capabilities.blockchain.evm.v1alpha.Client.HeaderByNumber:input_type -> capabilities.blockchain.evm.v1alpha.HeaderByNumberRequest - 4, // 35: capabilities.blockchain.evm.v1alpha.Client.LogTrigger:input_type -> capabilities.blockchain.evm.v1alpha.FilterLogTriggerRequest - 26, // 36: capabilities.blockchain.evm.v1alpha.Client.WriteReport:input_type -> capabilities.blockchain.evm.v1alpha.WriteReportRequest - 6, // 37: capabilities.blockchain.evm.v1alpha.Client.CallContract:output_type -> capabilities.blockchain.evm.v1alpha.CallContractReply - 8, // 38: capabilities.blockchain.evm.v1alpha.Client.FilterLogs:output_type -> capabilities.blockchain.evm.v1alpha.FilterLogsReply - 14, // 39: capabilities.blockchain.evm.v1alpha.Client.BalanceAt:output_type -> capabilities.blockchain.evm.v1alpha.BalanceAtReply - 16, // 40: capabilities.blockchain.evm.v1alpha.Client.EstimateGas:output_type -> capabilities.blockchain.evm.v1alpha.EstimateGasReply - 18, // 41: capabilities.blockchain.evm.v1alpha.Client.GetTransactionByHash:output_type -> capabilities.blockchain.evm.v1alpha.GetTransactionByHashReply - 21, // 42: capabilities.blockchain.evm.v1alpha.Client.GetTransactionReceipt:output_type -> capabilities.blockchain.evm.v1alpha.GetTransactionReceiptReply - 24, // 43: capabilities.blockchain.evm.v1alpha.Client.HeaderByNumber:output_type -> capabilities.blockchain.evm.v1alpha.HeaderByNumberReply - 9, // 44: capabilities.blockchain.evm.v1alpha.Client.LogTrigger:output_type -> capabilities.blockchain.evm.v1alpha.Log - 28, // 45: capabilities.blockchain.evm.v1alpha.Client.WriteReport:output_type -> capabilities.blockchain.evm.v1alpha.WriteReportReply - 37, // [37:46] is the sub-list for method output_type - 28, // [28:37] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 29, // 25: capabilities.blockchain.evm.v1alpha.GasConfig.max_gas_price:type_name -> values.v1.BigInt + 2, // 26: capabilities.blockchain.evm.v1alpha.WriteReportReply.tx_status:type_name -> capabilities.blockchain.evm.v1alpha.TxStatus + 1, // 27: capabilities.blockchain.evm.v1alpha.WriteReportReply.receiver_contract_execution_status:type_name -> capabilities.blockchain.evm.v1alpha.ReceiverContractExecutionStatus + 29, // 28: capabilities.blockchain.evm.v1alpha.WriteReportReply.transaction_fee:type_name -> values.v1.BigInt + 5, // 29: capabilities.blockchain.evm.v1alpha.Client.CallContract:input_type -> capabilities.blockchain.evm.v1alpha.CallContractRequest + 7, // 30: capabilities.blockchain.evm.v1alpha.Client.FilterLogs:input_type -> capabilities.blockchain.evm.v1alpha.FilterLogsRequest + 13, // 31: capabilities.blockchain.evm.v1alpha.Client.BalanceAt:input_type -> capabilities.blockchain.evm.v1alpha.BalanceAtRequest + 15, // 32: capabilities.blockchain.evm.v1alpha.Client.EstimateGas:input_type -> capabilities.blockchain.evm.v1alpha.EstimateGasRequest + 17, // 33: capabilities.blockchain.evm.v1alpha.Client.GetTransactionByHash:input_type -> capabilities.blockchain.evm.v1alpha.GetTransactionByHashRequest + 20, // 34: capabilities.blockchain.evm.v1alpha.Client.GetTransactionReceipt:input_type -> capabilities.blockchain.evm.v1alpha.GetTransactionReceiptRequest + 23, // 35: capabilities.blockchain.evm.v1alpha.Client.HeaderByNumber:input_type -> capabilities.blockchain.evm.v1alpha.HeaderByNumberRequest + 4, // 36: capabilities.blockchain.evm.v1alpha.Client.LogTrigger:input_type -> capabilities.blockchain.evm.v1alpha.FilterLogTriggerRequest + 26, // 37: capabilities.blockchain.evm.v1alpha.Client.WriteReport:input_type -> capabilities.blockchain.evm.v1alpha.WriteReportRequest + 6, // 38: capabilities.blockchain.evm.v1alpha.Client.CallContract:output_type -> capabilities.blockchain.evm.v1alpha.CallContractReply + 8, // 39: capabilities.blockchain.evm.v1alpha.Client.FilterLogs:output_type -> capabilities.blockchain.evm.v1alpha.FilterLogsReply + 14, // 40: capabilities.blockchain.evm.v1alpha.Client.BalanceAt:output_type -> capabilities.blockchain.evm.v1alpha.BalanceAtReply + 16, // 41: capabilities.blockchain.evm.v1alpha.Client.EstimateGas:output_type -> capabilities.blockchain.evm.v1alpha.EstimateGasReply + 18, // 42: capabilities.blockchain.evm.v1alpha.Client.GetTransactionByHash:output_type -> capabilities.blockchain.evm.v1alpha.GetTransactionByHashReply + 21, // 43: capabilities.blockchain.evm.v1alpha.Client.GetTransactionReceipt:output_type -> capabilities.blockchain.evm.v1alpha.GetTransactionReceiptReply + 24, // 44: capabilities.blockchain.evm.v1alpha.Client.HeaderByNumber:output_type -> capabilities.blockchain.evm.v1alpha.HeaderByNumberReply + 9, // 45: capabilities.blockchain.evm.v1alpha.Client.LogTrigger:output_type -> capabilities.blockchain.evm.v1alpha.Log + 28, // 46: capabilities.blockchain.evm.v1alpha.Client.WriteReport:output_type -> capabilities.blockchain.evm.v1alpha.WriteReportReply + 38, // [38:47] is the sub-list for method output_type + 29, // [29:38] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_capabilities_blockchain_evm_v1alpha_client_proto_init() } @@ -1941,6 +1978,7 @@ func file_capabilities_blockchain_evm_v1alpha_client_proto_init() { return } file_capabilities_blockchain_evm_v1alpha_client_proto_msgTypes[23].OneofWrappers = []any{} + file_capabilities_blockchain_evm_v1alpha_client_proto_msgTypes[24].OneofWrappers = []any{} file_capabilities_blockchain_evm_v1alpha_client_proto_msgTypes[25].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/chains/evm/evm.pb.go b/pkg/chains/evm/evm.pb.go index 7e049f80a..4ed2cbe0f 100644 --- a/pkg/chains/evm/evm.pb.go +++ b/pkg/chains/evm/evm.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.8 -// protoc v5.29.3 +// protoc-gen-go v1.36.11 +// protoc v6.33.0 // source: evm.proto package evm @@ -2455,8 +2455,11 @@ func (x *GetLatestLPBlockReply) GetLpBlock() *LPBlock { } type GasConfig struct { - state protoimpl.MessageState `protogen:"open.v1"` - GasLimit uint64 `protobuf:"varint,1,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + state protoimpl.MessageState `protogen:"open.v1"` + GasLimit uint64 `protobuf:"varint,1,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + // Maximum gas price (in wei) the user is willing to pay for this transaction. + // If not specified, the value configured in GasEstimator will be used. + MaxGasPrice *pb.BigInt `protobuf:"bytes,2,opt,name=max_gas_price,json=maxGasPrice,proto3,oneof" json:"max_gas_price,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2498,6 +2501,13 @@ func (x *GasConfig) GetGasLimit() uint64 { return 0 } +func (x *GasConfig) GetMaxGasPrice() *pb.BigInt { + if x != nil { + return x.MaxGasPrice + } + return nil +} + type CalculateTransactionFeeRequest struct { state protoimpl.MessageState `protogen:"open.v1"` GasInfo *ReceiptGasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` @@ -3160,9 +3170,11 @@ const file_evm_proto_rawDesc = "" + "\x15QueryTrackedLogsReply\x12!\n" + "\x04logs\x18\x01 \x03(\v2\r.loop.evm.LogR\x04logs\"E\n" + "\x15GetLatestLPBlockReply\x12,\n" + - "\blp_block\x18\x01 \x01(\v2\x11.loop.evm.LPBlockR\alpBlock\"(\n" + + "\blp_block\x18\x01 \x01(\v2\x11.loop.evm.LPBlockR\alpBlock\"v\n" + "\tGasConfig\x12\x1b\n" + - "\tgas_limit\x18\x01 \x01(\x04R\bgasLimit\"U\n" + + "\tgas_limit\x18\x01 \x01(\x04R\bgasLimit\x12:\n" + + "\rmax_gas_price\x18\x02 \x01(\v2\x11.values.v1.BigIntH\x00R\vmaxGasPrice\x88\x01\x01B\x10\n" + + "\x0e_max_gas_price\"U\n" + "\x1eCalculateTransactionFeeRequest\x123\n" + "\bgas_info\x18\x01 \x01(\v2\x18.loop.evm.ReceiptGasInfoR\agasInfo\"n\n" + "\x0eReceiptGasInfo\x12\x19\n" + @@ -3344,51 +3356,52 @@ var file_evm_proto_depIdxs = []int32{ 55, // 41: loop.evm.QueryTrackedLogsRequest.confidence_level:type_name -> loop.chain.common.Confidence 4, // 42: loop.evm.QueryTrackedLogsReply.logs:type_name -> loop.evm.Log 10, // 43: loop.evm.GetLatestLPBlockReply.lp_block:type_name -> loop.evm.LPBlock - 42, // 44: loop.evm.CalculateTransactionFeeRequest.gas_info:type_name -> loop.evm.ReceiptGasInfo - 51, // 45: loop.evm.ReceiptGasInfo.effective_gas_price:type_name -> values.v1.BigInt - 51, // 46: loop.evm.CalculateTransactionFeeReply.transaction_fee:type_name -> values.v1.BigInt - 40, // 47: loop.evm.SubmitTransactionRequest.gas_config:type_name -> loop.evm.GasConfig - 0, // 48: loop.evm.SubmitTransactionReply.txStatus:type_name -> loop.evm.TxStatus - 1, // 49: loop.evm.GetTransactionStatusReply.transaction_status:type_name -> loop.evm.TransactionStatus - 23, // 50: loop.evm.EVM.GetTransactionFee:input_type -> loop.evm.GetTransactionFeeRequest - 21, // 51: loop.evm.EVM.CallContract:input_type -> loop.evm.CallContractRequest - 25, // 52: loop.evm.EVM.FilterLogs:input_type -> loop.evm.FilterLogsRequest - 27, // 53: loop.evm.EVM.BalanceAt:input_type -> loop.evm.BalanceAtRequest - 29, // 54: loop.evm.EVM.EstimateGas:input_type -> loop.evm.EstimateGasRequest - 31, // 55: loop.evm.EVM.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest - 33, // 56: loop.evm.EVM.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest - 19, // 57: loop.evm.EVM.HeaderByNumber:input_type -> loop.evm.HeaderByNumberRequest - 37, // 58: loop.evm.EVM.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest - 57, // 59: loop.evm.EVM.GetFiltersNames:input_type -> google.protobuf.Empty - 35, // 60: loop.evm.EVM.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest - 36, // 61: loop.evm.EVM.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest - 46, // 62: loop.evm.EVM.GetTransactionStatus:input_type -> loop.evm.GetTransactionStatusRequest - 44, // 63: loop.evm.EVM.SubmitTransaction:input_type -> loop.evm.SubmitTransactionRequest - 41, // 64: loop.evm.EVM.CalculateTransactionFee:input_type -> loop.evm.CalculateTransactionFeeRequest - 48, // 65: loop.evm.EVM.GetForwarderForEOA:input_type -> loop.evm.GetForwarderForEOARequest - 57, // 66: loop.evm.EVM.GetLatestLPBlock:input_type -> google.protobuf.Empty - 24, // 67: loop.evm.EVM.GetTransactionFee:output_type -> loop.evm.GetTransactionFeeReply - 22, // 68: loop.evm.EVM.CallContract:output_type -> loop.evm.CallContractReply - 26, // 69: loop.evm.EVM.FilterLogs:output_type -> loop.evm.FilterLogsReply - 28, // 70: loop.evm.EVM.BalanceAt:output_type -> loop.evm.BalanceAtReply - 30, // 71: loop.evm.EVM.EstimateGas:output_type -> loop.evm.EstimateGasReply - 32, // 72: loop.evm.EVM.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply - 34, // 73: loop.evm.EVM.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply - 20, // 74: loop.evm.EVM.HeaderByNumber:output_type -> loop.evm.HeaderByNumberReply - 38, // 75: loop.evm.EVM.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply - 50, // 76: loop.evm.EVM.GetFiltersNames:output_type -> loop.evm.GetFiltersNamesReply - 57, // 77: loop.evm.EVM.RegisterLogTracking:output_type -> google.protobuf.Empty - 57, // 78: loop.evm.EVM.UnregisterLogTracking:output_type -> google.protobuf.Empty - 47, // 79: loop.evm.EVM.GetTransactionStatus:output_type -> loop.evm.GetTransactionStatusReply - 45, // 80: loop.evm.EVM.SubmitTransaction:output_type -> loop.evm.SubmitTransactionReply - 43, // 81: loop.evm.EVM.CalculateTransactionFee:output_type -> loop.evm.CalculateTransactionFeeReply - 49, // 82: loop.evm.EVM.GetForwarderForEOA:output_type -> loop.evm.GetForwarderForEOAReply - 39, // 83: loop.evm.EVM.GetLatestLPBlock:output_type -> loop.evm.GetLatestLPBlockReply - 67, // [67:84] is the sub-list for method output_type - 50, // [50:67] is the sub-list for method input_type - 50, // [50:50] is the sub-list for extension type_name - 50, // [50:50] is the sub-list for extension extendee - 0, // [0:50] is the sub-list for field type_name + 51, // 44: loop.evm.GasConfig.max_gas_price:type_name -> values.v1.BigInt + 42, // 45: loop.evm.CalculateTransactionFeeRequest.gas_info:type_name -> loop.evm.ReceiptGasInfo + 51, // 46: loop.evm.ReceiptGasInfo.effective_gas_price:type_name -> values.v1.BigInt + 51, // 47: loop.evm.CalculateTransactionFeeReply.transaction_fee:type_name -> values.v1.BigInt + 40, // 48: loop.evm.SubmitTransactionRequest.gas_config:type_name -> loop.evm.GasConfig + 0, // 49: loop.evm.SubmitTransactionReply.txStatus:type_name -> loop.evm.TxStatus + 1, // 50: loop.evm.GetTransactionStatusReply.transaction_status:type_name -> loop.evm.TransactionStatus + 23, // 51: loop.evm.EVM.GetTransactionFee:input_type -> loop.evm.GetTransactionFeeRequest + 21, // 52: loop.evm.EVM.CallContract:input_type -> loop.evm.CallContractRequest + 25, // 53: loop.evm.EVM.FilterLogs:input_type -> loop.evm.FilterLogsRequest + 27, // 54: loop.evm.EVM.BalanceAt:input_type -> loop.evm.BalanceAtRequest + 29, // 55: loop.evm.EVM.EstimateGas:input_type -> loop.evm.EstimateGasRequest + 31, // 56: loop.evm.EVM.GetTransactionByHash:input_type -> loop.evm.GetTransactionByHashRequest + 33, // 57: loop.evm.EVM.GetTransactionReceipt:input_type -> loop.evm.GetTransactionReceiptRequest + 19, // 58: loop.evm.EVM.HeaderByNumber:input_type -> loop.evm.HeaderByNumberRequest + 37, // 59: loop.evm.EVM.QueryTrackedLogs:input_type -> loop.evm.QueryTrackedLogsRequest + 57, // 60: loop.evm.EVM.GetFiltersNames:input_type -> google.protobuf.Empty + 35, // 61: loop.evm.EVM.RegisterLogTracking:input_type -> loop.evm.RegisterLogTrackingRequest + 36, // 62: loop.evm.EVM.UnregisterLogTracking:input_type -> loop.evm.UnregisterLogTrackingRequest + 46, // 63: loop.evm.EVM.GetTransactionStatus:input_type -> loop.evm.GetTransactionStatusRequest + 44, // 64: loop.evm.EVM.SubmitTransaction:input_type -> loop.evm.SubmitTransactionRequest + 41, // 65: loop.evm.EVM.CalculateTransactionFee:input_type -> loop.evm.CalculateTransactionFeeRequest + 48, // 66: loop.evm.EVM.GetForwarderForEOA:input_type -> loop.evm.GetForwarderForEOARequest + 57, // 67: loop.evm.EVM.GetLatestLPBlock:input_type -> google.protobuf.Empty + 24, // 68: loop.evm.EVM.GetTransactionFee:output_type -> loop.evm.GetTransactionFeeReply + 22, // 69: loop.evm.EVM.CallContract:output_type -> loop.evm.CallContractReply + 26, // 70: loop.evm.EVM.FilterLogs:output_type -> loop.evm.FilterLogsReply + 28, // 71: loop.evm.EVM.BalanceAt:output_type -> loop.evm.BalanceAtReply + 30, // 72: loop.evm.EVM.EstimateGas:output_type -> loop.evm.EstimateGasReply + 32, // 73: loop.evm.EVM.GetTransactionByHash:output_type -> loop.evm.GetTransactionByHashReply + 34, // 74: loop.evm.EVM.GetTransactionReceipt:output_type -> loop.evm.GetTransactionReceiptReply + 20, // 75: loop.evm.EVM.HeaderByNumber:output_type -> loop.evm.HeaderByNumberReply + 38, // 76: loop.evm.EVM.QueryTrackedLogs:output_type -> loop.evm.QueryTrackedLogsReply + 50, // 77: loop.evm.EVM.GetFiltersNames:output_type -> loop.evm.GetFiltersNamesReply + 57, // 78: loop.evm.EVM.RegisterLogTracking:output_type -> google.protobuf.Empty + 57, // 79: loop.evm.EVM.UnregisterLogTracking:output_type -> google.protobuf.Empty + 47, // 80: loop.evm.EVM.GetTransactionStatus:output_type -> loop.evm.GetTransactionStatusReply + 45, // 81: loop.evm.EVM.SubmitTransaction:output_type -> loop.evm.SubmitTransactionReply + 43, // 82: loop.evm.EVM.CalculateTransactionFee:output_type -> loop.evm.CalculateTransactionFeeReply + 49, // 83: loop.evm.EVM.GetForwarderForEOA:output_type -> loop.evm.GetForwarderForEOAReply + 39, // 84: loop.evm.EVM.GetLatestLPBlock:output_type -> loop.evm.GetLatestLPBlockReply + 68, // [68:85] is the sub-list for method output_type + 51, // [51:68] is the sub-list for method input_type + 51, // [51:51] is the sub-list for extension type_name + 51, // [51:51] is the sub-list for extension extendee + 0, // [0:51] is the sub-list for field type_name } func init() { file_evm_proto_init() } @@ -3407,6 +3420,7 @@ func file_evm_proto_init() { (*Primitive_EventByWord)(nil), (*Primitive_EventByTopic)(nil), } + file_evm_proto_msgTypes[38].OneofWrappers = []any{} file_evm_proto_msgTypes[42].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ diff --git a/pkg/chains/evm/evm.proto b/pkg/chains/evm/evm.proto index 370d4c88a..c41225225 100644 --- a/pkg/chains/evm/evm.proto +++ b/pkg/chains/evm/evm.proto @@ -310,6 +310,9 @@ enum TxStatus { message GasConfig { uint64 gas_limit = 1; + // Maximum gas price (in wei) the user is willing to pay for this transaction. + // If not specified, the value configured in GasEstimator will be used. + optional values.v1.BigInt max_gas_price = 2; } message CalculateTransactionFeeRequest { diff --git a/pkg/chains/evm/evm_grpc.pb.go b/pkg/chains/evm/evm_grpc.pb.go index d97ee5701..fd571d1df 100644 --- a/pkg/chains/evm/evm_grpc.pb.go +++ b/pkg/chains/evm/evm_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 -// - protoc v5.29.3 +// - protoc v6.33.0 // source: evm.proto package evm diff --git a/pkg/chains/evm/proto_helpers.go b/pkg/chains/evm/proto_helpers.go index c587b1ca5..fc602fb54 100644 --- a/pkg/chains/evm/proto_helpers.go +++ b/pkg/chains/evm/proto_helpers.go @@ -716,18 +716,28 @@ func ConvertGasConfigToProto(gasConfig evmtypes.GasConfig) (*GasConfig, error) { return nil, fmt.Errorf("gas limit can't be nil") } - return &GasConfig{ + pbGasConfig := &GasConfig{ GasLimit: *gasConfig.GasLimit, - }, nil + } + + if gasConfig.MaxGasPrice != nil { + pbGasConfig.MaxGasPrice = valuespb.NewBigIntFromInt(gasConfig.MaxGasPrice) + } + + return pbGasConfig, nil } func ConvertGasConfigFromProto(gasConfig *GasConfig) *evmtypes.GasConfig { if gasConfig == nil { return nil } - return &evmtypes.GasConfig{ + result := &evmtypes.GasConfig{ GasLimit: &gasConfig.GasLimit, } + if gasConfig.MaxGasPrice != nil { + result.MaxGasPrice = valuespb.NewIntFromBigInt(gasConfig.MaxGasPrice) + } + return result } func ConvertTxStatusFromProto(txStatus TxStatus) evmtypes.TransactionStatus { diff --git a/pkg/loop/internal/relayer/evm.go b/pkg/loop/internal/relayer/evm.go index 1d81027d9..7d86d51bf 100644 --- a/pkg/loop/internal/relayer/evm.go +++ b/pkg/loop/internal/relayer/evm.go @@ -42,12 +42,25 @@ func (e *EVMClient) SubmitTransaction(ctx context.Context, txRequest evmtypes.Su Data: txRequest.Data, } + // DEBUG: Log incoming request + var inputMaxGasPrice string + if txRequest.GasConfig != nil && txRequest.GasConfig.MaxGasPrice != nil { + inputMaxGasPrice = txRequest.GasConfig.MaxGasPrice.String() + } else if txRequest.GasConfig != nil { + inputMaxGasPrice = "nil (GasConfig exists but MaxGasPrice is nil)" + } else { + inputMaxGasPrice = "nil (no GasConfig)" + } + fmt.Printf("DEBUG EVMClient.SubmitTransaction: INPUT MaxGasPrice=%s\n", inputMaxGasPrice) + if txRequest.GasConfig != nil { gasCfg, err := evmpb.ConvertGasConfigToProto(*txRequest.GasConfig) if err != nil { return nil, err } pbTxRequest.GasConfig = gasCfg + // DEBUG: Log converted protobuf + fmt.Printf("DEBUG EVMClient.SubmitTransaction: CONVERTED pb.GasConfig=%+v, pb.MaxGasPrice=%v\n", gasCfg, gasCfg.MaxGasPrice) } reply, err := e.grpcClient.SubmitTransaction(ctx, pbTxRequest)