From 94e2c398c14dd5b9896162c5627381d4b6219230 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 28 Jan 2025 14:03:25 -0500 Subject: [PATCH 01/13] chore(*): Fix many more typos --- .typos.toml | 13 +++++++-- .../src/features/features.controller.ts | 4 +-- apps/core/src/enums/features.enums.ts | 2 +- apps/core/src/hooks/useFileExtensionType.ts | 4 +-- apps/core/src/hooks/useNftDetails.ts | 6 ++-- apps/core/src/hooks/useTransferKioskItem.tsx | 2 +- ...tion.ts => createIotaAddressValidation.ts} | 0 .../createValidationSchemaSendTokenForm.ts | 2 +- apps/core/src/utils/validation/index.ts | 2 +- .../utils/generateValidatorsTableColumns.tsx | 2 +- .../src/lib/utils/analytics/ampli/index.ts | 2 +- .../explorer/src/pages/epochs/EpochDetail.tsx | 2 +- .../src/pages/validators/Validators.tsx | 2 +- .../components/organisms/navbar/Navbar.tsx | 20 ++++++------- .../stories/organisms/Navbar.stories.tsx | 4 +-- .../components/dialogs/assets/AssetDialog.tsx | 8 +++--- .../dialogs/staking/views/EnterAmountView.tsx | 4 +-- .../src/shared/analytics/ampli/index.ts | 2 +- .../deriveBipPathAccountsFinder.ts | 4 +-- .../accounts/ImportRecoveryPhraseForm.tsx | 2 +- .../src/ui/app/staking/stake/StakeForm.tsx | 4 +-- bridge/evm/contracts/IotaBridge.sol | 4 +-- consensus/core/src/broadcaster.rs | 2 +- consensus/core/src/commit.rs | 2 +- consensus/core/src/test_dag_builder.rs | 2 +- .../core/src/tests/base_committer_tests.rs | 2 +- .../tests/programmable/transfer_objects.move | 2 +- ...ject_deletion_via_make_move_vec_fails.move | 6 ++-- ...alue_shared_object_deletion_via_merge.move | 4 +-- ...hared_object_deletion_via_merge_fails.move | 6 ++-- ...d_object_deletion_via_move_call_fails.move | 4 +-- .../tests/shared/transfer.move | 2 +- ....move => transferred_id_limits_tests.move} | 2 +- crates/iota-benchmark/src/bank.rs | 6 ++-- .../src/drivers/bench_driver.rs | 4 +-- crates/iota-bridge-cli/src/lib.rs | 2 +- crates/iota-bridge-indexer/src/main.rs | 2 +- crates/iota-bridge/src/error.rs | 2 +- .../src/iota_transaction_builder.rs | 4 +-- crates/iota-bridge/src/orchestrator.rs | 2 +- .../src/server/governance_verifier.rs | 10 +++---- crates/iota-bridge/src/test_utils.rs | 6 ++-- crates/iota-core/src/authority_server.rs | 2 +- .../src/execution_cache/cache_types.rs | 2 +- .../src/execution_cache/cached_version_map.rs | 2 +- .../iota-core/src/traffic_controller/mod.rs | 2 +- .../iota-e2e-tests/tests/full_node_tests.rs | 2 +- crates/iota-e2e-tests/tests/multisig_tests.rs | 4 +-- .../tests/object_deletion_tests.rs | 4 +-- .../tests/traffic_control_tests.rs | 2 +- .../packages/bridge/sources/message.move | 2 +- .../packages/bridge/tests/bridge_env.move | 2 +- .../iota-framework/sources/coin_manager.move | 4 +-- .../tests/crypto/ecdsa_k1_tests.move | 2 +- .../iota-framework/tests/event_tests.move | 2 +- .../iota-system/tests/iota_system_tests.move | 2 +- .../move-stdlib/tests/vector_tests.move | 4 +-- .../packages/stardust/tests/nft_tests.move | 2 +- .../address_unlock_condition_tests.move | 4 +-- crates/iota-genesis-builder/src/lib.rs | 4 +-- .../src/stardust/migration/migration.rs | 4 +-- .../tests/datetime/datetime.move | 18 ++++++------ crates/iota-graphql-rpc/src/server/builder.rs | 2 +- crates/iota-indexer/README.md | 2 +- .../pg/2023-08-19-044044_checkpoints/up.sql | 6 ++-- crates/iota-json-rpc/src/axum_router.rs | 4 +-- crates/iota-move/src/manage_package.rs | 2 +- crates/iota-proxy/src/lib.rs | 2 +- crates/iota-proxy/src/middleware.rs | 2 +- crates/iota-rest-api/src/accounts.rs | 2 +- crates/iota-rest-api/src/objects.rs | 2 +- crates/iota-storage/src/object_store/util.rs | 2 +- crates/iota-types/src/README.md | 2 +- crates/iota-types/src/bridge.rs | 2 +- .../iota-types/src/full_checkpoint_content.rs | 2 +- crates/iota-types/src/transaction.rs | 2 +- crates/test-cluster/src/lib.rs | 2 +- .../dashboards/validator-dashboard.json | 2 +- .../about-iota/tokenomics/iota-token.mdx | 2 +- ...create-review-rating-dao-with-multisig.mdx | 4 +-- docs/content/developer/developer.mdx | 2 +- .../exchange-integration.mdx | 2 +- .../explanations/about-identity-objects.mdx | 2 +- .../typescript/owned-object-pool/overview.mdx | 2 +- .../sources/rental_extension.move | 2 +- examples/move/crypto/ibe/sources/example.move | 4 +-- .../move/crypto/ibe/tests/example_tests.move | 6 ++-- examples/tic-tac-toe/move/sources/owned.move | 2 +- .../trading/api/indexer/escrow-handler.ts | 2 +- .../trading/api/indexer/locked-handler.ts | 2 +- .../contracts/demo/sources/demo_bear.move | 2 +- .../latest/iota-adapter/src/adapter.rs | 2 +- .../iota-adapter/src/execution_engine.rs | 2 +- nre/bpf/nodefw/README.md | 4 +-- nre/helm/README.md | 2 +- nre/helm/indexer/templates/deployment.yaml | 2 +- nre/ssfn_guide.md | 2 +- scripts/codesearch/README.md | 2 +- scripts/slipstream/slipstream.py | 2 +- .../src/mappers/transaction-block.ts | 28 +++++++++---------- ...tability.test.ts => compatibility.test.ts} | 0 .../e2e/data/demo-bear/sources/demo_bear.move | 2 +- 102 files changed, 183 insertions(+), 174 deletions(-) rename apps/core/src/utils/validation/{createIotaAdressValidation.ts => createIotaAddressValidation.ts} (100%) rename crates/iota-adapter-transactional-tests/tests/size_limits/{transfered_id_limits_tests.move => transferred_id_limits_tests.move} (97%) rename sdk/graphql-transport/test/{compatability.test.ts => compatibility.test.ts} (100%) diff --git a/.typos.toml b/.typos.toml index 73f51059184..96bdbe59dc3 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,5 +1,12 @@ [default] -extend-ignore-re = ["[a-zA-Z0-9]{44}", "[a-zA-Z0-9]{9}"] +extend-ignore-identifiers-re = [ + # Digests + "[a-zA-Z0-9]{43}?", + # Identifiers + "[a-zA-Z0-9]{44}?", + # Base64 + "[a-zA-Z0-9_]{47}?" +] [default.extend-words] # accepted plurals @@ -27,6 +34,8 @@ ratatui = "ratatui" groth = "groth" strat = "strat" mistic = "mistic" +transferer = "transferrer" +checkpoitn = "checkpoint" # Identity AAS = "AAS" # actual typos purposely used in tests @@ -35,4 +44,4 @@ tring = "tring" Thi = "Thi" [files] -extend-exclude = ["pnpm-lock.yaml", "external-crates/*"] +extend-exclude = ["pnpm-lock.yaml", "external-crates/*", "*.snap", "*.exp", "config-patch"] diff --git a/apps/apps-backend/src/features/features.controller.ts b/apps/apps-backend/src/features/features.controller.ts index 98ac2abb547..fef40313c72 100644 --- a/apps/apps-backend/src/features/features.controller.ts +++ b/apps/apps-backend/src/features/features.controller.ts @@ -35,7 +35,7 @@ export class FeaturesController { [Feature.WalletBalanceRefetchInterval]: { defaultValue: 1000, }, - [Feature.KioskOriginbytePackageid]: { + [Feature.KioskOriginbytePackageId]: { defaultValue: '', }, [Feature.WalletAppsBannerConfig]: { @@ -122,7 +122,7 @@ export class FeaturesController { [Feature.WalletBalanceRefetchInterval]: { defaultValue: 1000, }, - [Feature.KioskOriginbytePackageid]: { + [Feature.KioskOriginbytePackageId]: { defaultValue: '', }, [Feature.WalletAppsBannerConfig]: { diff --git a/apps/core/src/enums/features.enums.ts b/apps/core/src/enums/features.enums.ts index 63de585755d..71cce472c15 100644 --- a/apps/core/src/enums/features.enums.ts +++ b/apps/core/src/enums/features.enums.ts @@ -13,7 +13,7 @@ export enum Feature { WalletInterstitialConfig = 'wallet-interstitial-config', RecognizedPackages = 'recognized-packages', WalletSentryTracing = 'wallet-sentry-tracing', - KioskOriginbytePackageid = 'kiosk-originbyte-packageid', + KioskOriginbytePackageId = 'kiosk-originbyte-package-id', PollingTxnTable = 'polling-txn-table', NetworkOutageOverride = 'network-outage-override', ModuleSourceVerification = 'module-source-verification', diff --git a/apps/core/src/hooks/useFileExtensionType.ts b/apps/core/src/hooks/useFileExtensionType.ts index e21274a22b7..a0b22188375 100644 --- a/apps/core/src/hooks/useFileExtensionType.ts +++ b/apps/core/src/hooks/useFileExtensionType.ts @@ -12,7 +12,7 @@ type FileExtensionType = { // Soft file type detection. // Returns the file type of the given file name. // Temporary solution until we have a better way to detect file types. -// extentionType: FileExtentionType +// extensionType: FileExtensionType // type?: 'image' | 'audio' | 'video'; const FILE_EXTENSION_TYPE_MAP: FileExtensionType = { jpeg: { @@ -47,7 +47,7 @@ const FILE_EXTENSION_TYPE_MAP: FileExtensionType = { /* // TODO: extend this list with more file types. -const FILE_EXTENSION_TYPE_MAP_HEADERS: FileExtentionType = { +const FILE_EXTENSION_TYPE_MAP_HEADERS: FileExtensionType = { 'image/jpeg': { name: 'JPEG', type: 'image', diff --git a/apps/core/src/hooks/useNftDetails.ts b/apps/core/src/hooks/useNftDetails.ts index dc65ab58a9a..b7e83422d14 100644 --- a/apps/core/src/hooks/useNftDetails.ts +++ b/apps/core/src/hooks/useNftDetails.ts @@ -27,7 +27,7 @@ export function useNftDetails(nftId: string, accountAddress: string | null) { const { nftFields } = useNFTBasicData(objectData); - const { data: nftDisplayData, isPending: isPendingNftDislpay } = useGetNFTDisplay(nftId); + const { data: nftDisplayData, isPending: isPendingNftDisplay } = useGetNFTDisplay(nftId); const nftName = nftDisplayData?.name || formatAddress(nftId); const nftImageUrl = nftDisplayData?.imageUrl || ''; @@ -53,7 +53,7 @@ export function useNftDetails(nftId: string, accountAddress: string | null) { objectData.owner.AddressOwner) || ''; - const isLoading = isNftLoading || isCheckingAssetTransferability || isPendingNftDislpay; + const isLoading = isNftLoading || isCheckingAssetTransferability || isPendingNftDisplay; return { isLoading, @@ -69,6 +69,6 @@ export function useNftDetails(nftId: string, accountAddress: string | null) { isContainedInKiosk, kioskItem, nftDisplayData, - isPendingNftDislpay, + isPendingNftDisplay, }; } diff --git a/apps/core/src/hooks/useTransferKioskItem.tsx b/apps/core/src/hooks/useTransferKioskItem.tsx index e04b9c98428..9b21a1c4051 100644 --- a/apps/core/src/hooks/useTransferKioskItem.tsx +++ b/apps/core/src/hooks/useTransferKioskItem.tsx @@ -32,7 +32,7 @@ export function useTransferKioskItem({ address?: string | null; }) { const client = useIotaClient(); - const obPackageId = useFeatureValue(Feature.KioskOriginbytePackageid, ORIGINBYTE_PACKAGE_ID); + const obPackageId = useFeatureValue(Feature.KioskOriginbytePackageId, ORIGINBYTE_PACKAGE_ID); const { data: kioskData } = useGetKioskContents(address); // show personal kiosks too const objectData = useGetObject(objectId); const kioskClient = useKioskClient(); diff --git a/apps/core/src/utils/validation/createIotaAdressValidation.ts b/apps/core/src/utils/validation/createIotaAddressValidation.ts similarity index 100% rename from apps/core/src/utils/validation/createIotaAdressValidation.ts rename to apps/core/src/utils/validation/createIotaAddressValidation.ts diff --git a/apps/core/src/utils/validation/createValidationSchemaSendTokenForm.ts b/apps/core/src/utils/validation/createValidationSchemaSendTokenForm.ts index 6880c023b78..1eebcdea071 100644 --- a/apps/core/src/utils/validation/createValidationSchemaSendTokenForm.ts +++ b/apps/core/src/utils/validation/createValidationSchemaSendTokenForm.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 import * as Yup from 'yup'; -import { createIotaAddressValidation } from './createIotaAdressValidation'; +import { createIotaAddressValidation } from './createIotaAddressValidation'; import { createTokenValidation } from './createTokenValidation'; export function createValidationSchemaSendTokenForm( diff --git a/apps/core/src/utils/validation/index.ts b/apps/core/src/utils/validation/index.ts index 29e7b158322..a975f2122bb 100644 --- a/apps/core/src/utils/validation/index.ts +++ b/apps/core/src/utils/validation/index.ts @@ -1,6 +1,6 @@ // Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -export * from './createIotaAdressValidation'; +export * from './createIotaAddressValidation'; export * from './createTokenValidation'; export * from './createValidationSchemaSendTokenForm'; diff --git a/apps/explorer/src/lib/ui/utils/generateValidatorsTableColumns.tsx b/apps/explorer/src/lib/ui/utils/generateValidatorsTableColumns.tsx index 3f3599704dd..eadd306c64f 100644 --- a/apps/explorer/src/lib/ui/utils/generateValidatorsTableColumns.tsx +++ b/apps/explorer/src/lib/ui/utils/generateValidatorsTableColumns.tsx @@ -152,7 +152,7 @@ export function generateValidatorsTableColumns({ }, }, { - header: 'Comission', + header: 'Commission', accessorKey: 'commissionRate', cell({ getValue }) { return ( diff --git a/apps/explorer/src/lib/utils/analytics/ampli/index.ts b/apps/explorer/src/lib/utils/analytics/ampli/index.ts index df255e24389..f97d4f56911 100644 --- a/apps/explorer/src/lib/utils/analytics/ampli/index.ts +++ b/apps/explorer/src/lib/utils/analytics/ampli/index.ts @@ -221,7 +221,7 @@ export class Ampli { this.disabled = options.disabled ?? false; if (this.amplitude) { - console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.'); + console.warn('WARNING: Ampli is already initialized. Ampli.load() should be called once at application startup.'); return getVoidPromiseResult(); } diff --git a/apps/explorer/src/pages/epochs/EpochDetail.tsx b/apps/explorer/src/pages/epochs/EpochDetail.tsx index 468afa3ef5a..3b57f7eac6f 100644 --- a/apps/explorer/src/pages/epochs/EpochDetail.tsx +++ b/apps/explorer/src/pages/epochs/EpochDetail.tsx @@ -70,7 +70,7 @@ export function EpochDetail() { 'Stake', 'Proposed next Epoch gas price', 'APY', - 'Comission', + 'Commission', 'Last Epoch Rewards', 'Voting Power', 'Status', diff --git a/apps/explorer/src/pages/validators/Validators.tsx b/apps/explorer/src/pages/validators/Validators.tsx index 1ab8086ff87..00aeecb93b0 100644 --- a/apps/explorer/src/pages/validators/Validators.tsx +++ b/apps/explorer/src/pages/validators/Validators.tsx @@ -97,7 +97,7 @@ function ValidatorPageResult(): JSX.Element { 'Stake', 'Proposed next Epoch gas price', 'APY', - 'Comission', + 'Commission', 'Last Epoch Rewards', 'Voting Power', 'Status', diff --git a/apps/ui-kit/src/lib/components/organisms/navbar/Navbar.tsx b/apps/ui-kit/src/lib/components/organisms/navbar/Navbar.tsx index a7af094a0be..d6b964f779d 100644 --- a/apps/ui-kit/src/lib/components/organisms/navbar/Navbar.tsx +++ b/apps/ui-kit/src/lib/components/organisms/navbar/Navbar.tsx @@ -9,9 +9,9 @@ export type NavbarItemWithId = NavbarItemProps & { id: string }; export interface NavbarProps { /** - * If this flag is true we need to leave only the icon and collapsable button + * If this flag is true we need to leave only the icon and collapsible button */ - isCollapsable?: boolean; + isCollapsible?: boolean; /** * List of elements to be displayed in the navbar. @@ -29,7 +29,7 @@ export interface NavbarProps { onClickItem: (id: string) => void; /** - * If the navbar is collapsable, this flag indicates if it is open or not. + * If the navbar is collapsible, this flag indicates if it is open or not. */ isOpen?: boolean; @@ -43,16 +43,16 @@ export function Navbar({ items, activeId, onClickItem, - isCollapsable = false, + isCollapsible = false, onToggleNavbar, }: NavbarProps) { return (
- {isCollapsable && ( + {isCollapsible && (
@@ -67,16 +67,16 @@ export function Navbar({ )}
{items.map((item) => (
diff --git a/apps/ui-kit/src/storybook/stories/organisms/Navbar.stories.tsx b/apps/ui-kit/src/storybook/stories/organisms/Navbar.stories.tsx index 54e2ecccaea..cd1cdd26de0 100644 --- a/apps/ui-kit/src/storybook/stories/organisms/Navbar.stories.tsx +++ b/apps/ui-kit/src/storybook/stories/organisms/Navbar.stories.tsx @@ -47,7 +47,7 @@ type Story = StoryObj; export const Default: Story = {}; -export const Collapsable: Story = { +export const Collapsible: Story = { args: {}, argTypes: {}, render: (args) => { @@ -57,7 +57,7 @@ export const Collapsable: Story = { return (
setActiveId(id)} diff --git a/apps/wallet-dashboard/components/dialogs/assets/AssetDialog.tsx b/apps/wallet-dashboard/components/dialogs/assets/AssetDialog.tsx index f2190f2b713..01e45a2a97a 100644 --- a/apps/wallet-dashboard/components/dialogs/assets/AssetDialog.tsx +++ b/apps/wallet-dashboard/components/dialogs/assets/AssetDialog.tsx @@ -46,7 +46,7 @@ export function AssetDialog({ onClose, asset, refetchAssets }: AssetsDialogProps const initView = isTokenOwnedByKiosk ? AssetsDialogView.KioskDetails : AssetsDialogView.Details; const [view, setView] = useState(initView); - const [chosenKioskAsset, setChoosenKioskAsset] = useState(null); + const [chosenKioskAsset, setChosenKioskAsset] = useState(null); const [digest, setDigest] = useState(''); const activeAsset = chosenKioskAsset || asset; @@ -94,12 +94,12 @@ export function AssetDialog({ onClose, asset, refetchAssets }: AssetsDialogProps } function onOpenChange() { setView(AssetsDialogView.Details); - setChoosenKioskAsset(null); + setChosenKioskAsset(null); onClose(); } function onKioskItemClick(item: IotaObjectData) { - setChoosenKioskAsset(item); + setChosenKioskAsset(item); setView(AssetsDialogView.Details); } @@ -107,7 +107,7 @@ export function AssetDialog({ onClose, asset, refetchAssets }: AssetsDialogProps if (!chosenKioskAsset) { return; } - setChoosenKioskAsset(null); + setChosenKioskAsset(null); setView(AssetsDialogView.KioskDetails); } diff --git a/apps/wallet-dashboard/components/dialogs/staking/views/EnterAmountView.tsx b/apps/wallet-dashboard/components/dialogs/staking/views/EnterAmountView.tsx index 297ecba4e17..c7a851cc7f7 100644 --- a/apps/wallet-dashboard/components/dialogs/staking/views/EnterAmountView.tsx +++ b/apps/wallet-dashboard/components/dialogs/staking/views/EnterAmountView.tsx @@ -58,7 +58,7 @@ export function EnterAmountView({ const caption = `${maxTokenFormatted} ${maxTokenFormattedSymbol} Available`; const infoMessage = 'You have selected an amount that will leave you with insufficient funds to pay for gas fees for unstaking or any other transactions.'; - const hasEnoughRemaingBalance = + const hasEnoughRemainingBalance = maxTokenBalance > parseAmount(values.amount, decimals) + BigInt(2) * gasBudgetBigInt; function handleStake(): void { @@ -89,7 +89,7 @@ export function EnterAmountView({ gasBudget={newStakeData?.gasBudget} senderAddress={senderAddress} caption={caption} - showInfo={!hasEnoughRemaingBalance} + showInfo={!hasEnoughRemainingBalance} infoMessage={infoMessage} isLoading={isTransactionLoading} onBack={onBack} diff --git a/apps/wallet/src/shared/analytics/ampli/index.ts b/apps/wallet/src/shared/analytics/ampli/index.ts index 459cca7b532..9d73ccb12fe 100644 --- a/apps/wallet/src/shared/analytics/ampli/index.ts +++ b/apps/wallet/src/shared/analytics/ampli/index.ts @@ -594,7 +594,7 @@ export class Ampli { this.disabled = options.disabled ?? false; if (this.amplitude) { - console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.'); + console.warn('WARNING: Ampli is already initialized. Ampli.load() should be called once at application startup.'); return getVoidPromiseResult(); } diff --git a/apps/wallet/src/shared/messaging/messages/payloads/accounts-finder/deriveBipPathAccountsFinder.ts b/apps/wallet/src/shared/messaging/messages/payloads/accounts-finder/deriveBipPathAccountsFinder.ts index fde7d004c17..6c18ac752ac 100644 --- a/apps/wallet/src/shared/messaging/messages/payloads/accounts-finder/deriveBipPathAccountsFinder.ts +++ b/apps/wallet/src/shared/messaging/messages/payloads/accounts-finder/deriveBipPathAccountsFinder.ts @@ -19,12 +19,12 @@ export function isDeriveBipPathAccountsFinder( return isBasePayload(payload) && payload.type === 'derive-bip-path-accounts-finder'; } -export interface DeriveBipPathAccountsFindeResponsePayload extends BasePayload { +export interface DeriveBipPathAccountsFinderResponsePayload extends BasePayload { publicKey: string; } export function isDeriveBipPathAccountsFinderResponse( payload: Payload, -): payload is DeriveBipPathAccountsFindeResponsePayload { +): payload is DeriveBipPathAccountsFinderResponsePayload { return isBasePayload(payload) && payload.type === 'derive-bip-path-accounts-finder-response'; } diff --git a/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx b/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx index c7d9c2ac3a2..99dc8596253 100644 --- a/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx +++ b/apps/wallet/src/ui/app/components/accounts/ImportRecoveryPhraseForm.tsx @@ -28,7 +28,7 @@ const formSchema = z.object({ .length(RECOVERY_PHRASE_WORD_COUNT) .transform((recoveryPhrase) => normalizeMnemonics(recoveryPhrase.join(' ')).split(' ')) .refine((recoveryPhrase) => validateMnemonics(recoveryPhrase.join(' ')), { - message: 'Mnenonic is invalid', + message: 'Mnemonic is invalid', }), }); diff --git a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx index 59045e9a01e..a71a3dd5269 100644 --- a/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx +++ b/apps/wallet/src/ui/app/staking/stake/StakeForm.tsx @@ -74,7 +74,7 @@ export function StakeFormComponent({ const maxTokenBalance = coinBalance - gasBudget; const [maxTokenFormatted, symbol] = useFormatCoin(maxTokenBalance, coinType, CoinFormat.FULL); - const hasEnoughRemaingBalance = + const hasEnoughRemainingBalance = maxTokenBalance > parseAmount(values.amount, decimals) + BigInt(2) * gasBudget; return ( @@ -104,7 +104,7 @@ export function StakeFormComponent({ ); }} - {!hasEnoughRemaingBalance ? ( + {!hasEnoughRemainingBalance ? ( LayerBuilder<'a> { } fn should_skip_block(&self, round: Round, authority: AuthorityIndex) -> bool { - // Safe to unwrap as specified authorites has to be set before skip + // Safe to unwrap as specified authorities has to be set before skip // is specified. if self.skip_block && self diff --git a/consensus/core/src/tests/base_committer_tests.rs b/consensus/core/src/tests/base_committer_tests.rs index ebc3e8b5bbd..9ae553fb00b 100644 --- a/consensus/core/src/tests/base_committer_tests.rs +++ b/consensus/core/src/tests/base_committer_tests.rs @@ -735,5 +735,5 @@ async fn test_byzantine_direct_commit() { // validator. // TODO: add basic tests for multi leader & pipeline. More tests will be added -// to throughly test pipelining and multileader once universal committer lands +// to thoroughly test pipelining and multileader once universal committer lands // so these tests may not be necessary here. diff --git a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.move b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.move index 2feb5403267..938ff5fe475 100644 --- a/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.move +++ b/crates/iota-adapter-transactional-tests/tests/programmable/transfer_objects.move @@ -45,7 +45,7 @@ module test::m1 { //# view-object 4,0 -// compilicated Move logic +// complicated Move logic //# programmable --sender A --inputs @B true //> 0: iota::address::to_u256(Input(0)); //> 1: iota::address::from_u256(Result(0)); diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.move b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.move index 33364f54597..4fb616e1a1c 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.move +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.move @@ -57,7 +57,7 @@ module t2::o2 { public fun transfer_(mut o2: vector) { let o = vector::pop_back(&mut o2); - transferer(o); + transferrer(o); vector::destroy_empty(o2); } @@ -84,7 +84,7 @@ module t2::o2 { df::add(&mut parent.id, 0, o2); } - public fun transferer(o2: Obj2) { + public fun transferrer(o2: Obj2) { transfer::transfer(o2, @0x0); } @@ -147,7 +147,7 @@ module t2::o2 { //# programmable --inputs object(2,0) object(3,0) //> 0: MakeMoveVec([Input(1)]); //> 1: t2::o2::pop_it(Result(0)); -//> 2: t2::o2::transferer(Result(1)); +//> 2: t2::o2::transferrer(Result(1)); // Make MoveVec pop and return it, then try to transfer it with PT transfer //# programmable --inputs object(3,0) @0x0 diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.move b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.move index 27f107f8ecb..dec4e78da7b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.move +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.move @@ -51,7 +51,7 @@ module t2::o2 { df::add(&mut parent.id, 0, o2); } - public fun transferer(o2: Coin) { + public fun transferrer(o2: Coin) { transfer::public_transfer(o2, @0x0); } @@ -72,7 +72,7 @@ module t2::o2 { // just a normal owned object //# programmable --sender A --inputs object(2,0) object(3,0) //> 0: MergeCoins(Input(1), [Input(0)]); -//> 1: t2::o2::transferer(Input(1)); +//> 1: t2::o2::transferrer(Input(1)); // **Merge owned into shared** diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.move b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.move index e489e383a7e..c7234479419 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.move +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.move @@ -51,7 +51,7 @@ module t2::o2 { df::add(&mut parent.id, 0, o2); } - public fun transferer(o2: Coin) { + public fun transferrer(o2: Coin) { transfer::public_transfer(o2, @0x0); } @@ -92,7 +92,7 @@ module t2::o2 { // Merge and then try to transfer it //# programmable --sender A --inputs object(2,0) object(3,0) object(4,0) //> 0: MergeCoins(Input(1), [Input(0)]); -//> 1: t2::o2::transferer(Input(1)); +//> 1: t2::o2::transferrer(Input(1)); // Merge and then try to transfer it with PTB transfer //# programmable --sender A --inputs object(2,0) object(3,0) object(4,0) @A @@ -131,7 +131,7 @@ module t2::o2 { // Merge and then try to transfer it //# programmable --sender A --inputs object(13,0) object(14,0) object(15,0) //> 0: MergeCoins(Input(1), [Input(0)]); -//> 1: t2::o2::transferer(Input(1)); +//> 1: t2::o2::transferrer(Input(1)); // Merge and then try to transfer it with PTB transfer //# programmable --sender A --inputs object(13,0) object(14,0) object(15,0) @A diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.move b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.move index d6b5004ae62..96f575dfa54 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.move +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.move @@ -42,7 +42,7 @@ module t2::o2 { df::add(&mut parent.id, 0, o2); } - public fun transferer(o2: Obj2) { + public fun transferrer(o2: Obj2) { transfer::transfer(o2, @0x0); } @@ -83,7 +83,7 @@ module t2::o2 { // pass through a move function and then try to transfer it //# programmable --inputs object(2,0) object(3,0) //> 0: t2::o2::id(Input(1)); -//> 1: t2::o2::transferer(Result(0)); +//> 1: t2::o2::transferrer(Result(0)); //# run t2::o2::mint_shared_coin diff --git a/crates/iota-adapter-transactional-tests/tests/shared/transfer.move b/crates/iota-adapter-transactional-tests/tests/shared/transfer.move index 1a8cb6ee3e6..0a10338933e 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/transfer.move +++ b/crates/iota-adapter-transactional-tests/tests/shared/transfer.move @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -// tests that shared objects cannot be transfered in a way that will result +// tests that shared objects cannot be transferred in a way that will result // in their ownership no longer being shared //# init --addresses t1=0x0 t2=0x0 diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.move b/crates/iota-adapter-transactional-tests/tests/size_limits/transferred_id_limits_tests.move similarity index 97% rename from crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.move rename to crates/iota-adapter-transactional-tests/tests/size_limits/transferred_id_limits_tests.move index 51bacdabaa6..1bbcf198efd 100644 --- a/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.move +++ b/crates/iota-adapter-transactional-tests/tests/size_limits/transferred_id_limits_tests.move @@ -2,7 +2,7 @@ // Modifications Copyright (c) 2024 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -// Test limits on number of transferd IDs +// Test limits on number of transferred IDs //# init --addresses Test=0x0 --max-gas 100000000000000 diff --git a/crates/iota-benchmark/src/bank.rs b/crates/iota-benchmark/src/bank.rs index e0b102262a5..80d2b965e03 100644 --- a/crates/iota-benchmark/src/bank.rs +++ b/crates/iota-benchmark/src/bank.rs @@ -170,7 +170,7 @@ impl BenchmarkBank { } async fn create_init_coin(&mut self, amount: u64, gas_price: u64) -> Result { - info!("Creating initilization coin of value {amount}..."); + info!("Creating initialization coin of value {amount}..."); let tx = make_transfer_iota_transaction( self.primary_coin.0, @@ -185,7 +185,7 @@ impl BenchmarkBank { if !effects.is_ok() { effects.print_gas_summary(); - panic!("Failed to create initilization coin for workload."); + panic!("Failed to create initialization coin for workload."); } let updated_gas = effects @@ -207,7 +207,7 @@ impl BenchmarkBank { created_coin.1.get_owner_address()?, self.primary_coin.2.clone(), )), - None => panic!("Failed to create initilization coin for workload."), + None => panic!("Failed to create initialization coin for workload."), } } } diff --git a/crates/iota-benchmark/src/drivers/bench_driver.rs b/crates/iota-benchmark/src/drivers/bench_driver.rs index 7273b46f4ad..e51b0627808 100644 --- a/crates/iota-benchmark/src/drivers/bench_driver.rs +++ b/crates/iota-benchmark/src/drivers/bench_driver.rs @@ -170,9 +170,9 @@ enum NextOp { Response { /// Time taken to execute the tx and produce effects latency: Duration, - /// Number of commands in the executed transction + /// Number of commands in the executed transaction num_commands: u16, - /// Gas used in the executed transction + /// Gas used in the executed transaction gas_used: u64, /// The payload updated with the effects of the transaction payload: Box, diff --git a/crates/iota-bridge-cli/src/lib.rs b/crates/iota-bridge-cli/src/lib.rs index dc7062f0dfa..6614ee8aeab 100644 --- a/crates/iota-bridge-cli/src/lib.rs +++ b/crates/iota-bridge-cli/src/lib.rs @@ -665,7 +665,7 @@ async fn deposit_on_iota( ); let signed_tx = Transaction::from_data(tx_data, vec![sig]); let tx_digest = *signed_tx.digest(); - info!(?tx_digest, "Sending deposit transction to IOTA."); + info!(?tx_digest, "Sending deposit transaction to IOTA."); let resp = iota_bridge_client .execute_transaction_block_with_effects(signed_tx) .await diff --git a/crates/iota-bridge-indexer/src/main.rs b/crates/iota-bridge-indexer/src/main.rs index 15055fd00b5..59200198ac2 100644 --- a/crates/iota-bridge-indexer/src/main.rs +++ b/crates/iota-bridge-indexer/src/main.rs @@ -180,7 +180,7 @@ async fn start_processing_iota_checkpoints_by_querying_txns( )); handles.push(spawn_logged_monitored_task!( handle_iota_transactions_loop(pg_pool.clone(), rx, indexer_metrics.clone()), - "handle_iota_transcations_loop" + "handle_iota_transactions_loop" )); Ok(handles) } diff --git a/crates/iota-bridge/src/error.rs b/crates/iota-bridge/src/error.rs index cd344de337c..64e60594bf5 100644 --- a/crates/iota-bridge/src/error.rs +++ b/crates/iota-bridge/src/error.rs @@ -10,7 +10,7 @@ pub enum BridgeError { InvalidTxHash, // The referenced transaction failed OriginTxFailed, - // The referenced transction does not exist + // The referenced transaction does not exist TxNotFound, // Tx is not yet finalized TxNotFinalized, diff --git a/crates/iota-bridge/src/iota_transaction_builder.rs b/crates/iota-bridge/src/iota_transaction_builder.rs index c39891ab2fc..396f1d1bd0f 100644 --- a/crates/iota-bridge/src/iota_transaction_builder.rs +++ b/crates/iota-bridge/src/iota_transaction_builder.rs @@ -80,7 +80,7 @@ pub fn build_iota_transaction( rgp, ), BridgeAction::EvmContractUpgradeAction(_) => { - // It does not need an IOTA tranaction to execute EVM contract upgrade + // It does not need an IOTA transaction to execute EVM contract upgrade unreachable!() } BridgeAction::AddTokensOnIotaAction(_) => build_add_tokens_on_iota_transaction( @@ -91,7 +91,7 @@ pub fn build_iota_transaction( rgp, ), BridgeAction::AddTokensOnEvmAction(_) => { - // It does not need an IOTA tranaction to add tokens on EVM + // It does not need an IOTA transaction to add tokens on EVM unreachable!() } } diff --git a/crates/iota-bridge/src/orchestrator.rs b/crates/iota-bridge/src/orchestrator.rs index c44e162f5bb..16b1639db62 100644 --- a/crates/iota-bridge/src/orchestrator.rs +++ b/crates/iota-bridge/src/orchestrator.rs @@ -134,7 +134,7 @@ where } Err(e) => { panic!( - "IOTA Event could not be deserialzed to IotaBridgeEvent: {:?}", + "IOTA Event could not be deserialized to IotaBridgeEvent: {:?}", e ); } diff --git a/crates/iota-bridge/src/server/governance_verifier.rs b/crates/iota-bridge/src/server/governance_verifier.rs index ba342ce8ab9..e9f277f2db4 100644 --- a/crates/iota-bridge/src/server/governance_verifier.rs +++ b/crates/iota-bridge/src/server/governance_verifier.rs @@ -12,21 +12,21 @@ use crate::{ #[derive(Debug)] pub struct GovernanceVerifier { - approved_goverance_actions: HashMap, + approved_governance_actions: HashMap, } impl GovernanceVerifier { pub fn new(approved_actions: Vec) -> BridgeResult { // TODO(audit-blocking): verify chain ids - let mut approved_goverance_actions = HashMap::new(); + let mut approved_governance_actions = HashMap::new(); for action in approved_actions { if !action.is_governace_action() { return Err(BridgeError::ActionIsNotGovernanceAction(action)); } - approved_goverance_actions.insert(action.digest(), action); + approved_governance_actions.insert(action.digest(), action); } Ok(Self { - approved_goverance_actions, + approved_governance_actions, }) } } @@ -43,7 +43,7 @@ impl ActionVerifier for GovernanceVerifier { if !key.is_governace_action() { return Err(BridgeError::ActionIsNotGovernanceAction(key)); } - if let Some(approved_action) = self.approved_goverance_actions.get(&key.digest()) { + if let Some(approved_action) = self.approved_governance_actions.get(&key.digest()) { assert_eq!( &key, approved_action, "Mismatched action found in approved_actions" diff --git a/crates/iota-bridge/src/test_utils.rs b/crates/iota-bridge/src/test_utils.rs index 00a02d95d64..913006daa0b 100644 --- a/crates/iota-bridge/src/test_utils.rs +++ b/crates/iota-bridge/src/test_utils.rs @@ -150,15 +150,15 @@ pub fn get_test_authorities_and_run_mock_bridge_server( ) { assert_eq!(voting_power.len(), mock_handlers.len()); let (handles, ports) = run_mock_bridge_server(mock_handlers); - let mut authorites = vec![]; + let mut authorities = vec![]; let mut secrets = vec![]; for (port, vp) in ports.iter().zip(voting_power) { let (authority, _, secret) = get_test_authority_and_key(vp, *port); - authorites.push(authority); + authorities.push(authority); secrets.push(secret); } - (handles, authorites, secrets) + (handles, authorities, secrets) } pub fn sign_action_with_key( diff --git a/crates/iota-core/src/authority_server.rs b/crates/iota-core/src/authority_server.rs index 9c49cd9c9ab..7495e16b6b1 100644 --- a/crates/iota-core/src/authority_server.rs +++ b/crates/iota-core/src/authority_server.rs @@ -949,7 +949,7 @@ impl ValidatorService { let Some(client_ip) = header_contents.get(contents_len - num_hops) else { error!( - "x-forwarded-for header value of {:?} contains {} values, but {} hops were specificed. \ + "x-forwarded-for header value of {:?} contains {} values, but {} hops were specified. \ Expected at least {} values. Skipping traffic controller request handling.", header_contents, contents_len, num_hops, contents_len, ); diff --git a/crates/iota-core/src/execution_cache/cache_types.rs b/crates/iota-core/src/execution_cache/cache_types.rs index 0063fd1c04f..9bedd8dd42a 100644 --- a/crates/iota-core/src/execution_cache/cache_types.rs +++ b/crates/iota-core/src/execution_cache/cache_types.rs @@ -7,7 +7,7 @@ use std::{cmp::Ordering, collections::VecDeque}; use iota_types::base_types::SequenceNumber; /// CachedVersionMap is a map from version to value, with the additional -/// contraints: +/// constraints: /// - The key (SequenceNumber) must be monotonically increasing for each insert. /// If a key is inserted that is less than the previous key, it results in an /// assertion failure. diff --git a/crates/iota-core/src/execution_cache/cached_version_map.rs b/crates/iota-core/src/execution_cache/cached_version_map.rs index 0063fd1c04f..9bedd8dd42a 100644 --- a/crates/iota-core/src/execution_cache/cached_version_map.rs +++ b/crates/iota-core/src/execution_cache/cached_version_map.rs @@ -7,7 +7,7 @@ use std::{cmp::Ordering, collections::VecDeque}; use iota_types::base_types::SequenceNumber; /// CachedVersionMap is a map from version to value, with the additional -/// contraints: +/// constraints: /// - The key (SequenceNumber) must be monotonically increasing for each insert. /// If a key is inserted that is less than the previous key, it results in an /// assertion failure. diff --git a/crates/iota-core/src/traffic_controller/mod.rs b/crates/iota-core/src/traffic_controller/mod.rs index 47fb47c8efc..01e262db1a4 100644 --- a/crates/iota-core/src/traffic_controller/mod.rs +++ b/crates/iota-core/src/traffic_controller/mod.rs @@ -59,7 +59,7 @@ impl Debug for TrafficController { // given that (1) it contains all requests IPs, and (2) it could be quite // large. Instead, we print lengths of the blocklists. Further, we prefer // to get length from the metrics rather than from the blocklists themselves - // to avoid unneccesarily acquiring the read lock. + // to avoid unnecessarily acquiring the read lock. f.debug_struct("TrafficController") .field( "connection_ip_blocklist_len", diff --git a/crates/iota-e2e-tests/tests/full_node_tests.rs b/crates/iota-e2e-tests/tests/full_node_tests.rs index b22895f7e26..f8aa202fa99 100644 --- a/crates/iota-e2e-tests/tests/full_node_tests.rs +++ b/crates/iota-e2e-tests/tests/full_node_tests.rs @@ -142,7 +142,7 @@ async fn test_sponsored_transaction() -> Result<(), anyhow::Error> { info!("updated obj ref: {:?}", object_ref); info!("updated gas ref: {:?}", gas_obj); - // Construct the sponsored transction + // Construct the sponsored transaction let pt = { let mut builder = ProgrammableTransactionBuilder::new(); builder.transfer_object(another_addr, object_ref).unwrap(); diff --git a/crates/iota-e2e-tests/tests/multisig_tests.rs b/crates/iota-e2e-tests/tests/multisig_tests.rs index 01206d007dc..e97ab809812 100644 --- a/crates/iota-e2e-tests/tests/multisig_tests.rs +++ b/crates/iota-e2e-tests/tests/multisig_tests.rs @@ -162,7 +162,7 @@ async fn test_multisig_e2e() { #[sim_test] #[ignore = "https://github.com/iotaledger/iota/issues/1777"] -async fn test_multisig_with_zklogin_scenerios() { +async fn test_multisig_with_zklogin_scenarios() { let test_cluster = TestClusterBuilder::new() .with_epoch_duration_ms(15000) .with_default_jwks() @@ -359,7 +359,7 @@ async fn test_multisig_with_zklogin_scenerios() { .contains("Invalid zklogin authenticator bytes") ); - // assert positive case for all 4 participanting parties. + // assert positive case for all 4 participating parties. // 1a. good ed25519 sig used in multisig executes successfully. let gas = test_cluster .fund_address_and_return_gas(rgp, Some(20000000000), multisig_addr) diff --git a/crates/iota-e2e-tests/tests/object_deletion_tests.rs b/crates/iota-e2e-tests/tests/object_deletion_tests.rs index 6aab16a39d1..58e8e4a7bbf 100644 --- a/crates/iota-e2e-tests/tests/object_deletion_tests.rs +++ b/crates/iota-e2e-tests/tests/object_deletion_tests.rs @@ -110,12 +110,12 @@ mod sim_only_tests { .unwrap(); let state = node.state(); - let checkpoit_store = state.get_checkpoint_store(); + let checkpoint_store = state.get_checkpoint_store(); // Manually initiating a pruning and compaction job to make sure that deleted // objects are gong from object store. state .database_for_testing() - .prune_objects_and_compact_for_testing(checkpoit_store, None) + .prune_objects_and_compact_for_testing(checkpoint_store, None) .await; // Check that both root and child objects are gone from object store. diff --git a/crates/iota-e2e-tests/tests/traffic_control_tests.rs b/crates/iota-e2e-tests/tests/traffic_control_tests.rs index 285ee7e49e6..03d13934614 100644 --- a/crates/iota-e2e-tests/tests/traffic_control_tests.rs +++ b/crates/iota-e2e-tests/tests/traffic_control_tests.rs @@ -723,7 +723,7 @@ async fn test_traffic_sketch_with_sampled_spam() { assert!(metrics.num_requests < expected_requests + 20); // number of blocked requests should be nearly the same // as before, as we have half the single client TPS, - // but the threshould is also halved. However, divide by + // but the threshold is also halved. However, divide by // 5 instead of 4 as a buffer due in case we're unlucky with // the sampling assert!(metrics.num_blocked > (expected_requests / 5) - 100); diff --git a/crates/iota-framework/packages/bridge/sources/message.move b/crates/iota-framework/packages/bridge/sources/message.move index c4a04a8b947..720c6cf042b 100644 --- a/crates/iota-framework/packages/bridge/sources/message.move +++ b/crates/iota-framework/packages/bridge/sources/message.move @@ -257,7 +257,7 @@ module bridge::message { payload.push_back((vector::length(&target_address) as u8)); payload.append(target_address); payload.push_back(token_type); - // bcs serialzies u64 as 8 bytes + // bcs serializes u64 as 8 bytes payload.append(reverse_bytes(bcs::to_bytes(&amount))); assert!(vector::length(&payload) == 64, EInvalidPayloadLength); diff --git a/crates/iota-framework/packages/bridge/tests/bridge_env.move b/crates/iota-framework/packages/bridge/tests/bridge_env.move index b3d5359e6e0..0282a5716bd 100644 --- a/crates/iota-framework/packages/bridge/tests/bridge_env.move +++ b/crates/iota-framework/packages/bridge/tests/bridge_env.move @@ -155,7 +155,7 @@ module bridge::bridge_env { } } - // Bridge environemnt + // Bridge environment public struct BridgeEnv { scenario: Scenario, validators: vector, diff --git a/crates/iota-framework/packages/iota-framework/sources/coin_manager.move b/crates/iota-framework/packages/iota-framework/sources/coin_manager.move index 348b1378794..f8fdb40d30c 100644 --- a/crates/iota-framework/packages/iota-framework/sources/coin_manager.move +++ b/crates/iota-framework/packages/iota-framework/sources/coin_manager.move @@ -80,7 +80,7 @@ module iota::coin_manager { icon_url: Option } - /// Event triggered once `Coin` ownership is transfered to a new `CoinManager` + /// Event triggered once `Coin` ownership is transferred to a new `CoinManager` public struct CoinManaged has copy, drop { coin_name: std::ascii::String } @@ -127,7 +127,7 @@ module iota::coin_manager { ) } - /// This function allows the same as `new` but under the assumption the Metadata can not be transfered + /// This function allows the same as `new` but under the assumption the Metadata can not be transferred /// This would typically be the case with `Coin` instances where the metadata is already frozen. public fun new_with_immutable_metadata ( treasury_cap: TreasuryCap, diff --git a/crates/iota-framework/packages/iota-framework/tests/crypto/ecdsa_k1_tests.move b/crates/iota-framework/packages/iota-framework/tests/crypto/ecdsa_k1_tests.move index 4c5b9ea0864..4bfc6ddcabd 100644 --- a/crates/iota-framework/packages/iota-framework/tests/crypto/ecdsa_k1_tests.move +++ b/crates/iota-framework/packages/iota-framework/tests/crypto/ecdsa_k1_tests.move @@ -168,7 +168,7 @@ module iota::ecdsa_k1_tests { let sig = ecdsa_k1::secp256k1_sign(&sk, &msg, 1, true); assert!(pk == ecdsa_k1::secp256k1_ecrecover(&sig, &msg, 1)); - // Recoveres pk should not be the same with another message + // Recovers pk should not be the same with another message let other_msg = b"Farewell, world!"; assert!(pk != ecdsa_k1::secp256k1_ecrecover(&sig, &other_msg, 0)); } diff --git a/crates/iota-framework/packages/iota-framework/tests/event_tests.move b/crates/iota-framework/packages/iota-framework/tests/event_tests.move index cf2dfad34d8..00ba919b314 100644 --- a/crates/iota-framework/packages/iota-framework/tests/event_tests.move +++ b/crates/iota-framework/packages/iota-framework/tests/event_tests.move @@ -18,7 +18,7 @@ module iota::event_tests { } #[test] - fun test_emit_homogenous() { + fun test_emit_homogeneous() { let e0 = S1(0); event::emit(e0); assert_eq(event::events_by_type()[0], e0); diff --git a/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move b/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move index 18d51aaff4b..b9b69a20090 100644 --- a/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move +++ b/crates/iota-framework/packages/iota-system/tests/iota_system_tests.move @@ -167,7 +167,7 @@ module iota_system::iota_system_tests { assert!(validator.next_epoch_gas_price() == 888); test_scenario::return_shared(system_state); - // @0x1 revokes stakee's permssion by creating a new + // @0x1 revokes stakee's permission by creating a new // operation cap object. rotate_operation_cap(@0x1, scenario); diff --git a/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move b/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move index 96a720831b9..8ef6fa6e757 100644 --- a/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move +++ b/crates/iota-framework/packages/move-stdlib/tests/vector_tests.move @@ -432,9 +432,9 @@ module std::vector_tests { assert!(index == 1); } - // index_of will return the index first occurence that is equal + // index_of will return the index first occurrence that is equal #[test] - fun index_of_nonempty_has_multiple_occurences() { + fun index_of_nonempty_has_multiple_occurrences() { let mut v = vector[]; v.push_back(false); v.push_back(true); diff --git a/crates/iota-framework/packages/stardust/tests/nft_tests.move b/crates/iota-framework/packages/stardust/tests/nft_tests.move index f3e623b03ed..214b781f99e 100644 --- a/crates/iota-framework/packages/stardust/tests/nft_tests.move +++ b/crates/iota-framework/packages/stardust/tests/nft_tests.move @@ -32,7 +32,7 @@ module stardust::nft_tests { // Demonstration on how to claim the assets from an NFT output with all unlock conditions inside one PTB. #[test] fun nft_assets_extraction() { - // Set up a test enviroment. + // Set up a test environment. let sender = @0xA; let mut scenario = test_scenario::begin(sender); diff --git a/crates/iota-framework/packages/stardust/tests/unlock_condition/address_unlock_condition_tests.move b/crates/iota-framework/packages/stardust/tests/unlock_condition/address_unlock_condition_tests.move index cb869769793..96a9402f4b1 100644 --- a/crates/iota-framework/packages/stardust/tests/unlock_condition/address_unlock_condition_tests.move +++ b/crates/iota-framework/packages/stardust/tests/unlock_condition/address_unlock_condition_tests.move @@ -17,7 +17,7 @@ module stardust::address_unlock_condition_tests { use stardust::timelock_unlock_condition; const ENativeTokenBagNonEmpty: u64 = 1; - const EIotaBlanceMismatch: u64 = 3; + const EIotaBalanceMismatch: u64 = 3; // One Time Witness for coins used in the tests. public struct TEST_A has drop {} @@ -109,7 +109,7 @@ module stardust::address_unlock_condition_tests { // Command 4: create a coin from the extracted IOTA balance. let iota_coin = coin::from_balance(extracted_base_token, &mut ctx); // We should have `initial_iota_in_output` - `sdruc_return_amount` left in the coin. - assert!(iota_coin.value() == (initial_iota_in_output - sdruc_return_amount), EIotaBlanceMismatch); + assert!(iota_coin.value() == (initial_iota_in_output - sdruc_return_amount), EIotaBalanceMismatch); // Command 6: send back the base token coin to the user. transfer::public_transfer(iota_coin, migrate_to); diff --git a/crates/iota-genesis-builder/src/lib.rs b/crates/iota-genesis-builder/src/lib.rs index bd6818b6c9e..55cdfb41b9d 100644 --- a/crates/iota-genesis-builder/src/lib.rs +++ b/crates/iota-genesis-builder/src/lib.rs @@ -368,7 +368,7 @@ impl Builder { fn build_and_cache_unsigned_genesis(&mut self) { // Verify that all input data is valid. - // Check that if extra objects are present then it is allowed by the paramenters + // Check that if extra objects are present then it is allowed by the parameters // to add extra objects and it also validates the validator info self.validate_inputs().unwrap(); @@ -986,7 +986,7 @@ impl Builder { let file = path.join(GENESIS_BUILDER_MIGRATION_SOURCES_FILE); fs::write(file, serde_json::to_string(&self.migration_sources)?)?; - // Write migration transations data + // Write migration transactions data let file = path.join(IOTA_GENESIS_MIGRATION_TX_DATA_FILENAME); self.migration_tx_data .expect("migration data should exist") diff --git a/crates/iota-genesis-builder/src/stardust/migration/migration.rs b/crates/iota-genesis-builder/src/stardust/migration/migration.rs index d80096d99d5..58f2a8b99b8 100644 --- a/crates/iota-genesis-builder/src/stardust/migration/migration.rs +++ b/crates/iota-genesis-builder/src/stardust/migration/migration.rs @@ -83,7 +83,7 @@ pub struct Migration { impl Migration { /// Try to setup the migration process by creating the inner executor - /// and bootstraping the in-memory storage. + /// and bootstrapping the in-memory storage. pub fn new( target_milestone_timestamp_sec: u32, total_supply: u64, @@ -107,7 +107,7 @@ impl Migration { } /// Run all stages of the migration except snapshot migration. - /// Factored out to faciliate testing. + /// Factored out to facilitate testing. /// /// See also `Self::run`. pub(crate) fn run_migration( diff --git a/crates/iota-graphql-e2e-tests/tests/datetime/datetime.move b/crates/iota-graphql-e2e-tests/tests/datetime/datetime.move index 9a00cdce3d9..958cefc8e6f 100644 --- a/crates/iota-graphql-e2e-tests/tests/datetime/datetime.move +++ b/crates/iota-graphql-e2e-tests/tests/datetime/datetime.move @@ -6,47 +6,47 @@ //# create-checkpoint -// advance the clock by 1ms, next checkpoint timestmap should be 1970-01-01T00:00:00:001Z +// advance the clock by 1ms, next checkpoint timestamp should be 1970-01-01T00:00:00:001Z //# advance-clock --duration-ns 1000000 //# create-checkpoint -// advance the clock by 1ms, next checkpoint timestmap should be 1970-01-01T00:00:00:002Z +// advance the clock by 1ms, next checkpoint timestamp should be 1970-01-01T00:00:00:002Z //# advance-clock --duration-ns 1000000 //# create-checkpoint -// advance the clock by 1ms, next checkpoint timestmap should be 1970-01-01T00:00:00:003Z +// advance the clock by 1ms, next checkpoint timestamp should be 1970-01-01T00:00:00:003Z //# advance-clock --duration-ns 1000000 //# create-checkpoint -// advance the clock by 10ms, next checkpoint timestmap should be 1970-01-01T00:00:00:013Z +// advance the clock by 10ms, next checkpoint timestamp should be 1970-01-01T00:00:00:013Z //# advance-clock --duration-ns 10000000 //# create-checkpoint -// advance the clock by 2000ms, next checkpoint timestmap should be 1970-01-01T00:00:02:013Z +// advance the clock by 2000ms, next checkpoint timestamp should be 1970-01-01T00:00:02:013Z //# advance-clock --duration-ns 2000000000 //# create-checkpoint -// advance the clock by 990s / 16m30s, next checkpoint timestmap should be 1970-01-01T00:16:32.013Z +// advance the clock by 990s / 16m30s, next checkpoint timestamp should be 1970-01-01T00:16:32.013Z //# advance-clock --duration-ns 990000000000 //# create-checkpoint -// advance the clock by 9900s / 2h45m0s, next checkpoint timestmap should be 1970-01-01T03:01:32.013Z +// advance the clock by 9900s / 2h45m0s, next checkpoint timestamp should be 1970-01-01T03:01:32.013Z //# advance-clock --duration-ns 9900000000000 //# advance-epoch //# create-checkpoint -// advance the clock by 1888ms, next checkpoint timestmap should be 1970-01-01T03:01:33:901Z +// advance the clock by 1888ms, next checkpoint timestamp should be 1970-01-01T03:01:33:901Z //# advance-clock --duration-ns 1888000000 -// advance the clock by 99ms, next checkpoint timestmap should be 1970-01-01T03:01:34:00Z +// advance the clock by 99ms, next checkpoint timestamp should be 1970-01-01T03:01:34:00Z //# advance-clock --duration-ns 99000000 //# create-checkpoint diff --git a/crates/iota-graphql-rpc/src/server/builder.rs b/crates/iota-graphql-rpc/src/server/builder.rs index 193c7b8fb05..8c17c8a8a06 100644 --- a/crates/iota-graphql-rpc/src/server/builder.rs +++ b/crates/iota-graphql-rpc/src/server/builder.rs @@ -558,7 +558,7 @@ async fn graphql_handler( let result = schema.execute(req).await; - // If there are errors, insert them as an extention so that the Metrics callback + // If there are errors, insert them as an extension so that the Metrics callback // handler can pull it out later. let mut extensions = axum::http::Extensions::new(); if result.is_err() { diff --git a/crates/iota-indexer/README.md b/crates/iota-indexer/README.md index fa390826ffb..d1f2f45191e 100644 --- a/crates/iota-indexer/README.md +++ b/crates/iota-indexer/README.md @@ -98,7 +98,7 @@ The crate provides following tests currently: - rpc tests (see [rpc-tests](tests/rpc-tests/main.rs)) > [!NOTE] -> rpc tests which relies on postgres for every test it applies migrations, we need to run tests sequencially to avoid errors +> rpc tests which relies on postgres for every test it applies migrations, we need to run tests sequentially to avoid errors ```sh # run tests requiring only postgres integration diff --git a/crates/iota-indexer/migrations/pg/2023-08-19-044044_checkpoints/up.sql b/crates/iota-indexer/migrations/pg/2023-08-19-044044_checkpoints/up.sql index ddb63b020de..ec861450dfc 100644 --- a/crates/iota-indexer/migrations/pg/2023-08-19-044044_checkpoints/up.sql +++ b/crates/iota-indexer/migrations/pg/2023-08-19-044044_checkpoints/up.sql @@ -6,9 +6,9 @@ CREATE TABLE checkpoints -- total transactions in the network at the end of this checkpoint (including itself) network_total_transactions BIGINT NOT NULL, previous_checkpoint_digest BYTEA, - -- if this checkpoitn is the last checkpoint of an epoch + -- if this checkpoint is the last checkpoint of an epoch end_of_epoch boolean NOT NULL, - -- array of TranscationDigest in bytes included in this checkpoint + -- array of TransactionDigest in bytes included in this checkpoint tx_digests BYTEA[] NOT NULL, timestamp_ms BIGINT NOT NULL, total_gas_cost BIGINT NOT NULL, @@ -20,7 +20,7 @@ CREATE TABLE checkpoints checkpoint_commitments BYTEA NOT NULL, -- bcs serialized AggregateAuthoritySignature bytes validator_signature BYTEA NOT NULL, - -- bcs serialzied EndOfEpochData bytes, if the checkpoint marks end of an epoch + -- bcs serialized EndOfEpochData bytes, if the checkpoint marks end of an epoch end_of_epoch_data BYTEA, min_tx_sequence_number BIGINT, max_tx_sequence_number BIGINT diff --git a/crates/iota-json-rpc/src/axum_router.rs b/crates/iota-json-rpc/src/axum_router.rs index 8037cda0c3f..494eaad071c 100644 --- a/crates/iota-json-rpc/src/axum_router.rs +++ b/crates/iota-json-rpc/src/axum_router.rs @@ -184,7 +184,7 @@ async fn process_raw_request( let contents_len = header_contents.len(); let Some(client_ip) = header_contents.get(contents_len - num_hops) else { error!( - "x-forwarded-for header value of {:?} contains {} values, but {} hops were specificed. \ + "x-forwarded-for header value of {:?} contains {} values, but {} hops were specified. \ Expected {} values. Skipping traffic controller request handling.", header_contents, contents_len, @@ -278,7 +278,7 @@ fn handle_traffic_resp( // For now, count everything as spam with equal weight // on the rpc node side, including gas-charging endpoints // such as `iota_executeTransactionBlock`, as this can enable - // node operators who wish to rate limit their transcation + // node operators who wish to rate limit their transaction // traffic and incentivize high volume clients to choose a // suitable rpc provider (or run their own). Later we may want // to provide a weight distribution based on the method being called. diff --git a/crates/iota-move/src/manage_package.rs b/crates/iota-move/src/manage_package.rs index e377c9c5bd0..00db04fd4ea 100644 --- a/crates/iota-move/src/manage_package.rs +++ b/crates/iota-move/src/manage_package.rs @@ -28,7 +28,7 @@ pub struct ManagePackage { /// using `iota client active-env`). pub environment: String, #[arg(long = "network-id")] - /// The network chain identifer. Use '35834a8a' for mainnet. + /// The network chain identifier. Use '35834a8a' for mainnet. pub chain_id: String, #[arg(long = "original-id", value_parser = ObjectID::from_hex_literal)] /// The original address (Object ID) where this package is published. diff --git a/crates/iota-proxy/src/lib.rs b/crates/iota-proxy/src/lib.rs index 268c0b59982..c5a81a540b2 100644 --- a/crates/iota-proxy/src/lib.rs +++ b/crates/iota-proxy/src/lib.rs @@ -92,7 +92,7 @@ mod tests { /// the proxy using the protobuf format. The server processes this data /// and sends it to the mock remote_write which accepts everything. Future /// work is to make this more robust and expand the scope of coverage, - /// probabaly moving this test elsewhere and renaming it. + /// probably moving this test elsewhere and renaming it. #[tokio::test] async fn test_axum_acceptor() { // generate self-signed certificates diff --git a/crates/iota-proxy/src/middleware.rs b/crates/iota-proxy/src/middleware.rs index 708532c32f9..adf49c9c8de 100644 --- a/crates/iota-proxy/src/middleware.rs +++ b/crates/iota-proxy/src/middleware.rs @@ -150,7 +150,7 @@ where let mut decoder = ProtobufDecoder::new(intermediate); let decoded = decoder.parse::().map_err(|e| { - let msg = format!("unable to decode len deliminated protobufs; {e}"); + let msg = format!("unable to decode len delimited protobufs; {e}"); error!(msg); MIDDLEWARE_OPS .with_label_values(&[ diff --git a/crates/iota-rest-api/src/accounts.rs b/crates/iota-rest-api/src/accounts.rs index 3911da863c3..be49a6cb35e 100644 --- a/crates/iota-rest-api/src/accounts.rs +++ b/crates/iota-rest-api/src/accounts.rs @@ -69,7 +69,7 @@ async fn list_account_objects( let cursor = if object_info.len() > limit { // SAFETY: We've already verified that object_info is greater than limit, which - // is gaurenteed to be >= 1. + // is guaranteed to be >= 1. object_info.pop().unwrap().object_id.pipe(Some) } else { None diff --git a/crates/iota-rest-api/src/objects.rs b/crates/iota-rest-api/src/objects.rs index 6a0088be245..f4c697105c9 100644 --- a/crates/iota-rest-api/src/objects.rs +++ b/crates/iota-rest-api/src/objects.rs @@ -227,7 +227,7 @@ async fn list_dynamic_fields( let cursor = if dynamic_fields.len() > limit { // SAFETY: We've already verified that object_keys is greater than limit, which - // is gaurenteed to be >= 1. + // is guaranteed to be >= 1. dynamic_fields .pop() .unwrap() diff --git a/crates/iota-storage/src/object_store/util.rs b/crates/iota-storage/src/object_store/util.rs index b1b36d90017..159d6727758 100644 --- a/crates/iota-storage/src/object_store/util.rs +++ b/crates/iota-storage/src/object_store/util.rs @@ -388,7 +388,7 @@ pub fn get_path(prefix: &str) -> Path { } // Snapshot MANIFEST file is very simple. Just a newline delimited list of all -// paths in the snapshot directory this simplicty enables easy parsing for +// paths in the snapshot directory this simplicity enables easy parsing for // scripts to download snapshots pub async fn write_snapshot_manifest( dir: &Path, diff --git a/crates/iota-types/src/README.md b/crates/iota-types/src/README.md index 3b0532b87cb..1efaf68510b 100644 --- a/crates/iota-types/src/README.md +++ b/crates/iota-types/src/README.md @@ -3,7 +3,7 @@ Note: this README file currently covers cryptography-related structs and methods. Currently, three files are equipped with signature and hashing functionality (`crypto.rs`, `signature_seed` and -`messages.rs`). See [IOTA Signatures](https://github.com/iotaledger/iota/blob/develop/docs/content/concepts/cryptography/transaction-auth/signatures.mdx) for supported signature schemes and its requirments for user and authority signatures. See [fastcrypto](https://github.com/MystenLabs/fastcrypto) for concrete implementation of various cryptography libraries. +`messages.rs`). See [IOTA Signatures](https://github.com/iotaledger/iota/blob/develop/docs/content/concepts/cryptography/transaction-auth/signatures.mdx) for supported signature schemes and its requirements for user and authority signatures. See [fastcrypto](https://github.com/MystenLabs/fastcrypto) for concrete implementation of various cryptography libraries. ## Quick links diff --git a/crates/iota-types/src/bridge.rs b/crates/iota-types/src/bridge.rs index 4fb1b5de74c..193c82a2b94 100644 --- a/crates/iota-types/src/bridge.rs +++ b/crates/iota-types/src/bridge.rs @@ -23,7 +23,7 @@ use crate::{ }; pub type BridgeInnerDynamicField = Field; -pub type BridgeRecordDyanmicField = Field< +pub type BridgeRecordDynamicField = Field< MoveTypeBridgeMessageKey, LinkedTableNode, >; diff --git a/crates/iota-types/src/full_checkpoint_content.rs b/crates/iota-types/src/full_checkpoint_content.rs index db44a808589..0e1f2ed2562 100644 --- a/crates/iota-types/src/full_checkpoint_content.rs +++ b/crates/iota-types/src/full_checkpoint_content.rs @@ -79,7 +79,7 @@ pub struct CheckpointTransaction { pub transaction: Transaction, /// The effects produced by executing this transaction pub effects: TransactionEffects, - /// The events, if any, emitted by this transaciton during execution + /// The events, if any, emitted by this transaction during execution pub events: Option, /// The state of all inputs to this transaction as they were prior to /// execution. diff --git a/crates/iota-types/src/transaction.rs b/crates/iota-types/src/transaction.rs index b64de3ca0bf..1c6ce74f96c 100644 --- a/crates/iota-types/src/transaction.rs +++ b/crates/iota-types/src/transaction.rs @@ -2864,7 +2864,7 @@ impl InputObjects { .any(|obj| obj.is_deleted_shared_object()) } - // Returns IDs of objects responsible for a tranaction being cancelled, and the + // Returns IDs of objects responsible for a transaction being cancelled, and the // corresponding reason for cancellation. pub fn get_cancelled_objects(&self) -> Option<(Vec, SequenceNumber)> { let mut contains_cancelled = false; diff --git a/crates/test-cluster/src/lib.rs b/crates/test-cluster/src/lib.rs index d7b36777632..b7b9eed65bf 100644 --- a/crates/test-cluster/src/lib.rs +++ b/crates/test-cluster/src/lib.rs @@ -925,7 +925,7 @@ impl TestCluster { } /// Create transactions based on provided object ids - /// by transfering them from one address to another + /// by transferring them from one address to another pub async fn transfer_objects( &self, sender: IotaAddress, diff --git a/dev-tools/grafana-local/dashboards/validator-dashboard.json b/dev-tools/grafana-local/dashboards/validator-dashboard.json index 520c4d374b9..01040158539 100644 --- a/dev-tools/grafana-local/dashboards/validator-dashboard.json +++ b/dev-tools/grafana-local/dashboards/validator-dashboard.json @@ -1151,7 +1151,7 @@ { "matcher": { "id": "byName", - "options": "Avaliable" + "options": "Available" }, "properties": [ { diff --git a/docs/content/about-iota/tokenomics/iota-token.mdx b/docs/content/about-iota/tokenomics/iota-token.mdx index 4e48c0d6e11..d1b01b2c6b8 100644 --- a/docs/content/about-iota/tokenomics/iota-token.mdx +++ b/docs/content/about-iota/tokenomics/iota-token.mdx @@ -13,7 +13,7 @@ There is no maximum supply of IOTA - the total supply will fluctuate over time a :::info Decimals -The amount of decimals for the IOTA token has changed from **6** to **9** with this release, any balance from the Stardust network has been migrated and multiplied by 1000 to accomodate. +The amount of decimals for the IOTA token has changed from **6** to **9** with this release, any balance from the Stardust network has been migrated and multiplied by 1000 to accommodate. ::: diff --git a/docs/content/developer/advanced/create-review-rating-dao-with-multisig.mdx b/docs/content/developer/advanced/create-review-rating-dao-with-multisig.mdx index 71e976dc208..bf27f422b5f 100644 --- a/docs/content/developer/advanced/create-review-rating-dao-with-multisig.mdx +++ b/docs/content/developer/advanced/create-review-rating-dao-with-multisig.mdx @@ -113,7 +113,7 @@ Create the multisig address by combining the public keys of all moderators and s ```shell iota keytool multi-sig-address --pks --weights 1 1 1 --threshold 2 ``` -This command sets up a multisig address where `PUBLIC-KEY-1`, `PUBLIC-KEY-2` & `PUBLIC-KEY-3` are the public keys we retreived in step 2. +This command sets up a multisig address where `PUBLIC-KEY-1`, `PUBLIC-KEY-2` & `PUBLIC-KEY-3` are the public keys we retrieved in step 2. expected output : ```shell @@ -144,7 +144,7 @@ To remove a review, moderators must sign a transaction using the multisig setup. Serialize the transaction to remove a review to be signed by the multisig account: ```shell -iota client call --package --module --function "delete_review" --args --gas-budget 10000000 --serialize-unsigned-transaction +iota client call --package --module --function "delete_review" --args --gas-budget 10000000 --serialize-unsigned-transaction ``` **Arguments:** diff --git a/docs/content/developer/developer.mdx b/docs/content/developer/developer.mdx index 3da2678b84f..a3401b493f4 100644 --- a/docs/content/developer/developer.mdx +++ b/docs/content/developer/developer.mdx @@ -42,7 +42,7 @@ Go to [Cryptography](cryptography.mdx). ## Capture the Flag -Get aquainted with IOTA by solving challenges of increasing complexity in the [Capture the Flag section](iota-move-ctf/introduction.mdx). +Get acquainted with IOTA by solving challenges of increasing complexity in the [Capture the Flag section](iota-move-ctf/introduction.mdx). ## Decentralized Identity diff --git a/docs/content/developer/exchange-integration/exchange-integration.mdx b/docs/content/developer/exchange-integration/exchange-integration.mdx index c7a43faf988..f9d15af8ad3 100644 --- a/docs/content/developer/exchange-integration/exchange-integration.mdx +++ b/docs/content/developer/exchange-integration/exchange-integration.mdx @@ -201,7 +201,7 @@ While it's possible to directly call the JSON-RPC API to integrate, we highly re IOTA supports the following API operations related to transferring IOTA between addresses: - [unsafe_transferObject](/iota-api-ref#unsafe_transferobject) - Because IOTA tokens are objects, you can transfer IOTA tokens just like any other object. This method requires a gas token. For transfering tokens there are better alternatives, as listed below. + Because IOTA tokens are objects, you can transfer IOTA tokens just like any other object. This method requires a gas token. For transferring tokens there are better alternatives, as listed below. - [unsafe_payAllIota](/iota-api-ref#unsafe_payalliota) This method accepts an array of IOTA token IDs. It merges all existing tokens into one, deducts the gas fee, then sends the merged token to the recipient address. diff --git a/docs/content/iota-identity/explanations/about-identity-objects.mdx b/docs/content/iota-identity/explanations/about-identity-objects.mdx index 12dcdb5553d..08e23e405ad 100644 --- a/docs/content/iota-identity/explanations/about-identity-objects.mdx +++ b/docs/content/iota-identity/explanations/about-identity-objects.mdx @@ -117,7 +117,7 @@ capability on **B**. Identities, just like any other _Move_ object, can own assets - e.g. coins, NFTs, `ControllerCap`s. Controllers can access an Identity's assets through different proposals to either borrow or send them. -Borrowing an Identity's assets allows a controller to reference them in a trasaction, in order to use them or update them; +Borrowing an Identity's assets allows a controller to reference them in a transaction, in order to use them or update them; the only restriction is that they have to be returned to the Identity in the same transaction. Instead, sending an Identity's assets enables controllers to transfer them to another address, even their own. \ No newline at end of file diff --git a/docs/content/ts-sdk/typescript/owned-object-pool/overview.mdx b/docs/content/ts-sdk/typescript/owned-object-pool/overview.mdx index 463bca18a77..df1e50b02ea 100644 --- a/docs/content/ts-sdk/typescript/owned-object-pool/overview.mdx +++ b/docs/content/ts-sdk/typescript/owned-object-pool/overview.mdx @@ -104,7 +104,7 @@ const eshandler = await ExecutorServiceHandler.initialize(adminKeypair, client); const promises = []; let tx: TransactionBlockWithLambda; for (let i = 0; i < 10; i++) { - tx = new TransactionBlockWithLambda(() => ceatePaymenttx('')); + tx = new TransactionBlockWithLambda(() => createPaymenttx('')); promises.push(eshandler.execute(tx, client)); } diff --git a/docs/examples/move/nft_marketplace/sources/rental_extension.move b/docs/examples/move/nft_marketplace/sources/rental_extension.move index e971e79b210..8d5f6b72382 100644 --- a/docs/examples/move/nft_marketplace/sources/rental_extension.move +++ b/docs/examples/move/nft_marketplace/sources/rental_extension.move @@ -142,7 +142,7 @@ module nft_marketplace::rental_extension { /// Enables someone to list an asset within the Marketplace extension's Bag, /// creating a Bag entry with the asset's ID as the key and a Rentable wrapper object as the value. - /// Requires the existance of a ProtectedTP which can only be created by the creator of type T. + /// Requires the existence of a ProtectedTP which can only be created by the creator of type T. /// Assumes item is already placed (& optionally locked) in a Kiosk. public fun list( kiosk: &mut Kiosk, diff --git a/examples/move/crypto/ibe/sources/example.move b/examples/move/crypto/ibe/sources/example.move index 524fd0226c6..42731a0deca 100644 --- a/examples/move/crypto/ibe/sources/example.move +++ b/examples/move/crypto/ibe/sources/example.move @@ -135,7 +135,7 @@ module ibe::example { ////// Helper functions for converting 32 byte vectors to BLS12-381's order ////// /// Returns x-ORDER if x >= ORDER, otherwise none. - public(package) fun try_substract(x: &vector): Option> { + public(package) fun try_subtract(x: &vector): Option> { assert!(x.length() == 32, EInvalidLength); let order = x"73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001"; let mut c = vector::empty(); @@ -169,7 +169,7 @@ module ibe::example { let mut res = *x; // Since 2^256 < 3*ORDER, this loop won't run many times. while (true) { - let minus_order = try_substract(&res); + let minus_order = try_subtract(&res); if (option::is_none(&minus_order)) { return res }; diff --git a/examples/move/crypto/ibe/tests/example_tests.move b/examples/move/crypto/ibe/tests/example_tests.move index a188b144d35..55c794ff860 100644 --- a/examples/move/crypto/ibe/tests/example_tests.move +++ b/examples/move/crypto/ibe/tests/example_tests.move @@ -46,13 +46,13 @@ module ibe::tests { } #[test] - fun test_try_substract_and_modulo() { + fun test_try_subtract_and_modulo() { let smaller: vector = x"73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000000"; - let res = example::try_substract(&smaller); + let res = example::try_subtract(&smaller); assert!(option::is_none(&res), 0); let bigger: vector = x"8c1258acd66282b7ccc627f7f65e27faac425bfd0001a40100000000fffffff5"; - let res = example::try_substract(&bigger); + let res = example::try_subtract(&bigger); assert!(option::is_some(&res), 0); let bigger_minus_order = *option::borrow(&res); let expected: vector = x"1824b159acc5056f998c4fefecbc4ff55884b7fa0003480200000001fffffff4"; diff --git a/examples/tic-tac-toe/move/sources/owned.move b/examples/tic-tac-toe/move/sources/owned.move index 6ea07635f23..6195ea9e21d 100644 --- a/examples/tic-tac-toe/move/sources/owned.move +++ b/examples/tic-tac-toe/move/sources/owned.move @@ -116,7 +116,7 @@ module tic_tac_toe::owned { // === Public Functions === /// Create a new game, played by `x` and `o`. The game should be - /// transfered to the address that will administrate the game. If + /// transferred to the address that will administrate the game. If /// that address is a multi-sig of the two players, its public key /// should be passed as `admin`. public fun new(x: address, o: address, admin: vector, ctx: &mut TxContext): Game { diff --git a/examples/trading/api/indexer/escrow-handler.ts b/examples/trading/api/indexer/escrow-handler.ts index b8188b3f4ad..3173e033a5f 100644 --- a/examples/trading/api/indexer/escrow-handler.ts +++ b/examples/trading/api/indexer/escrow-handler.ts @@ -27,7 +27,7 @@ type EscrowCancelled = { /** * Handles all events emitted by the `escrow` module. * Data is modelled in a way that allows writing to the db in any order (DESC or ASC) without - * resulting in data incosistencies. + * resulting in data inconsistencies. * We're constructing the updates to support multiple events involving a single record * as part of the same batch of events (but using a single write/record to the DB). * */ diff --git a/examples/trading/api/indexer/locked-handler.ts b/examples/trading/api/indexer/locked-handler.ts index 9b209af1bd2..c29f0dfe1fe 100644 --- a/examples/trading/api/indexer/locked-handler.ts +++ b/examples/trading/api/indexer/locked-handler.ts @@ -22,7 +22,7 @@ type LockDestroyed = { /** * Handles all events emitted by the `lock` module. * Data is modelled in a way that allows writing to the db in any order (DESC or ASC) without - * resulting in data incosistencies. + * resulting in data inconsistencies. * We're constructing the updates to support multiple events involving a single record * as part of the same batch of events (but using a single write/record to the DB). * */ diff --git a/examples/trading/contracts/demo/sources/demo_bear.move b/examples/trading/contracts/demo/sources/demo_bear.move index 8ed765ab1d8..7510e3b4b80 100644 --- a/examples/trading/contracts/demo/sources/demo_bear.move +++ b/examples/trading/contracts/demo/sources/demo_bear.move @@ -17,7 +17,7 @@ module demo::demo_bear { /// our OTW to create display. public struct DEMO_BEAR has drop {} - // It's recommened to create Display using PTBs instead of + // It's recommended to create Display using PTBs instead of // directly on the contracts. // We are only creating it here for demo purposes (one-step setup). fun init(otw: DEMO_BEAR, ctx: &mut TxContext){ diff --git a/iota-execution/latest/iota-adapter/src/adapter.rs b/iota-execution/latest/iota-adapter/src/adapter.rs index 29fc004b12f..3ec496f188c 100644 --- a/iota-execution/latest/iota-adapter/src/adapter.rs +++ b/iota-execution/latest/iota-adapter/src/adapter.rs @@ -198,7 +198,7 @@ mod checked { /// Run both the Move verifier and the IOTA verifier, checking just for /// timeouts. Returns Ok(()) if the verifier completes within the module - /// meter limit and the ticks are successfully transfered to the package + /// meter limit and the ticks are successfully transferred to the package /// limit (regardless of whether verification succeeds or not). fn verify_module_timeout_only( module: &CompiledModule, diff --git a/iota-execution/latest/iota-adapter/src/execution_engine.rs b/iota-execution/latest/iota-adapter/src/execution_engine.rs index 9b9128532b6..9b6f6b85756 100644 --- a/iota-execution/latest/iota-adapter/src/execution_engine.rs +++ b/iota-execution/latest/iota-adapter/src/execution_engine.rs @@ -78,7 +78,7 @@ mod checked { /// prepares a transaction for execution, then executes it through an /// inner execution method and finally produces an instance of /// transaction effects. It also returns the inner temporary store, which - /// contains the objects resulting from the transction execution, the gas + /// contains the objects resulting from the transaction execution, the gas /// status instance, which tracks the gas usage, and the execution result. /// The function handles transaction execution based on the provided /// `TransactionKind`. It checks for any expensive operations, manages diff --git a/nre/bpf/nodefw/README.md b/nre/bpf/nodefw/README.md index a3df2f56898..91d4fd7e815 100644 --- a/nre/bpf/nodefw/README.md +++ b/nre/bpf/nodefw/README.md @@ -41,8 +41,8 @@ cargo build ## Run -NB the RUST_LOG env var. if you wish to run the binary outside of a cargo run, you'll need linux capabilites. xtask does `sudo -E` for you automatically, but if you don't you'll need to set -capabilites on the built binary. Some or all of these, depending on the program. +NB the RUST_LOG env var. if you wish to run the binary outside of a cargo run, you'll need linux capabilities. xtask does `sudo -E` for you automatically, but if you don't you'll need to set +capabilities on the built binary. Some or all of these, depending on the program. `CAP_SYS_ADMIN` `CAP_NET_ADMIN` diff --git a/nre/helm/README.md b/nre/helm/README.md index be5d97f44e5..3f60546e318 100644 --- a/nre/helm/README.md +++ b/nre/helm/README.md @@ -25,7 +25,7 @@ kubectl create secret generic db-secret \ More Documentation on this coming soon! The storage amount recommendations will increase over time. The below numbers may quickly become outdated. -_Resource Reccomendations_ +_Resource Recommendations_ - Storage - Mainnet 30TB diff --git a/nre/helm/indexer/templates/deployment.yaml b/nre/helm/indexer/templates/deployment.yaml index 913aed3a003..2abe91b585f 100644 --- a/nre/helm/indexer/templates/deployment.yaml +++ b/nre/helm/indexer/templates/deployment.yaml @@ -23,7 +23,7 @@ spec: maxSurge: {{ .Values.strategy.rollingUpdate.maxSurge }} {{- end }} {{- if .Values.strategy.rollingUpdate.maxUnavailable }} - maxUnavailable: {{ .Values.strategy.rollingUpdate.maxUnavaialable }} + maxUnavailable: {{ .Values.strategy.rollingUpdate.maxUnavailable }} {{- end }} {{- end }} {{- end }} diff --git a/nre/ssfn_guide.md b/nre/ssfn_guide.md index cc3eea14046..83cc1bc9770 100644 --- a/nre/ssfn_guide.md +++ b/nre/ssfn_guide.md @@ -2,7 +2,7 @@ State sync fullnodes are in essence just regular fullnodes, with a few tweaks. I won't detail setting up an IOTA fullnode here, just the ways in which state sync fullnodes differ: -1. State sync fullnodes should be peered directly to a validator, these are the only nodes in the network that explictly set validators as their peer +1. State sync fullnodes should be peered directly to a validator, these are the only nodes in the network that explicitly set validators as their peer The way to allow your state sync fullnode to connect to your validator is as follows: diff --git a/scripts/codesearch/README.md b/scripts/codesearch/README.md index ccf3d56e7b8..3e8bb8968b1 100644 --- a/scripts/codesearch/README.md +++ b/scripts/codesearch/README.md @@ -8,4 +8,4 @@ Helps to find all occurrences of version numbers in the rust code (e.g. function ## search_tests -Helps to find all occurences of a given pattern in all the rust tests (#[test], #[tokio::test], #[simtest]). +Helps to find all occurrences of a given pattern in all the rust tests (#[test], #[tokio::test], #[simtest]). diff --git a/scripts/slipstream/slipstream.py b/scripts/slipstream/slipstream.py index addde33fd5a..63398d22262 100644 --- a/scripts/slipstream/slipstream.py +++ b/scripts/slipstream/slipstream.py @@ -698,7 +698,7 @@ def prepare_docker_turborepo(script_folder): "sh", "-c", "pnpm i" ], check=True) - print(" run install of additional depedencies...") + print(" run install of additional dependencies...") # cmd: docker run --rm --name turborepo -v {repo_folder}:/home/node/app --user 1000:1000 turborepo-image sh -c "pnpm i" subprocess.run([ "docker", "run", "--rm", diff --git a/sdk/graphql-transport/src/mappers/transaction-block.ts b/sdk/graphql-transport/src/mappers/transaction-block.ts index f722709dc7e..504f70cea89 100644 --- a/sdk/graphql-transport/src/mappers/transaction-block.ts +++ b/sdk/graphql-transport/src/mappers/transaction-block.ts @@ -178,10 +178,10 @@ export function mapTransactionBlockToInput( ): IotaTransactionBlock | null { const txData = data.intentMessage.value.V1; - const programableTransaction = + const programmableTransaction = 'ProgrammableTransaction' in txData.kind ? txData.kind.ProgrammableTransaction : null; - if (!programableTransaction) { + if (!programmableTransaction) { return null; } @@ -200,18 +200,18 @@ export function mapTransactionBlockToInput( }, messageVersion: 'v1', sender: txData.sender, - transaction: mapProgramableTransaction(programableTransaction), + transaction: mapProgrammableTransaction(programmableTransaction), }, }; } -export function mapProgramableTransaction( - programableTransaction: typeof bcs.ProgrammableTransaction.$inferType, +export function mapProgrammableTransaction( + programmableTransaction: typeof bcs.ProgrammableTransaction.$inferType, ): IotaTransactionBlockKind { return { - inputs: programableTransaction.inputs.map(mapTransactionInput), + inputs: programmableTransaction.inputs.map(mapTransactionInput), kind: 'ProgrammableTransaction', - transactions: programableTransaction.commands.map(mapTransaction), + transactions: programmableTransaction.commands.map(mapTransaction), }; } @@ -353,7 +353,7 @@ const ADDRESS_ZERO = normalizeIotaAddress('0x0'); export function mapEffects(data: string): IotaTransactionBlockResponse['effects'] { const effects = bcs.TransactionEffects.parse(fromB64(data)); - type InferedOwner = Exclude<(typeof ObjectOut)['$inferType']['ObjectWrite'], undefined>[1]; + type InferredOwner = Exclude<(typeof ObjectOut)['$inferType']['ObjectWrite'], undefined>[1]; const sharedObjects = effects.V1.unchangedSharedObjects.map(([id, sharedObject]) => { switch (sharedObject.$kind) { @@ -421,7 +421,7 @@ export function mapEffects(data: string): IotaTransactionBlockResponse['effects' ] as const), ); - const mutated: Array<[IotaObjectRef, InferedOwner]> = effects.V1.changedObjects + const mutated: Array<[IotaObjectRef, InferredOwner]> = effects.V1.changedObjects .filter( ([_id, change]) => change.inputState.Exist && @@ -444,7 +444,7 @@ export function mapEffects(data: string): IotaTransactionBlockResponse['effects' : { $kind: 'Immutable', Immutable: true }, ]); - const unwrapped: Array<[IotaObjectRef, InferedOwner]> = effects.V1.changedObjects + const unwrapped: Array<[IotaObjectRef, InferredOwner]> = effects.V1.changedObjects .filter( ([_id, change]) => change.inputState.NotExist && @@ -502,7 +502,7 @@ export function mapEffects(data: string): IotaTransactionBlockResponse['effects' ? effects.V1.changedObjects[effects.V1.gasObjectIndex] : null; - const gasObject: [IotaObjectRef, InferedOwner] = gasObjectFromV1 + const gasObject: [IotaObjectRef, InferredOwner] = gasObjectFromV1 ? [ { objectId: gasObjectFromV1[0], @@ -555,7 +555,7 @@ export function mapEffects(data: string): IotaTransactionBlockResponse['effects' : { mutated: mutated.map(([reference, owner]) => ({ reference, - owner: mapEffectsOwner(owner as InferedOwner), + owner: mapEffectsOwner(owner as InferredOwner), })), }), ...(unwrapped.length === 0 @@ -566,7 +566,7 @@ export function mapEffects(data: string): IotaTransactionBlockResponse['effects' ? undefined : unwrapped.map(([reference, owner]) => ({ reference, - owner: mapEffectsOwner(owner as InferedOwner), + owner: mapEffectsOwner(owner as InferredOwner), })), }), ...(deleted.length === 0 ? {} : { deleted: deleted }), @@ -582,7 +582,7 @@ export function mapEffects(data: string): IotaTransactionBlockResponse['effects' dependencies: effects.V1.dependencies, }; - function mapEffectsOwner(owner: NonNullable) { + function mapEffectsOwner(owner: NonNullable) { if (owner.Immutable) { return 'Immutable'; } else if (owner.Shared) { diff --git a/sdk/graphql-transport/test/compatability.test.ts b/sdk/graphql-transport/test/compatibility.test.ts similarity index 100% rename from sdk/graphql-transport/test/compatability.test.ts rename to sdk/graphql-transport/test/compatibility.test.ts diff --git a/sdk/typescript/test/e2e/data/demo-bear/sources/demo_bear.move b/sdk/typescript/test/e2e/data/demo-bear/sources/demo_bear.move index 8ed765ab1d8..7510e3b4b80 100644 --- a/sdk/typescript/test/e2e/data/demo-bear/sources/demo_bear.move +++ b/sdk/typescript/test/e2e/data/demo-bear/sources/demo_bear.move @@ -17,7 +17,7 @@ module demo::demo_bear { /// our OTW to create display. public struct DEMO_BEAR has drop {} - // It's recommened to create Display using PTBs instead of + // It's recommended to create Display using PTBs instead of // directly on the contracts. // We are only creating it here for demo purposes (one-step setup). fun init(otw: DEMO_BEAR, ctx: &mut TxContext){ From a51d98aaec95b986b5b6f7996d479a4a4561b4d8 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 28 Jan 2025 14:34:21 -0500 Subject: [PATCH 02/13] more fixes --- .typos.toml | 52 ++++++++++++++-------------- crates/iota/src/client_ptb/parser.rs | 6 ++-- scripts/bench_sweep.py | 4 +-- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.typos.toml b/.typos.toml index 96bdbe59dc3..a79f1e0e7fb 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,39 +1,28 @@ [default] extend-ignore-identifiers-re = [ - # Digests - "[a-zA-Z0-9]{43}?", - # Identifiers - "[a-zA-Z0-9]{44}?", - # Base64 - "[a-zA-Z0-9_]{47}?" + # Short git hashes + "[a-z0-9]{7}?", + # Digests + "[a-zA-Z0-9]{43}?", + # Identifiers + "[a-zA-Z0-9]{44}?", + # Base64 + "[a-zA-Z0-9_]{47}?", ] +# Truncated hex IDs (ex. "0x9...a9b") +extend-ignore-re = ["0x[a-z0-9]\\.{3}[a-z0-9]{3}"] + +[type.hex-move] +extend-glob = ["hex.move"] +extend-words = { ba = "ba" } [default.extend-words] -# accepted plurals -froms = "froms" -alls = "alls" -somes = "somes" # ordinal numbers (2nd, ...) nd = "nd" # random identifiers, variables, functions, ... -bttr = "bttr" -dbe = "dbe" -thr = "thr" -fo = "fo" -BA = "BA" -DAA = "DAA" -UE = "UE" tto = "tto" ser = "ser" -pn = "pn" -noo = "noo" -Ot = "Ot" -Hel = "Hel" -numer = "numer" -ratatui = "ratatui" groth = "groth" -strat = "strat" -mistic = "mistic" transferer = "transferrer" checkpoitn = "checkpoint" # Identity @@ -43,5 +32,16 @@ assing = "assing" tring = "tring" Thi = "Thi" +[default.extend-identifiers] +numer = "numer" + [files] -extend-exclude = ["pnpm-lock.yaml", "external-crates/*", "*.snap", "*.exp", "config-patch"] +extend-exclude = [ + "pnpm-lock.yaml", + "external-crates/*", + "*.snap", + "*.exp", + "config-patch", + "*.patch", + "*.svg", +] diff --git a/crates/iota/src/client_ptb/parser.rs b/crates/iota/src/client_ptb/parser.rs index f4b8d024eda..0ea6c75b0d3 100644 --- a/crates/iota/src/client_ptb/parser.rs +++ b/crates/iota/src/client_ptb/parser.rs @@ -268,11 +268,11 @@ impl<'a, I: Iterator> ProgramParser<'a, I> { /// Parse a transfer-objects command. /// The expected format is: `--transfer-objects [, ...] ` fn parse_transfer_objects(&mut self) -> PTBResult> { - let transfer_froms = self.parse_array()?; + let transfer_from = self.parse_array()?; let transfer_to = self.parse_argument()?; - let sp = transfer_to.span.widen(transfer_froms.span); + let sp = transfer_to.span.widen(transfer_from.span); Ok(sp.wrap(ParsedPTBCommand::TransferObjects( - transfer_froms, + transfer_from, transfer_to, ))) } diff --git a/scripts/bench_sweep.py b/scripts/bench_sweep.py index ff07522d579..fc7df2a8a24 100644 --- a/scripts/bench_sweep.py +++ b/scripts/bench_sweep.py @@ -39,8 +39,8 @@ def plot(vals): chunk_size = 200 * (i+1) period_us = 1000 num_chunks = 10 - thr = chunk_size*1000*1000/period_us + throughput = chunk_size*1000*1000/period_us avg_lat_ms = get_avg_latency(period_us, chunk_size, num_chunks)/1000 - lats.append((thr, avg_lat_ms)) + lats.append((throughput, avg_lat_ms)) sleep(1) plot(lats) From e5f6d7e763c8a68a22b51ec6c99970105fa50c66 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 28 Jan 2025 15:35:04 -0500 Subject: [PATCH 03/13] fmt --- consensus/core/src/commit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/core/src/commit.rs b/consensus/core/src/commit.rs index 0ed9ea975c4..d60e8e00575 100644 --- a/consensus/core/src/commit.rs +++ b/consensus/core/src/commit.rs @@ -31,8 +31,8 @@ pub(crate) const GENESIS_COMMIT_INDEX: CommitIndex = 0; /// chance of committing the leader under asynchrony at the cost of latency in /// the common case. // TODO: merge DEFAULT_WAVE_LENGTH and MINIMUM_WAVE_LENGTH into a single -// constant, because we are unlikely to change them via config in the foreseeable -// future. +// constant, because we are unlikely to change them via config in the +// foreseeable future. pub(crate) const DEFAULT_WAVE_LENGTH: Round = MINIMUM_WAVE_LENGTH; /// We need at least one leader round, one voting round, and one decision round. From e21c1fb74a59b44e5c14b5768caca1cac65d5bfb Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 28 Jan 2025 16:24:13 -0500 Subject: [PATCH 04/13] tweaks --- .typos.toml | 16 ++++++++++++---- bridge/evm/test/BridgeConfigTest.t.sol | 2 +- bridge/evm/test/BridgeLimiterTest.t.sol | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.typos.toml b/.typos.toml index a79f1e0e7fb..a09aa41c9a0 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,13 +1,17 @@ [default] extend-ignore-identifiers-re = [ # Short git hashes - "[a-z0-9]{7}?", + "^[a-z0-9]{7}$", # Digests - "[a-zA-Z0-9]{43}?", + "^[a-zA-Z0-9]{43}$", # Identifiers - "[a-zA-Z0-9]{44}?", + "^[a-zA-Z0-9]{44}$", # Base64 - "[a-zA-Z0-9_]{47}?", + "^[a-zA-Z0-9_]{47}$", + # Base64 + "^[a-zA-Z0-9]{49}$", + # Long hex strings + "^[a-zA-Z0-9]{56,}$", ] # Truncated hex IDs (ex. "0x9...a9b") extend-ignore-re = ["0x[a-z0-9]\\.{3}[a-z0-9]{3}"] @@ -16,6 +20,10 @@ extend-ignore-re = ["0x[a-z0-9]\\.{3}[a-z0-9]{3}"] extend-glob = ["hex.move"] extend-words = { ba = "ba" } +[type.pg] +extend-glob = ["pg.rs"] +extend-words = { ba = "ba" } + [default.extend-words] # ordinal numbers (2nd, ...) nd = "nd" diff --git a/bridge/evm/test/BridgeConfigTest.t.sol b/bridge/evm/test/BridgeConfigTest.t.sol index f87d64c5c76..d3006d2143d 100644 --- a/bridge/evm/test/BridgeConfigTest.t.sol +++ b/bridge/evm/test/BridgeConfigTest.t.sol @@ -329,7 +329,7 @@ contract BridgeConfigTest is BridgeBaseTest { } // An e2e update token price regression test covering message ser/de and signature verification - function testUpdateTokenPriceRegressionTestWithSigVerficiation() public { + function testUpdateTokenPriceRegressionTestWithSigVerification() public { address[] memory _committee = new address[](4); _committee[0] = 0x68B43fD906C0B8F024a18C56e06744F7c6157c65; _committee[1] = 0xaCAEf39832CB995c4E049437A3E2eC6a7bad1Ab5; diff --git a/bridge/evm/test/BridgeLimiterTest.t.sol b/bridge/evm/test/BridgeLimiterTest.t.sol index f0e5f18d57e..106f248e9b1 100644 --- a/bridge/evm/test/BridgeLimiterTest.t.sol +++ b/bridge/evm/test/BridgeLimiterTest.t.sol @@ -279,7 +279,7 @@ contract BridgeLimiterTest is BridgeBaseTest { } // An e2e update limit regression test covering message ser/de and signature verification - function testUpdateLimitRegressionTestWithSigVerficiation() public { + function testUpdateLimitRegressionTestWithSigVerification() public { address[] memory _committee = new address[](4); uint16[] memory _stake = new uint16[](4); uint8 chainID = 11; From b522f1841f1134321fa64bccc904122b0c718274 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 28 Jan 2025 16:28:47 -0500 Subject: [PATCH 05/13] actual hex --- .typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index a09aa41c9a0..20274446199 100644 --- a/.typos.toml +++ b/.typos.toml @@ -14,7 +14,7 @@ extend-ignore-identifiers-re = [ "^[a-zA-Z0-9]{56,}$", ] # Truncated hex IDs (ex. "0x9...a9b") -extend-ignore-re = ["0x[a-z0-9]\\.{3}[a-z0-9]{3}"] +extend-ignore-re = ["0x[a-f0-9]\\.{3}[a-f0-9]{3}"] [type.hex-move] extend-glob = ["hex.move"] From 7a2d5cc8cb583adf82a11cb71262e0e9fa55333f Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 28 Jan 2025 16:34:01 -0500 Subject: [PATCH 06/13] hex again --- .typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 20274446199..5d2fde5ce56 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,7 +1,7 @@ [default] extend-ignore-identifiers-re = [ # Short git hashes - "^[a-z0-9]{7}$", + "^[a-f0-9]{7}$", # Digests "^[a-zA-Z0-9]{43}$", # Identifiers From 8a4fa032fe79c02071d9cc070dfadf2ed4bf5b7c Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Wed, 29 Jan 2025 08:07:37 -0500 Subject: [PATCH 07/13] :triumph: --- .typos.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.typos.toml b/.typos.toml index 5d2fde5ce56..35b565665a2 100644 --- a/.typos.toml +++ b/.typos.toml @@ -10,7 +10,7 @@ extend-ignore-identifiers-re = [ "^[a-zA-Z0-9_]{47}$", # Base64 "^[a-zA-Z0-9]{49}$", - # Long hex strings + # Long keys and such "^[a-zA-Z0-9]{56,}$", ] # Truncated hex IDs (ex. "0x9...a9b") From 76e1b80baf9c432918e75dd32eec8583caca781c Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Wed, 29 Jan 2025 09:13:40 -0500 Subject: [PATCH 08/13] fix exp files --- .typos.toml | 1 - ...y_value_shared_object_deletion_via_make_move_vec_fails.exp | 2 +- .../shared/by_value_shared_object_deletion_via_merge.exp | 2 +- .../by_value_shared_object_deletion_via_merge_fails.exp | 4 ++-- .../by_value_shared_object_deletion_via_move_call_fails.exp | 2 +- ...ed_id_limits_tests.exp => transferred_id_limits_tests.exp} | 0 6 files changed, 5 insertions(+), 6 deletions(-) rename crates/iota-adapter-transactional-tests/tests/size_limits/{transfered_id_limits_tests.exp => transferred_id_limits_tests.exp} (100%) diff --git a/.typos.toml b/.typos.toml index 35b565665a2..11b79fc8a65 100644 --- a/.typos.toml +++ b/.typos.toml @@ -48,7 +48,6 @@ extend-exclude = [ "pnpm-lock.yaml", "external-crates/*", "*.snap", - "*.exp", "config-patch", "*.patch", "*.svg", diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp index 52bbddf17b8..81c5dc05eb1 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp @@ -105,7 +105,7 @@ task 13, lines 147-152: //# programmable --inputs object(2,0) object(3,0) //> 0: MakeMoveVec([Input(1)]); //> 1: t2::o2::pop_it(Result(0)); -//> 2: t2::o2::transferer(Result(1)); +//> 2: t2::o2::transferrer(Result(1)); // Make MoveVec pop and return it, then try to transfer it with PT transfer Error: Transaction Effects Status: The shared object operation is not allowed. Debug of error: SharedObjectOperationNotAllowed at command None diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp index 783f63f639b..41f2debccf9 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp @@ -54,7 +54,7 @@ Contents: iota::coin::Coin { task 6, lines 73-77: //# programmable --sender A --inputs object(2,0) object(3,0) //> 0: MergeCoins(Input(1), [Input(0)]); -//> 1: t2::o2::transferer(Input(1)); +//> 1: t2::o2::transferrer(Input(1)); // **Merge owned into shared** mutated: object(0,0), object(3,0) deleted: object(2,0) diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp index 9fa33541d90..2a7a1be3e3b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp @@ -96,7 +96,7 @@ Debug of error: SharedObjectOperationNotAllowed at command None task 11, lines 93-97: //# programmable --sender A --inputs object(2,0) object(3,0) object(4,0) //> 0: MergeCoins(Input(1), [Input(0)]); -//> 1: t2::o2::transferer(Input(1)); +//> 1: t2::o2::transferrer(Input(1)); // Merge and then try to transfer it with PTB transfer Error: Transaction Effects Status: The shared object operation is not allowed. Debug of error: SharedObjectOperationNotAllowed at command None @@ -196,7 +196,7 @@ Debug of error: SharedObjectOperationNotAllowed at command None task 22, lines 132-136: //# programmable --sender A --inputs object(13,0) object(14,0) object(15,0) //> 0: MergeCoins(Input(1), [Input(0)]); -//> 1: t2::o2::transferer(Input(1)); +//> 1: t2::o2::transferrer(Input(1)); // Merge and then try to transfer it with PTB transfer Error: Transaction Effects Status: The shared object operation is not allowed. Debug of error: SharedObjectOperationNotAllowed at command None diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp index 4a3ac54f5a9..f7aa4d6696b 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp @@ -69,7 +69,7 @@ Debug of error: SharedObjectOperationNotAllowed at command None task 9, lines 84-86: //# programmable --inputs object(2,0) object(3,0) //> 0: t2::o2::id(Input(1)); -//> 1: t2::o2::transferer(Result(0)); +//> 1: t2::o2::transferrer(Result(0)); Error: Transaction Effects Status: The shared object operation is not allowed. Debug of error: SharedObjectOperationNotAllowed at command None diff --git a/crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.exp b/crates/iota-adapter-transactional-tests/tests/size_limits/transferred_id_limits_tests.exp similarity index 100% rename from crates/iota-adapter-transactional-tests/tests/size_limits/transfered_id_limits_tests.exp rename to crates/iota-adapter-transactional-tests/tests/size_limits/transferred_id_limits_tests.exp From e95f434de05416f6ae5226585058125f193a5724 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Wed, 29 Jan 2025 09:28:43 -0500 Subject: [PATCH 09/13] fix one more --- .../developer/getting-started/simple-token-transfer.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/developer/getting-started/simple-token-transfer.mdx b/docs/content/developer/getting-started/simple-token-transfer.mdx index b43da6b2162..71847ea3be6 100644 --- a/docs/content/developer/getting-started/simple-token-transfer.mdx +++ b/docs/content/developer/getting-started/simple-token-transfer.mdx @@ -458,7 +458,7 @@ The minted amount will be displayed in the balance changes section of the wallet Once you approve the mint transaction, an alert will appear indicating 'Transaction Successful'. -![Transaction successfull](/img/developer/getting-started/token-transfer/transaction-successful.png) +![Transaction successful](/img/developer/getting-started/token-transfer/transaction-successful.png) ### Wallet Check @@ -474,4 +474,4 @@ Click on the `Check balance` button to check the token balance. ## Conclusion -With this setup, you’ve created a straightforward yet robust frontend application using the IOTA dApp kit. The components provided by the dApp kit enable you to effortlessly perform token-related tasks, such as transferring tokens and querying contract data, with smooth integration to the IOTA blockchain. This setup lays a strong foundation for expanding and customizing your dApp to meet your specific requirements. By completing these steps, you’ve successfully linked your frontend to the smart contract, resulting in a fully functional dApp that interacts seamlessly with the blockchain. \ No newline at end of file +With this setup, you’ve created a straightforward yet robust frontend application using the IOTA dApp kit. The components provided by the dApp kit enable you to effortlessly perform token-related tasks, such as transferring tokens and querying contract data, with smooth integration to the IOTA blockchain. This setup lays a strong foundation for expanding and customizing your dApp to meet your specific requirements. By completing these steps, you’ve successfully linked your frontend to the smart contract, resulting in a fully functional dApp that interacts seamlessly with the blockchain. From 09c3bd8b06519fd766858a0093ca6b23139061c7 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Thu, 30 Jan 2025 10:04:20 -0500 Subject: [PATCH 10/13] new typos --- apps/wallet-dashboard/lib/utils/analytics/ampli/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/wallet-dashboard/lib/utils/analytics/ampli/index.ts b/apps/wallet-dashboard/lib/utils/analytics/ampli/index.ts index fa637ca6b53..36b6404f850 100644 --- a/apps/wallet-dashboard/lib/utils/analytics/ampli/index.ts +++ b/apps/wallet-dashboard/lib/utils/analytics/ampli/index.ts @@ -302,7 +302,7 @@ export class Ampli { this.disabled = options.disabled ?? false; if (this.amplitude) { - console.warn('WARNING: Ampli is already intialized. Ampli.load() should be called once at application startup.'); + console.warn('WARNING: Ampli is already initialized. Ampli.load() should be called once at application startup.'); return getVoidPromiseResult(); } From a44ecff1b53e2a2d5deb97907949a581dee0e281 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Thu, 30 Jan 2025 11:02:39 -0500 Subject: [PATCH 11/13] Update tests --- .../by_value_shared_object_deletion_via_make_move_vec_fails.exp | 2 +- .../tests/shared/by_value_shared_object_deletion_via_merge.exp | 2 +- .../shared/by_value_shared_object_deletion_via_merge_fails.exp | 2 +- .../by_value_shared_object_deletion_via_move_call_fails.exp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp index 81c5dc05eb1..eab39301104 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_make_move_vec_fails.exp @@ -4,7 +4,7 @@ task 1, lines 7-98: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10951600, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 10959200, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 100: //# run t2::o2::create diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp index 41f2debccf9..0fd1caba2e2 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge.exp @@ -7,7 +7,7 @@ task 1, lines 14-61: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9272000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9279600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 63: //# run t2::o2::mint_shared_coin diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp index 2a7a1be3e3b..ffc11e18e11 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_merge_fails.exp @@ -7,7 +7,7 @@ task 1, lines 14-63: //# publish created: object(1,0) mutated: object(0,1) -gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9272000, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 9279600, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 65: //# run t2::o2::mint_owned_coin diff --git a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp index f7aa4d6696b..870f5c13764 100644 --- a/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp +++ b/crates/iota-adapter-transactional-tests/tests/shared/by_value_shared_object_deletion_via_move_call_fails.exp @@ -4,7 +4,7 @@ task 1, lines 7-58: //# publish created: object(1,0) mutated: object(0,0) -gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8876800, storage_rebate: 0, non_refundable_storage_fee: 0 +gas summary: computation_cost: 1000000, computation_cost_burned: 1000000, storage_cost: 8884400, storage_rebate: 0, non_refundable_storage_fee: 0 task 2, line 60: //# run t2::o2::create From 080c6a8e7e8e0c6bb785c50fc22cc55f0517989e Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 4 Feb 2025 11:55:09 -0500 Subject: [PATCH 12/13] review --- .typos.toml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.typos.toml b/.typos.toml index 11b79fc8a65..466465eaa28 100644 --- a/.typos.toml +++ b/.typos.toml @@ -2,16 +2,12 @@ extend-ignore-identifiers-re = [ # Short git hashes "^[a-f0-9]{7}$", - # Digests - "^[a-zA-Z0-9]{43}$", - # Identifiers - "^[a-zA-Z0-9]{44}$", # Base64 + "^[a-zA-Z0-9_]{43}$", + "^[a-zA-Z0-9_]{44}$", "^[a-zA-Z0-9_]{47}$", - # Base64 - "^[a-zA-Z0-9]{49}$", - # Long keys and such - "^[a-zA-Z0-9]{56,}$", + "^[a-zA-Z0-9_]{49}$", + "^[a-zA-Z0-9_]{56,}$", ] # Truncated hex IDs (ex. "0x9...a9b") extend-ignore-re = ["0x[a-f0-9]\\.{3}[a-f0-9]{3}"] @@ -20,10 +16,6 @@ extend-ignore-re = ["0x[a-f0-9]\\.{3}[a-f0-9]{3}"] extend-glob = ["hex.move"] extend-words = { ba = "ba" } -[type.pg] -extend-glob = ["pg.rs"] -extend-words = { ba = "ba" } - [default.extend-words] # ordinal numbers (2nd, ...) nd = "nd" @@ -31,14 +23,15 @@ nd = "nd" tto = "tto" ser = "ser" groth = "groth" -transferer = "transferrer" -checkpoitn = "checkpoint" # Identity AAS = "AAS" # actual typos purposely used in tests assing = "assing" tring = "tring" -Thi = "Thi" +# better suggestions for typos +transferer = "transferrer" +# not in the correction dictionary +checkpoitn = "checkpoint" [default.extend-identifiers] numer = "numer" @@ -47,7 +40,6 @@ numer = "numer" extend-exclude = [ "pnpm-lock.yaml", "external-crates/*", - "*.snap", "config-patch", "*.patch", "*.svg", From 70d721a2c0ce7dad77d904dec5478a61b30e6e64 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Wed, 5 Feb 2025 08:59:00 -0500 Subject: [PATCH 13/13] renames --- crates/iota/src/client_ptb/parser.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/crates/iota/src/client_ptb/parser.rs b/crates/iota/src/client_ptb/parser.rs index 0ea6c75b0d3..1f1be1e892b 100644 --- a/crates/iota/src/client_ptb/parser.rs +++ b/crates/iota/src/client_ptb/parser.rs @@ -268,13 +268,10 @@ impl<'a, I: Iterator> ProgramParser<'a, I> { /// Parse a transfer-objects command. /// The expected format is: `--transfer-objects [, ...] ` fn parse_transfer_objects(&mut self) -> PTBResult> { - let transfer_from = self.parse_array()?; - let transfer_to = self.parse_argument()?; - let sp = transfer_to.span.widen(transfer_from.span); - Ok(sp.wrap(ParsedPTBCommand::TransferObjects( - transfer_from, - transfer_to, - ))) + let objects = self.parse_array()?; + let to = self.parse_argument()?; + let sp = to.span.widen(objects.span); + Ok(sp.wrap(ParsedPTBCommand::TransferObjects(objects, to))) } /// Parse a split-coins command.