Skip to content

Commit

Permalink
Rename examples to artefacts.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeilaWang committed Jul 18, 2023
1 parent 02d93ed commit a2b75b8
Show file tree
Hide file tree
Showing 44 changed files with 247 additions and 247 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
PendingCommitmentsContractAbi,
TestContractAbi,
ZkTokenContractAbi,
} from '@aztec/noir-contracts/examples';
} from '@aztec/noir-contracts/artifacts';
import { PackedArguments, TxExecutionRequest } from '@aztec/types';

import { jest } from '@jest/globals';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { encodeArguments } from '@aztec/foundation/abi';
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr } from '@aztec/foundation/fields';
import { ZkTokenContractAbi } from '@aztec/noir-contracts/examples';
import { ZkTokenContractAbi } from '@aztec/noir-contracts/artifacts';
import { ExecutionRequest } from '@aztec/types';

import { mock } from 'jest-mock-extended';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/acir-simulator/src/public/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ParentContractAbi,
PublicTokenContractAbi,
TestContractAbi,
} from '@aztec/noir-contracts/examples';
} from '@aztec/noir-contracts/artifacts';

import { MockProxy, mock } from 'jest-mock-extended';
import { type MemDown, default as memdown } from 'memdown';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { randomBytes } from '@aztec/foundation/crypto';
import { JsonStringify } from '@aztec/foundation/json-rpc';
import { createLogger } from '@aztec/foundation/log';
import { createDebugLogger } from '@aztec/foundation/log';
import { SchnorrAccountContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrAccountContractAbi } from '@aztec/noir-contracts/artifacts';
import { ContractData, L2BlockL2Logs, TxHash } from '@aztec/types';

import { Command } from 'commander';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '@aztec/aztec.js';
import { createDebugLogger } from '@aztec/foundation/log';
import { UniswapPortalAbi, UniswapPortalBytecode } from '@aztec/l1-artifacts';
import { SchnorrAccountContractAbi, UniswapContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrAccountContractAbi, UniswapContractAbi } from '@aztec/noir-contracts/artifacts';
import { AztecRPC, TxStatus } from '@aztec/types';

import { createPublicClient, createWalletClient, getContract, http, parseEther } from 'viem';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec-sandbox/src/examples/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Contract, ContractDeployer, EthAddress, Wallet } from '@aztec/aztec.js';
import { PortalERC20Abi, PortalERC20Bytecode, TokenPortalAbi, TokenPortalBytecode } from '@aztec/l1-artifacts';
import { NonNativeTokenContractAbi } from '@aztec/noir-contracts/examples';
import { NonNativeTokenContractAbi } from '@aztec/noir-contracts/artifacts';

import type { Abi, Narrow } from 'abitype';
import { Account, Chain, Hex, HttpTransport, PublicClient, WalletClient, getContract } from 'viem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Contract, ContractDeployer, Wallet, createAccounts, createAztecRpcClient } from '@aztec/aztec.js';
import { AztecAddress, Fr, Point } from '@aztec/circuits.js';
import { createDebugLogger } from '@aztec/foundation/log';
import { SchnorrAccountContractAbi, ZkTokenContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrAccountContractAbi, ZkTokenContractAbi } from '@aztec/noir-contracts/artifacts';

const logger = createDebugLogger('aztec:http-rpc-client');

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/circuits.js/src/cbind/constants.in.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function main(): Promise<void> {
processEnumNoir(privateStateNoteGeneratorIndexEnum, 'PRIVATE_STATE_NOTE_GENERATOR_INDEX__') +
processEnumNoir(privateStateTypeEnum, 'PRIVATE_STATE_TYPE__');

const noirTargetPath = join(__dirname, '../../../noir-contracts/src/libs/noir-aztec/src/constants_gen.nr');
const noirTargetPath = join(__dirname, '../../../noir-libs/noir-aztec/src/constants_gen.nr');
fs.writeFileSync(noirTargetPath, resultNoir);
}

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_account_contracts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { AztecAddress, PartialContractAddress, Point, getContractDeploymentInfo
import { Ecdsa, Schnorr } from '@aztec/circuits.js/barretenberg';
import { ContractAbi } from '@aztec/foundation/abi';
import { toBigInt } from '@aztec/foundation/serialize';
import { EcdsaAccountContractAbi, SchnorrAccountContractAbi } from '@aztec/noir-contracts/examples';
import { EcdsaAccountContractAbi, SchnorrAccountContractAbi } from '@aztec/noir-contracts/artifacts';
import { ChildContract } from '@aztec/noir-contracts/types';
import { PublicKey } from '@aztec/types';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_block_building.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AztecNodeService } from '@aztec/aztec-node';
import { AztecRPCServer } from '@aztec/aztec-rpc';
import { ContractDeployer, Fr } from '@aztec/aztec.js';
import { DebugLogger } from '@aztec/foundation/log';
import { TestContractAbi } from '@aztec/noir-contracts/examples';
import { TestContractAbi } from '@aztec/noir-contracts/artifacts';
import { TxStatus } from '@aztec/types';

