diff --git a/packages/abi/src.ts/fragments.ts b/packages/abi/src.ts/fragments.ts index 1794c729a..802a2a963 100644 --- a/packages/abi/src.ts/fragments.ts +++ b/packages/abi/src.ts/fragments.ts @@ -239,7 +239,7 @@ export const FormatTypes: { [ name: string ]: string } = Object.freeze({ // Human-Readable with Minimal spacing and without names (compact human-readable) minimal: "minimal", - // Human-Readble with nice spacing, including all names + // Human-Readable with nice spacing, including all names full: "full", // JSON-format a la Solidity @@ -306,7 +306,7 @@ export class ParamType { // Format the parameter fragment // - sighash: "(uint256,address)" // - minimal: "tuple(uint256,address) indexed" - // - full: "tuple(uint256 foo, addres bar) indexed baz" + // - full: "tuple(uint256 foo, address bar) indexed baz" format(format?: string): string { if (!format) { format = FormatTypes.sighash; } if (!FormatTypes[format]) { diff --git a/packages/abi/src.ts/interface.ts b/packages/abi/src.ts/interface.ts index 664838845..c019e331d 100644 --- a/packages/abi/src.ts/interface.ts +++ b/packages/abi/src.ts/interface.ts @@ -215,7 +215,7 @@ export class Interface { return this.functions[matching[0]]; } - // Normlize the signature and lookup the function + // Normalize the signature and lookup the function const result = this.functions[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; if (!result) { logger.throwArgumentError("no matching function", "signature", nameOrSignatureOrSighash); @@ -248,7 +248,7 @@ export class Interface { return this.events[matching[0]]; } - // Normlize the signature and lookup the function + // Normalize the signature and lookup the function const result = this.events[EventFragment.fromString(nameOrSignatureOrTopic).format()]; if (!result) { logger.throwArgumentError("no matching event", "signature", nameOrSignatureOrTopic); @@ -282,7 +282,7 @@ export class Interface { return this.errors[matching[0]]; } - // Normlize the signature and lookup the function + // Normalize the signature and lookup the function const result = this.errors[FunctionFragment.fromString(nameOrSignatureOrSighash).format()]; if (!result) { logger.throwArgumentError("no matching error", "signature", nameOrSignatureOrSighash); @@ -521,7 +521,7 @@ export class Interface { } else if (param.type === "bytes") { topics.push(keccak256(value)) } else if (param.baseType === "tuple" || param.baseType === "array") { - // @TOOD + // @TODO throw new Error("not implemented"); } else { topics.push(this._abiCoder.encode([ param.type] , [ value ])); @@ -658,7 +658,7 @@ export class Interface { // @TODO: If anonymous, and the only method, and the input count matches, should we parse? // Probably not, because just because it is the only event in the ABI does - // not mean we have the full ABI; maybe jsut a fragment? + // not mean we have the full ABI; maybe just a fragment? return new LogDescription({ diff --git a/packages/abstract-signer/src.ts/index.ts b/packages/abstract-signer/src.ts/index.ts index 56431ceb6..47c598867 100644 --- a/packages/abstract-signer/src.ts/index.ts +++ b/packages/abstract-signer/src.ts/index.ts @@ -49,7 +49,7 @@ export interface ExternallyOwnedAccount { // key or mnemonic) in a function, so that console.log does not leak // the data -// @TODO: This is a temporary measure to preserse backwards compatibility +// @TODO: This is a temporary measure to preserve backwards compatibility // In v6, the method on TypedDataSigner will be added to Signer export interface TypedDataSigner { _signTypedData(domain: TypedDataDomain, types: Record>, value: Record): Promise; @@ -70,7 +70,7 @@ export abstract class Signer { // i.e. "0x1234" is a SIX (6) byte string, NOT 2 bytes of data abstract signMessage(message: Bytes | string): Promise; - // Signs a transaxction and returns the fully serialized, signed transaction. + // Signs a transaction and returns the fully serialized, signed transaction. // The EXACT transaction MUST be signed, and NO additional properties to be added. // - This MAY throw if signing transactions is not supports, but if // it does, sentTransaction MUST be overridden. @@ -104,14 +104,14 @@ export abstract class Signer { return await this.provider.getTransactionCount(this.getAddress(), blockTag); } - // Populates "from" if unspecified, and estimates the gas for the transation + // Populates "from" if unspecified, and estimates the gas for the transaction async estimateGas(transaction: Deferrable): Promise { this._checkProvider("estimateGas"); const tx = await resolveProperties(this.checkTransaction(transaction)); return await this.provider.estimateGas(tx); } - // Populates "from" if unspecified, and calls with the transation + // Populates "from" if unspecified, and calls with the transaction async call(transaction: Deferrable, blockTag?: BlockTag): Promise { this._checkProvider("call"); const tx = await resolveProperties(this.checkTransaction(transaction)); @@ -212,7 +212,7 @@ export abstract class Signer { tx.to.catch((error) => { }); } - // Do not allow mixing pre-eip-1559 and eip-1559 proerties + // Do not allow mixing pre-eip-1559 and eip-1559 properties const hasEip1559 = (tx.maxFeePerGas != null || tx.maxPriorityFeePerGas != null); if (tx.gasPrice != null && (tx.type === 2 || hasEip1559)) { logger.throwArgumentError("eip-1559 transaction do not support gasPrice", "transaction", transaction); diff --git a/packages/asm/src.ts/assembler.ts b/packages/asm/src.ts/assembler.ts index ef9872080..9f885ee15 100644 --- a/packages/asm/src.ts/assembler.ts +++ b/packages/asm/src.ts/assembler.ts @@ -312,7 +312,7 @@ export class LinkNode extends ValueNode { } if (value == null) { - throwError("labels can only be targetted as offsets", this.location); + throwError("labels can only be targeted as offsets", this.location); } if (isOffset && assembler.positionIndependentCode) { @@ -975,7 +975,7 @@ class SemanticChecker extends Assembler { if (node.location.statement) { if (node instanceof PopNode) { - // $$ by istelf is useless and is intended to be an operand + // $$ by itself is useless and is intended to be an operand errors.push({ message: `$$ must be an operand`, severity: SemanticErrorSeverity.error, @@ -1079,7 +1079,7 @@ class CodeGenerationAssembler extends Assembler { return this._changed; } - // Reset the assmebler for another run with updated values + // Reset the assembler for another run with updated values reset(): void { this._changed = false; this._objectCache = { }; @@ -1172,7 +1172,7 @@ class CodeGenerationAssembler extends Assembler { // This is used by evaluate to access properties in JavaScript // - "defines" allow meta-programming values to be used // - jump destinations are available as numbers - // - bytecode and data are available as an immuatble DataSource + // - bytecode and data are available as an immutable DataSource get(name: string, source: Node): any { if (name === "defines") { return this.defines; @@ -1277,8 +1277,8 @@ type _Location = { export function parse(code: string, options?: ParserOptions): Node { if (options == null) { options = { }; } - // Since jison allows \n, \r or \r\n line endings, we need some - // twekaing to get the correct position + // Since Jison allows \n, \r or \r\n line endings, we need some + // tweaking to get the correct position const lines: Array<{ line: string, offset: number }> = [ ]; let offset = 0; code.split(/(\r\n?|\n)/g).forEach((clump, index) => { diff --git a/packages/bignumber/src.ts/bignumber.ts b/packages/bignumber/src.ts/bignumber.ts index 1255f921a..656018909 100644 --- a/packages/bignumber/src.ts/bignumber.ts +++ b/packages/bignumber/src.ts/bignumber.ts @@ -264,7 +264,7 @@ export class BigNumber implements Hexable { if (anyValue) { - // Hexable interface (takes piority) + // Hexable interface (takes priority) if (anyValue.toHexString) { const hex = anyValue.toHexString(); if (typeof(hex) === "string") { @@ -309,7 +309,7 @@ function toHex(value: string | BN): string { // Strip off the negative sign value = value.substring(1); - // Cannot have mulitple negative signs (e.g. "--0x04") + // Cannot have multiple negative signs (e.g. "--0x04") if (value[0] === "-") { logger.throwArgumentError("invalid hex", "value", value); } // Call toHex on the positive component diff --git a/packages/cli/src.ts/prompt.ts b/packages/cli/src.ts/prompt.ts index 87e4db179..0a8adb10b 100644 --- a/packages/cli/src.ts/prompt.ts +++ b/packages/cli/src.ts/prompt.ts @@ -78,7 +78,7 @@ function _getPrompt(prompt: string, options: PromptOptions, callback: (ctrlC: bo respond(null, chr); } } else { - // More passsword characters + // More password characters if (options.mask) { process.stdout.write('*'); } else { diff --git a/packages/contracts/src.ts/index.ts b/packages/contracts/src.ts/index.ts index ecbaac292..072bbbb4e 100644 --- a/packages/contracts/src.ts/index.ts +++ b/packages/contracts/src.ts/index.ts @@ -231,7 +231,7 @@ async function populateTransaction(contract: Contract, fragment: FunctionFragmen // If there was no "gasLimit" override, but the ABI specifies a default, use it if (tx.gasLimit == null && fragment.gas != null) { - // Conmpute the intrinisic gas cost for this transaction + // Compute the intrinsic gas cost for this transaction // @TODO: This is based on the yellow paper as of Petersburg; this is something // we may wish to parameterize in v6 as part of the Network object. Since this // is always a non-nil to address, we can ignore G_create, but may wish to add @@ -257,7 +257,7 @@ async function populateTransaction(contract: Contract, fragment: FunctionFragmen tx.value = roValue; } - // Remvoe the overrides + // Remove the overrides delete overrides.nonce; delete overrides.gasLimit; delete overrides.gasPrice; @@ -354,7 +354,7 @@ function buildSend(contract: Contract, fragment: FunctionFragment): ContractFunc }) } - // If the contract was just deployed, wait until it is minded + // If the contract was just deployed, wait until it is mined if (contract.deployTransaction != null) { await contract._deployed(); } @@ -363,7 +363,7 @@ function buildSend(contract: Contract, fragment: FunctionFragment): ContractFunc const tx = await contract.signer.sendTransaction(txRequest); - // Tweak the tw.wait so the receipt has extra properties + // Tweak the tx.wait so the receipt has extra properties const wait = tx.wait.bind(tx); tx.wait = (confirmations?: number) => { return wait(confirmations).then((receipt: ContractReceipt) => { @@ -501,7 +501,7 @@ class ErrorRunningEvent extends RunningEvent { // options to configure both. // A Fragment Event will populate all the properties that Wildcard -// will, and additioanlly dereference the arguments when emitting +// will, and additionally dereference the arguments when emitting class FragmentRunningEvent extends RunningEvent { readonly address: string; readonly interface: Interface; @@ -555,7 +555,7 @@ class FragmentRunningEvent extends RunningEvent { } } -// A Wildard Event will attempt to populate: +// A Wildcard Event will attempt to populate: // - event The name of the event name // - eventSignature The full signature of the event // - decode A function to decode data and topics @@ -618,7 +618,7 @@ export class BaseContract { _deployedPromise: Promise; - // A list of RunningEvents to track listsners for each event tag + // A list of RunningEvents to track listeners for each event tag _runningEvents: { [ eventTag: string ]: RunningEvent }; // Wrapped functions to call emit and allow deregistration from the provider @@ -1146,7 +1146,7 @@ export class ContractFactory { defineReadOnly(this, "signer", signer || null); } - // @TODO: Future; rename to populteTransaction? + // @TODO: Future; rename to populateTransaction? getDeployTransaction(...args: Array): TransactionRequest { let tx: TransactionRequest = { }; diff --git a/packages/experimental/src.ts/eip1193-bridge.ts b/packages/experimental/src.ts/eip1193-bridge.ts index b06f55a88..86e53350f 100644 --- a/packages/experimental/src.ts/eip1193-bridge.ts +++ b/packages/experimental/src.ts/eip1193-bridge.ts @@ -98,7 +98,7 @@ export class Eip1193Bridge extends EventEmitter { return result.toHexString(); } - // @TOOD: Transform? No uncles? + // @TODO: Transform? No uncles? case "eth_getBlockByHash": case "eth_getBlockByNumber": { if (params[1]) { diff --git a/packages/hdnode/src.ts/index.ts b/packages/hdnode/src.ts/index.ts index f3dba2551..2fb609d0c 100644 --- a/packages/hdnode/src.ts/index.ts +++ b/packages/hdnode/src.ts/index.ts @@ -142,7 +142,7 @@ export class HDNode implements ExternallyOwnedAccount { get extendedKey(): string { // We only support the mainnet values for now, but if anyone needs - // testnet values, let me know. I believe current senitment is that + // testnet values, let me know. I believe current sentiment is that // we should always use mainnet, and use BIP-44 to derive the network // - Mainnet: public=0x0488B21E, private=0x0488ADE4 // - Testnet: public=0x043587CF, private=0x04358394 diff --git a/packages/logger/src.ts/index.ts b/packages/logger/src.ts/index.ts index d1da3def1..87808ec61 100644 --- a/packages/logger/src.ts/index.ts +++ b/packages/logger/src.ts/index.ts @@ -123,7 +123,7 @@ export enum ErrorCode { // - reason: The reason (only for EIP848 "Error(string)") CALL_EXCEPTION = "CALL_EXCEPTION", - // Insufficien funds (< value + gasLimit * gasPrice) + // Insufficient funds (< value + gasLimit * gasPrice) // - transaction: the transaction attempted INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS", diff --git a/packages/providers/src.ts/base-provider.ts b/packages/providers/src.ts/base-provider.ts index 856051568..f73fed595 100644 --- a/packages/providers/src.ts/base-provider.ts +++ b/packages/providers/src.ts/base-provider.ts @@ -559,7 +559,7 @@ export class BaseProvider extends Provider implements EnsProvider { // This will always return the most recently established network. // For "any", this can change (a "network" event is emitted before - // any change is refelcted); otherwise this cannot change + // any change is reflected); otherwise this cannot change get ready(): Promise { return poll(() => { return this._ready().then((network) => { diff --git a/packages/providers/src.ts/etherscan-provider.ts b/packages/providers/src.ts/etherscan-provider.ts index 50f0fe664..4e8db11b8 100644 --- a/packages/providers/src.ts/etherscan-provider.ts +++ b/packages/providers/src.ts/etherscan-provider.ts @@ -417,7 +417,7 @@ export class EtherscanProvider extends BaseProvider{ } // Note: The `page` page parameter only allows pagination within the - // 10,000 window abailable without a page and offset parameter + // 10,000 window available without a page and offset parameter // Error: Result window is too large, PageNo x Offset size must // be less than or equal to 10000 async getHistory(addressOrName: string | Promise, startBlock?: BlockTag, endBlock?: BlockTag): Promise> { diff --git a/packages/providers/src.ts/fallback-provider.ts b/packages/providers/src.ts/fallback-provider.ts index 88fe62ac1..0931a6fa3 100644 --- a/packages/providers/src.ts/fallback-provider.ts +++ b/packages/providers/src.ts/fallback-provider.ts @@ -105,7 +105,7 @@ export interface FallbackProviderConfig { // this provider and if its result comes back before a quorum is reached // it will be incorporated into the vote // - lower values will cause more network traffic but may result in a - // faster retult. + // faster result. stallTimeout?: number; // How much this provider contributes to the quorum; sometimes a specific diff --git a/packages/providers/src.ts/formatter.ts b/packages/providers/src.ts/formatter.ts index 4801682ea..d83c7b457 100644 --- a/packages/providers/src.ts/formatter.ts +++ b/packages/providers/src.ts/formatter.ts @@ -249,7 +249,7 @@ export class Formatter { blockTag(blockTag: any): string { if (blockTag == null) { return "latest"; } - if (blockTag === "earliest") { return "0x0"; } + if (blockTag === "earliest") { return "0x0"; } if (blockTag === "latest" || blockTag === "pending") { return blockTag; diff --git a/packages/providers/src.ts/index.ts b/packages/providers/src.ts/index.ts index ed4ea09c5..914148c42 100644 --- a/packages/providers/src.ts/index.ts +++ b/packages/providers/src.ts/index.ts @@ -102,7 +102,7 @@ export { UrlJsonRpcProvider, /////////////////////// - // Concreate Providers + // Concrete Providers FallbackProvider, diff --git a/packages/providers/src.ts/pocket-provider.ts b/packages/providers/src.ts/pocket-provider.ts index 33c55706a..11993b5ff 100644 --- a/packages/providers/src.ts/pocket-provider.ts +++ b/packages/providers/src.ts/pocket-provider.ts @@ -10,7 +10,7 @@ const logger = new Logger(version); import { UrlJsonRpcProvider } from "./url-json-rpc-provider"; -// These are load-balancer-based applicatoin IDs +// These are load-balancer-based application IDs const defaultApplicationIds: Record = { homestead: "6004bcd10040261633ade990", ropsten: "6004bd4d0040261633ade991", diff --git a/packages/providers/src.ts/websocket-provider.ts b/packages/providers/src.ts/websocket-provider.ts index cfa82391c..d38817a77 100644 --- a/packages/providers/src.ts/websocket-provider.ts +++ b/packages/providers/src.ts/websocket-provider.ts @@ -20,7 +20,7 @@ const logger = new Logger(version); * will stall responses to ensure a consistent state, while this * WebSocket provider assumes the connected backend will manage this. * - * For example, if a polling provider emits an event which indicats + * For example, if a polling provider emits an event which indicates * the event occurred in blockhash XXX, a call to fetch that block by * its hash XXX, if not present will retry until it is present. This * can occur when querying a pool of nodes that are mildly out of sync diff --git a/packages/strings/src.ts/utf8.ts b/packages/strings/src.ts/utf8.ts index 00d1ded5e..2d52dec69 100644 --- a/packages/strings/src.ts/utf8.ts +++ b/packages/strings/src.ts/utf8.ts @@ -43,7 +43,7 @@ export enum Utf8ErrorReason { // - badCodepoint = the computed codepoint; inside the UTF-16 surrogate range UTF16_SURROGATE = "UTF-16 surrogate", - // The string is an overlong reperesentation + // The string is an overlong representation // - offset = start of this codepoint // - badCodepoint = the computed codepoint; already bounds checked OVERLONG = "overlong representation", @@ -171,7 +171,7 @@ function getUtf8CodePoints(bytes: BytesLike, onError?: Utf8ErrorFunc): Array(connection: string | ConnectionInfo, runningTimeout.cancel(); - // If we had a processFunc, it eitehr returned a T or threw above. + // If we had a processFunc, it either returned a T or threw above. // The "body" is now a Uint8Array. return (body); }