Skip to content

Commit

Permalink
Changed zk overflow validation method name
Browse files Browse the repository at this point in the history
  • Loading branch information
amit-momin committed Mar 26, 2024
1 parent 68de594 commit 1a25270
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/chains/evm/client/chain_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (c *chainClient) LatestFinalizedBlock(ctx context.Context) (*evmtypes.Head,
return c.multiNode.LatestFinalizedBlock(ctx)
}

func (c *chainClient) CheckTxValidity(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError {
func (c *chainClient) CheckTxOverflow(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError {
msg := ethereum.CallMsg{
From: from,
To: &to,
Expand Down
4 changes: 2 additions & 2 deletions core/chains/evm/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ type Client interface {
IsL2() bool

// Simulate the transaction prior to sending to catch zk out-of-counters errors ahead of time
CheckTxValidity(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError
CheckTxOverflow(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError
}

func ContextWithDefaultTimeout() (ctx context.Context, cancel context.CancelFunc) {
Expand Down Expand Up @@ -375,6 +375,6 @@ func (client *client) LatestFinalizedBlock(_ context.Context) (*evmtypes.Head, e
return nil, pkgerrors.New("not implemented. client was deprecated. New methods are added only to satisfy type constraints while we are migrating to new alternatives")
}

func (client *client) CheckTxValidity(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError {
func (client *client) CheckTxOverflow(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError {
return NewSendError(pkgerrors.New("not implemented. client was deprecated. New methods are added only to satisfy type constraints while we are migrating to new alternatives"))
}
6 changes: 3 additions & 3 deletions core/chains/evm/client/mocks/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/chains/evm/client/null_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,6 @@ func (nc *NullClient) LatestFinalizedBlock(_ context.Context) (*evmtypes.Head, e
return nil, nil
}

func (nc *NullClient) CheckTxValidity(_ context.Context, _ common.Address, _ common.Address, _ []byte) *SendError {
func (nc *NullClient) CheckTxOverflow(_ context.Context, _ common.Address, _ common.Address, _ []byte) *SendError {
return nil
}
2 changes: 1 addition & 1 deletion core/chains/evm/client/simulated_backend_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ func (c *SimulatedBackendClient) ethGetLogs(ctx context.Context, result interfac
}
}

func (c *SimulatedBackendClient) CheckTxValidity(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError {
func (c *SimulatedBackendClient) CheckTxOverflow(ctx context.Context, from common.Address, to common.Address, data []byte) *SendError {
return nil
}

Expand Down

0 comments on commit 1a25270

Please sign in to comment.