Skip to content

Commit aa3bd23

Browse files
authored
chore: fix some comments (#475)
Signed-off-by: jiangmencity <[email protected]>
1 parent 1341373 commit aa3bd23

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

contracts/nitro/examples/HashLockedSwap.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ contract HashLockedSwap is IForceMoveApp {
5959
require(sha256(preImage) == h, 'incorrect preimage');
6060
// NOTE ON GAS COSTS
6161
// The gas cost of hashing depends on the choice of hash function
62-
// and the length of the the preImage.
62+
// and the length of the preImage.
6363
// sha256 is twice as expensive as keccak256
6464
// https://ethereum.stackexchange.com/a/3200
6565
// But is compatible with bitcoin.

pkg/keystore/hdwallet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/layer-3/clearsync/pkg/signer"
1212
)
1313

14-
// Wallet represents a master wallet that can create signers.
14+
// HdWallet represents a master wallet that can create signers.
1515
type HdWallet struct {
1616
masterKey *hdkeychain.ExtendedKey
1717
mx sync.RWMutex

pkg/quotes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ index_price = totalPriceVolume / totalVolume
143143
Uniswap V3 uses [Q notation](https://en.wikipedia.org/wiki/Q_(number_format)), which is a type of fixed-point arithmetics, to encode swap price.
144144

145145
Q notation allows variables to remain integers, but function similarly to floating point numbers.
146-
Additionally piping the price through square root allows to reduce dimentionality of the number.
146+
Additionally piping the price through square root allows to reduce dimensionality of the number.
147147
Predictable size of the number encoded this way enables efficient caching and fast retrieval of data from chain.
148148

149149
#### How to calculate price?

pkg/quotes/opendax_protocol/protocol.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Events/metods names for open-finance.org protocol implementation client and server.
1+
// Events/methods names for open-finance.org protocol implementation client and server.
22
package opendax_protocol
33

44
import "fmt"

pkg/smart_wallet/account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func GetAccountAddress(ctx context.Context, provider ethereum.ContractCaller, co
6666

6767
// check if the error data has the correct length
6868
if len(errorData) < 74 {
69-
return common.Address{}, fmt.Errorf("'getSenderAddress' revert data expected to have lenght of 74, but got: %d", len(errorData))
69+
return common.Address{}, fmt.Errorf("'getSenderAddress' revert data expected to have length of 74, but got: %d", len(errorData))
7070
}
7171

7272
swAddress := common.HexToAddress(errorData[34:])

pkg/universal_sigver/client_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ func TestVerify(t *testing.T) {
4242
msgHash := common.BytesToHash(signer_pkg.ComputeEthereumSignedMessageHash(msg))
4343
rawSig := sig.Raw()
4444

45-
t.Run("Successfuly verify ECDSA signature", func(t *testing.T) {
45+
t.Run("Successfully verify ECDSA signature", func(t *testing.T) {
4646
ok, err := sigver.Verify(ctx, signer.CommonAddress(), msgHash, rawSig)
4747
require.NoError(t, err)
4848
require.True(t, ok)
4949
})
5050

51-
t.Run("Successfuly verify ERC-1271 signature", func(t *testing.T) {
51+
t.Run("Successfully verify ERC-1271 signature", func(t *testing.T) {
5252
index := decimal.Zero
5353

5454
// 3. Start bundler, create client and kernel signer
@@ -88,7 +88,7 @@ func TestVerify(t *testing.T) {
8888
require.True(t, ok)
8989
})
9090

91-
t.Run("Successfuly verify ERC-6492 signature", func(t *testing.T) {
91+
t.Run("Successfully verify ERC-6492 signature", func(t *testing.T) {
9292
index := decimal.NewFromInt(1)
9393

9494
// 3. Calculate smart wallet address

src/nitro/transactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const NITRO_MAX_GAS = 6_000_000; // should be below the block gas limit,
1515
// mainnet 12505858
1616
// ropsten: 8000029
1717
// rinkeby: 10000000
18-
// ganache: 6721975 (hardcoded but can be overriden via config)
18+
// ganache: 6721975 (hardcoded but can be overridden via config)
1919

2020
/**
2121
* Marshalls the supplied signedStates into an ethereum transaction for the challenge method. Automatically computes signedVariableParts, etc.

0 commit comments

Comments
 (0)