From 97c36aa8047579ef08faea1305aac060929b43da Mon Sep 17 00:00:00 2001 From: solunolab Date: Thu, 4 Jun 2026 22:15:51 +0800 Subject: [PATCH] chore: fix some comments to improve readability Signed-off-by: solunolab --- cmd/chain-watch/main.go | 2 +- cmd/ethkit/abigen.go | 2 +- ethcoder/typed_data_json.go | 4 ++-- ethgas/ema.go | 2 +- ethmonitor/chain.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/chain-watch/main.go b/cmd/chain-watch/main.go index 12dc2cae..b1ab99b3 100644 --- a/cmd/chain-watch/main.go +++ b/cmd/chain-watch/main.go @@ -214,7 +214,7 @@ func chainWatch(provider *ethrpc.Provider, monitorOptions ethmonitor.Options) (* // TODO: we can implement a program, chain-watch-test // which will assert ethmonitor behaviour - // checking the event source to ensure its correct, etc....... + // checking the event source to ensure it's correct, etc....... wg.Wait() // select { diff --git a/cmd/ethkit/abigen.go b/cmd/ethkit/abigen.go index 587403bd..623fd09b 100644 --- a/cmd/ethkit/abigen.go +++ b/cmd/ethkit/abigen.go @@ -129,7 +129,7 @@ func (c *abigen) generateGo(artifact ethartifact.RawArtifact) error { // the "bytecode" value is what we use to deploy a new contract. // // Whereas the "deployedBytecode" is the runtime code of the contract, and can be used to verify - // the contract bytecode once its been deployed. For our purposes of generating a client, we only + // the contract bytecode once it's been deployed. For our purposes of generating a client, we only // need the constructor code, so we use the "bytecode" value. if c.fUseV2 { diff --git a/ethcoder/typed_data_json.go b/ethcoder/typed_data_json.go index 79db176d..fa8e3820 100644 --- a/ethcoder/typed_data_json.go +++ b/ethcoder/typed_data_json.go @@ -141,7 +141,7 @@ func (t *TypedData) UnmarshalJSON(data []byte) error { return err } - // Ensure the "EIP712Domain" type is defined. In case its not defined + // Ensure the "EIP712Domain" type is defined. In case it's not defined // we will add it to the types map _, ok := raw.Types["EIP712Domain"] if !ok { @@ -165,7 +165,7 @@ func (t *TypedData) UnmarshalJSON(data []byte) error { // Ensure primary type is defined if raw.PrimaryType == "" { - // detect primary type if its unspecified + // detect primary type if it's unspecified primaryType, err := typedDataDetectPrimaryType(raw.Types.Map(), raw.Message) if err != nil { return err diff --git a/ethgas/ema.go b/ethgas/ema.go index a424e1a2..e556cd49 100644 --- a/ethgas/ema.go +++ b/ethgas/ema.go @@ -10,7 +10,7 @@ func NewEMA(decay float64) *EMA { } // EMA is a moving average with exponential decay. It doesn't have any concept of weight -// so it will only work on homogenous (evenly spaced) time series. +// so it will only work on homogeneous (evenly spaced) time series. // ema := NewEMA(0.1818) // avg1 = ema.Tick(price1) // avg2 = ema.Tick(price2) diff --git a/ethmonitor/chain.go b/ethmonitor/chain.go index 8685a862..8e3951d2 100644 --- a/ethmonitor/chain.go +++ b/ethmonitor/chain.go @@ -176,7 +176,7 @@ func (c *Chain) GetBlockByNumber(blockNum uint64, event Event) *Block { // GetTransaction searches our canonical chain of blocks (where each block points at previous), // and returns the transaction. Aka, searches our chain for mined transactions. Keep in mind // transactions can still be reorged, but you can check the blockNumber and compare it against -// the head to determine if its final. +// the head to determine if it's final. func (c *Chain) GetTransaction(txnHash common.Hash) (*types.Transaction, Event) { c.mu.Lock() defer c.mu.Unlock()