Skip to content

Commit

Permalink
refactor!: move entrypoints back to aztec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Mar 21, 2024
1 parent 161c313 commit 383a13c
Show file tree
Hide file tree
Showing 23 changed files with 12 additions and 159 deletions.
1 change: 0 additions & 1 deletion yarn-project/accounts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"@aztec/aztec.js": "workspace:^",
"@aztec/circuit-types": "workspace:^",
"@aztec/circuits.js": "workspace:^",
"@aztec/entrypoints": "workspace:^",
"@aztec/ethereum": "workspace:^",
"@aztec/foundation": "workspace:^",
"@aztec/types": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/accounts/src/defaults/account_interface.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AccountInterface, AuthWitnessProvider, EntrypointInterface, FeeOptions } from '@aztec/aztec.js/account';
import { DefaultAccountEntrypoint } from '@aztec/aztec.js/entrypoint';
import { AuthWitness, FunctionCall, TxExecutionRequest } from '@aztec/circuit-types';
import { AztecAddress, CompleteAddress, Fr } from '@aztec/circuits.js';
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
import { NodeInfo } from '@aztec/types/interfaces';

/**
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/accounts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
{
"path": "../circuits.js"
},
{
"path": "../entrypoints"
},
{
"path": "../ethereum"
},
Expand Down
1 change: 1 addition & 0 deletions yarn-project/aztec.js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"./interfaces/pxe": "./dest/api/interfaces/pxe.js",
"./abi": "./dest/api/abi.js",
"./account": "./dest/api/account.js",
"./entrypoint": "./dest/api/entrypoint.js",
"./aztec_address": "./dest/api/aztec_address.js",
"./deployment": "./dest/api/deployment.js",
"./eth_address": "./dest/api/eth_address.js",
Expand Down
1 change: 1 addition & 0 deletions yarn-project/aztec.js/src/api/entrypoint.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '../entrypoint/index.js';
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AuthWitnessProvider, EntrypointInterface, FeeOptions } from '@aztec/aztec.js/account';
import { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types';
import { AztecAddress, FunctionData, GeneratorIndex, TxContext } from '@aztec/circuits.js';
import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi';

import { AuthWitnessProvider, EntrypointInterface, FeeOptions } from '../account/interface.js';
import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
import { buildAppPayload, buildFeePayload, hashPayload } from './entrypoint_payload.js';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { computeInnerAuthWitHash, computeOuterAuthWitHash } from '@aztec/aztec.js';
import { AuthWitnessProvider, EntrypointInterface } from '@aztec/aztec.js/account';
import { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types';
import { AztecAddress, Fr, FunctionData, TxContext } from '@aztec/circuits.js';
import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi';

import { AuthWitnessProvider, EntrypointInterface } from '../account/interface.js';
import { computeInnerAuthWitHash, computeOuterAuthWitHash } from '../utils/authwit.js';
import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js';
import { buildDappPayload } from './entrypoint_payload.js';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { FeeOptions } from '@aztec/aztec.js/account';
import { Fr } from '@aztec/aztec.js/fields';
import { FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/circuit-types';
import { AztecAddress } from '@aztec/circuits.js';
import { padArrayEnd } from '@aztec/foundation/collection';
import { pedersenHash } from '@aztec/foundation/crypto';

import { FeeOptions } from '../account/interface.js';

// These must match the values defined in:
// - noir-projects/aztec-nr/aztec/src/entrypoint/app.nr
const ACCOUNT_MAX_CALLS = 4;
Expand Down
2 changes: 2 additions & 0 deletions yarn-project/aztec.js/src/entrypoint/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './account_entrypoint.js';
export * from './dapp_entrypoint.js';
1 change: 0 additions & 1 deletion yarn-project/deploy_npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ deploy_package circuits.js
deploy_package circuit-types
deploy_package protocol-contracts
deploy_package aztec.js
deploy_package entrypoints
deploy_package accounts
deploy_package l1-artifacts
deploy_package ethereum
Expand Down
1 change: 0 additions & 1 deletion yarn-project/end-to-end/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"@aztec/circuit-types": "workspace:^",
"@aztec/circuits.js": "workspace:^",
"@aztec/cli": "workspace:^",
"@aztec/entrypoints": "workspace:^",
"@aztec/ethereum": "workspace:^",
"@aztec/foundation": "workspace:^",
"@aztec/kv-store": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
PublicFeePaymentMethod,
SentTx,
} from '@aztec/aztec.js';
import { DefaultDappEntrypoint } from '@aztec/entrypoints/dapp';
import { DefaultDappEntrypoint } from '@aztec/aztec.js/entrypoint';
import {
AppSubscriptionContract,
TokenContract as BananaCoin,
Expand Down
3 changes: 0 additions & 3 deletions yarn-project/end-to-end/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
{
"path": "../cli"
},
{
"path": "../entrypoints"
},
{
"path": "../ethereum"
},
Expand Down
1 change: 0 additions & 1 deletion yarn-project/entrypoints/.eslintrc.cjs

This file was deleted.

8 changes: 0 additions & 8 deletions yarn-project/entrypoints/README.md

This file was deleted.

61 changes: 0 additions & 61 deletions yarn-project/entrypoints/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions yarn-project/entrypoints/src/index.ts

This file was deleted.

18 changes: 0 additions & 18 deletions yarn-project/entrypoints/tsconfig.dest.json

This file was deleted.

23 changes: 0 additions & 23 deletions yarn-project/entrypoints/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion yarn-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
},
"workspaces": [
"accounts",
"entrypoints",
"simulator",
"archiver",
"aztec-faucet",
Expand Down
3 changes: 1 addition & 2 deletions yarn-project/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
{ "path": "sequencer-client/tsconfig.json" },
{ "path": "types/tsconfig.json" },
{ "path": "world-state/tsconfig.json" },
{ "path": "scripts/tsconfig.json" },
{ "path": "entrypoints/tsconfig.json" }
{ "path": "scripts/tsconfig.json" }
],
"files": ["./@types/jest/index.d.ts"]
}
20 changes: 0 additions & 20 deletions yarn-project/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ __metadata:
"@aztec/aztec.js": "workspace:^"
"@aztec/circuit-types": "workspace:^"
"@aztec/circuits.js": "workspace:^"
"@aztec/entrypoints": "workspace:^"
"@aztec/ethereum": "workspace:^"
"@aztec/foundation": "workspace:^"
"@aztec/types": "workspace:^"
Expand Down Expand Up @@ -375,7 +374,6 @@ __metadata:
"@aztec/circuit-types": "workspace:^"
"@aztec/circuits.js": "workspace:^"
"@aztec/cli": "workspace:^"
"@aztec/entrypoints": "workspace:^"
"@aztec/ethereum": "workspace:^"
"@aztec/foundation": "workspace:^"
"@aztec/kv-store": "workspace:^"
Expand Down Expand Up @@ -428,24 +426,6 @@ __metadata:
languageName: unknown
linkType: soft

"@aztec/entrypoints@workspace:^, @aztec/entrypoints@workspace:entrypoints":
version: 0.0.0-use.local
resolution: "@aztec/entrypoints@workspace:entrypoints"
dependencies:
"@aztec/aztec.js": "workspace:^"
"@aztec/circuit-types": "workspace:^"
"@aztec/circuits.js": "workspace:^"
"@aztec/foundation": "workspace:^"
"@jest/globals": ^29.5.0
"@types/jest": ^29.5.0
jest: ^29.5.0
ts-jest: ^29.1.0
ts-node: ^10.9.1
tslib: ^2.4.0
typescript: ^5.0.4
languageName: unknown
linkType: soft

"@aztec/ethereum@workspace:^, @aztec/ethereum@workspace:ethereum":
version: 0.0.0-use.local
resolution: "@aztec/ethereum@workspace:ethereum"
Expand Down

0 comments on commit 383a13c

Please sign in to comment.