Skip to content

Commit

Permalink
docs(repo): fix all typos (#16489)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Wang <[email protected]>
Co-authored-by: d1onys1us <[email protected]>
  • Loading branch information
3 people authored Mar 25, 2024
1 parent 89d8ece commit 4cc2393
Show file tree
Hide file tree
Showing 33 changed files with 58 additions and 66 deletions.
16 changes: 4 additions & 12 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
[files]
# Temporarily commenting a lot so that at least *.sol files are included.
extend-exclude = [
"CHANGELOG.md",
"*.go",
"*.html",
"*.md",
"*.ts",
"*.css",
"*.yaml",
"*.yml",
"*.json",
"**/automata-attestation/**",
"**/thirdparty/**",
"CHANGELOG.md",
"packages/protocol/contracts/automata-attestation/**",
"packages/protocol/contracts/thirdparty/**",
"packages/protocol/contracts/compiled/**",
]
2 changes: 1 addition & 1 deletion packages/blobstorage/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func main() {
_ = godotenv.Load(envFile)

app.Name = "Taiko Blob Catcher"
app.Usage = "The taiko blob catcher softwares command line interface"
app.Usage = "The taiko blob catcher software command line interface"
app.Copyright = "Copyright 2021-2024 Taiko Labs"
app.Description = "Blob catcher implementation in Golang for Taiko protocol"
app.Authors = []*cli.Author{{Name: "Taiko Labs", Email: "[email protected]"}}
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/scripts/utils/validateJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { PluginLogger } from './PluginLogger';

const ajv = new Ajv({ strict: false });

type SchmaWithId = Schema & { $id?: string };
type SchemaWithId = Schema & { $id?: string };

const logger = new PluginLogger('json-validator');

export const validateJsonAgainstSchema = (json: JSON, schema: SchmaWithId): boolean => {
export const validateJsonAgainstSchema = (json: JSON, schema: SchemaWithId): boolean => {
logger.info(`Validating ${schema.$id}`);
const validate = ajv.compile(schema);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function generateBridgeConfig() {
// Decode base64 encoded JSON string
configuredBridgesConfigFile = decodeBase64ToJson(process.env.CONFIGURED_BRIDGES || '');

// Valide JSON against schema
// Valid JSON against schema
const isValid = validateJsonAgainstSchema(configuredBridgesConfigFile, configuredBridgesSchema);

if (!isValid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function generateChainConfig() {
}
// Decode base64 encoded JSON string
configuredChainsConfigFile = decodeBase64ToJson(process.env.CONFIGURED_CHAINS || '');
// Valide JSON against schema
// Valid JSON against schema
const isValid = validateJsonAgainstSchema(configuredChainsConfigFile, configuredChainsSchema);

if (!isValid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function generateCustomTokenConfig() {
// Decode base64 encoded JSON string
configuredTokenConfigFile = decodeBase64ToJson(process.env.CONFIGURED_CUSTOM_TOKENS || '');

// Valide JSON against schema
// Valid JSON against schema
const isValid = validateJsonAgainstSchema(configuredTokenConfigFile, configuredChainsSchema);

if (!isValid) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function generateEventIndexerConfig() {
// Decode base64 encoded JSON string
configuredEventIndexerConfigFile = decodeBase64ToJson(process.env.CONFIGURED_EVENT_INDEXER || '');

// Valide JSON against schema
// Valid JSON against schema
const isValid = validateJsonAgainstSchema(configuredEventIndexerConfigFile, configuredEventIndexerSchema);
if (!isValid) {
throw new Error('encoded configuredEventIndexer.json is not valid.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function generateRelayerConfig() {
// Decode base64 encoded JSON string
configuredRelayerConfigFile = decodeBase64ToJson(process.env.CONFIGURED_RELAYER || '');

// Valide JSON against schema
// Valid JSON against schema
const isValid = validateJsonAgainstSchema(configuredRelayerConfigFile, configuredRelayerSchema);
if (!isValid) {
throw new Error('encoded configuredRelayer.json is not valid.');
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/src/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const recommentProcessingFee = {
export const recommendProcessingFeeConfig = {
ethGasLimit: BigInt(900_000),
erc20NotDeployedGasLimit: BigInt(1_650_000),
erc20DeployedGasLimit: BigInt(1_100_000),
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
"transactions": "Transactions"
},
"paused_modal": {
"description": "The bridge is currently not available. Follow our official communcation channels for more information. ",
"description": "The bridge is currently not available. Follow our official communication channels for more information. ",
"title": "Bridge under maintenance!"
},
"processing_fee": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ vi.mock('$libs/util/getLatestBlockTimestamp');
describe('getInvocationDelayForTx()', () => {
it('should return the invocation delays for the transaction', async () => {
const MOCK_BLOCK_TIMESTAMP = 1632787200n;
const MOCK_RECIEPT_TIMESTAMP = 1632787200n - 200n;
const MOCK_RECEIPT_TIMESTAMP = 1632787200n - 200n;
const PREFERRED_CLAIMER_DELAY = 100n;
const NOT_PREFERRED_CLAIMER_DELAY = 200n;
const MOCK_DELAYS = [PREFERRED_CLAIMER_DELAY, NOT_PREFERRED_CLAIMER_DELAY] as const;

//Given
vi.mocked(getInvocationDelaysForDestBridge).mockResolvedValue(MOCK_DELAYS);
vi.mocked(getLatestBlockTimestamp).mockResolvedValue(MOCK_BLOCK_TIMESTAMP);
vi.mocked(getProofReceiptForMsgHash).mockResolvedValue([MOCK_RECIEPT_TIMESTAMP, ALICE]);
vi.mocked(getProofReceiptForMsgHash).mockResolvedValue([MOCK_RECEIPT_TIMESTAMP, ALICE]);

//When
const result = await getInvocationDelayForTx(MOCK_BRIDGE_TX_1);

//Then
expect(result).toStrictEqual({
preferredDelay: PREFERRED_CLAIMER_DELAY - (MOCK_BLOCK_TIMESTAMP - MOCK_RECIEPT_TIMESTAMP),
notPreferredDelay: NOT_PREFERRED_CLAIMER_DELAY - (MOCK_BLOCK_TIMESTAMP - MOCK_RECIEPT_TIMESTAMP),
preferredDelay: PREFERRED_CLAIMER_DELAY - (MOCK_BLOCK_TIMESTAMP - MOCK_RECEIPT_TIMESTAMP),
notPreferredDelay: NOT_PREFERRED_CLAIMER_DELAY - (MOCK_BLOCK_TIMESTAMP - MOCK_RECEIPT_TIMESTAMP),
});
expect(getInvocationDelaysForDestBridge).toHaveBeenCalledWith({
srcChainId: BigInt(L1_CHAIN_ID),
Expand Down
8 changes: 4 additions & 4 deletions packages/bridge-ui/src/libs/bridge/getInvocationDelayForTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ export const getInvocationDelayForTx = async (tx: BridgeTransaction) => {
throw new NoDelaysForBridgeError('Destination chain does not have delays');
}

const proofReciept = await getProofReceiptForMsgHash({
const proofReceipt = await getProofReceiptForMsgHash({
msgHash: tx.msgHash,
destChainId: tx.destChainId,
srcChainId: tx.srcChainId,
});

if (proofReciept[0] === 0n) {
if (proofReceipt[0] === 0n) {
// No proof receipt found, no delay (yet)
return {
preferredDelay: 0n,
Expand All @@ -42,8 +42,8 @@ export const getInvocationDelayForTx = async (tx: BridgeTransaction) => {
const latestBlockTimestamp = await getLatestBlockTimestamp(tx.destChainId);
log('latestBlockTimestamp', latestBlockTimestamp);

const provenAt = proofReciept[0];
// const provenBy = proofReciept[1];
const provenAt = proofReceipt[0];
// const provenBy = proofReceipt[1];

log('time since last claim', latestBlockTimestamp - provenAt);
const delays = {
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/src/libs/fee/recommendProcessingFee.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getPublicClient } from '@wagmi/core';

import { recommentProcessingFee } from '$config';
import { recommendProcessingFeeConfig } from '$config';
import { NoCanonicalInfoFoundError } from '$libs/error';
import { type Token, TokenType } from '$libs/token';
import { getTokenAddresses } from '$libs/token/getTokenAddresses';
Expand All @@ -23,7 +23,7 @@ const {
erc1155NotDeployedGasLimit,
erc721DeployedGasLimit,
erc721NotDeployedGasLimit,
} = recommentProcessingFee;
} = recommendProcessingFeeConfig;

export async function recommendProcessingFee({
token,
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/src/libs/util/logger.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import debug from 'debug';

export function getLogger(namesapce: string) {
return debug(`bridge:${namesapce}`);
export function getLogger(namespace: string) {
return debug(`bridge:${namespace}`);
}
2 changes: 1 addition & 1 deletion packages/bridge-ui/src/stores/pendingTransactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const pendingTransactions = {

/**
* Custom method, which will help us add a new transaction to the store
* and get it removed onces the transaction is mined.
* and get it removed once the transaction is mined.
*/
add: (hash: Hex, chainId: number) => {
const deferred = new Deferred<TransactionReceipt>();
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/src/styles/override.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ input[type='number'] {
}

/**
* Overrides the dafault color for the overlay component used
* Overrides the default color for the overlay component used
* in DaisyUI's drawer. Unfortunately cannot be done via variables
*/
.drawer-toggle:checked ~ .drawer-side > .drawer-overlay {
Expand Down
2 changes: 1 addition & 1 deletion packages/eventindexer/cmd/flags/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var (
}
IndexNFTs = &cli.BoolFlag{
Name: "indexNfts",
Usage: "Whether to index nft transfer events orn ot",
Usage: "Whether to index nft transfer events or not",
Required: false,
Category: indexerCategory,
EnvVars: []string{"INDEX_NFTS"},
Expand Down
2 changes: 1 addition & 1 deletion packages/eventindexer/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func main() {
_ = godotenv.Load(envFile)

app.Name = "Taiko EventIndexer"
app.Usage = "The taiko eventindexing softwares command line interface"
app.Usage = "The taiko eventindexing software command line interface"
app.Copyright = "Copyright 2021-2023 Taiko Labs"
app.Description = "Eventindexer implementation in Golang for Taiko protocol"
app.Authors = []*cli.Author{{Name: "Taiko Labs", Email: "[email protected]"}}
Expand Down
2 changes: 1 addition & 1 deletion packages/eventindexer/indexer/index_nft_transfers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (i *Indexer) isERC721Transfer(ctx context.Context, vLog types.Log) bool {
return true
}

// saveNFTTrasnfer parses the event logs and saves either an ERC721 or ERC1155 event, updating
// saveNFTTransfer parses the event logs and saves either an ERC721 or ERC1155 event, updating
// users balances
func (i *Indexer) saveNFTTransfer(ctx context.Context, chainID *big.Int, vLog types.Log) error {
if i.isERC721Transfer(ctx, vLog) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/labstack/echo/v4"
)

// GetNFTBalancesByAddessAndChainID
// GetNFTBalancesByAddressAndChainID
//
// returns nft balances by address and chain ID
//
Expand All @@ -19,7 +19,7 @@ import (
// @Produce json
// @Success 200 {object} paginate.Page
// @Router /nftsByAddress [get]
func (srv *Server) GetNFTBalancesByAddessAndChainID(c echo.Context) error {
func (srv *Server) GetNFTBalancesByAddressAndChainID(c echo.Context) error {
page, err := srv.nftBalanceRepo.FindByAddress(
c.Request().Context(),
c.Request(),
Expand Down
2 changes: 1 addition & 1 deletion packages/eventindexer/pkg/http/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func (srv *Server) configureRoutes() {
srv.echo.GET("/events", srv.GetByAddressAndEventName)
srv.echo.GET("/stats", srv.GetStats)
srv.echo.GET("/assignedBlocks", srv.GetAssignedBlocksByProverAddress)
srv.echo.GET("/nftsByAddress", srv.GetNFTBalancesByAddessAndChainID)
srv.echo.GET("/nftsByAddress", srv.GetNFTBalancesByAddressAndChainID)

galaxeAPI := srv.echo.Group("/api")

Expand Down
2 changes: 1 addition & 1 deletion packages/eventindexer/pkg/repo/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (r *AccountRepository) Save(
address common.Address,
transactedAt time.Time,
) error {
// only inserte if addresss doesnt exist
// only insert if address doesn't exist
a := &eventindexer.Account{}

if err := r.db.GormDB().Where("address = ?", address.Hex()).First(a).Error; err != nil {
Expand Down
2 changes: 1 addition & 1 deletion packages/fork-diff/fork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def:
# - "graphql/*"

# - title: "Changes in internal"
# description: "This shows chnages to internal files"
# description: "This shows changes to internal files"
# sub:
# - title: "first layer"
# globs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ input[type='number'] {
}

/**
* Overrides the dafault color for the overlay component used
* Overrides the default color for the overlay component used
* in DaisyUI's drawer. Unfortunately cannot be done via variables
*/
.drawer-toggle:checked ~ .drawer-side > .drawer-overlay {
Expand Down
2 changes: 1 addition & 1 deletion packages/guardian-prover-health-check/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func main() {
_ = godotenv.Load(envFile)

app.Name = "Taiko guardian-prover-health-check"
app.Usage = "The taiko guardian-prover-health-check softwares command line interface"
app.Usage = "The taiko guardian-prover-health-check software command line interface"
app.Copyright = "Copyright 2021-2023 Taiko Labs"
app.Description = "guardian-prover-health-check implementation in Golang for Taiko protocol"
app.Authors = []*cli.Author{{Name: "Taiko Labs", Email: "[email protected]"}}
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/docs/contestable_validity_rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For a given block, a transition can be uniquely identified by its _parent hash_.

The _first transition_ of a block is reserved for the block's assigned prover. However, this exclusivity is contingent upon the assigned prover successfully proving the block within the stipulated proving window of the tier. If the assigned prover fails to meet this deadline, the transition is considered _open_. Upon its opening, the assigned prover is no longer allowed to prove the first transition.

For all other transitions, the proving window doesn't apply. Here, the principle is straightforward: the quickest prover takes the lead. Importantly, the assigned prover is not allowed to prove transtions other than the first one.
For all other transitions, the proving window doesn't apply. Here, the principle is straightforward: the quickest prover takes the lead. Importantly, the assigned prover is not allowed to prove transitions other than the first one.

## Proof Tier Selection

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/docs/native_token_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Taiko's bridging concept is a lock-and-mint type. It simply means (the red path

But there might be some incentives (e.g.: adoption, liquidity fragmentation, etc.) when deploying a native token on the destination chain is beneficial. For this reason Taiko introduced the possibility of deploying the canonical assets (together with all their sub/parent/proxy contracts) and plug it into our ERC20Vault via adapters (green path).

Important to note that while wrapped asset bridging is 'automatical', the native one requires the willingness and efforts from Taiko side (and maybe also original token issuer green light to recognise officially as "native"), to support that type of asset-transfer.
Important to note that while wrapped asset bridging is 'automatically', the native one requires the willingness and efforts from Taiko side (and maybe also original token issuer green light to recognise officially as "native"), to support that type of asset-transfer.

## Howto

Expand Down
Loading

0 comments on commit 4cc2393

Please sign in to comment.