@@ -30,14 +30,15 @@ type TaskErrorMessage struct {
3030 TaskError string `json:"error"`
3131}
3232
33- type TaskGasPriceBumpMessage struct {
34- MerkleRoot string `json:"merkle_root"`
35- BumpedGasPrice string `json:"bumped_gas_price "`
33+ type TaskSetGasPriceMessage struct {
34+ MerkleRoot string `json:"merkle_root"`
35+ GasPrice string `json:"gas_price "`
3636}
3737
3838type TaskSentToEthereumMessage struct {
39- MerkleRoot string `json:"merkle_root"`
40- TxHash string `json:"tx_hash"`
39+ MerkleRoot string `json:"merkle_root"`
40+ TxHash string `json:"tx_hash"`
41+ EffectiveGasPrice string `json:"effective_gas_price"`
4142}
4243
4344type Telemetry struct {
@@ -101,20 +102,21 @@ func (t *Telemetry) LogTaskError(batchMerkleRoot [32]byte, taskError error) {
101102 }
102103}
103104
104- func (t * Telemetry ) BumpedTaskGasPrice (batchMerkleRoot [32 ]byte , bumpedGasPrice string ) {
105- body := TaskGasPriceBumpMessage {
106- MerkleRoot : fmt .Sprintf ("0x%s" , hex .EncodeToString (batchMerkleRoot [:])),
107- BumpedGasPrice : bumpedGasPrice ,
105+ func (t * Telemetry ) TaskSetGasPrice (batchMerkleRoot [32 ]byte , gasPrice string ) {
106+ body := TaskSetGasPriceMessage {
107+ MerkleRoot : fmt .Sprintf ("0x%s" , hex .EncodeToString (batchMerkleRoot [:])),
108+ GasPrice : gasPrice ,
108109 }
109- if err := t .sendTelemetryMessage ("/api/aggregatorTaskGasPriceBump " , body ); err != nil {
110+ if err := t .sendTelemetryMessage ("/api/aggregatorTaskSetGasPrice " , body ); err != nil {
110111 t .logger .Warn ("[Telemetry] Error in LogOperatorResponse" , "error" , err )
111112 }
112113}
113114
114- func (t * Telemetry ) TaskSentToEthereum (batchMerkleRoot [32 ]byte , txHash string ) {
115+ func (t * Telemetry ) TaskSentToEthereum (batchMerkleRoot [32 ]byte , txHash string , effectiveGasPrice string ) {
115116 body := TaskSentToEthereumMessage {
116- MerkleRoot : fmt .Sprintf ("0x%s" , hex .EncodeToString (batchMerkleRoot [:])),
117- TxHash : txHash ,
117+ MerkleRoot : fmt .Sprintf ("0x%s" , hex .EncodeToString (batchMerkleRoot [:])),
118+ TxHash : txHash ,
119+ EffectiveGasPrice : effectiveGasPrice ,
118120 }
119121 if err := t .sendTelemetryMessage ("/api/aggregatorTaskSent" , body ); err != nil {
120122 t .logger .Warn ("[Telemetry] Error in TaskSentToEthereum" , "error" , err )
0 commit comments