Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-six committed Mar 13, 2024
1 parent 50d8807 commit 2a51814
Show file tree
Hide file tree
Showing 30 changed files with 75 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .codespell/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = .git,node_modules,artifacts-zk,yarn.lock,contracts-preprocessed,Cargo.lock
count =
quiet-level = 3
ignore-words = ./.codespell/wordlist.txt
1 change: 1 addition & 0 deletions .codespell/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
codespell==2.2.5
1 change: 1 addition & 0 deletions .codespell/wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
crate
30 changes: 30 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# A Github action that using codespell to check spell.
# .codespellrc/.codespellrc is a config file.
# .codespellrc/wordlist.txt is a list of words that will ignore word checks.
# More details please check the following link:
# https://github.com/codespell-project/codespell

name: Codespell

on: pull_request

jobs:
codespell:
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: pip cache
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Install prerequisites
run: sudo pip install -r ./.codespellrc/requirements.txt

- name: Spell check
run: codespell --config=./.codespellrc/.codespellrc
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Hyperlane

We'd love for you to contribue to Hyperlane! Here are the guidelines to follow when contributing:
We'd love for you to contribute to Hyperlane! Here are the guidelines to follow when contributing:

- [Code of Conduct](#coc)
- [Questions and Problems](#question)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl MigrationTrait for Migration {
"origin_tx"."{tx_egp}" AS "origin_tx_effective_gas_price",
"origin_tx"."{tx_nonce}" AS "origin_tx_nonce",
"origin_tx"."{tx_sender}" AS "origin_tx_sender",
"origin_tx"."{tx_receipient}" AS "origin_tx_recipient",
"origin_tx"."{tx_recipient}" AS "origin_tx_recipient",
"origin_tx"."{tx_gas_used}" AS "origin_tx_gas_used",
"origin_tx"."{tx_cgu}" AS "origin_tx_cumulative_gas_used",
Expand All @@ -152,7 +152,7 @@ impl MigrationTrait for Migration {
"dest_tx"."{tx_egp}" AS "destination_tx_effective_gas_price",
"dest_tx"."{tx_nonce}" AS "destination_tx_nonce",
"dest_tx"."{tx_sender}" AS "destination_tx_sender",
"dest_tx"."{tx_receipient}" AS "destination_tx_recipient",
"dest_tx"."{tx_recipient}" AS "destination_tx_recipient",
"dest_tx"."{tx_gas_used}" AS "destination_tx_gas_used",
"dest_tx"."{tx_cgu}" AS "destination_tx_cumulative_gas_used",
Expand Down Expand Up @@ -214,7 +214,7 @@ impl MigrationTrait for Migration {
tx_egp = Transaction::EffectiveGasPrice.to_string(),
tx_nonce = Transaction::Nonce.to_string(),
tx_sender = Transaction::Sender.to_string(),
tx_receipient = Transaction::Recipient.to_string(),
tx_recipient = Transaction::Recipient.to_string(),
tx_gas_used = Transaction::GasUsed.to_string(),
tx_cgu = Transaction::CumulativeGasUsed.to_string(),
block_table = Block::Table.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion rust/chains/hyperlane-cosmos/src/trait_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub struct ConnectionConf {
chain_id: String,
/// The human readable address prefix for the chains using bech32.
bech32_prefix: String,
/// Canoncial Assets Denom
/// Canonical Assets Denom
canonical_asset: String,
/// The gas price set by the cosmos-sdk validator. Note that this represents the
/// minimum price set by the validator.
Expand Down
2 changes: 1 addition & 1 deletion rust/hyperlane-base/src/types/gcs_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl GcsStorageClientBuilder {
}

impl GcsStorageClient {
// convinience formatter
// convenience formatter
fn get_checkpoint_key(index: u32) -> String {
format!("checkpoint_{index}_with_id.json")
}
Expand Down
4 changes: 2 additions & 2 deletions rust/hyperlane-core/src/accumulator/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{
// - remove ring dependency
// In accordance with its license terms, the apache2 license is reproduced below

// Can't initialize this using `lazy_static` because of a constaint in Solana: static variables cannot be writable.
// Can't initialize this using `lazy_static` because of a constraint in Solana: static variables cannot be writable.
// See the following links for more info:
// https://stackoverflow.com/questions/70630344/failed-to-deploy-my-solana-smart-contract
// https://docs.solana.com/developing/on-chain-programs/limitations#static-writable-data
Expand Down Expand Up @@ -474,7 +474,7 @@ mod tests {

let leaf_b11 = H256::from([0xDD; 32]);
tree.push_leaf(leaf_b11, depth)
.expect("Pushing in outtermost leaf failed");
.expect("Pushing in outermost leaf failed");
let expected_tree = MerkleTree::create(&[leaf_b00, leaf_b01, leaf_b10, leaf_b11], depth);
assert_eq!(tree.hash(), expected_tree.hash());

Expand Down
2 changes: 1 addition & 1 deletion rust/hyperlane-core/src/config/str_or_int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub enum StrOrIntParseError {
/// The provided integer does not match the type requirements.
#[error("Provided number is an invalid integer: {0}")]
InvalidInt(#[from] TryFromIntError),
/// Some other error occured.
/// Some other error occurred.
#[error("Could not parse integer: {0}")]
Other(String),
}
2 changes: 1 addition & 1 deletion rust/hyperlane-core/src/traits/validator_announce.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ pub trait ValidatorAnnounce: HyperlaneContract + Send + Sync + Debug {
) -> ChainResult<TxOutcome>;

/// Returns the number of additional tokens needed to pay for the announce
/// transaction. Return `None` if the needed tokens canno tbe determined.
/// transaction. Return `None` if the needed tokens canno the determined.
async fn announce_tokens_needed(&self, announcement: SignedType<Announcement>) -> Option<U256>;
}
4 changes: 2 additions & 2 deletions rust/sealevel/programs/mailbox/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ fn inbox_process(
.map_err(|e| ProgramError::BorshIoError(e.to_string()))?;

// Now call into the recipient program with the verified message!
let handle_intruction = Instruction::new_with_bytes(
let handle_instruction = Instruction::new_with_bytes(
recipient_program_id,
&MessageRecipientInstruction::Handle(HandleInstruction::new(
message.origin,
Expand All @@ -388,7 +388,7 @@ fn inbox_process(
recipient_account_metas,
);
invoke_signed(
&handle_intruction,
&handle_instruction,
&recipient_infos,
&[mailbox_process_authority_pda_seeds!(
&recipient_program_id,
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/isms/ccip-read/AbstractCcipReadIsm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {AbstractMultisigIsm} from "../multisig/AbstractMultisigIsm.sol";
* @title AbstractCcipReadIsm
* @notice An ISM that allows arbitrary payloads to be submitted and verified on chain
* @dev https://eips.ethereum.org/EIPS/eip-3668
* @dev The AbstractCcipReadIsm provided by Hyperlane is left intentially minimalist as
* @dev The AbstractCcipReadIsm provided by Hyperlane is left intentionally minimalist as
* the range of applications that could be supported by a CcipReadIsm are so broad. However
* there are few things to note when building a custom CcipReadIsm.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Ini

/**
* @title AbstractMessageIdAuthorizedIsm
* @notice Uses external verfication options to verify interchain messages which need a authorized caller
* @notice Uses external verification options to verify interchain messages which need a authorized caller
*/
abstract contract AbstractMessageIdAuthorizedIsm is
IInterchainSecurityModule,
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/token/extensions/FastHypERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ contract FastHypERC20 is FastTokenRouter, HypERC20 {
* @dev Burns `_amount` of tokens from `_recipient`.
* @inheritdoc FastTokenRouter
*/
function _fastRecieveFrom(
function _fastReceiveFrom(
address _sender,
uint256 _amount
) internal override {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contract FastHypERC20Collateral is FastTokenRouter, HypERC20Collateral {
* @dev Transfers in `_amount` of `wrappedToken` from `_recipient`.
* @inheritdoc FastTokenRouter
*/
function _fastRecieveFrom(
function _fastReceiveFrom(
address _sender,
uint256 _amount
) internal override {
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/token/extensions/HypNativeScaled.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ contract HypNativeScaled is HypNative {
}

/**
* @dev Sends scaled `_amount` (multipled by `scale`) to `_recipient`.
* @dev Sends scaled `_amount` (multiplied by `scale`) to `_recipient`.
* @inheritdoc TokenRouter
*/
function _transferTo(
Expand Down
12 changes: 6 additions & 6 deletions solidity/contracts/token/libs/FastTokenRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ abstract contract FastTokenRouter is TokenRouter {

/**
* @dev allows an external user to full an unfilled fast transfer order.
* @param _recipient The recepient of the wrapped token on base chain.
* @param _recipient The recipient of the wrapped token on base chain.
* @param _amount The amount of wrapped tokens that is being bridged.
* @param _fastFee The fee the bridging entity will pay.
* @param _fastTransferId Id assigned on the remote chain to uniquely identify the transfer.
Expand All @@ -82,7 +82,7 @@ abstract contract FastTokenRouter is TokenRouter {

filledFastTransfers[filledFastTransfersKey] = msg.sender;

_fastRecieveFrom(msg.sender, _amount - _fastFee);
_fastReceiveFrom(msg.sender, _amount - _fastFee);
_fastTransferTo(_recipient, _amount - _fastFee);
}

Expand Down Expand Up @@ -126,13 +126,13 @@ abstract contract FastTokenRouter is TokenRouter {
uint256 _fastFee,
uint256 _fastTransferId
) internal virtual returns (bytes memory) {
_fastRecieveFrom(msg.sender, _amount);
_fastReceiveFrom(msg.sender, _amount);
return abi.encode(_fastFee, _fastTransferId);
}

/**
* @dev returns an address that indicates who should recieve the bridged tokens.
* @dev if _fastFees was inlcuded and someone filled the order before the mailbox made the contract call, the filler gets the funds.
* @dev returns an address that indicates who should receive the bridged tokens.
* @dev if _fastFees was included and someone filled the order before the mailbox made the contract call, the filler gets the funds.
*/
function _getTokenRecipient(
address _recipient,
Expand Down Expand Up @@ -201,7 +201,7 @@ abstract contract FastTokenRouter is TokenRouter {
* @dev Should collect `amount` of tokens from `_sender`.
* @dev The implementation is delegated.
*/
function _fastRecieveFrom(
function _fastReceiveFrom(
address _sender,
uint256 _amount
) internal virtual;
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/LiquidityLayerRouter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ contract LiquidityLayerRouterTest is Test {

// ==== dispatchWithTokens ====

function testDispatchWithTokensRevertsWithUnkownBridgeAdapter() public {
function testDispatchWithTokensRevertsWithUnknownBridgeAdapter() public {
vm.expectRevert("No adapter found for bridge");
originLiquidityLayerRouter.dispatchWithTokens(
destinationDomain,
Expand Down
4 changes: 2 additions & 2 deletions solidity/test/isms/ERC5164ISM.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ contract ERC5164IsmTest is Test {

function _encodeTestMessage(
uint32 _msgCount,
address _receipient
address _recipient
) internal view returns (bytes memory) {
return
MessageUtils.formatMessage(
Expand All @@ -225,7 +225,7 @@ contract ERC5164IsmTest is Test {
TEST1_DOMAIN,
TypeCasts.addressToBytes32(address(this)),
TEST2_DOMAIN,
TypeCasts.addressToBytes32(_receipient),
TypeCasts.addressToBytes32(_recipient),
testMessage
);
}
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/isms/OPStackIsm.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ contract OPStackIsmTest is Test {

vm.selectFork(optimismFork);

// needs to be called by the cannonical messenger on Optimism
// needs to be called by the canonical messenger on Optimism
vm.expectRevert(NotCrossChainCall.selector);
opISM.verifyMessageId(messageId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract PortalAdapterTest is Test {
function testAdapter(uint256 amount) public {
// Transfers of 0 are invalid
vm.assume(amount > 0);
// Calls MockPortalBridge with the right paramters
// Calls MockPortalBridge with the right parameters
vm.expectCall(
address(portalBridge),
abi.encodeCall(
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/token/HypNativeScaled.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ contract HypNativeScaledTest is Test {
environment.processNextPendingMessage();
}

function test_tranferRemote(uint256 amount) public {
function test_transferRemote(uint256 amount) public {
vm.assume(amount <= mintAmount);

uint256 nativeValue = amount * (10 ** nativeDecimals);
Expand Down
4 changes: 2 additions & 2 deletions typescript/ccip-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ProofsServiceAbi } from './abis/ProofsServiceAbi';
import * as config from './config';
import { ProofsService } from './services/ProofsService';

// Initalize Services
// Initialize Services
const proofsService = new ProofsService(
config.LIGHT_CLIENT_ADDR,
config.RPC_ADDRESS,
Expand All @@ -14,7 +14,7 @@ const proofsService = new ProofsService(
config.SUCCINCT_API_KEY,
);

// Initalize Server and add Service handlers
// Initialize Server and add Service handlers
const server = new Server();

server.add(ProofsServiceAbi, [
Expand Down
2 changes: 1 addition & 1 deletion typescript/ccip-server/src/services/LightClientService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class LightClientService {
}

/**
* Calculates the slot given a timestamp, and the LightClient's configured Genesis Time and Secods Per Slot
* Calculates the slot given a timestamp, and the LightClient's configured Genesis Time and Seconds Per Slot
* @param timestamp timestamp to calculate slot with
*/
async calculateSlot(timestamp: bigint): Promise<bigint> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ Regardless, workload identities are a more attractive long-term option, and movi

## What is external-secrets?

The [documentation](https://external-secrets.io/v0.4.4/) is the best source. In short, it allows Kuberenetes Secrets to get their secrets from an external secret provided (like GCP's Secret Manager), all without a developer/deployer needing to touch the secrets themselves.
The [documentation](https://external-secrets.io/v0.4.4/) is the best source. In short, it allows Kubernetes Secrets to get their secrets from an external secret provided (like GCP's Secret Manager), all without a developer/deployer needing to touch the secrets themselves.

The general idea is there are `SecretStore`s (or `ClusterSecretStore`s, which are the cluster-wide version), that specify how the cluster can authenticate with the external secret provider. `ExternalSecret`s can then be specified in "application" infrastructure, which allow developers to specify a template for a Secret that will be created using the secret values from the external provider (& using the credentials from the SecretStore).
2 changes: 1 addition & 1 deletion typescript/sdk/src/core/CoreDeployer.hardhat-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('core', async () => {
sinon.restore(); // restore normal deployer behavior and test3 will be deployed
const result = await deployer.deploy(coreConfig);
expect(result).to.have.keys(['test1', 'test2', 'test3']);
// Each test network key has entries about the other test networks, whre ISM details are stored.
// Each test network key has entries about the other test networks, where ISM details are stored.
// With this exception, the keys should be the same, so we check the intersections for equality.
const testnetKeysIntersection = Object.keys(result.test1).filter(
(key) =>
Expand Down
4 changes: 2 additions & 2 deletions typescript/sdk/src/core/HyperlaneCoreChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ export class HyperlaneCoreChecker extends HyperlaneAppChecker<
],
(bytecode) =>
// This is obviously super janky but basically we are searching
// for the ocurrences of localDomain in the bytecode and remove
// that to compare, but some coincidental ocurrences of
// for the occurrences of localDomain in the bytecode and remove
// that to compare, but some coincidental occurrences of
// localDomain in the bytecode should be not be removed which
// are just done via an offset guard
bytecode
Expand Down
2 changes: 1 addition & 1 deletion typescript/sdk/src/deploy/verify/ContractVerifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export class ContractVerifier {
contractname: `${sourceName}:${input.name}`,
contractaddress: input.address,
// TYPO IS ENFORCED BY API
constructorArguements: strip0x(input.constructorArguments ?? ''),
constructorArguments: strip0x(input.constructorArguments ?? ''),
...this.compilerOptions,
};

Expand Down
2 changes: 1 addition & 1 deletion typescript/sdk/src/deploy/verify/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export type FormOptions<Action extends ExplorerApiActions> =
contractaddress: string;
sourceCode: string;
contractname: string;
constructorArguements?: string; // TYPO IS ENFORCED BY API
constructorArguments?: string; // TYPO IS ENFORCED BY API
}
: Action extends ExplorerApiActions.MARK_PROXY
? {
Expand Down

0 comments on commit 2a51814

Please sign in to comment.