Skip to content

Commit

Permalink
feat: aztec packages 0.68.0 (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipHarald authored Dec 23, 2024
1 parent 2a1c718 commit e139430
Show file tree
Hide file tree
Showing 21 changed files with 330 additions and 295 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM node:20-alpine

RUN apk update && apk add jq
RUN apk update && apk add jq python3 make g++

WORKDIR /usr/main

Expand Down
2 changes: 1 addition & 1 deletion k8s/local/aztec-sandbox-node/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
app: aztec-sandbox-node
spec:
containers:
- image: aztecprotocol/aztec:0.67.0
- image: aztecprotocol/aztec:0.68.0
name: aztec-sandbox-node
resources:
limits:
Expand Down
2 changes: 1 addition & 1 deletion packages/backend-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint-base": "yarn run g:lint"
},
"dependencies": {
"@aztec/aztec.js": "0.67.0",
"@aztec/aztec.js": "0.68.0",
"@chicmoz-pkg/types": "workspace:^",
"drizzle-orm": "0.33.0",
"exponential-backoff": "3.1.1",
Expand Down
13 changes: 9 additions & 4 deletions packages/backend-utils/src/parse-block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ const getTxEffectWithHashes = (txEffects: L2Block["body"]["txEffects"]) => {
...txEffect,
unencryptedLogslength: txEffect.unencryptedLogsLength.toNumber(),
privateLogs: txEffect.privateLogs.map((log) => log.toFields()),
hash: "0x" + txEffect.hash().toString("hex"),
hash: txEffect.txHash.toString(), // TODO: ⚠️ remove hash from txEffect
txHash: txEffect.txHash.toString(),
};
});
};

export const blockFromString = (stringifiedBlock: string): L2Block => {
return L2Block.fromString(stringifiedBlock);
}
};

