Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Oct 12, 2023
1 parent 8c8c0bf commit 50fc0e4
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { CombinedConstantData } from './combined_constant_data.js';
export class KernelCircuitPublicInputsFinal {
constructor(
/**
* Final data accumulated for ordering privated kernel circuit.
* Final data accumulated for ordering private kernel circuit.
*/
public end: FinalAccumulatedData,
/**
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/benchmarks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export async function waitNewPXESynced(
}

/**
* Retisters a new account in a pxe and waits until it's synced all its notes.
* Registers a new account in a pxe and waits until it's synced all its notes.
* @param pxe - PXE where to register the account.
* @param privateKey - Private key of the account to register.
* @param partialAddress - Partial address of the account to register.
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/canary/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const browserTestSuite = (setup: () => Server, pageLogger: AztecJs.DebugL
const completeAddress = window.AztecJs.CompleteAddress.fromString(
'0x115f123bbc6cc6af9890055821cfba23a7c4e8832377a32ccb719a1ba3a86483',
);
// NOTE: browser doesnt know how to serialize CompleteAddress for return, so return a string
// NOTE: browser does not know how to serialize CompleteAddress for return, so return a string
// otherwise returning a CompleteAddress makes result undefined.
return completeAddress.toString();
});
Expand Down
6 changes: 3 additions & 3 deletions yarn-project/end-to-end/src/e2e_card_game.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,9 @@ describe('e2e_card_game', () => {
{ address: secondPlayer, deck: secondPlayerGameDeck },
]);

const sotedByPoints = game.players.sort((a, b) => Number(b.points - a.points));
const winner = AztecAddress.fromBigInt(sotedByPoints[0].address);
const loser = AztecAddress.fromBigInt(sotedByPoints[1].address);
const sortedByPoints = game.players.sort((a, b) => Number(b.points - a.points));
const winner = AztecAddress.fromBigInt(sortedByPoints[0].address);
const loser = AztecAddress.fromBigInt(sortedByPoints[1].address);

await expect(
contractFor(loser).methods.claim_cards(GAME_ID, game.rounds_cards.map(cardToField)).send().wait(),
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/end-to-end/src/e2e_multi_transfer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ describe('multi-transfer payments', () => {
{
const amounts: bigint[] = [50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n, 50n];
const noteOffsets: bigint[] = [0n, 0n, 3n, 6n];
const repeatedSelfAdddress: AztecAddress[] = Array(12).fill(ownerAddress);
const repeatedSelfAddress: AztecAddress[] = Array(12).fill(ownerAddress);

await multiTransferContract.methods
.multiTransfer(zkTokenContract.address.toField(), repeatedSelfAdddress, amounts, ownerAddress, noteOffsets)
.multiTransfer(zkTokenContract.address.toField(), repeatedSelfAddress, amounts, ownerAddress, noteOffsets)
.send()
.wait({ timeout: 100 }); // mining timeout ≥ time needed for the test to finish.

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/ethereum/src/deploy_l1_contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export type DeployL1Contracts = {
*/
export interface ContractArtifacts {
/**
* The conttract abi.
* The contract abi.
*/
contractAbi: Narrow<Abi | readonly unknown[]>;
/**
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/foundation/src/eth-address/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class EthAddress {
// Does not have the basic requirements of an address.
return false;
} else if (/^(0x|0X)?[0-9a-f]{40}$/.test(address) || /^(0x|0X)?[0-9A-F]{40}$/.test(address)) {
// It's ALL lowercase or ALL upppercase.
// It's ALL lowercase or ALL uppercase.
return true;
} else {
return EthAddress.checkAddressChecksum(address);
Expand Down Expand Up @@ -227,7 +227,7 @@ export class EthAddress {
/**
* Deserializes from a buffer or reader, corresponding to a write in cpp.
* @param buffer - Buffer to read from.
* @returns The EthAdress.
* @returns The EthAddress.
*/
static fromBuffer(buffer: Buffer | BufferReader): EthAddress {
const reader = BufferReader.asReader(buffer);
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/fields/coordinate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Coordinate {
}

/**
* serializes the oblect to buffer of 2 fields.
* serializes the object to buffer of 2 fields.
* @returns A buffer serialization of the object.
*/
toFieldsBuffer(): Buffer {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/fields/point.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class Point {
}

/**
* Converts the Point instance to a Buffer representaion of the coordinates.
* Converts the Point instance to a Buffer representation of the coordinates.
* The outputs buffer length will be 64, the length of both coordinates not represented as fields.
* @returns A Buffer representation of the Point instance.
*/
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/fifo/bounded_serial_queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class BoundedSerialQueue {

/**
* The caller will block until fn is successfully enqueued.
* The fn itself is execute asyncronously and its result discarded.
* The fn itself is execute asynchronously and its result discarded.
* TODO(AD) do we need this if we have exec()?
* @param fn - The function to call once unblocked.
*/
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/json-rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ json-rpc
```

Each createJsonRpcClient and JsonRpcServer call needs a map of classes that will be translated in input and output values.
By default, Buffer is handled, but other usermade classes need to define toString() and static fromString() like so:
By default, Buffer is handled, but other user-made classes need to define toString() and static fromString() like so:

```
class PublicKey {
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/foundation/src/json-rpc/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function convertFromJsonObj(cc: ClassConverter, obj: any): any {
* @returns The encoded object.
*/
export function convertToJsonObj(cc: ClassConverter, obj: any): any {
// Bigint is a primitive type that needs special handling since it's not serialisable
// Bigint is a primitive type that needs special handling since it's not serializable
if (typeof obj === 'bigint') {
return {
type: 'bigint',
Expand Down

0 comments on commit 50fc0e4

Please sign in to comment.