Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Commit 86fc792

Browse files
committed
logging tx relayer transactions
1 parent 1262c24 commit 86fc792

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

txrelayer/txrelayer.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"github.com/umbracle/ethgo"
1212
"github.com/umbracle/ethgo/jsonrpc"
1313
"github.com/umbracle/ethgo/wallet"
14+
"github.com/0xPolygon/polygon-edge/helper/hex"
1415
)
1516

1617
const (
@@ -127,6 +128,7 @@ func (t *TxRelayerImpl) sendTransactionLocked(txn *ethgo.Transaction, key ethgo.
127128
}
128129

129130
txn.GasPrice = gasPrice + (gasPrice * gasPricePercent / 100)
131+
fmt.Println("[txRelayer] set gas price", txn.GasPrice)
130132
}
131133

132134
if txn.Gas == 0 {
@@ -136,6 +138,7 @@ func (t *TxRelayerImpl) sendTransactionLocked(txn *ethgo.Transaction, key ethgo.
136138
}
137139

138140
txn.Gas = gasLimit + (gasLimit * gasLimitPercent / 100)
141+
fmt.Println("[txRelayer] set gas", txn.Gas)
139142
}
140143

141144
chainID, err := t.client.Eth().ChainID()
@@ -159,6 +162,9 @@ func (t *TxRelayerImpl) sendTransactionLocked(txn *ethgo.Transaction, key ethgo.
159162
txn.From, txn.Gas, txn.GasPrice, txn.Nonce)))
160163
}
161164

165+
asHex := "0x" + hex.EncodeToString(data)
166+
fmt.Println("[txRelayer] raw data", asHex)
167+
162168
return t.client.Eth().SendRawTransaction(data)
163169
}
164170

0 commit comments

Comments
 (0)