Commit 43cfef03 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into indexer.bridge.metrics

parents 38d3505b 6ab378e4
---
'@eth-optimism/endpoint-monitor': patch
'@eth-optimism/indexer-api': patch
'@eth-optimism/op-exporter': patch
'@eth-optimism/chain-mon': patch
'@eth-optimism/common-ts': patch
'@eth-optimism/contracts-bedrock': patch
'@eth-optimism/contracts-ts': patch
'@eth-optimism/core-utils': patch
'@eth-optimism/fee-estimation': patch
'@eth-optimism/sdk': patch
'@eth-optimism/web3.js-plugin': patch
---
Updated dev dependencies related to testing that is causing audit tooling to report failures
# @eth-optimism/endpoint-monitor # @eth-optimism/endpoint-monitor
## 1.0.3
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
## 1.0.2 ## 1.0.2
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/endpoint-monitor", "name": "@eth-optimism/endpoint-monitor",
"version": "1.0.2", "version": "1.0.3",
"private": true, "private": true,
"dependencies": {} "dependencies": {}
} }
# @eth-optimism/indexer-api
## 0.0.4
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
{ {
"name": "@eth-optimism/indexer-api", "name": "@eth-optimism/indexer-api",
"version": "0.0.3", "version": "0.0.4",
"description": "[Optimism] typescript types for the indexer service", "description": "[Optimism] typescript types for the indexer service",
"main": "indexer.cjs", "main": "indexer.cjs",
"module": "indexer.js", "module": "indexer.js",
......
...@@ -152,10 +152,10 @@ func (a *Agent) tryResolveClaims(ctx context.Context) error { ...@@ -152,10 +152,10 @@ func (a *Agent) tryResolveClaims(ctx context.Context) error {
resolvableClaims = append(resolvableClaims, int64(claim.ContractIndex)) resolvableClaims = append(resolvableClaims, int64(claim.ContractIndex))
} }
} }
a.log.Info("Resolving claims", "numClaims", len(resolvableClaims))
if len(resolvableClaims) == 0 { if len(resolvableClaims) == 0 {
return errNoResolvableClaims return errNoResolvableClaims
} }
a.log.Info("Resolving claims", "numClaims", len(resolvableClaims))
var wg sync.WaitGroup var wg sync.WaitGroup
wg.Add(len(resolvableClaims)) wg.Add(len(resolvableClaims))
......
...@@ -58,22 +58,27 @@ func TestMonitorGames(t *testing.T) { ...@@ -58,22 +58,27 @@ func TestMonitorGames(t *testing.T) {
go func() { go func() {
headerNotSent := true headerNotSent := true
waitErr := wait.For(context.Background(), 100*time.Millisecond, func() (bool, error) { for {
if len(sched.scheduled) >= 1 { if len(sched.scheduled) >= 1 {
return true, nil break
} }
if mockHeadSource.sub == nil { if mockHeadSource.sub == nil {
return false, nil continue
} }
if headerNotSent { if headerNotSent {
mockHeadSource.sub.headers <- &ethtypes.Header{ select {
case mockHeadSource.sub.headers <- &ethtypes.Header{
Number: big.NewInt(1), Number: big.NewInt(1),
}:
headerNotSent = false
case <-ctx.Done():
break
default:
} }
headerNotSent = false
} }
return false, nil // Just to avoid a tight loop
}) time.Sleep(100 * time.Millisecond)
require.NoError(t, waitErr) }
mockHeadSource.err = fmt.Errorf("eth subscribe test error") mockHeadSource.err = fmt.Errorf("eth subscribe test error")
cancel() cancel()
}() }()
...@@ -94,27 +99,29 @@ func TestMonitorGames(t *testing.T) { ...@@ -94,27 +99,29 @@ func TestMonitorGames(t *testing.T) {
defer cancel() defer cancel()
go func() { go func() {
headerNotSent := true
waitErr := wait.For(context.Background(), 100*time.Millisecond, func() (bool, error) { waitErr := wait.For(context.Background(), 100*time.Millisecond, func() (bool, error) {
return mockHeadSource.sub != nil, nil return mockHeadSource.sub != nil, nil
}) })
require.NoError(t, waitErr) require.NoError(t, waitErr)
mockHeadSource.sub.errChan <- fmt.Errorf("test error") mockHeadSource.sub.errChan <- fmt.Errorf("test error")
waitErr = wait.For(context.Background(), 100*time.Millisecond, func() (bool, error) { for {
if len(sched.scheduled) >= 1 { if len(sched.scheduled) >= 1 {
return true, nil break
} }
if mockHeadSource.sub == nil { if mockHeadSource.sub == nil {
return false, nil continue
} }
if headerNotSent { select {
mockHeadSource.sub.headers <- &ethtypes.Header{ case mockHeadSource.sub.headers <- &ethtypes.Header{
Number: big.NewInt(1), Number: big.NewInt(1),
} }:
headerNotSent = false case <-ctx.Done():
break
default:
} }
return false, nil // Just to avoid a tight loop
}) time.Sleep(100 * time.Millisecond)
}
require.NoError(t, waitErr) require.NoError(t, waitErr)
mockHeadSource.err = fmt.Errorf("eth subscribe test error") mockHeadSource.err = fmt.Errorf("eth subscribe test error")
cancel() cancel()
...@@ -122,7 +129,7 @@ func TestMonitorGames(t *testing.T) { ...@@ -122,7 +129,7 @@ func TestMonitorGames(t *testing.T) {
err := monitor.MonitorGames(ctx) err := monitor.MonitorGames(ctx)
require.NoError(t, err) require.NoError(t, err)
require.Len(t, sched.scheduled, 1) require.NotEmpty(t, sched.scheduled) // We might get more than one update scheduled.
require.Equal(t, []common.Address{addr1, addr2}, sched.scheduled[0]) require.Equal(t, []common.Address{addr1, addr2}, sched.scheduled[0])
}) })
} }
......
...@@ -504,7 +504,7 @@ func TestBigL2Txs(gt *testing.T) { ...@@ -504,7 +504,7 @@ func TestBigL2Txs(gt *testing.T) {
if miner.l1GasPool.Gas() < tx.Gas() { // fill the L1 block with batcher txs until we run out of gas if miner.l1GasPool.Gas() < tx.Gas() { // fill the L1 block with batcher txs until we run out of gas
break break
} }
log.Info("including batcher tx", "nonce", tx) log.Info("including batcher tx", "nonce", tx.Nonce())
miner.IncludeTx(t, tx) miner.IncludeTx(t, tx)
txs = txs[1:] txs = txs[1:]
} }
......
package actions package actions
import ( import (
"context"
"errors" "errors"
"time"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils" "github.com/ethereum-optimism/optimism/op-e2e/e2eutils"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-program/client/l2/engineapi" "github.com/ethereum-optimism/optimism/op-program/client/l2/engineapi"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
...@@ -176,12 +179,22 @@ func (e *L2Engine) ActL2IncludeTx(from common.Address) Action { ...@@ -176,12 +179,22 @@ func (e *L2Engine) ActL2IncludeTx(from common.Address) Action {
return return
} }
i := e.engineApi.PendingIndices(from) var i uint64
txs, q := e.eth.TxPool().ContentFrom(from) var txs []*types.Transaction
require.Greaterf(t, uint64(len(txs)), i, var q []*types.Transaction
"no pending txs from %s, and have %d unprocessable queued txs from this account", from, len(q)) // Wait for the tx to be in the pending tx queue
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
err := wait.For(ctx, time.Second, func() (bool, error) {
i = e.engineApi.PendingIndices(from)
txs, q = e.eth.TxPool().ContentFrom(from)
return uint64(len(txs)) > i, nil
})
require.NoError(t, err,
"no pending txs from %s, and have %d unprocessable queued txs from this account: %w", from, len(q), err)
tx := txs[i] tx := txs[i]
err := e.engineApi.IncludeTx(tx, from) err = e.engineApi.IncludeTx(tx, from)
if errors.Is(err, engineapi.ErrNotBuildingBlock) { if errors.Is(err, engineapi.ErrNotBuildingBlock) {
t.InvalidAction(err.Error()) t.InvalidAction(err.Error())
} else if errors.Is(err, engineapi.ErrUsesTooMuchGas) { } else if errors.Is(err, engineapi.ErrUsesTooMuchGas) {
......
...@@ -16,6 +16,7 @@ import ( ...@@ -16,6 +16,7 @@ import (
"github.com/ethereum-optimism/optimism/op-chain-ops/genesis" "github.com/ethereum-optimism/optimism/op-chain-ops/genesis"
"github.com/ethereum-optimism/optimism/op-e2e/external" "github.com/ethereum-optimism/optimism/op-e2e/external"
oplog "github.com/ethereum-optimism/optimism/op-service/log"
) )
var ( var (
...@@ -65,6 +66,23 @@ func init() { ...@@ -65,6 +66,23 @@ func init() {
testing.Init() // Register test flags before parsing testing.Init() // Register test flags before parsing
flag.Parse() flag.Parse()
// Setup global logger
lvl := log.Lvl(EthNodeVerbosity)
if lvl < log.LvlCrit {
log.Root().SetHandler(log.DiscardHandler())
} else if lvl > log.LvlTrace { // clip to trace level
lvl = log.LvlTrace
}
// We cannot attach a testlog logger,
// because the global logger is shared between different independent parallel tests.
// Tests that write to a testlogger of another finished test fail.
h := oplog.NewLogHandler(os.Stdout, oplog.CLIConfig{
Level: lvl,
Color: false, // some CI logs do not handle colors well
Format: oplog.FormatTerminal,
})
oplog.SetGlobalLogHandler(h)
if err := allExist(l1AllocsPath, l1DeploymentsPath, deployConfigPath); err != nil { if err := allExist(l1AllocsPath, l1DeploymentsPath, deployConfigPath); err != nil {
return return
} }
......
...@@ -197,7 +197,7 @@ func (h *Helper) WaitForGameDataDeletion(ctx context.Context, games ...GameAddr) ...@@ -197,7 +197,7 @@ func (h *Helper) WaitForGameDataDeletion(ctx context.Context, games ...GameAddr)
if err != nil { if err != nil {
return false, fmt.Errorf("failed to check dir %v is deleted: %w", dir, err) return false, fmt.Errorf("failed to check dir %v is deleted: %w", dir, err)
} }
h.t.Errorf("Game data directory %v not yet deleted", dir) h.t.Logf("Game data directory %v not yet deleted", dir)
return false, nil return false, nil
} }
return true, nil return true, nil
......
package wait
import (
"context"
"fmt"
"math/big"
"time"
"github.com/ethereum/go-ethereum/core/types"
)
// BlockCaller is a subset of the [ethclient.Client] interface
// encompassing methods that query for block information.
type BlockCaller interface {
BlockByNumber(ctx context.Context, number *big.Int) (*types.Block, error)
BlockNumber(ctx context.Context) (uint64, error)
}
func ForBlock(ctx context.Context, client BlockCaller, n uint64) error {
for {
if ctx.Done() != nil {
return ctx.Err()
}
height, err := client.BlockNumber(ctx)
if err != nil {
return err
}
if height < n {
time.Sleep(500 * time.Millisecond)
continue
}
break
}
return nil
}
func ForBlockWithTimestamp(ctx context.Context, client BlockCaller, target uint64) error {
_, err := AndGet(ctx, time.Second, func() (uint64, error) {
head, err := client.BlockByNumber(ctx, nil)
if err != nil {
return 0, err
}
return head.Time(), nil
}, func(actual uint64) bool {
return actual >= target
})
return err
}
func ForNextBlock(ctx context.Context, client BlockCaller) error {
current, err := client.BlockNumber(ctx)
// Long timeout so we don't have to care what the block time is. If the test passes this will complete early anyway.
ctx, cancel := context.WithTimeout(ctx, 60*time.Second)
defer cancel()
if err != nil {
return fmt.Errorf("get starting block number: %w", err)
}
return ForBlock(ctx, client, current+1)
}
...@@ -69,59 +69,25 @@ func printDebugTrace(ctx context.Context, client *ethclient.Client, txHash commo ...@@ -69,59 +69,25 @@ func printDebugTrace(ctx context.Context, client *ethclient.Client, txHash commo
fmt.Printf("TxTrace: %v\n", trace) fmt.Printf("TxTrace: %v\n", trace)
} }
func ForBlock(ctx context.Context, client *ethclient.Client, n uint64) error { func For(ctx context.Context, rate time.Duration, cb func() (bool, error)) error {
tick := time.NewTicker(rate)
defer tick.Stop()
for { for {
height, err := client.BlockNumber(ctx) // Perform the first check before any waiting.
done, err := cb()
if err != nil { if err != nil {
return err return err
} }
if height < n { if done {
time.Sleep(500 * time.Millisecond) return nil
continue
}
break
}
return nil
}
func ForBlockWithTimestamp(ctx context.Context, client *ethclient.Client, target uint64) error {
_, err := AndGet(ctx, time.Second, func() (uint64, error) {
head, err := client.BlockByNumber(ctx, nil)
if err != nil {
return 0, err
} }
return head.Time(), nil
}, func(actual uint64) bool {
return actual >= target
})
return err
}
func ForNextBlock(ctx context.Context, client *ethclient.Client) error {
current, err := client.BlockNumber(ctx)
if err != nil {
return fmt.Errorf("get starting block number: %w", err)
}
return ForBlock(ctx, client, current+1)
}
func For(ctx context.Context, rate time.Duration, cb func() (bool, error)) error {
tick := time.NewTicker(rate)
defer tick.Stop()
for {
select { select {
case <-ctx.Done(): case <-ctx.Done():
return ctx.Err() return ctx.Err()
case <-tick.C: case <-tick.C:
done, err := cb() // Allow loop to continue for next retry
if err != nil {
return err
}
if done {
return nil
}
} }
} }
} }
......
...@@ -3,12 +3,6 @@ package op_e2e ...@@ -3,12 +3,6 @@ package op_e2e
import ( import (
"os" "os"
"testing" "testing"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum-optimism/optimism/op-e2e/config"
oplog "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum-optimism/optimism/op-service/testlog"
) )
var enableParallelTesting bool = os.Getenv("OP_E2E_DISABLE_PARALLEL") != "true" var enableParallelTesting bool = os.Getenv("OP_E2E_DISABLE_PARALLEL") != "true"
...@@ -18,12 +12,4 @@ func InitParallel(t *testing.T) { ...@@ -18,12 +12,4 @@ func InitParallel(t *testing.T) {
if enableParallelTesting { if enableParallelTesting {
t.Parallel() t.Parallel()
} }
lvl := log.Lvl(config.EthNodeVerbosity)
if lvl < log.LvlCrit {
log.Root().SetHandler(log.DiscardHandler())
} else if lvl > log.LvlTrace { // clip to trace level
lvl = log.LvlTrace
}
h := testlog.Handler(t, lvl, log.TerminalFormat(false)) // some CI logs do not handle colors well
oplog.SetGlobalLogHandler(h)
} }
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"testing" "testing"
"time" "time"
"github.com/ethereum-optimism/optimism/op-e2e/e2eutils/wait"
"github.com/ethereum-optimism/optimism/op-node/client" "github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/node" "github.com/ethereum-optimism/optimism/op-node/node"
"github.com/ethereum-optimism/optimism/op-node/sources" "github.com/ethereum-optimism/optimism/op-node/sources"
...@@ -34,10 +35,11 @@ func TestStopStartSequencer(t *testing.T) { ...@@ -34,10 +35,11 @@ func TestStopStartSequencer(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.True(t, active, "sequencer should be active") require.True(t, active, "sequencer should be active")
blockBefore := latestBlock(t, l2Seq) require.NoError(
time.Sleep(time.Duration(cfg.DeployConfig.L2BlockTime+1) * time.Second) t,
blockAfter := latestBlock(t, l2Seq) wait.ForNextBlock(ctx, l2Seq),
require.Greaterf(t, blockAfter, blockBefore, "Chain did not advance") "Chain did not advance after starting sequencer",
)
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
defer cancel() defer cancel()
...@@ -50,9 +52,9 @@ func TestStopStartSequencer(t *testing.T) { ...@@ -50,9 +52,9 @@ func TestStopStartSequencer(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.False(t, active, "sequencer should be inactive") require.False(t, active, "sequencer should be inactive")
blockBefore = latestBlock(t, l2Seq) blockBefore := latestBlock(t, l2Seq)
time.Sleep(time.Duration(cfg.DeployConfig.L2BlockTime+1) * time.Second) time.Sleep(time.Duration(cfg.DeployConfig.L2BlockTime+1) * time.Second)
blockAfter = latestBlock(t, l2Seq) blockAfter := latestBlock(t, l2Seq)
require.Equal(t, blockAfter, blockBefore, "Chain advanced after stopping sequencer") require.Equal(t, blockAfter, blockBefore, "Chain advanced after stopping sequencer")
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second) ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
...@@ -66,10 +68,11 @@ func TestStopStartSequencer(t *testing.T) { ...@@ -66,10 +68,11 @@ func TestStopStartSequencer(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.True(t, active, "sequencer should be active again") require.True(t, active, "sequencer should be active again")
blockBefore = latestBlock(t, l2Seq) require.NoError(
time.Sleep(time.Duration(cfg.DeployConfig.L2BlockTime+1) * time.Second) t,
blockAfter = latestBlock(t, l2Seq) wait.ForNextBlock(ctx, l2Seq),
require.Greater(t, blockAfter, blockBefore, "Chain did not advance after starting sequencer") "Chain did not advance after starting sequencer",
)
} }
func TestPersistSequencerStateWhenChanged(t *testing.T) { func TestPersistSequencerStateWhenChanged(t *testing.T) {
......
# @eth-optimism/op-exporter # @eth-optimism/op-exporter
## 0.5.5
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
## 0.5.4 ## 0.5.4
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/op-exporter", "name": "@eth-optimism/op-exporter",
"version": "0.5.4", "version": "0.5.5",
"private": true, "private": true,
"devDependencies": {} "devDependencies": {}
} }
# @eth-optimism/drippie-mon # @eth-optimism/drippie-mon
## 0.5.1
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
- Updated dependencies [[`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e)]:
- @eth-optimism/common-ts@0.8.7
- @eth-optimism/contracts-bedrock@0.16.2
- @eth-optimism/core-utils@0.13.1
- @eth-optimism/sdk@3.1.4
## 0.5.0 ## 0.5.0
### Minor Changes ### Minor Changes
......
{ {
"private": true, "private": true,
"name": "@eth-optimism/chain-mon", "name": "@eth-optimism/chain-mon",
"version": "0.5.0", "version": "0.5.1",
"description": "[Optimism] Chain monitoring services", "description": "[Optimism] Chain monitoring services",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
......
# @eth-optimism/common-ts # @eth-optimism/common-ts
## 0.8.7
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
- Updated dependencies [[`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e)]:
- @eth-optimism/core-utils@0.13.1
## 0.8.6 ## 0.8.6
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/common-ts", "name": "@eth-optimism/common-ts",
"version": "0.8.6", "version": "0.8.7",
"description": "[Optimism] Advanced typescript tooling used by various services", "description": "[Optimism] Advanced typescript tooling used by various services",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
......
# @eth-optimism/contracts-bedrock # @eth-optimism/contracts-bedrock
## 0.16.2
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
## 0.16.1 ## 0.16.1
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/contracts-bedrock", "name": "@eth-optimism/contracts-bedrock",
"version": "0.16.1", "version": "0.16.2",
"description": "Contracts for Optimism Specs", "description": "Contracts for Optimism Specs",
"license": "MIT", "license": "MIT",
"files": [ "files": [
......
# @eth-optimism/contracts-ts
## 0.16.2
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
{ {
"name": "@eth-optimism/contracts-ts", "name": "@eth-optimism/contracts-ts",
"version": "0.15.0", "version": "0.16.2",
"description": "TypeScript interface for Contracts Bedrock", "description": "TypeScript interface for Contracts Bedrock",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
......
# @eth-optimism/core-utils # @eth-optimism/core-utils
## 0.13.1
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
## 0.13.0 ## 0.13.0
### Minor Changes ### Minor Changes
......
{ {
"name": "@eth-optimism/core-utils", "name": "@eth-optimism/core-utils",
"version": "0.13.0", "version": "0.13.1",
"description": "[Optimism] Core typescript utilities", "description": "[Optimism] Core typescript utilities",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
......
# @eth-optimism/fee-estimation # @eth-optimism/fee-estimation
## 0.15.3
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
## 0.15.2 ## 0.15.2
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/fee-estimation", "name": "@eth-optimism/fee-estimation",
"version": "0.15.2", "version": "0.15.3",
"description": "Lightweight library for doing OP-Chain gas estimation", "description": "Lightweight library for doing OP-Chain gas estimation",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
......
# @eth-optimism/sdk # @eth-optimism/sdk
## 3.1.4
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
- Updated dependencies [[`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e)]:
- @eth-optimism/contracts-bedrock@0.16.2
- @eth-optimism/core-utils@0.13.1
## 3.1.3 ## 3.1.3
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/sdk", "name": "@eth-optimism/sdk",
"version": "3.1.3", "version": "3.1.4",
"description": "[Optimism] Tools for working with Optimism", "description": "[Optimism] Tools for working with Optimism",
"main": "dist/index", "main": "dist/index",
"types": "dist/index", "types": "dist/index",
......
# @eth-optimism/web3.js-plugin # @eth-optimism/web3.js-plugin
## 0.1.3
### Patch Changes
- [#7450](https://github.com/ethereum-optimism/optimism/pull/7450) [`ac90e16a7`](https://github.com/ethereum-optimism/optimism/commit/ac90e16a7f85c4f73661ae6023135c3d00421c1e) Thanks [@roninjin10](https://github.com/roninjin10)! - Updated dev dependencies related to testing that is causing audit tooling to report failures
## 0.1.2 ## 0.1.2
### Patch Changes ### Patch Changes
......
{ {
"name": "@eth-optimism/web3.js-plugin", "name": "@eth-optimism/web3.js-plugin",
"version": "0.1.2", "version": "0.1.3",
"description": "A Web3.js plugin for doing OP-Chain gas estimation", "description": "A Web3.js plugin for doing OP-Chain gas estimation",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
......
...@@ -17,7 +17,7 @@ importers: ...@@ -17,7 +17,7 @@ importers:
devDependencies: devDependencies:
'@babel/eslint-parser': '@babel/eslint-parser':
specifier: ^7.18.2 specifier: ^7.18.2
version: 7.22.15(@babel/core@7.22.10)(eslint@8.49.0) version: 7.22.15(@babel/core@7.22.10)(eslint@8.50.0)
'@changesets/changelog-github': '@changesets/changelog-github':
specifier: ^0.4.8 specifier: ^0.4.8
version: 0.4.8 version: 0.4.8
...@@ -38,10 +38,10 @@ importers: ...@@ -38,10 +38,10 @@ importers:
version: 20.6.3 version: 20.6.3
'@typescript-eslint/eslint-plugin': '@typescript-eslint/eslint-plugin':
specifier: ^6.7.0 specifier: ^6.7.0
version: 6.7.0(@typescript-eslint/parser@6.7.3)(eslint@8.49.0)(typescript@5.2.2) version: 6.7.0(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/parser': '@typescript-eslint/parser':
specifier: ^6.7.0 specifier: ^6.7.0
version: 6.7.3(eslint@8.49.0)(typescript@5.2.2) version: 6.7.3(eslint@8.50.0)(typescript@5.2.2)
chai: chai:
specifier: ^4.3.9 specifier: ^4.3.9
version: 4.3.9 version: 4.3.9
...@@ -52,38 +52,38 @@ importers: ...@@ -52,38 +52,38 @@ importers:
specifier: ^2.2.0 specifier: ^2.2.0
version: 2.2.1 version: 2.2.1
eslint: eslint:
specifier: ^8.43.0 specifier: ^8.50.0
version: 8.49.0 version: 8.50.0
eslint-config-prettier: eslint-config-prettier:
specifier: ^8.3.0 specifier: ^8.3.0
version: 8.3.0(eslint@8.49.0) version: 8.3.0(eslint@8.50.0)
eslint-config-standard: eslint-config-standard:
specifier: ^16.0.3 specifier: ^16.0.3
version: 16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@8.49.0) version: 16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@8.50.0)
eslint-plugin-import: eslint-plugin-import:
specifier: ^2.26.0 specifier: ^2.26.0
version: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.49.0) version: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)
eslint-plugin-jsdoc: eslint-plugin-jsdoc:
specifier: ^35.1.2 specifier: ^35.1.2
version: 35.5.1(eslint@8.49.0) version: 35.5.1(eslint@8.50.0)
eslint-plugin-node: eslint-plugin-node:
specifier: ^11.1.0 specifier: ^11.1.0
version: 11.1.0(eslint@8.49.0) version: 11.1.0(eslint@8.50.0)
eslint-plugin-prefer-arrow: eslint-plugin-prefer-arrow:
specifier: ^1.2.3 specifier: ^1.2.3
version: 1.2.3(eslint@8.49.0) version: 1.2.3(eslint@8.50.0)
eslint-plugin-prettier: eslint-plugin-prettier:
specifier: ^4.0.0 specifier: ^4.0.0
version: 4.2.1(eslint-config-prettier@8.3.0)(eslint@8.49.0)(prettier@2.8.8) version: 4.2.1(eslint-config-prettier@8.3.0)(eslint@8.50.0)(prettier@2.8.8)
eslint-plugin-promise: eslint-plugin-promise:
specifier: ^5.1.0 specifier: ^5.1.0
version: 5.2.0(eslint@8.49.0) version: 5.2.0(eslint@8.50.0)
eslint-plugin-react: eslint-plugin-react:
specifier: ^7.24.0 specifier: ^7.24.0
version: 7.33.2(eslint@8.49.0) version: 7.33.2(eslint@8.50.0)
eslint-plugin-unicorn: eslint-plugin-unicorn:
specifier: ^48.0.1 specifier: ^48.0.1
version: 48.0.1(eslint@8.49.0) version: 48.0.1(eslint@8.50.0)
husky: husky:
specifier: ^8.0.3 specifier: ^8.0.3
version: 8.0.3 version: 8.0.3
...@@ -632,7 +632,7 @@ packages: ...@@ -632,7 +632,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@babel/eslint-parser@7.22.15(@babel/core@7.22.10)(eslint@8.49.0): /@babel/eslint-parser@7.22.15(@babel/core@7.22.10)(eslint@8.50.0):
resolution: {integrity: sha512-yc8OOBIQk1EcRrpizuARSQS0TWAcOMpEJ1aafhNznaeYkeL+OhqnDObGFylB8ka8VFF/sZc+S4RzHyO+3LjQxg==} resolution: {integrity: sha512-yc8OOBIQk1EcRrpizuARSQS0TWAcOMpEJ1aafhNznaeYkeL+OhqnDObGFylB8ka8VFF/sZc+S4RzHyO+3LjQxg==}
engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0}
peerDependencies: peerDependencies:
...@@ -641,7 +641,7 @@ packages: ...@@ -641,7 +641,7 @@ packages:
dependencies: dependencies:
'@babel/core': 7.22.10 '@babel/core': 7.22.10
'@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1
eslint: 8.49.0 eslint: 8.50.0
eslint-visitor-keys: 2.1.0 eslint-visitor-keys: 2.1.0
semver: 6.3.1 semver: 6.3.1
dev: true dev: true
...@@ -1775,16 +1775,6 @@ packages: ...@@ -1775,16 +1775,6 @@ packages:
dev: true dev: true
optional: true optional: true
/@eslint-community/eslint-utils@4.4.0(eslint@8.49.0):
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
dependencies:
eslint: 8.49.0
eslint-visitor-keys: 3.4.3
dev: true
/@eslint-community/eslint-utils@4.4.0(eslint@8.50.0): /@eslint-community/eslint-utils@4.4.0(eslint@8.50.0):
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
...@@ -1817,11 +1807,6 @@ packages: ...@@ -1817,11 +1807,6 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@eslint/js@8.49.0:
resolution: {integrity: sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
/@eslint/js@8.50.0: /@eslint/js@8.50.0:
resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==} resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
...@@ -4227,7 +4212,7 @@ packages: ...@@ -4227,7 +4212,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.7.3)(eslint@8.49.0)(typescript@5.2.2): /@typescript-eslint/eslint-plugin@6.7.0(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==} resolution: {integrity: sha512-gUqtknHm0TDs1LhY12K2NA3Rmlmp88jK9Tx8vGZMfHeNMLE3GH2e9TRub+y+SOjuYgtOmok+wt1AyDPZqxbNag==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
...@@ -4239,13 +4224,13 @@ packages: ...@@ -4239,13 +4224,13 @@ packages:
optional: true optional: true
dependencies: dependencies:
'@eslint-community/regexpp': 4.6.2 '@eslint-community/regexpp': 4.6.2
'@typescript-eslint/parser': 6.7.3(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/scope-manager': 6.7.0 '@typescript-eslint/scope-manager': 6.7.0
'@typescript-eslint/type-utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/type-utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/utils': 6.7.0(eslint@8.50.0)(typescript@5.2.2)
'@typescript-eslint/visitor-keys': 6.7.0 '@typescript-eslint/visitor-keys': 6.7.0
debug: 4.3.4(supports-color@8.1.1) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.49.0 eslint: 8.50.0
graphemer: 1.4.0 graphemer: 1.4.0
ignore: 5.2.4 ignore: 5.2.4
natural-compare: 1.4.0 natural-compare: 1.4.0
...@@ -4277,7 +4262,7 @@ packages: ...@@ -4277,7 +4262,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/parser@6.7.3(eslint@8.49.0)(typescript@5.2.2): /@typescript-eslint/parser@6.7.3(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==} resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies: peerDependencies:
...@@ -4292,7 +4277,7 @@ packages: ...@@ -4292,7 +4277,7 @@ packages:
'@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2) '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2)
'@typescript-eslint/visitor-keys': 6.7.3 '@typescript-eslint/visitor-keys': 6.7.3
debug: 4.3.4(supports-color@8.1.1) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.49.0 eslint: 8.50.0
typescript: 5.2.2 typescript: 5.2.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
...@@ -4322,26 +4307,6 @@ packages: ...@@ -4322,26 +4307,6 @@ packages:
'@typescript-eslint/visitor-keys': 6.7.3 '@typescript-eslint/visitor-keys': 6.7.3
dev: true dev: true
/@typescript-eslint/type-utils@6.7.0(eslint@8.49.0)(typescript@5.2.2):
resolution: {integrity: sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
'@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2)
'@typescript-eslint/utils': 6.7.0(eslint@8.49.0)(typescript@5.2.2)
debug: 4.3.4(supports-color@8.1.1)
eslint: 8.49.0
ts-api-utils: 1.0.1(typescript@5.2.2)
typescript: 5.2.2
transitivePeerDependencies:
- supports-color
dev: true
/@typescript-eslint/type-utils@6.7.0(eslint@8.50.0)(typescript@5.2.2): /@typescript-eslint/type-utils@6.7.0(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==} resolution: {integrity: sha512-f/QabJgDAlpSz3qduCyQT0Fw7hHpmhOzY/Rv6zO3yO+HVIdPfIWhrQoAyG+uZVtWAIS85zAyzgAFfyEr+MgBpg==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
...@@ -4440,25 +4405,6 @@ packages: ...@@ -4440,25 +4405,6 @@ packages:
- supports-color - supports-color
dev: true dev: true
/@typescript-eslint/utils@6.7.0(eslint@8.49.0)(typescript@5.2.2):
resolution: {integrity: sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==}
engines: {node: ^16.0.0 || >=18.0.0}
peerDependencies:
eslint: ^7.0.0 || ^8.0.0
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0)
'@types/json-schema': 7.0.12
'@types/semver': 7.5.0
'@typescript-eslint/scope-manager': 6.7.0
'@typescript-eslint/types': 6.7.0
'@typescript-eslint/typescript-estree': 6.7.0(typescript@5.2.2)
eslint: 8.49.0
semver: 7.5.4
transitivePeerDependencies:
- supports-color
- typescript
dev: true
/@typescript-eslint/utils@6.7.0(eslint@8.50.0)(typescript@5.2.2): /@typescript-eslint/utils@6.7.0(eslint@8.50.0)(typescript@5.2.2):
resolution: {integrity: sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==} resolution: {integrity: sha512-MfCq3cM0vh2slSikQYqK2Gq52gvOhe57vD2RM3V4gQRZYX4rDPnKLu5p6cm89+LJiGlwEXU8hkYxhqqEC/V3qA==}
engines: {node: ^16.0.0 || >=18.0.0} engines: {node: ^16.0.0 || >=18.0.0}
...@@ -7603,16 +7549,16 @@ packages: ...@@ -7603,16 +7549,16 @@ packages:
engines: {node: '>=10'} engines: {node: '>=10'}
dev: true dev: true
/eslint-config-prettier@8.3.0(eslint@8.49.0): /eslint-config-prettier@8.3.0(eslint@8.50.0):
resolution: {integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==} resolution: {integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
eslint: '>=7.0.0' eslint: '>=7.0.0'
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
dev: true dev: true
/eslint-config-standard@16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@8.49.0): /eslint-config-standard@16.0.3(eslint-plugin-import@2.28.1)(eslint-plugin-node@11.1.0)(eslint-plugin-promise@5.2.0)(eslint@8.50.0):
resolution: {integrity: sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==} resolution: {integrity: sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==}
peerDependencies: peerDependencies:
eslint: ^7.12.1 eslint: ^7.12.1
...@@ -7620,10 +7566,10 @@ packages: ...@@ -7620,10 +7566,10 @@ packages:
eslint-plugin-node: ^11.1.0 eslint-plugin-node: ^11.1.0
eslint-plugin-promise: ^4.2.1 || ^5.0.0 eslint-plugin-promise: ^4.2.1 || ^5.0.0
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.49.0) eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)
eslint-plugin-node: 11.1.0(eslint@8.49.0) eslint-plugin-node: 11.1.0(eslint@8.50.0)
eslint-plugin-promise: 5.2.0(eslint@8.49.0) eslint-plugin-promise: 5.2.0(eslint@8.50.0)
dev: true dev: true
/eslint-import-resolver-node@0.3.9: /eslint-import-resolver-node@0.3.9:
...@@ -7636,7 +7582,7 @@ packages: ...@@ -7636,7 +7582,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.49.0): /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0):
resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
...@@ -7657,26 +7603,26 @@ packages: ...@@ -7657,26 +7603,26 @@ packages:
eslint-import-resolver-webpack: eslint-import-resolver-webpack:
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 6.7.3(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
debug: 3.2.7 debug: 3.2.7
eslint: 8.49.0 eslint: 8.50.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
dev: true dev: true
/eslint-plugin-es@3.0.1(eslint@8.49.0): /eslint-plugin-es@3.0.1(eslint@8.50.0):
resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==} resolution: {integrity: sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==}
engines: {node: '>=8.10.0'} engines: {node: '>=8.10.0'}
peerDependencies: peerDependencies:
eslint: '>=4.19.1' eslint: '>=4.19.1'
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
eslint-utils: 2.1.0 eslint-utils: 2.1.0
regexpp: 3.2.0 regexpp: 3.2.0
dev: true dev: true
/eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.49.0): /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.3)(eslint@8.50.0):
resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
...@@ -7686,16 +7632,16 @@ packages: ...@@ -7686,16 +7632,16 @@ packages:
'@typescript-eslint/parser': '@typescript-eslint/parser':
optional: true optional: true
dependencies: dependencies:
'@typescript-eslint/parser': 6.7.3(eslint@8.49.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2)
array-includes: 3.1.6 array-includes: 3.1.6
array.prototype.findlastindex: 1.2.2 array.prototype.findlastindex: 1.2.2
array.prototype.flat: 1.3.1 array.prototype.flat: 1.3.1
array.prototype.flatmap: 1.3.1 array.prototype.flatmap: 1.3.1
debug: 3.2.7 debug: 3.2.7
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 8.49.0 eslint: 8.50.0
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.49.0) eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.3)(eslint-import-resolver-node@0.3.9)(eslint@8.50.0)
has: 1.0.3 has: 1.0.3
is-core-module: 2.13.0 is-core-module: 2.13.0
is-glob: 4.0.3 is-glob: 4.0.3
...@@ -7711,7 +7657,7 @@ packages: ...@@ -7711,7 +7657,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-plugin-jsdoc@35.5.1(eslint@8.49.0): /eslint-plugin-jsdoc@35.5.1(eslint@8.50.0):
resolution: {integrity: sha512-pPYPWtsykwVEue1tYEyoppBj4dgF7XicF67tLLLraY6RQYBq7qMKjUHji19+hfiTtYKKBD0YfeK8hgjPAE5viw==} resolution: {integrity: sha512-pPYPWtsykwVEue1tYEyoppBj4dgF7XicF67tLLLraY6RQYBq7qMKjUHji19+hfiTtYKKBD0YfeK8hgjPAE5viw==}
engines: {node: '>=12'} engines: {node: '>=12'}
peerDependencies: peerDependencies:
...@@ -7720,7 +7666,7 @@ packages: ...@@ -7720,7 +7666,7 @@ packages:
'@es-joy/jsdoccomment': 0.9.0-alpha.1 '@es-joy/jsdoccomment': 0.9.0-alpha.1
comment-parser: 1.1.6-beta.0 comment-parser: 1.1.6-beta.0
debug: 4.3.4(supports-color@8.1.1) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.49.0 eslint: 8.50.0
esquery: 1.4.0 esquery: 1.4.0
jsdoc-type-pratt-parser: 1.1.1 jsdoc-type-pratt-parser: 1.1.1
lodash: 4.17.21 lodash: 4.17.21
...@@ -7731,14 +7677,14 @@ packages: ...@@ -7731,14 +7677,14 @@ packages:
- supports-color - supports-color
dev: true dev: true
/eslint-plugin-node@11.1.0(eslint@8.49.0): /eslint-plugin-node@11.1.0(eslint@8.50.0):
resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==} resolution: {integrity: sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==}
engines: {node: '>=8.10.0'} engines: {node: '>=8.10.0'}
peerDependencies: peerDependencies:
eslint: '>=5.16.0' eslint: '>=5.16.0'
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
eslint-plugin-es: 3.0.1(eslint@8.49.0) eslint-plugin-es: 3.0.1(eslint@8.50.0)
eslint-utils: 2.1.0 eslint-utils: 2.1.0
ignore: 5.2.4 ignore: 5.2.4
minimatch: 3.1.2 minimatch: 3.1.2
...@@ -7746,15 +7692,15 @@ packages: ...@@ -7746,15 +7692,15 @@ packages:
semver: 6.3.1 semver: 6.3.1
dev: true dev: true
/eslint-plugin-prefer-arrow@1.2.3(eslint@8.49.0): /eslint-plugin-prefer-arrow@1.2.3(eslint@8.50.0):
resolution: {integrity: sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==} resolution: {integrity: sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==}
peerDependencies: peerDependencies:
eslint: '>=2.0.0' eslint: '>=2.0.0'
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
dev: true dev: true
/eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.3.0)(eslint@8.49.0)(prettier@2.8.8): /eslint-plugin-prettier@4.2.1(eslint-config-prettier@8.3.0)(eslint@8.50.0)(prettier@2.8.8):
resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
peerDependencies: peerDependencies:
...@@ -7765,22 +7711,22 @@ packages: ...@@ -7765,22 +7711,22 @@ packages:
eslint-config-prettier: eslint-config-prettier:
optional: true optional: true
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
eslint-config-prettier: 8.3.0(eslint@8.49.0) eslint-config-prettier: 8.3.0(eslint@8.50.0)
prettier: 2.8.8 prettier: 2.8.8
prettier-linter-helpers: 1.0.0 prettier-linter-helpers: 1.0.0
dev: true dev: true
/eslint-plugin-promise@5.2.0(eslint@8.49.0): /eslint-plugin-promise@5.2.0(eslint@8.50.0):
resolution: {integrity: sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==} resolution: {integrity: sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==}
engines: {node: ^10.12.0 || >=12.0.0} engines: {node: ^10.12.0 || >=12.0.0}
peerDependencies: peerDependencies:
eslint: ^7.0.0 eslint: ^7.0.0
dependencies: dependencies:
eslint: 8.49.0 eslint: 8.50.0
dev: true dev: true
/eslint-plugin-react@7.33.2(eslint@8.49.0): /eslint-plugin-react@7.33.2(eslint@8.50.0):
resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==}
engines: {node: '>=4'} engines: {node: '>=4'}
peerDependencies: peerDependencies:
...@@ -7791,7 +7737,7 @@ packages: ...@@ -7791,7 +7737,7 @@ packages:
array.prototype.tosorted: 1.1.1 array.prototype.tosorted: 1.1.1
doctrine: 2.1.0 doctrine: 2.1.0
es-iterator-helpers: 1.0.13 es-iterator-helpers: 1.0.13
eslint: 8.49.0 eslint: 8.50.0
estraverse: 5.3.0 estraverse: 5.3.0
jsx-ast-utils: 3.2.0 jsx-ast-utils: 3.2.0
minimatch: 3.1.2 minimatch: 3.1.2
...@@ -7805,17 +7751,17 @@ packages: ...@@ -7805,17 +7751,17 @@ packages:
string.prototype.matchall: 4.0.8 string.prototype.matchall: 4.0.8
dev: true dev: true
/eslint-plugin-unicorn@48.0.1(eslint@8.49.0): /eslint-plugin-unicorn@48.0.1(eslint@8.50.0):
resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==} resolution: {integrity: sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==}
engines: {node: '>=16'} engines: {node: '>=16'}
peerDependencies: peerDependencies:
eslint: '>=8.44.0' eslint: '>=8.44.0'
dependencies: dependencies:
'@babel/helper-validator-identifier': 7.22.5 '@babel/helper-validator-identifier': 7.22.5
'@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0)
ci-info: 3.8.0 ci-info: 3.8.0
clean-regexp: 1.0.0 clean-regexp: 1.0.0
eslint: 8.49.0 eslint: 8.50.0
esquery: 1.5.0 esquery: 1.5.0
indent-string: 4.0.0 indent-string: 4.0.0
is-builtin-module: 3.2.1 is-builtin-module: 3.2.1
...@@ -7867,52 +7813,6 @@ packages: ...@@ -7867,52 +7813,6 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true dev: true
/eslint@8.49.0:
resolution: {integrity: sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
hasBin: true
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0)
'@eslint-community/regexpp': 4.6.2
'@eslint/eslintrc': 2.1.2
'@eslint/js': 8.49.0
'@humanwhocodes/config-array': 0.11.11
'@humanwhocodes/module-importer': 1.0.1
'@nodelib/fs.walk': 1.2.8
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.4(supports-color@8.1.1)
doctrine: 3.0.0
escape-string-regexp: 4.0.0
eslint-scope: 7.2.2
eslint-visitor-keys: 3.4.3
espree: 9.6.1
esquery: 1.5.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
file-entry-cache: 6.0.1
find-up: 5.0.0
glob-parent: 6.0.2
globals: 13.21.0
graphemer: 1.4.0
ignore: 5.2.4
imurmurhash: 0.1.4
is-glob: 4.0.3
is-path-inside: 3.0.3
js-yaml: 4.1.0
json-stable-stringify-without-jsonify: 1.0.1
levn: 0.4.1
lodash.merge: 4.6.2
minimatch: 3.1.2
natural-compare: 1.4.0
optionator: 0.9.3
strip-ansi: 6.0.1
text-table: 0.2.0
transitivePeerDependencies:
- supports-color
dev: true
/eslint@8.50.0: /eslint@8.50.0:
resolution: {integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==} resolution: {integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": 1,
"links": [], "links": [],
"liveNow": false, "liveNow": false,
"panels": [ "panels": [
...@@ -31,88 +32,57 @@ ...@@ -31,88 +32,57 @@
"color": { "color": {
"mode": "thresholds" "mode": "thresholds"
}, },
"custom": {
"axisCenteredZero": true,
"axisColorMode": "series",
"axisGridShow": false,
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "stepAfter",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"decimals": 0,
"displayName": "Number of Transactions (positive number = success, negative = failures)",
"mappings": [], "mappings": [],
"thresholds": { "thresholds": {
"mode": "absolute", "mode": "absolute",
"steps": [ "steps": [
{ {
"color": "red", "color": "text",
"value": null "value": null
}, },
{ {
"color": "yellow", "color": "red",
"value": 1 "value": -1
}, },
{
"color": "green",
"value": 4
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 6,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"orientation": "auto",
"reduceOptions": {
"calcs": [
"lastNotNull"
],
"fields": "",
"values": false
},
"showThresholdLabels": false,
"showThresholdMarkers": true
},
"pluginVersion": "10.1.2",
"targets": [
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"disableTextWrap": false,
"editorMode": "builder",
"expr": "metamask_tx_success",
"fullMetaSearch": false,
"includeNullMetadata": true,
"instant": false,
"legendFormat": "__auto",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Successful Transaction Since Last Failure",
"type": "gauge"
},
{
"datasource": {
"type": "prometheus",
"uid": "PBFA97CFB590B2093"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{ {
"color": "text", "color": "text",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "green",
"value": 1 "value": 1
} }
] ]
...@@ -121,25 +91,29 @@ ...@@ -121,25 +91,29 @@
"overrides": [] "overrides": []
}, },
"gridPos": { "gridPos": {
"h": 5, "h": 8,
"w": 6, "w": 24,
"x": 6, "x": 0,
"y": 0 "y": 0
}, },
"id": 2, "id": 1,
"options": { "options": {
"orientation": "auto", "legend": {
"reduceOptions": {
"calcs": [ "calcs": [
"lastNotNull" "last"
], ],
"fields": "", "displayMode": "list",
"values": false "placement": "bottom",
"showLegend": true
}, },
"showThresholdLabels": false, "timezone": [
"showThresholdMarkers": true "browser"
],
"tooltip": {
"mode": "single",
"sort": "none"
}
}, },
"pluginVersion": "10.1.2",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
...@@ -148,7 +122,7 @@ ...@@ -148,7 +122,7 @@
}, },
"disableTextWrap": false, "disableTextWrap": false,
"editorMode": "builder", "editorMode": "builder",
"expr": "metamask_tx_failure", "expr": "metamask_self_send",
"fullMetaSearch": false, "fullMetaSearch": false,
"includeNullMetadata": true, "includeNullMetadata": true,
"instant": false, "instant": false,
...@@ -158,8 +132,8 @@ ...@@ -158,8 +132,8 @@
"useBackend": false "useBackend": false
} }
], ],
"title": "Failed Transactions Since Last Success", "title": "Self Transferring on OP Goerli (positive number = success, negative = failures)",
"type": "gauge" "type": "timeseries"
} }
], ],
"refresh": "5s", "refresh": "5s",
...@@ -170,7 +144,7 @@ ...@@ -170,7 +144,7 @@
"list": [] "list": []
}, },
"time": { "time": {
"from": "now-6h", "from": "now-30m",
"to": "now" "to": "now"
}, },
"timepicker": {}, "timepicker": {},
...@@ -179,4 +153,4 @@ ...@@ -179,4 +153,4 @@
"uid": "f66f7076-c724-4f81-8ff9-58d6d99f2716", "uid": "f66f7076-c724-4f81-8ff9-58d6d99f2716",
"version": 1, "version": 1,
"weekStart": "" "weekStart": ""
} }
\ No newline at end of file
...@@ -15,8 +15,6 @@ export default defineConfig({ ...@@ -15,8 +15,6 @@ export default defineConfig({
fullyParallel: true, fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */ /* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI, forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */ /* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined, workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
......
...@@ -6,8 +6,7 @@ import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts' ...@@ -6,8 +6,7 @@ import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'
import { testWithSynpress } from './testWithSynpressUtil' import { testWithSynpress } from './testWithSynpressUtil'
import { import {
incrementMetamaskTxCounter, incrementSelfSendTxGauge,
setMetamaskTxCounter,
} from './prometheusUtils' } from './prometheusUtils'
const env = z.object({ const env = z.object({
...@@ -24,18 +23,31 @@ const expectedSender = ...@@ -24,18 +23,31 @@ const expectedSender =
: mnemonicToAccount( : mnemonicToAccount(
env.METAMASK_SECRET_WORDS_OR_PRIVATEKEY as string env.METAMASK_SECRET_WORDS_OR_PRIVATEKEY as string
).address.toLowerCase() ).address.toLowerCase()
const expectedRecipient = '0x8fcfbe8953433fd1f2e8375ee99057833e4e1e9e' const expectedRecipient = expectedSender
let sharedPage: Page let sharedPage: Page
let wasSuccessful: boolean
let handledFailure: boolean
test.describe.configure({ mode: 'serial' }) test.describe.configure({ mode: 'serial' })
test.beforeAll(() => {
wasSuccessful = false
handledFailure = false
})
test.afterAll(async () => { test.afterAll(async () => {
// This is handling failure scenarios such as Playwright timeouts
// where are not able to catch and respond to an error.
if (!wasSuccessful && !handledFailure) {
await incrementSelfSendTxGauge(false)
}
await sharedPage.close() await sharedPage.close()
}) })
testWithSynpress('Setup wallet and dApp', async ({ page }) => { testWithSynpress('Setup wallet and dApp', async ({ page }) => {
console.log('Seting up wallet and dApp...') console.log('Setting up wallet and dApp...')
sharedPage = page sharedPage = page
await sharedPage.goto('http://localhost:9011') await sharedPage.goto('http://localhost:9011')
console.log('Setup wallet and dApp') console.log('Setup wallet and dApp')
...@@ -66,8 +78,8 @@ testWithSynpress('Add OP Goerli network', async () => { ...@@ -66,8 +78,8 @@ testWithSynpress('Add OP Goerli network', async () => {
try { try {
await expect(sharedPage.locator('#chainId')).toHaveText(expectedChainId) await expect(sharedPage.locator('#chainId')).toHaveText(expectedChainId)
} catch (error) { } catch (error) {
await setMetamaskTxCounter(true, 0) await incrementSelfSendTxGauge(false)
await incrementMetamaskTxCounter(false) handledFailure = true
throw error throw error
} }
console.log('Added OP Goerli network') console.log('Added OP Goerli network')
...@@ -81,15 +93,15 @@ test(`Connect wallet with ${expectedSender}`, async () => { ...@@ -81,15 +93,15 @@ test(`Connect wallet with ${expectedSender}`, async () => {
try { try {
await expect(sharedPage.locator('#accounts')).toHaveText(expectedSender) await expect(sharedPage.locator('#accounts')).toHaveText(expectedSender)
} catch (error) { } catch (error) {
await setMetamaskTxCounter(true, 0) await incrementSelfSendTxGauge(false)
await incrementMetamaskTxCounter(false) handledFailure = true
throw error throw error
} }
console.log(`Connected wallet with ${expectedSender}`) console.log(`Connected wallet with ${expectedSender}`)
}) })
test('Send an EIP-1559 transaciton and verfiy success', async () => { test('Send an EIP-1559 transaction and verify success', async () => {
console.log('Sending an EIP-1559 transaciton and verfiy success...') console.log('Sending an EIP-1559 transaction and verify success...')
const expectedTransferAmount = '0x1' const expectedTransferAmount = '0x1'
const expectedTxType = '0x2' const expectedTxType = '0x2'
...@@ -120,7 +132,7 @@ test('Send an EIP-1559 transaciton and verfiy success', async () => { ...@@ -120,7 +132,7 @@ test('Send an EIP-1559 transaciton and verfiy success', async () => {
// Waiting for RPC response to be populated on the page // Waiting for RPC response to be populated on the page
await sharedPage.waitForTimeout(2_000) await sharedPage.waitForTimeout(2_000)
const transaction = JSON.parse( const transactionReceipt = JSON.parse(
(await sharedPage.locator('body > main').innerText()).replace( (await sharedPage.locator('body > main').innerText()).replace(
'Response: ', 'Response: ',
'' ''
...@@ -128,13 +140,13 @@ test('Send an EIP-1559 transaciton and verfiy success', async () => { ...@@ -128,13 +140,13 @@ test('Send an EIP-1559 transaciton and verfiy success', async () => {
) )
try { try {
expect(transaction.status).toBe('0x1') expect(transactionReceipt.status).toBe('0x1')
await setMetamaskTxCounter(false, 0) wasSuccessful = true
await incrementMetamaskTxCounter(true) await incrementSelfSendTxGauge(true)
} catch (error) { } catch (error) {
await setMetamaskTxCounter(true, 0) await incrementSelfSendTxGauge(false)
await incrementMetamaskTxCounter(false) handledFailure = true
throw error throw error
} }
console.log('Sent an EIP-1559 transaciton and verfied success') console.log('Sent an EIP-1559 transaction and verified success')
}) })
import 'dotenv/config' import 'dotenv/config'
import { z } from 'zod' import { z } from 'zod'
import { Counter, Pushgateway } from 'prom-client' import { Gauge, Pushgateway } from 'prom-client'
const env = z const env = z
.object({ .object({
...@@ -9,21 +9,15 @@ const env = z ...@@ -9,21 +9,15 @@ const env = z
}) })
.parse(process.env) .parse(process.env)
const txSuccessMetricName = 'metamask_tx_success' const selfSendTransactionMetricName = 'metamask_self_send'
const txFailureMetricName = 'metamask_tx_failure'
const txSuccessCounter = new Counter({ const selfSendGauge = new Gauge({
name: txSuccessMetricName, name: selfSendTransactionMetricName,
help: 'A counter signifying the number of successful transactions sent with Metamask since last failure', help: 'A gauge signifying the number of transactions sent with Metamask',
})
const txFailureCounter = new Counter({
name: txFailureMetricName,
help: 'A counter signifying the number of failed transactions sent with Metamask since last successful transaction',
}) })
export const getMetamaskTxCounterValue = async (isSuccess: boolean) => { export const getSelfSendGaugeValue = async () => {
const metricName = isSuccess ? txSuccessMetricName : txFailureMetricName const prometheusMetricQuery = `${env.PROMETHEUS_SERVER_URL}/api/v1/query?query=${selfSendTransactionMetricName}`
const prometheusMetricQuery = `${env.PROMETHEUS_SERVER_URL}/api/v1/query?query=${metricName}`
const response = await fetch(prometheusMetricQuery) const response = await fetch(prometheusMetricQuery)
if (!response.ok) { if (!response.ok) {
...@@ -37,12 +31,12 @@ export const getMetamaskTxCounterValue = async (isSuccess: boolean) => { ...@@ -37,12 +31,12 @@ export const getMetamaskTxCounterValue = async (isSuccess: boolean) => {
// [ // [
// { // {
// metric: { // metric: {
// __name__: 'metamask_tx_success', // __name__: 'metamask_self_send',
// exported_job: 'metamask_tx_count', // exported_job: 'metamask_self_send_tx_count',
// instance: 'pushgateway:9091', // instance: 'pushgateway:9091',
// job: 'pushgateway' // job: 'pushgateway'
// }, // },
// value: [ 1695250414.474, '0' ] // value: [ 1695847795.646, '-1' ]
// } // }
// ] // ]
try { try {
...@@ -66,7 +60,9 @@ export const getMetamaskTxCounterValue = async (isSuccess: boolean) => { ...@@ -66,7 +60,9 @@ export const getMetamaskTxCounterValue = async (isSuccess: boolean) => {
if ( if (
error.message === "Cannot read properties of undefined (reading 'value')" error.message === "Cannot read properties of undefined (reading 'value')"
) { ) {
console.warn(`No data found for metric ${metricName} in Prometheus`) console.warn(
`No data found for metric ${selfSendTransactionMetricName} in Prometheus`
)
return undefined return undefined
} }
...@@ -74,28 +70,26 @@ export const getMetamaskTxCounterValue = async (isSuccess: boolean) => { ...@@ -74,28 +70,26 @@ export const getMetamaskTxCounterValue = async (isSuccess: boolean) => {
} }
} }
export const setMetamaskTxCounter = async ( export const setSelfSendTxGauge = async (valueToSetTo: number) => {
isSuccess: boolean, console.log(`Setting ${selfSendTransactionMetricName} to ${valueToSetTo}`)
valueToSetTo: number selfSendGauge.set(valueToSetTo)
) => {
const metricName = isSuccess ? txSuccessMetricName : txFailureMetricName
const txCounter = isSuccess ? txSuccessCounter : txFailureCounter
txCounter.reset()
console.log(`Setting ${metricName} to ${valueToSetTo}`)
txCounter.inc(valueToSetTo)
const pushGateway = new Pushgateway(env.PROMETHEUS_PUSHGATEWAY_URL) const pushGateway = new Pushgateway(env.PROMETHEUS_PUSHGATEWAY_URL)
await pushGateway.pushAdd({ jobName: 'metamask_tx_count' }) await pushGateway.pushAdd({ jobName: 'metamask_self_send_tx_count' })
} }
export const incrementMetamaskTxCounter = async (isSuccess: boolean) => { export const incrementSelfSendTxGauge = async (isSuccess: boolean) => {
const metricName = isSuccess ? txSuccessMetricName : txFailureMetricName const currentMetricValue = (await getSelfSendGaugeValue()) ?? 0
const currentMetricValue = (await getMetamaskTxCounterValue(true)) ?? 0
let newMetricValue: number
if (isSuccess) {
newMetricValue = currentMetricValue >= 0 ? currentMetricValue + 1 : 1
} else {
newMetricValue = currentMetricValue < 0 ? currentMetricValue - 1 : -1
}
console.log( console.log(
`Current value of ${metricName} is ${currentMetricValue}, incrementing to ${ `Current value of ${selfSendTransactionMetricName} is ${currentMetricValue}, incrementing to ${newMetricValue}`
currentMetricValue + 1
}`
) )
await setMetamaskTxCounter(isSuccess, currentMetricValue + 1) await setSelfSendTxGauge(newMetricValue)
} }
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