Commit 859e6437 authored by Felipe Andrade's avatar Felipe Andrade

chore(ufm): update deps

parent 1a34669c
module github.com/ethereum-optimism/optimism/op-ufm
go 1.20
go 1.21
toolchain go1.21.3
require (
cloud.google.com/go/kms v1.12.1
github.com/BurntSushi/toml v1.3.2
github.com/ethereum-optimism/optimism/op-service v0.10.14
github.com/ethereum/go-ethereum v1.12.1
github.com/ethereum-optimism/optimism v1.2.0
github.com/ethereum/go-ethereum v1.13.1
github.com/gorilla/mux v1.8.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/client_golang v1.17.0
github.com/rs/cors v1.9.0
)
......@@ -18,6 +20,7 @@ require (
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VictoriaMetrics/fastcache v1.10.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.7.0 // indirect
......@@ -25,15 +28,16 @@ require (
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cockroachdb/errors v1.9.1 // indirect
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811 // indirect
github.com/cockroachdb/pebble v0.0.0-20230906160148-46873a6a7a06 // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/crate-crypto/go-kzg-4844 v0.3.0 // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/ethereum/c-kzg-4844 v0.3.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v0.3.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/getsentry/sentry-go v0.18.0 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-stack/stack v1.8.1 // indirect
......@@ -49,34 +53,38 @@ require (
github.com/gorilla/websocket v1.5.0 // indirect
github.com/holiman/bloomfilter/v2 v2.0.3 // indirect
github.com/holiman/uint256 v1.2.3 // indirect
github.com/klauspost/compress v1.15.15 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/rivo/uniseg v0.3.4 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.10.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/urfave/cli v1.22.9 // indirect
github.com/urfave/cli/v2 v2.25.7 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/api v0.132.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
......
This diff is collapsed.
......@@ -6,9 +6,10 @@ import (
"time"
"github.com/ethereum-optimism/optimism/op-ufm/pkg/metrics"
"github.com/ethereum/go-ethereum/common"
optls "github.com/ethereum-optimism/optimism/op-service/tls"
signer "github.com/ethereum-optimism/optimism/op-service/signer"
optls "github.com/ethereum-optimism/optimism/op-service/tls"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
)
......@@ -29,9 +30,9 @@ func NewSignerClient(providerName string, logger log.Logger, endpoint string, tl
return &InstrumentedSignerClient{c: c, providerName: providerName}, nil
}
func (i *InstrumentedSignerClient) SignTransaction(ctx context.Context, chainId *big.Int, tx *types.Transaction) (*types.Transaction, error) {
func (i *InstrumentedSignerClient) SignTransaction(ctx context.Context, chainId *big.Int, from *common.Address, tx *types.Transaction) (*types.Transaction, error) {
start := time.Now()
tx, err := i.c.SignTransaction(ctx, chainId, tx)
tx, err := i.c.SignTransaction(ctx, chainId, *from, tx)
if err != nil {
metrics.RecordErrorDetails(i.providerName, "signer.SignTransaction", err)
return nil, err
......
......@@ -57,7 +57,7 @@ func (p *Provider) RoundTrip(ctx context.Context) {
}
}
tx, err := p.createTx(ctx, client, nonce)
from, tx, err := p.createTx(ctx, client, nonce)
if err != nil {
log.Error("cant create tx",
"provider", p.name,
......@@ -67,7 +67,7 @@ func (p *Provider) RoundTrip(ctx context.Context) {
}
nonce = tx.Nonce()
signedTx, err := p.sign(ctx, tx)
signedTx, err := p.sign(ctx, from, tx)
if err != nil {
log.Error("cant sign tx",
"provider", p.name,
......@@ -192,7 +192,7 @@ func (p *Provider) RoundTrip(ctx context.Context) {
"gasUsed", receipt.GasUsed)
}
func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEthClient, nonce uint64) (*types.Transaction, error) {
func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEthClient, nonce uint64) (*common.Address, *types.Transaction, error) {
var err error
if nonce == 0 {
nonce, err = client.PendingNonceAt(ctx, p.walletConfig.Address)
......@@ -201,7 +201,7 @@ func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEt
"provider", p.name,
"nonce", nonce,
"err", err)
return nil, err
return nil, nil, err
}
}
......@@ -210,7 +210,7 @@ func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEt
log.Error("cant get gas tip cap",
"provider", p.name,
"err", err)
return nil, err
return nil, nil, err
}
gasTipCap = new(big.Int).Mul(gasTipCap, big.NewInt(110))
gasTipCap = new(big.Int).Div(gasTipCap, big.NewInt(100))
......@@ -220,7 +220,7 @@ func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEt
log.Error("cant get base fee from head",
"provider", p.name,
"err", err)
return nil, err
return nil, nil, err
}
baseFee := head.BaseFee
......@@ -252,7 +252,7 @@ func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEt
log.Error("cant estimate gas",
"provider", p.name,
"err", err)
return nil, err
return nil, nil, err
}
dynamicTx.Gas = gas
tx := types.NewTx(dynamicTx)
......@@ -268,10 +268,10 @@ func (p *Provider) createTx(ctx context.Context, client *iclients.InstrumentedEt
"gasFeeCap", dynamicTx.GasFeeCap,
)
return tx, nil
return &addr, tx, nil
}
func (p *Provider) sign(ctx context.Context, tx *types.Transaction) (*types.Transaction, error) {
func (p *Provider) sign(ctx context.Context, from *common.Address, tx *types.Transaction) (*types.Transaction, error) {
if p.walletConfig.SignerMethod == "static" {
log.Debug("using static signer")
privateKey, err := crypto.HexToECDSA(p.walletConfig.PrivateKey)
......@@ -297,7 +297,7 @@ func (p *Provider) sign(ctx context.Context, tx *types.Transaction) (*types.Tran
return nil, errors.New("could not initialize signer client")
}
signedTx, err := client.SignTransaction(ctx, &p.walletConfig.ChainID, tx)
signedTx, err := client.SignTransaction(ctx, &p.walletConfig.ChainID, from, tx)
if err != nil {
return nil, err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment