Skip to content

Commit

Permalink
Merge branch 'master' into janb/e2e-2-rpc-servers
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan authored Jul 19, 2023
2 parents cd2d471 + 2e25f8a commit f8e6a8f
Show file tree
Hide file tree
Showing 125 changed files with 588 additions and 512 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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 @@ -5,7 +5,7 @@ import { encodeArguments } from '@aztec/foundation/abi';
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { EthAddress } from '@aztec/foundation/eth-address';
import { Fr, Point } 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 { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrSingleKeyAccountContractAbi } 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 @@ -10,7 +10,7 @@ import {
} from '@aztec/aztec.js';
import { createDebugLogger } from '@aztec/foundation/log';
import { UniswapPortalAbi, UniswapPortalBytecode } from '@aztec/l1-artifacts';
import { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/artifacts';
import { NonNativeTokenContract, UniswapContract } from '@aztec/noir-contracts/types';
import { AztecRPC, TxStatus } from '@aztec/types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Contract, Wallet, createAccounts, createAztecRpcClient } from '@aztec/aztec.js';
import { AztecAddress, Fr } from '@aztec/circuits.js';
import { createDebugLogger } from '@aztec/foundation/log';
import { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/artifacts';
import { ZkTokenContract } from '@aztec/noir-contracts/types';

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 @@ -16,7 +16,7 @@ import {
EcdsaAccountContractAbi,
SchnorrMultiKeyAccountContractAbi,
SchnorrSingleKeyAccountContractAbi,
} from '@aztec/noir-contracts/examples';
} 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 { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/examples';
import { SchnorrSingleKeyAccountContractAbi } from '@aztec/noir-contracts/artifacts';
import { NonNativeTokenContract } from '@aztec/noir-contracts/types';
import { AztecNode, TxStatus } from '@aztec/types';

Expand Down
4 changes: 2 additions & 2 deletions yarn-project/noir-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ This package contains the source code and the Aztec ABIs for the example contrac
compiler_version = "0.7.1"
[dependencies]
aztec = { path = "../../libs/noir-aztec" }
aztec = { path = "../../../../noir-libs/noir-aztec" }
```

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
156 changes: 156 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.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit f8e6a8f

Please sign in to comment.