Skip to content

Fixed typos #9634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 16, 2024
2 changes: 1 addition & 1 deletion op-chain-ops/cmd/receipt-reference-builder/readwrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (w jsonAggregateReaderWriter) readAggregate(f string) (aggregate, error) {
type gobAggregateReaderWriter struct{}

// writeAggregate writes the aggregate to a file in gob format
// if the output file is not specified, it will creeate a file based on the block range
// if the output file is not specified, it will create a file based on the block range
func (w gobAggregateReaderWriter) writeAggregate(a aggregate, o string) error {
if o == "" {
o = fmt.Sprintf("%d.%d-%d.gob", a.ChainID, a.First, a.Last)
Expand Down
4 changes: 2 additions & 2 deletions op-chain-ops/safe/batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func TestBatchAddCallFinalizeWithdrawalTransaction(t *testing.T) {
require.JSONEq(t, string(expected), string(serialized))
}

// TestBatchAddCallDespostTransaction ensures that simple calls can be serialized correctly.
func TestBatchAddCallDespositTransaction(t *testing.T) {
// TestBatchAddCallDepositTransaction ensures that simple calls can be serialized correctly.
func TestBatchAddCallDepositTransaction(t *testing.T) {
file, err := os.ReadFile("testdata/portal-abi.json")
require.NoError(t, err)
portalABI, err := abi.JSON(bytes.NewReader(file))
Expand Down
4 changes: 2 additions & 2 deletions op-challenger/game/fault/claims/claimer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ type BondClaimMetrics interface {
}

type BondContract interface {
GetCredit(ctx context.Context, receipient common.Address) (*big.Int, error)
ClaimCredit(receipient common.Address) (txmgr.TxCandidate, error)
GetCredit(ctx context.Context, recipient common.Address) (*big.Int, error)
ClaimCredit(recipient common.Address) (txmgr.TxCandidate, error)
}

type BondContractCreator func(game types.GameMetadata) (BondContract, error)
Expand Down
4 changes: 2 additions & 2 deletions op-challenger/game/fault/responder/responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ type GameContract interface {
DefendTx(parentContractIndex uint64, pivot common.Hash) (txmgr.TxCandidate, error)
StepTx(claimIdx uint64, isAttack bool, stateData []byte, proof []byte) (txmgr.TxCandidate, error)
GetRequiredBond(ctx context.Context, position types.Position) (*big.Int, error)
GetCredit(ctx context.Context, receipient common.Address) (*big.Int, error)
ClaimCredit(receipient common.Address) (txmgr.TxCandidate, error)
GetCredit(ctx context.Context, recipient common.Address) (*big.Int, error)
ClaimCredit(recipient common.Address) (txmgr.TxCandidate, error)
}

type Oracle interface {
Expand Down
4 changes: 2 additions & 2 deletions op-challenger/game/registry/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ func (s stubPreimageOracle) GetActivePreimages(_ context.Context, _ common.Hash)

type stubBondContract struct{}

func (s *stubBondContract) GetCredit(ctx context.Context, receipient common.Address) (*big.Int, error) {
func (s *stubBondContract) GetCredit(ctx context.Context, recipient common.Address) (*big.Int, error) {
panic("not supported")
}

func (s *stubBondContract) ClaimCredit(receipient common.Address) (txmgr.TxCandidate, error) {
func (s *stubBondContract) ClaimCredit(recipient common.Address) (txmgr.TxCandidate, error) {
panic("not supported")
}
2 changes: 1 addition & 1 deletion op-conductor/conductor/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func (oc *OpConductor) action() {
break
}

// 2. we're here becasuse an healthy leader became unhealthy itself
// 2. we're here because an healthy leader became unhealthy itself
// then we should try to stop sequencing locally and transfer leadership.
var result *multierror.Error
// Try to stop sequencer first, but since sequencer is not healthy, we may not be able to stop it.
Expand Down
4 changes: 2 additions & 2 deletions op-node/rollup/async/asyncgossiper.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ type SimpleAsyncGossiper struct {
}

// To avoid import cycles, we define a new Network interface here
// this interface is compatable with driver.Network
// this interface is compatible with driver.Network
type Network interface {
PublishL2Payload(ctx context.Context, payload *eth.ExecutionPayloadEnvelope) error
}

// To avoid import cycles, we define a new Metrics interface here
// this interface is compatable with driver.Metrics
// this interface is compatible with driver.Metrics
type Metrics interface {
RecordPublishingError()
}
Expand Down
8 changes: 4 additions & 4 deletions op-node/rollup/derive/engine_consolidate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func mismatchedParentHashArgs() args {
return args
}

func createMistmatchedPrevRandao() args {
func createMismatchedPrevRandao() args {
args := ecotoneArgs()
args.attrs.PrevRandao = eth.Bytes32(common.HexToHash("0xabc"))
return args
Expand All @@ -126,7 +126,7 @@ func createNilGasLimit() args {
return args
}

func createMistmatchedTimestamp() args {
func createMismatchedTimestamp() args {
args := ecotoneArgs()
val := eth.Uint64Quantity(2000)
args.attrs.Timestamp = val
Expand Down Expand Up @@ -178,7 +178,7 @@ func TestAttributesMatch(t *testing.T) {
},
{
shouldMatch: false,
args: createMistmatchedPrevRandao(),
args: createMismatchedPrevRandao(),
},
{
shouldMatch: false,
Expand All @@ -190,7 +190,7 @@ func TestAttributesMatch(t *testing.T) {
},
{
shouldMatch: false,
args: createMistmatchedTimestamp(),
args: createMismatchedTimestamp(),
},
}

Expand Down
2 changes: 1 addition & 1 deletion op-node/rollup/derive/frame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func randomFrame(rng *rand.Rand, opts ...frameOpt) *Frame {
IsLast: testutils.RandomBool(rng),
}

// evaulaute options
// evaluate options
for _, opt := range opts {
opt(rng, frame)
}
Expand Down
2 changes: 1 addition & 1 deletion op-program/client/l1/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Oracle interface {
// GetBlobField retrieves the field element at the given index from the blob with the given hash.
GetBlob(ref eth.L1BlockRef, blobHash eth.IndexedBlobHash) *eth.Blob

// KZGPointEvaluation retriees the result of the Cancun KZG point evaluation precompile for the given input.
// KZGPointEvaluation retrieves the result of the Cancun KZG point evaluation precompile for the given input.
KZGPointEvaluation(input []byte) bool
}

Expand Down
2 changes: 1 addition & 1 deletion op-proposer/proposer/abi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestManualABIPacking(t *testing.T) {
txData, err := proposeL2OutputTxData(l2ooAbi, output)
require.NoError(t, err)

// set a gas limit to disable gas estimation. The invariantes that the L2OO tries to uphold
// set a gas limit to disable gas estimation. The invariants that the L2OO tries to uphold
// are not maintained in this test.
opts.GasLimit = 100_000
tx, err := l2oo.ProposeL2Output(
Expand Down
4 changes: 2 additions & 2 deletions op-service/eth/ssz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ func TestMarshalUnmarshalExecutionPayloadEnvelopes(t *testing.T) {
ExecutionPayload: createPayloadWithWithdrawals(&types.Withdrawals{}),
}

missingExecutionPaylaod := &ExecutionPayloadEnvelope{
missingExecutionPayload := &ExecutionPayloadEnvelope{
ParentBeaconBlockRoot: &hash,
ExecutionPayload: nil,
}
Expand All @@ -439,7 +439,7 @@ func TestMarshalUnmarshalExecutionPayloadEnvelopes(t *testing.T) {
}{
{"ValidInputSucceeds", validInput, nil},
{"MissingHashFailsToSerialize", missingHash, ErrMissingData},
{"MissingExecutionDataFailsToSerialize", missingExecutionPaylaod, ErrMissingData},
{"MissingExecutionDataFailsToSerialize", missingExecutionPayload, ErrMissingData},
}

for _, test := range tests {
Expand Down
2 changes: 1 addition & 1 deletion op-service/txmgr/txmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func (m *SimpleTxManager) sendTx(ctx context.Context, tx *types.Transaction) (*t
return tx
}

// Immediately publish a transaction before starting the resumbission loop
// Immediately publish a transaction before starting the resubmission loop
tx = publishAndWait(tx, false)

ticker := time.NewTicker(m.cfg.ResubmissionTimeout)
Expand Down
2 changes: 1 addition & 1 deletion op-service/txmgr/txmgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ func (*mockBackend) ChainID(ctx context.Context) (*big.Int, error) {

// TransactionReceipt queries the mockBackend for a mined txHash. If none is found, nil is returned
// for both return values. Otherwise, it returns a receipt containing the txHash, the gasFeeCap
// used in GasUsed, and the blobFeeCap in CumuluativeGasUsed to make the values accessible from our
// used in GasUsed, and the blobFeeCap in CumulativeGasUsed to make the values accessible from our
// test framework.
func (b *mockBackend) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) {
b.mu.RLock()
Expand Down
2 changes: 1 addition & 1 deletion op-wheel/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func Copy(ctx context.Context, copyFrom client.RPC, copyTo client.RPC) error {
return nil
}

// CopyPaylod takes the execution payload at number & applies it via NewPayload to copyTo
// CopyPayload takes the execution payload at number & applies it via NewPayload to copyTo
func CopyPayload(ctx context.Context, number uint64, copyFrom client.RPC, copyTo client.RPC) error {
copyHead, err := getBlock(ctx, copyFrom, "eth_getBlockByNumber", hexutil.EncodeUint64(number))
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/test/L2/L2StandardBridge.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ contract L2StandardBridge_Bridge_Test is Bridge_Initializer {
l2StandardBridge.finalizeBridgeETH{ value: 50 }(alice, alice, 100, hex"");
}

/// @dev Tests that `finalizeDeposit` reverts if the receipient is the other bridge.
/// @dev Tests that `finalizeDeposit` reverts if the recipient is the other bridge.
function test_finalizeBridgeETH_sendToSelf_reverts() external {
vm.mockCall(
address(l2StandardBridge.messenger()),
Expand All @@ -495,7 +495,7 @@ contract L2StandardBridge_Bridge_Test is Bridge_Initializer {
l2StandardBridge.finalizeBridgeETH{ value: 100 }(alice, address(l2StandardBridge), 100, hex"");
}

/// @dev Tests that `finalizeDeposit` reverts if the receipient is the messenger.
/// @dev Tests that `finalizeDeposit` reverts if the recipient is the messenger.
function test_finalizeBridgeETH_sendToMessenger_reverts() external {
vm.mockCall(
address(l2StandardBridge.messenger()),
Expand Down