Skip to content

Commit

Permalink
formatting:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Oct 21, 2023
1 parent df605be commit 5fe48c3
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 73 deletions.
2 changes: 1 addition & 1 deletion yarn-project/boxes/blank-react/src/artifacts/Blank.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
}
}
}
}
}
24 changes: 4 additions & 20 deletions yarn-project/boxes/blank-react/src/artifacts/Blank.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/* Autogenerated file, do not edit! */

/* eslint-disable */
Expand Down Expand Up @@ -28,58 +27,43 @@ export const BlankContractArtifact = BlankContractArtifactJson as ContractArtifa
* Type-safe interface for contract Blank;
*/
export class BlankContract extends ContractBase {

private constructor(
completeAddress: CompleteAddress,
wallet: Wallet,
portalContract = EthAddress.ZERO
) {
private constructor(completeAddress: CompleteAddress, wallet: Wallet, portalContract = EthAddress.ZERO) {
super(completeAddress, BlankContractArtifact, wallet, portalContract);
}



/**
* Creates a contract instance.
* @param address - The deployed contract's address.
* @param wallet - The wallet to use when interacting with the contract.
* @returns A promise that resolves to a new Contract instance.
*/
public static async at(
address: AztecAddress,
wallet: Wallet,
) {
public static async at(address: AztecAddress, wallet: Wallet) {
return Contract.at(address, BlankContract.artifact, wallet) as Promise<BlankContract>;
}


/**
* Creates a tx to deploy a new instance of this contract.
*/
public static deploy(pxe: PXE, ) {
public static deploy(pxe: PXE) {
return new DeployMethod<BlankContract>(Point.ZERO, pxe, BlankContractArtifact, Array.from(arguments).slice(1));
}

/**
* Creates a tx to deploy a new instance of this contract using the specified public key to derive the address.
*/
public static deployWithPublicKey(pxe: PXE, publicKey: PublicKey, ) {
public static deployWithPublicKey(pxe: PXE, publicKey: PublicKey) {
return new DeployMethod<BlankContract>(publicKey, pxe, BlankContractArtifact, Array.from(arguments).slice(2));
}



/**
* Returns this contract's artifact.
*/
public static get artifact(): ContractArtifact {
return BlankContractArtifact;
}


/** Type-safe wrappers for the public methods exposed by the contract. */
public methods!: {

/** getPublicKey(address: field) */
getPublicKey: ((address: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
};
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/boxes/blank/src/artifacts/Blank.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@
}
}
}
}
}
24 changes: 4 additions & 20 deletions yarn-project/boxes/blank/src/artifacts/Blank.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/* Autogenerated file, do not edit! */

/* eslint-disable */
Expand Down Expand Up @@ -28,58 +27,43 @@ export const BlankContractArtifact = BlankContractArtifactJson as ContractArtifa
* Type-safe interface for contract Blank;
*/
export class BlankContract extends ContractBase {

private constructor(
completeAddress: CompleteAddress,
wallet: Wallet,
portalContract = EthAddress.ZERO
) {
private constructor(completeAddress: CompleteAddress, wallet: Wallet, portalContract = EthAddress.ZERO) {
super(completeAddress, BlankContractArtifact, wallet, portalContract);
}



/**
* Creates a contract instance.
* @param address - The deployed contract's address.
* @param wallet - The wallet to use when interacting with the contract.
* @returns A promise that resolves to a new Contract instance.
*/
public static async at(
address: AztecAddress,
wallet: Wallet,
) {
public static async at(address: AztecAddress, wallet: Wallet) {
return Contract.at(address, BlankContract.artifact, wallet) as Promise<BlankContract>;
}


/**
* Creates a tx to deploy a new instance of this contract.
*/
public static deploy(pxe: PXE, ) {
public static deploy(pxe: PXE) {
return new DeployMethod<BlankContract>(Point.ZERO, pxe, BlankContractArtifact, Array.from(arguments).slice(1));
}

/**
* Creates a tx to deploy a new instance of this contract using the specified public key to derive the address.
*/
public static deployWithPublicKey(pxe: PXE, publicKey: PublicKey, ) {
public static deployWithPublicKey(pxe: PXE, publicKey: PublicKey) {
return new DeployMethod<BlankContract>(publicKey, pxe, BlankContractArtifact, Array.from(arguments).slice(2));
}



/**
* Returns this contract's artifact.
*/
public static get artifact(): ContractArtifact {
return BlankContractArtifact;
}


/** Type-safe wrappers for the public methods exposed by the contract. */
public methods!: {

/** getPublicKey(address: field) */
getPublicKey: ((address: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
};
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/boxes/token/src/artifacts/Token.json
Original file line number Diff line number Diff line change
Expand Up @@ -3329,4 +3329,4 @@
}
}
}
}
}
81 changes: 51 additions & 30 deletions yarn-project/boxes/token/src/artifacts/Token.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/* Autogenerated file, do not edit! */

/* eslint-disable */
Expand Down Expand Up @@ -28,31 +27,20 @@ export const TokenContractArtifact = TokenContractArtifactJson as ContractArtifa
* Type-safe interface for contract Token;
*/
export class TokenContract extends ContractBase {

private constructor(
completeAddress: CompleteAddress,
wallet: Wallet,
portalContract = EthAddress.ZERO
) {
private constructor(completeAddress: CompleteAddress, wallet: Wallet, portalContract = EthAddress.ZERO) {
super(completeAddress, TokenContractArtifact, wallet, portalContract);
}



/**
* Creates a contract instance.
* @param address - The deployed contract's address.
* @param wallet - The wallet to use when interacting with the contract.
* @returns A promise that resolves to a new Contract instance.
*/
public static async at(
address: AztecAddress,
wallet: Wallet,
) {
public static async at(address: AztecAddress, wallet: Wallet) {
return Contract.at(address, TokenContract.artifact, wallet) as Promise<TokenContract>;
}


/**
* Creates a tx to deploy a new instance of this contract.
*/
Expand All @@ -66,22 +54,19 @@ export class TokenContract extends ContractBase {
public static deployWithPublicKey(pxe: PXE, publicKey: PublicKey, admin: AztecAddressLike) {
return new DeployMethod<TokenContract>(publicKey, pxe, TokenContractArtifact, Array.from(arguments).slice(2));
}



/**
* Returns this contract's artifact.
*/
public static get artifact(): ContractArtifact {
return TokenContractArtifact;
}


/** Type-safe wrappers for the public methods exposed by the contract. */
public methods!: {

/** _increase_public_balance(to: struct, amount: field) */
_increase_public_balance: ((to: AztecAddressLike, amount: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
_increase_public_balance: ((to: AztecAddressLike, amount: FieldLike) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** _initialize(new_admin: struct) */
_initialize: ((new_admin: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
Expand All @@ -99,45 +84,81 @@ export class TokenContract extends ContractBase {
balance_of_public: ((owner: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

/** burn(from: struct, amount: field, nonce: field) */
burn: ((from: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
burn: ((from: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** burn_public(from: struct, amount: field, nonce: field) */
burn_public: ((from: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
burn_public: ((from: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** compute_note_hash_and_nullifier(contract_address: field, nonce: field, storage_slot: field, preimage: array) */
compute_note_hash_and_nullifier: ((contract_address: FieldLike, nonce: FieldLike, storage_slot: FieldLike, preimage: FieldLike[]) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
compute_note_hash_and_nullifier: ((
contract_address: FieldLike,
nonce: FieldLike,
storage_slot: FieldLike,
preimage: FieldLike[],
) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** is_minter(minter: struct) */
is_minter: ((minter: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

/** mint_private(amount: field, secret_hash: field) */
mint_private: ((amount: FieldLike, secret_hash: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
mint_private: ((amount: FieldLike, secret_hash: FieldLike) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** mint_public(to: struct, amount: field) */
mint_public: ((to: AztecAddressLike, amount: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
mint_public: ((to: AztecAddressLike, amount: FieldLike) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** redeem_shield(to: struct, amount: field, secret: field) */
redeem_shield: ((to: AztecAddressLike, amount: FieldLike, secret: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
redeem_shield: ((to: AztecAddressLike, amount: FieldLike, secret: FieldLike) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** set_admin(new_admin: struct) */
set_admin: ((new_admin: AztecAddressLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

/** set_minter(minter: struct, approve: boolean) */
set_minter: ((minter: AztecAddressLike, approve: boolean) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
set_minter: ((minter: AztecAddressLike, approve: boolean) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** shield(from: struct, amount: field, secret_hash: field, nonce: field) */
shield: ((from: AztecAddressLike, amount: FieldLike, secret_hash: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
shield: ((
from: AztecAddressLike,
amount: FieldLike,
secret_hash: FieldLike,
nonce: FieldLike,
) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** total_supply() */
total_supply: (() => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;

/** transfer(from: struct, to: struct, amount: field, nonce: field) */
transfer: ((from: AztecAddressLike, to: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
transfer: ((
from: AztecAddressLike,
to: AztecAddressLike,
amount: FieldLike,
nonce: FieldLike,
) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** transfer_public(from: struct, to: struct, amount: field, nonce: field) */
transfer_public: ((from: AztecAddressLike, to: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
transfer_public: ((
from: AztecAddressLike,
to: AztecAddressLike,
amount: FieldLike,
nonce: FieldLike,
) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;

/** unshield(from: struct, to: struct, amount: field, nonce: field) */
unshield: ((from: AztecAddressLike, to: AztecAddressLike, amount: FieldLike, nonce: FieldLike) => ContractFunctionInteraction) & Pick<ContractMethod, 'selector'>;
unshield: ((
from: AztecAddressLike,
to: AztecAddressLike,
amount: FieldLike,
nonce: FieldLike,
) => ContractFunctionInteraction) &
Pick<ContractMethod, 'selector'>;
};
}

0 comments on commit 5fe48c3

Please sign in to comment.