import times from 'lodash.times';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_deploy_contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AztecRPCServer } from '@aztec/aztec-rpc';
import { AztecAddress, ContractDeployer, Fr } from '@aztec/aztec.js';
import { getContractDeploymentInfo } from '@aztec/circuits.js';
import { DebugLogger } from '@aztec/foundation/log';
import { TestContractAbi } from '@aztec/noir-contracts/examples';
import { TestContractAbi } from '@aztec/noir-contracts/artifacts';
import { TxStatus } from '@aztec/types';

import { setup } from './utils.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_nested_contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AztecAddress, Contract, ContractDeployer, Fr, Wallet } from '@aztec/azt
import { ContractAbi } from '@aztec/foundation/abi';
import { DebugLogger } from '@aztec/foundation/log';
import { toBigInt } from '@aztec/foundation/serialize';
import { ChildContractAbi, ParentContractAbi } from '@aztec/noir-contracts/examples';
import { ChildContractAbi, ParentContractAbi } from '@aztec/noir-contracts/artifacts';
import { ChildContract, ParentContract } from '@aztec/noir-contracts/types';
import { TxStatus } from '@aztec/types';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_p2p_network.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CircuitsWasm, Point, getContractDeploymentInfo } from '@aztec/circuits.
import { computeContractAddressFromPartial } from '@aztec/circuits.js/abis';
import { Grumpkin } from '@aztec/circuits.js/barretenberg';
import { DebugLogger } from '@aztec/foundation/log';
import { TestContractAbi } from '@aztec/noir-contracts/examples';
import { TestContractAbi } from '@aztec/noir-contracts/artifacts';
import { BootstrapNode, P2PConfig, createLibP2PPeerId, exportLibP2PPeerIdToString } from '@aztec/p2p';
import { TxStatus } from '@aztec/types';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { randomBytes } from '@aztec/foundation/crypto';
import { Fr } from '@aztec/foundation/fields';
import { DebugLogger, Logger, createDebugLogger } from '@aztec/foundation/log';
import { PortalERC20Abi, PortalERC20Bytecode, TokenPortalAbi, TokenPortalBytecode } from '@aztec/l1-artifacts';
import { NonNativeTokenContractAbi, SchnorrAccountContractAbi } from '@aztec/noir-contracts/examples';
import { NonNativeTokenContractAbi, SchnorrAccountContractAbi } from '@aztec/noir-contracts/artifacts';
import { NonNativeTokenContract } from '@aztec/noir-contracts/types';
import { TxStatus } from '@aztec/types';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/noir-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ This package contains the source code and the Aztec ABIs for the example contrac

4. Replace the content of the generated `example_contract/src/main.nr` file with your contract code.
5. Go to `noir-contracts` root folder and run `yarn noir:build example` to compile the contract.
6. Export the abi in `src/examples/index.ts` to be able to use the contract in the rest of the project:
6. Export the abi in `src/artifacts/index.ts` to be able to use the contract in the rest of the project:
```
import ExampleContractJson from './example_contract.json' assert { type: 'json' };
export const ExampleContractAbi = ExampleContractJson as ContractAbi;
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/noir-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "module",
"exports": {
".": "./dest/index.js",
"./examples": "./dest/examples/index.js",
"./artifacts": "./dest/artifacts/index.js",
"./types": "./dest/types/index.js"
},
"typedoc": {
Expand Down
107 changes: 107 additions & 0 deletions yarn-project/noir-contracts/src/artifacts/ecdsa_account_contract.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit a2b75b8

Please sign in to comment.