export const parseBlock = (b: L2Block): ChicmozL2Block => {
const blockHash = b.hash();

const blockWithTxEffectsHashesAdded = {
...b,
txsEffectsHash: b.header.contentCommitment.txsEffectsHash.toJSON(),
body: {
...b.body,
txEffects: getTxEffectWithHashes(b.body.txEffects),
Expand All @@ -34,9 +34,14 @@ export const parseBlock = (b: L2Block): ChicmozL2Block => {
header: {
...blockWithTxEffectsHashesAdded.header,
totalFees: blockWithTxEffectsHashesAdded.header.totalFees.toBigInt(),
contentCommitment: {
...blockWithTxEffectsHashesAdded.header.contentCommitment,
txsEffectsHash: b.header.contentCommitment.blobsHash, // TODO: ⚠️ find real txsEffectsHash (or remove it)
},
globalVariables: {
...blockWithTxEffectsHashesAdded.header.globalVariables,
coinbase: blockWithTxEffectsHashesAdded.header.globalVariables.coinbase.toString(),
coinbase:
blockWithTxEffectsHashesAdded.header.globalVariables.coinbase.toString(),
},
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/message-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lint-base": "yarn run g:lint"
},
"dependencies": {
"@aztec/aztec.js": "0.67.0",
"@aztec/aztec.js": "0.68.0",
"@chicmoz-pkg/types": "workspace:^"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions services/aztec-listener/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"main": "index.js",
"license": "Apache-2.0",
"dependencies": {
"@aztec/aztec.js": "0.67.0",
"@aztec/circuits.js": "0.67.0",
"@aztec/aztec.js": "0.68.0",
"@aztec/circuits.js": "0.68.0",
"@chicmoz-pkg/backend-utils": "workspace:^",
"@chicmoz-pkg/logger-server": "workspace:^",
"@chicmoz-pkg/message-bus": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions services/ethereum-listener/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
],
"license": "Apache-2.0",
"dependencies": {
"@aztec/aztec.js": "0.67.0",
"@aztec/l1-artifacts": "0.67.0",
"@aztec/aztec.js": "0.68.0",
"@aztec/l1-artifacts": "0.68.0",
"@chicmoz-pkg/logger-server": "workspace:^",
"@chicmoz-pkg/message-bus": "workspace:^",
"@chicmoz-pkg/message-registry": "workspace:^",
Expand Down
8 changes: 4 additions & 4 deletions services/event-cannon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
],
"license": "Apache-2.0",
"dependencies": {
"@aztec/accounts": "0.67.0",
"@aztec/aztec.js": "0.67.0",
"@aztec/l1-artifacts": "0.67.0",
"@aztec/noir-contracts.js": "0.67.0",
"@aztec/accounts": "0.68.0",
"@aztec/aztec.js": "0.68.0",
"@aztec/l1-artifacts": "0.68.0",
"@aztec/noir-contracts.js": "0.68.0",
"@chicmoz-pkg/logger-server": "workspace:^"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import {
Contract,
DeploySentTx,
waitForPXE,
} from "@aztec/aztec.js";
import { Contract, DeploySentTx, waitForPXE } from "@aztec/aztec.js";
import { logger } from "../../logger.js";
import { getAztecNodeClient, getPxe, getWallets } from "../pxe.js";
import { deployContract, logAndWaitForTx } from "./utils/index.js";
import { TokenContract } from "@aztec/noir-contracts.js";
import { TokenContract } from "@aztec/noir-contracts.js/Token";

export async function run() {
logger.info("===== TOKEN CONTRACT =====");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import {
Contract,
DeploySentTx,
Fr,
waitForPXE,
} from "@aztec/aztec.js";
import { Contract, DeploySentTx, Fr, waitForPXE } from "@aztec/aztec.js";
import { logger } from "../../logger.js";
import { getAztecNodeClient, getPxe, getWallets } from "../pxe.js";
import { deployContract, logAndWaitForTx } from "./utils/index.js";
import {
EasyPrivateVotingContract,
EasyPrivateVotingContractArtifact,
} from "@aztec/noir-contracts.js";
} from "@aztec/noir-contracts.js/EasyPrivateVoting";

export async function run() {
logger.info("===== VOTING CONTRACT =====");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@ import {
} from "viem";
import { mnemonicToAccount } from "viem/accounts";
import { foundry } from "viem/chains";
import {
ETHEREUM_RPC_URL,
} from "../../environment.js";
import { ETHEREUM_RPC_URL } from "../../environment.js";
import {
RollupAbi,
TestERC20Abi,
TestERC20Bytecode,
TokenPortalAbi,
TokenPortalBytecode,
} from "@aztec/l1-artifacts";
import { TokenBridgeContract, TokenContract } from "@aztec/noir-contracts.js";
import assert from "assert";
import { TokenContract } from "@aztec/noir-contracts.js/Token";
import { TokenBridgeContract } from "@aztec/noir-contracts.js/TokenBridge";

const MNEMONIC = "test test test test test test test test test test test junk";
const TOKEN_NAME = "TokenName";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ import {
TokenPortalAbi,
TokenPortalBytecode,
} from "@aztec/l1-artifacts";
import { TokenBridgeContract, TokenContract } from "@aztec/noir-contracts.js";
import assert from "assert";
import { TokenContract } from "@aztec/noir-contracts.js/Token";
import { TokenBridgeContract } from "@aztec/noir-contracts.js/TokenBridge";

const MNEMONIC = "test test test test test test test test test test test junk";
const TOKEN_NAME = "TokenName";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DeploySentTx, waitForPXE } from "@aztec/aztec.js";
import { EasyPrivateVotingContract } from "@aztec/noir-contracts.js";
import { logger } from "../../logger.js";
import { getAztecNodeClient, getPxe, getWallets } from "../pxe.js";
import { deployContract } from "./utils/index.js";
import { EasyPrivateVotingContract } from "@aztec/noir-contracts.js/EasyPrivateVoting";

export async function run() {
logger.info("===== SIMPLE DEPLOY CONTRACT =====");
Expand Down
2 changes: 1 addition & 1 deletion services/event-cannon/src/cannon/scenarios/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "@aztec/aztec.js/deployment";
import { deriveSigningKey } from "@aztec/circuits.js";
import { FunctionType } from "@aztec/foundation/abi";
import { ContractClassRegisteredEvent } from "@aztec/protocol-contracts";
import { ContractClassRegisteredEvent } from "@aztec/protocol-contracts/class-registerer";
import { logger } from "../../../logger.js";

export const truncateHashString = (value: string) => {
Expand Down
Loading

0 comments on commit e139430

Please sign in to comment.