From d38a74e7ea0bbb4a298a6bfb0f8419e8b28b1c44 Mon Sep 17 00:00:00 2001 From: Filip Harald Date: Mon, 9 Dec 2024 09:59:18 +0100 Subject: [PATCH] feat: verified contracts v0.1 (#233) also upgraded to aztec-packages 0.65.2 --- packages/backend-utils/src/parse-block.ts | 9 +- packages/types/src/aztec/l2TxEffect.ts | 8 +- packages/types/src/aztec/special.ts | 1 + packages/types/src/aztec/utils.ts | 27 +- services/event-cannon/src/cannon/index.ts | 2 + .../scenarios/simple-deploy-contract.ts | 58 +++ .../src/cannon/scenarios/utils/index.ts | 3 +- .../target/simple_logging-SimpleLogging.json | 436 +++++++++--------- .../simple_logging-SimpleLogging.json.bak | 2 +- ...ble_man.sql => 0000_dry_puppet_master.sql} | 2 +- .../migrations/meta/0000_snapshot.json | 4 +- .../migrations/meta/_journal.json | 4 +- services/explorer-api/src/constants.ts | 10 + .../database/controllers/l2contract/utils.ts | 2 + .../src/database/controllers/sign-of-life.ts | 18 +- .../src/database/schema/l2block/body.ts | 3 +- services/explorer-api/src/environment.ts | 21 +- .../src/event-handler/on-block/contracts.ts | 29 +- .../src/event-handler/on-block/index.ts | 19 + .../src/http-server/express-config.ts | 4 +- .../routes/controllers/inofficial.ts | 12 +- .../src/http-server/routes/index.ts | 2 +- .../routes/paths_and_validation.ts | 2 +- .../pages/contract-instance-details/index.tsx | 16 +- .../pages/contract-instance-details/util.ts | 10 +- .../src/pages/tx-effect-details/index.tsx | 88 ++-- .../src/pages/tx-effect-details/utils.ts | 6 +- .../src/pages/verified-contracts.tsx | 33 ++ services/explorer-ui/src/routeTree.gen.ts | 20 + services/explorer-ui/src/routes/__root.tsx | 4 + .../src/routes/verified-contracts.lazy.tsx | 6 + 31 files changed, 568 insertions(+), 293 deletions(-) create mode 100644 services/event-cannon/src/cannon/scenarios/simple-deploy-contract.ts rename services/explorer-api/migrations/{0000_worried_impossible_man.sql => 0000_dry_puppet_master.sql} (99%) create mode 100644 services/explorer-ui/src/pages/verified-contracts.tsx create mode 100644 services/explorer-ui/src/routes/verified-contracts.lazy.tsx diff --git a/packages/backend-utils/src/parse-block.ts b/packages/backend-utils/src/parse-block.ts index ab982477..197c8237 100644 --- a/packages/backend-utils/src/parse-block.ts +++ b/packages/backend-utils/src/parse-block.ts @@ -28,6 +28,13 @@ export const parseBlock = (b: L2Block): ChicmozL2Block => { return chicmozL2BlockSchema.parse({ hash: blockHash.toString(), height: b.number, - ...JSON.parse(JSON.stringify(blockWithTxEffectsHashesAdded)), + ...blockWithTxEffectsHashesAdded, + header: { + ...blockWithTxEffectsHashesAdded.header, + globalVariables: { + ...blockWithTxEffectsHashesAdded.header.globalVariables, + coinbase: blockWithTxEffectsHashesAdded.header.globalVariables.coinbase.toString(), + }, + }, }); }; diff --git a/packages/types/src/aztec/l2TxEffect.ts b/packages/types/src/aztec/l2TxEffect.ts index 28c47430..1f7d956e 100644 --- a/packages/types/src/aztec/l2TxEffect.ts +++ b/packages/types/src/aztec/l2TxEffect.ts @@ -1,18 +1,18 @@ import { z } from "zod"; import { hexStringSchema } from "../general.js"; -import { aztecAddressSchema, frNumberSchema, frSchema } from "./utils.js"; +import { aztecAddressSchema, bufferSchema, frNumberSchema, frSchema } from "./utils.js"; export const noteEncryptedLogEntrySchema = z.object({ - data: z.string(), + data: bufferSchema, }); export const encryptedLogEntrySchema = z.object({ - data: z.string(), + data: bufferSchema, maskedContractAddress: frSchema, }); export const unencryptedLogEntrySchema = z.object({ - data: z.string(), + data: bufferSchema, contractAddress: aztecAddressSchema, }); diff --git a/packages/types/src/aztec/special.ts b/packages/types/src/aztec/special.ts index 2eb98674..8100607a 100644 --- a/packages/types/src/aztec/special.ts +++ b/packages/types/src/aztec/special.ts @@ -10,6 +10,7 @@ export const chicmozL2ContractInstanceDeluxeSchema = z.object({ ...chicmozL2ContractInstanceDeployedEventSchema.shape, ...chicmozL2ContractClassRegisteredEventSchema.shape, blockHeight: chicmozL2BlockSchema.shape.height.optional(), + aztecScoutVerified: z.boolean().optional(), }); export type ChicmozL2ContractInstanceDeluxe = z.infer< diff --git a/packages/types/src/aztec/utils.ts b/packages/types/src/aztec/utils.ts index 6394de4c..37054eaa 100644 --- a/packages/types/src/aztec/utils.ts +++ b/packages/types/src/aztec/utils.ts @@ -10,11 +10,6 @@ export type AztecAddress = { toString(): string; }; -export type StringifiedAztecFr = { - type: "Fr"; - value: `0x${string}`; -}; - export type StringifiedAztecAddress = { type: "AztecAddress"; value: `0x${string}`; @@ -22,8 +17,6 @@ export type StringifiedAztecAddress = { const frToHexString = (val: unknown) => { if (!val) return val; - else if ((val as StringifiedAztecFr).value) - return (val as StringifiedAztecFr).value; else if ((val as AztecFr).toString) return (val as AztecFr).toString(); else return val; }; @@ -36,12 +29,28 @@ export const frSchema = z.preprocess( .regex(/^0x[0-9a-fA-F]+$/) ); -export const frPointSchema = z.object({ +type FrPoint = { + x: AztecFr; + y: AztecFr; + isInfinite: boolean; + kind: "point"; +}; + +const frPointToObj = (val: unknown) => { + if (!val) return val; + else if ((val as FrPoint).x) return val; + else return val; +}; + +export const frPointSchema = z.preprocess( + frPointToObj, +z.object({ x: frSchema, y: frSchema, isInfinite: z.boolean(), kind: z.enum(["point"]), -}); +}) +); export const frNumberSchema = z.preprocess((val) => { if (typeof val === "number") return val; diff --git a/services/event-cannon/src/cannon/index.ts b/services/event-cannon/src/cannon/index.ts index 0a19e54c..3bde38ac 100644 --- a/services/event-cannon/src/cannon/index.ts +++ b/services/event-cannon/src/cannon/index.ts @@ -1,6 +1,7 @@ import { logger } from "../logger.js"; import { setup } from "./pxe.js"; import { run as deployAndInteractFunctionsVote } from "./scenarios/deploy-and-interact-vote-contract.js"; +import { run as deploySimpleContract } from "./scenarios/simple-deploy-contract.js"; import { run as deploySimpleDefaultAccount } from "./scenarios/deploy-simple-default-account.js"; import { run as deployAndInteractTokenContract } from "./scenarios/deploy-and-interact-token-contract.js"; import { run as deploySimpleLog } from "./scenarios/deploy-and-run-simple-log.js"; @@ -25,6 +26,7 @@ export const start = async () => { deploySimpleDefaultAccount, deployAndInteractTokenContract, deployAndInteractFunctionsVote, + deploySimpleContract, deploySimpleLog, l1L2PublicMessaging, l1L2PrivateMessaging, diff --git a/services/event-cannon/src/cannon/scenarios/simple-deploy-contract.ts b/services/event-cannon/src/cannon/scenarios/simple-deploy-contract.ts new file mode 100644 index 00000000..0b795f74 --- /dev/null +++ b/services/event-cannon/src/cannon/scenarios/simple-deploy-contract.ts @@ -0,0 +1,58 @@ +import { DeploySentTx, waitForPXE } from "@aztec/aztec.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"; +import { + ContractClassRegisteredEvent, + ContractInstanceDeployedEvent, +} from "@aztec/circuits.js"; +import { ProtocolContractAddress } from "@aztec/protocol-contracts"; + +export async function run() { + logger.info("===== SIMPLE DEPLOY CONTRACT ====="); + const pxe = getPxe(); + await waitForPXE(pxe); + const namedWallets = getWallets(); + + const deployerWallet = namedWallets.alice; + const votingAdmin = namedWallets.alice.getAddress(); + + const sentTx = EasyPrivateVotingContract.deploy( + deployerWallet, + votingAdmin + ).send(); + + await deployContract({ + contractLoggingName: "Voting Contract", + deployFn: (): DeploySentTx => sentTx, + }); + + const blockNumber = (await sentTx.getReceipt()).blockNumber; + const node = getAztecNodeClient(); + if (blockNumber && blockNumber > 0) { + const b = await node.getBlock(blockNumber); + if (b) { + const encryptedBlockLogs = b.body.txEffects.flatMap((txEffect) => + txEffect.encryptedLogs.unrollLogs() + ); + const contractInstances = + ContractInstanceDeployedEvent.fromLogs(encryptedBlockLogs); + + const contractClassLogs = b.body.txEffects.flatMap((txEffect) => + txEffect.contractClassLogs.unrollLogs() + ); + const contractClasses = ContractClassRegisteredEvent.fromLogs( + contractClassLogs, + ProtocolContractAddress.ContractClassRegisterer + ); + + logger.info( + JSON.stringify({ + contractClasses, + contractInstances, + }) + ); + } + } +} diff --git a/services/event-cannon/src/cannon/scenarios/utils/index.ts b/services/event-cannon/src/cannon/scenarios/utils/index.ts index 8868debf..ba33c5c6 100644 --- a/services/event-cannon/src/cannon/scenarios/utils/index.ts +++ b/services/event-cannon/src/cannon/scenarios/utils/index.ts @@ -98,8 +98,9 @@ export const deployContract = async ({ `📫 ${contractLoggingName} ${truncateHashString(hash)} (Deploying contract)` ); const deployedContract = await contractTx.deployed(); + const receipt = await contractTx.wait(); const addressString = deployedContract.address.toString(); - logger.info(`⛏ ${contractLoggingName} deployed at: ${addressString}`); + logger.info(`⛏ ${contractLoggingName} deployed at: ${addressString} block: ${receipt.blockNumber}`); if (broadcastWithWallet) { await broadcastFunctions({ wallet: broadcastWithWallet, diff --git a/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json b/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json index 6d08ecb9..9a25d51f 100644 --- a/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json +++ b/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json @@ -3,206 +3,6 @@ "noir_version": "0.38.0+c807678263164209f62fa5c9bf19f468cace1f98-x8664", "name": "SimpleLogging", "functions": [ - { - "name": "add_to_counter_public", - "is_unconstrained": true, - "custom_attributes": ["public", "internal"], - "abi": { - "error_types": { - "10176877060487216746": { - "error_kind": "string", - "string": "Function add_to_counter_public can only be called internally" - }, - "13699457482007836410": { - "error_kind": "string", - "string": "Not initialized" - }, - "16761564377371454734": { - "error_kind": "string", - "string": "Array index out of bounds" - }, - "17843811134343075018": { - "error_kind": "string", - "string": "Stack too deep" - }, - "206160798890201757": { - "error_kind": "string", - "string": "Storage slot 0 not allowed. Storage slots must start from 1." - }, - "5019202896831570965": { - "error_kind": "string", - "string": "attempt to add with overflow" - } - }, - "parameters": [ - { - "name": "counter_id", - "type": { - "kind": "field" - }, - "visibility": "private" - } - ], - "return_type": null - }, - "bytecode": "JgAEAQInAASARAABJ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ApViJQcD8lHdpZR8e2sAkpVV+nh4nlU6eFbAaWqy6nqcnLfmEKp+gar+iGr6vKa3CuUtqsIqKBBRU3GFkuL9QJK46MigAqlqgtVdiGpUJr2ilbTNyKpNCSVhqqRQ1TdyzEqMjY0hd6LlA4XQoYc5TQoUNVV2KItoAqHt0gor0EVDv9AnwbqGHPlCy9kFlCFvuEgbfh1kDMsrD1IKK9BFWbFJZRToabVYJvai9lkqMJBhBJKVVf0ChQUTsuWUEGDKhyJJaAK0UFCsQZVuL8klKouUtlFpEJpelTp8AsJpeqHrOqHhRNNOaT45Q1mqILfkFCqukoeQEBFDaowryShvAKFRqMhFuIypYeEhv4NOcqpUFGDKkRzCeU1qIK3kVAqNUilPOnqUinvVMo7lfKFo1rI+YTyJkexBlWYxZJQUYMqeBsBFY0K5RSo0oZzCUUqVNCgCrNYEsprUAgqlKYfWmsUea+dnsUWUUGDKmyinEH9GK7+uX7aXt/c3z0PmN2X3x5uX7aPD6+XL/9+Hb+5edre32+/fPz69Hh79+nb093H+8fb3Xcb8/rnPUZ/NTTlh93B0MMlDKMxoLC7hP23dIWRh1qHmv8D", - "brillig_names": ["add_to_counter_public"] - }, - { - "name": "public_dispatch", - "is_unconstrained": true, - "custom_attributes": ["public"], - "abi": { - "error_types": { - "10176877060487216746": { - "error_kind": "string", - "string": "Function add_to_counter_public can only be called internally" - }, - "13699457482007836410": { - "error_kind": "string", - "string": "Not initialized" - }, - "16761564377371454734": { - "error_kind": "string", - "string": "Array index out of bounds" - }, - "16957488177269924912": { - "error_kind": "fmtstring", - "item_types": [], - "length": 16 - }, - "17618083556256589634": { - "error_kind": "string", - "string": "Initialization hash does not match" - }, - "17843811134343075018": { - "error_kind": "string", - "string": "Stack too deep" - }, - "206160798890201757": { - "error_kind": "string", - "string": "Storage slot 0 not allowed. Storage slots must start from 1." - }, - "2233873454491509486": { - "error_kind": "string", - "string": "Initializer address is not the contract deployer" - }, - "5019202896831570965": { - "error_kind": "string", - "string": "attempt to add with overflow" - } - }, - "parameters": [ - { - "name": "selector", - "type": { - "kind": "field" - }, - "visibility": "private" - } - ], - "return_type": null - }, - "bytecode": "JgAEAQInAASARAABJgAEAwAmAgQBAiYCBAADHxgAAwACgEMtCIBDAAEkAAAAQCcCBIBEAAEmAgQAAjoNAAEAAiQAAAjbKAIAF/EoiAACCjgBAgMmAgQAAiYCBAAFJgIEAwcAOAUHBiwIAQQAEAEGASYDBAEEACgEAgYsDgUGACgGAgYsDgUGJgIEAwYAOAQGBSMCAAAAngADIgAAANMmAgQFAywIAAUAEAADACQAAAkELAQAAAAoBAIGLA0GBSYCBAIHADgGBwM6DQADAAUiAAAA0ygCAJI5JNYAAwo4AQMFJgIEAQMmAgAABiYCAQAHJgIABggjAgAAAQIABSIAAAMILAgBCSYCBAIKABABCgEmAwQBCQAoCQIKHzwAAwADAAosDQkKACgKAgosDgoJLAgBCgAAAQIBLA4JCiwIAQkAAAECASwOAgkmAgQNDCwIAA0sDAoOLAwJDywMCBAAEAAMACQAAAwHLAQAACwMDgssCAEJAAABAgEsDgcJLAgBCgAAAQIBLA4GCiwIAQwAAAECASYCACYNLA4NDCYCBA4NLAgADiwMCQ8sDAoQLAwMEQAQAA0AJAAADXEsBAAAHgIBAA0eAgAADgo4DQ4PIwIAAAHbAA8kAAANmyYCABkNJgIAAQ4mAgQUEywIABQsDAkVLAwKFiwMDBcsDA4YLAwNGSwMCxoAEAATACQAAA2tLAQAACwMFQ8sDBYQLAwXESwMGBIsCAETJgIEAhQAEAEUASYDBAETACgTAhQsDBQVLA4GFSwNExQAKBQCFCwOFBMsCAEUAAABAgEsDhMULAwCBSIAAAJnCjgFAg8jAgAACGYADyIAAAJ5LA0UDwAoDwIRADgRAhIsDRIQADgQDg8mAgQVFCwIABUsDAkWLAwKFywMDBgsDA4ZLAwNGiwMCxsAEAAUACQAAA2tLAQAACwMFhAsDBcRLAwYEiwMGRMsDAIFIgAAAtgKOAUCCSMCAAAH8QAJIgAAAuoAKAQCCiwNCgkmAgQCCw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S1SqQKXC2F1DSQ2qEG0UVGFbuIbCGlSo0hWq7Cr0UhRUYTethqIaFPoqVFU9TK6i35sKl1BqKK5BFRZRFNR6BJimtWcUTyuo365Hx99hhRBAeSepJ1kqK4SA2yhyvgolNahCCNBQ6wXGPM9HeHGLmQAqdDg0FNWgCh0ODYVVKKlBxSpvxCrPY5UurPJ8qvJ8qvJ8qvI8VXmDqrzBVd7gVINaPw48TQ3m+TkXVlBYgWLnqlB1uqQGtb6fVEVxDWp9p6OKSjWo9cimoCSuXw4f873hGBaY0gYbzJ3l60uuZ1Rpt4qCohoU+SrUeqzx+UiZ97SY4JTCCr+GilUoqUFJlS6p0IXOxSpUlS5fpQtcFapOF9egCpOpGirVoGKVNyLWoApPlN2INRNm3e9T2eeWHJao0j4qBZVqUKUdPgqqyq7S3pPbqNJGjlvRcEJVRN5pjFWjy3tXhcIaFFTpgjpdUoMqHFJ2Kbcux7BEcQ0qVukqvbyhoFINKlXpSlW6SK8ba6iqusFV9ZCrdEmoQnEFCgo9AAXlfRUq1aAAqlA18RBCla5QZVd0Vaiq8opVdQOrfJiqfJiqdG1vy9+m3/7z5vPjm7cf3n+ZME9//Pvju6+Pnz7++PXrf/+a//L28+OHD49/vv7r86d373//+/P71x8+vXv624P78c+/GNyradZxYvPUaNmlV+zT9Nv3HDnNbr6apr6efn1qMOxp+qtMHCYe/wM=", - "brillig_names": ["public_dispatch"] - }, - { - "name": "constructor", - "is_unconstrained": true, - "custom_attributes": ["public", "initializer"], - "abi": { - "error_types": { - "16761564377371454734": { - "error_kind": "string", - "string": "Array index out of bounds" - }, - "17618083556256589634": { - "error_kind": "string", - "string": "Initialization hash does not match" - }, - "17843811134343075018": { - "error_kind": "string", - "string": "Stack too deep" - }, - "2233873454491509486": { - "error_kind": "string", - "string": "Initializer address is not the contract deployer" - }, - "5019202896831570965": { - "error_kind": "string", - "string": "attempt to add with overflow" - } - }, - "parameters": [], - "return_type": null - }, - "bytecode": "JgAEAQInAASAQwABJgAEAwAmA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SnAE4wPsdMTA6TkvjB9P4nSoZEGJyVamXWsoNqAgs1yuoU4PV5DH2oBJZqhMhVNQmeVDgrGaEswZZt6zU1CZs7gaikyoZEHlHg33Y3nFoyfeR5RYUNFkK7f2o6CiBZV7c0hBJQsqd8hyEYW521sVFFlQYLIFJl1gqVGI3oRiC8qDCWWph5ibfRKcQinOUWRBkclWzgMso3IeQEGxBZXzGwrKlIeZuBzGHUgQAsxRyYLKbDTUUGxA+Uw011BkQllyw0MwoUy20JtQppz3ppzPTLqHaQNQ4Jm38Rlvo6GiBZXpb2gosaAyL31qqGRBsckWm3Rleikaii2ozIt9GspSD3MvyWmoYOj3hszKsoLKLOhqqGhB0ck8lDC8+yzkZxg+3bocjV7DRZqj2ILKXP6iociEOt0mu7A2oIBnI72Q6WFrKDGgKLPRQkOZbIHJFphsockWmmz5YEKZbGWOL2uoaEFletgaypQbZGkpdDpSLvoaiqfz3UEYW7KfozLXKCmozB44DRVMKIuu3GWhGioavGHuakwNZbKVuZZDQyULyptseZOt4E2oTKSMY+tyMhsdxsxTZRrKZCvzspWCykx9ayiTLTHZEr1unEKZ6kYy1cNkscXO0vfKXfikocSCQkuPjTO71zSUxUdxABPKZItMuiiYUKbyiqa6waY8ZFMemkYOfH5bfu0+/XvztL253d0/d5j+y18Pdy/bx4fDx5f/fg7f3D5td7vtj+ufT493999+Pd1f7x7v+u827vDnqxe4Cg56Nv3Hbn78CoH6j70g3y07eebOamf5fw==", - "brillig_names": ["constructor"] - }, - { - "name": "sync_notes", - "is_unconstrained": true, - "custom_attributes": [], - "abi": { - "error_types": { - "17843811134343075018": { - "error_kind": "string", - "string": "Stack too deep" - } - }, - "parameters": [], - "return_type": null - }, - "bytecode": "H4sIAAAAAAAA/9VUyw6CMBBseURBOaiJ3kz8gyIYOJJ49x8akKMe8OKNT5eabbqpVRKlJkzSbEs3szNlW0oUKESPvAH9tGnIFdhBDCA6aN/tRgFr9hviQKs7JH/O0iQw+BtQ/5OfWtIvIPktnT+bAM+xVfzYi6w77UaIesKWZ/nPbHpe9fhc/MFnh32k1caghm+uIYci3RuYR4Y8iRlRd9prh/eV5YzJei7w++RVO67va/lrWIeafvmOFV/qrDMe1wmv+YFXVVrypcYv4KBzGnMvbGHe1wvY45yo3mjul/J0vZ0b0gNB8gCVxsvQjgYAAA==", - "debug_symbols": "nZLBCoMwEET/Zc8eTDRR8ytSJGqUQEgkxkIR/71RbLHFS3JZmGXe7GFnhV60y9hIPZgZWL2CMh130miv1i2B1kql5Nhc15DuA6HDP09c73J23DpgGU5A6B5Ynnp6kEoAo9X2SADhQH8W6M8D/STMj2/zK4LLk6gIIV8G0fSASAxEY6AiBiojoOz28RVFxQeiGf2FNi+f3EreKnEWa1h0d+mZe03ir3KTNZ3oFyv28l1652ftb2HsY330Gw==", - "brillig_names": ["sync_notes"] - }, - { - "name": "get_counter_value", - "is_unconstrained": true, - "custom_attributes": [], - "abi": { - "error_types": { - "16761564377371454734": { - "error_kind": "string", - "string": "Array index out of bounds" - }, - "17843811134343075018": { - "error_kind": "string", - "string": "Stack too deep" - }, - "206160798890201757": { - "error_kind": "string", - "string": "Storage slot 0 not allowed. Storage slots must start from 1." - }, - "5019202896831570965": { - "error_kind": "string", - "string": "attempt to add with overflow" - } - }, - "parameters": [ - { - "name": "counter_id", - "type": { - "kind": "field" - }, - "visibility": "private" - } - ], - "return_type": { - "abi_type": { - "kind": "field" - }, - "visibility": "public" - } - }, - "bytecode": "H4sIAAAAAAAA/+1bv28jRRSejb2Of8RnJwcnGqiQaL2Jc0kkisDRXAECJJAoTewcp4NEJEFCNLhC0FEhJAoaWqRr4E+gRzoqCjp6JCRabo598ZfP307WyU4IEiNZa++8ee/Nm3nfvHkzTtw/Jck/vtThHRd7t5s/B5crWYW8BgnrmZTsTCLe/ZJ/aeW/l6C+VqEBWkKXqvhvD4abLTff5wr132jlPGPax3hG4D9Yzvncmc74c1986bqzToJtmo8/K0DnyyvAz9rEtNXjsR5GtlV20xXbx9vgmbyj3hY38vf3Jicv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Kog0K4I0K4I0K4I0K4I0K4I0K4I0K2KlCoX5sgc2GhKirBCtVKGCyGpEpBE5jYg1Iq8RLZu7W/2TiFkcYVdaTUGUFaKVVlMQWY2INCKnEbFG5DWioBFpVgRrVsRKq2EfZ1EUB5aVVlMQWY2INCKnEbFG5DWioBFFjShpRJoVETQrImhWRNCsiLUzNE9m2LUzGE+LvEb07Nrwc/fbP5d328sP11ffdpr9H7/ffLzf3t48/nr/79fpLx/uttfX2y/vv97dfrz69P3u6v317cf93zbm8Z+/XKQLl2k3mYe4T8lcUPL7X/ceueAuXPC7e93d838=", - "brillig_names": ["get_counter_value"] - }, { "name": "increace_counter_private", "is_unconstrained": false, @@ -1799,6 +1599,206 @@ ], "verification_key": "AAAAAAAAIAAAAAAAAAAADQAAAAAAAAAAAAAAAAAAAAUAjfaum2pGCa9bm1ND6yy44rz29I0SOGLX\n9SStISj7yW54+O6Qi9ZPt8ikGNsrQkVTON1vYR7ccL1BEVFJ6lbuHwAAAAAAAAAAAAonTH55ktIg\nd8xE0EpdTxIbHsywK4ZESiF6zsvuogAiBk7QOELWzTXgxQYFi8dsTXVWtLoyfJkAbaJ9g3+mp0oH\nWNd6gHAumGHehqiw68yYzoixB9DYUkQKOXCFp/NN7QQx4dKItdX1Z1omJyxD2OgOVWrXDPyucC5q\nIrjrWk+WDjLLRAijaS3rygpixSTAEqC3wQzfHtFHw1pq1YWuUXMaPFwyycEy81D2f8biTDv/AjX3\nWqsrpd+Jrf7TYEtyawuybOv1qLdoUjmgR8sbRbqBngpyA55HHjJ2PvvhCeXHDmIiFrsNOV47td4o\niUTMsVXKWuUNt0cYz/m7yCleK5MYWPNGFw8wUTE8h8HBuwEFaFQL1GZ35avBJ4M9vP0PlxLVwhY+\naAbdTG6gUrgXm1NidqprzQosO0ElvF1O3y2gGCLhrW2tVsOcQFvFh4J5o3AOneCSuzXAUDVKSo1b\nt0gBLwAnz/TZxzGT+8+UDyBoaQXR0Rs+GABpSKDfZtQWniqWotHcAGHtH3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UgllnJGaewH9huJo1F4XOBN69rornEwgV2AghH\nBE1QfmRYo27LpAgmnZ2tP5CCBJxj74krWmlev3FF/I392L4Q6ACHkvgr8Q73tOIaBtDUaJMTbO2o\nfL+MDdcs0TNx/3XSlj2V/AeQAM8lrSBmeR/pbB+J3DW9cEZwSWaQmHN0iE8DfOZFCG4gqd2xnY1w\nSKXoWKvN42405pCW3mL/cBOofAI2QxNeli8J/6v/QACFX6CKpHIZL1AcZJ3TEYgnTBI+gD2PvjJY\nJv5lQhB81cAxsqHlxcptn3EjDVqxz8UVKiNWmgHA4SIQavXflCxhvEyiJ3LOcIdHPYUyLXCBgHos\n7sn1zyXZPCMRmtGn+fy/ULQ1oiscNqnPe18/xglNgnyQ/WnFQuRmA645tKuK6yTjpYo0CT2n2jvI\n+5Wl8iwIU7qw7gx9DjsPlkprougN4PPF2Vs+ZorzhEdV+FaH4i7jlyNZbe89jxqEOK25+fpM8t7v\nqvhw+NvMiTDJHD3RB9KfRPGlDrwEHcg2BBrM/gVLfGXwxDGAIrOGTv0eGIOwzBXGvrL1t88kWQ2K\nOKQCDCZuOZvEf0aB31fEkpmTtoOVGcDxcwfdIC7pmHPZZvPB9BKR4uLVkmf7Lm1F7rGNAiwOjPeP\naO21AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAgs2dscYS+zKASVRePp0wGbh0kJSit88X4cKSBAVboUyAfO8XDbSLnNEmySECroI\npr+xTKY294DwyIVplJAKCKkPy7+dPPQCuqPu2l8Knkm1werJWyZMMC3IVObyLXMw3yg+39qJyUgF\nl/CzRC6XUt751Y/Ckgg2GUJh97Fj/vuvATgwXZNKpmayZy8htuiA1AuYunSoxl7i+D2PbC6ohGQY\nj8a+zx02yPQI5Rd6FkK2tUtzEwRFJMUf6M6rFylnBQ==" }, + { + "name": "add_to_counter_public", + "is_unconstrained": true, + "custom_attributes": ["public", "internal"], + "abi": { + "error_types": { + "10176877060487216746": { + "error_kind": "string", + "string": "Function add_to_counter_public can only be called internally" + }, + "13699457482007836410": { + "error_kind": "string", + "string": "Not initialized" + }, + "16761564377371454734": { + "error_kind": "string", + "string": "Array index out of bounds" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + }, + "206160798890201757": { + "error_kind": "string", + "string": "Storage slot 0 not allowed. Storage slots must start from 1." + }, + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + }, + "parameters": [ + { + "name": "counter_id", + "type": { + "kind": "field" + }, + "visibility": "private" + } + ], + "return_type": null + }, + "bytecode": "JgAEAQInAASARAABJgAEAwAmAgQBAiYCBAADHxgAAwACgEMtCIBDAAEkAAAAQCcCBIBEAAEmAgQAAjoNAAEAAiQAAAK/LAgBAwAAAQIBJgIBAAQsDgQDLAgBBAAAAQIBJgIAAAUsDgUELAgBBgAAAQIBJgIAAgcsDgcGHgIAAAceAgAACDI4AAcACAAJJgIBAQcjAgAAAJ8ACSQAAALoHgIBAAceAgAACAo4BwgJIwIAAAC7AAkkAAAC+iYCAAEHJgIAHQgmAgQODSwIAA4sDAMPLAwEECwMBhEsDAcSLAwIEywMARQAEAANACQAAAMMLAQAACwMDwksDBAKLAwRCywMEgwsCAENJgIEAg4AEAEOASYDBAENACgNAg4sDA4PLA4FDywNDQ4AKA4CDiwODg0sCAEOAAABAgEsDg0OJgIEAAUmAgQBDSwMBQIiAAABUQo4AgUJIwIAAAJKAAkiAAABYywNDgkAKAkCCwA4CwUMLA0MCgA4CgcJJgIEEA8sCAAQLAwDESwMBBIsDAYTLAwHFCwMCBUsDAEWABAADwAkAAADDCwEAAAsDBEKLAwSCywMEwwsDBQOLAwFAiIAAAHCCjgCBQEjAgAAAdUAASIAAAHUJRwMAAIBADgOAQMsCAEBJgIEAgQAEAEEASYDBAEBACgBAgQsDAQGLA4JBiYCBAEGDDgCBgcjAgAAAhYAByQAAAWSACgBAgYAOAYCBywNBwQvDAAEAAMAOA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xtB2DprhDO2lRdvZ8MUYqjuJo7qdQ1gYQ9s5hYUztJ3MSKWZKYJsZkq3cw4LZ2g7mRFjaDtxdNpQ28wEPGdoO+Fl2lDXizNq50BqxlDfzsCbMbSXFm3nICHO0E7iKKlOWpSgndHLpKF2/DgWT8OCtjfZCpwtHQ9hMIlj85oKL2NnUKVBB4MyItT4bQxpdX+/8zRDWRKhvARV2A7MoUR1eVFdXlRXENUVJHU5RSKUqK6CG+FQVoIqnCDFoURqoOROcZou9jWudOYOULqTdY4yVoIqHUzKoEiEEtlV2hLAoKzAGzoPIpSorlKmyKCCAFV8IzKDEtUFWoQqREobjslHdpZR8e2sDEpUV+nh4mlU6eFbBiWqy4jqMnzfGEOJ+oYV9UMrqstJci9f2q7CoLwEFSQZWygt1jMoiY8KACKUqC4U2YUkQknaK2hJ3wgk0pBEGopGDkF0L4cgyNhQFXovUjpcCC3kKCNBgaiuwhZtBlU4vIVDOQmqcPgHujRQx5ArX3ghM4Mq9A0DacOvgZxhYe2BQzkJqjArzqGMCDWuhtWpvaxVGapwECGHEtUVnAAFhdOyOZSXoApHYjGoQnTgUFaCKtxfHEpUF4nsIhKhJD2qdPgFhxL1Qyvqh4UTTa1P8cspzFAFv8GhRHWVPACDChJUYV6JQzkBCpVEQyzEZUoPCcX+DTnKiFBBgipEcw7lJKiCt+FQIjVIpDzJ6hIpb0TKG5HyhaNayLiEcipHWQmqMIvFoYIEVfA2DCooEcoIUKUN5xyKRCgvQRVmsTiUk6AQRChJP9RaCfJePT6LzaK8BFXYRDmB+hmv/rl52t7c7u6fI2b/5feHu5ft48Pr5cu/34Zvbp+2u9326/W3p8e7+8/fn+6vd493++826vXPRwzuKjblp/3B0PES4mgMyO8v9w2lg7nSwcVaY83/AQ==", + "brillig_names": ["add_to_counter_public"] + }, + { + "name": "public_dispatch", + "is_unconstrained": true, + "custom_attributes": ["public"], + "abi": { + "error_types": { + "10176877060487216746": { + "error_kind": "string", + "string": "Function add_to_counter_public can only be called internally" + }, + "13699457482007836410": { + "error_kind": "string", + "string": "Not initialized" + }, + "16761564377371454734": { + "error_kind": "string", + "string": "Array index out of bounds" + }, + "16957488177269924912": { + "error_kind": "fmtstring", + "item_types": [], + "length": 16 + }, + "17618083556256589634": { + "error_kind": "string", + "string": "Initialization hash does not match" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + }, + "206160798890201757": { + "error_kind": "string", + "string": "Storage slot 0 not allowed. Storage slots must start from 1." + }, + "2233873454491509486": { + "error_kind": "string", + "string": "Initializer address is not the contract deployer" + }, + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + }, + "parameters": [ + { + "name": "selector", + "type": { + "kind": "field" + }, + "visibility": "private" + } + ], + "return_type": null + }, + "bytecode": "JgAEAQInAASARAABJgAEAwAmAgQBAiYCBAADHxgAAwACgEMtCIBDAAEkAAAAQCcCBIBEAAEmAgQAAjoNAAEAAiQAAAjbKAIAF/EoiAACCjgBAgMmAgQAAiYCBAAFJgIEAwcAOAUHBiwIAQQAEAEGASYDBAEEACgEAgYsDgUGACgGAgYsDgUGJgIEAwYAOAQGBSMCAAAAngADIgAAANMmAgQFAywIAAUAEAADACQAAAkELAQAAAAoBAIGLA0GBSYCBAIHADgGBwM6DQADAAUiAAAA0ygCAJI5JNYAAwo4AQMFJgIEAQMmAgAABiYCAQAHJgIABggjAgAAAQIABSIAAAMILAgBCSYCBAIKABABCgEmAwQBCQAoCQIKHzwAAwADAAosDQkKACgKAgosDgoJLAgBCgAAAQIBLA4JCiwIAQkAAAECASwOAgkmAgQNDCwIAA0sDAoOLAwJDywMCBAAEAAMACQAAAwHLAQAACwMDgssCAEJAAABAgEsDgcJLAgBCgAAAQIBLA4GCiwIAQwAAAECASYCACYNLA4NDCYCBA4NLAgADiwMCQ8sDAoQLAwMEQAQAA0AJAAADXEsBAAAHgIBAA0eAgAADgo4DQ4PIwIAAAHbAA8kAAANmyYCABkNJgIAAQ4mAgQUEywIABQsDAkVLAwKFiwMDBcsD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+ "brillig_names": ["public_dispatch"] + }, + { + "name": "get_counter_value", + "is_unconstrained": true, + "custom_attributes": [], + "abi": { + "error_types": { + "16761564377371454734": { + "error_kind": "string", + "string": "Array index out of bounds" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + }, + "206160798890201757": { + "error_kind": "string", + "string": "Storage slot 0 not allowed. Storage slots must start from 1." + }, + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + }, + "parameters": [ + { + "name": "counter_id", + "type": { + "kind": "field" + }, + "visibility": "private" + } + ], + "return_type": { + "abi_type": { + "kind": "field" + }, + "visibility": "public" + } + }, + "bytecode": "H4sIAAAAAAAA/+1bv28jRRSejb2Of8RnJwcnGqiQaL2Jc0kkisDRXAECJJAoTewcp4NEJEFCNLhC0FEhJAoaWqRr4E+gRzoqCjp6JCRabo598ZfP307WyU4IEiNZa++8ee/Nm3nfvHkzTtw/Jck/vtThHRd7t5s/B5crWYW8BgnrmZTsTCLe/ZJ/aeW/l6C+VqEBWkKXqvhvD4abLTff5wr132jlPGPax3hG4D9Yzvncmc74c1986bqzToJtmo8/K0DnyyvAz9rEtNXjsR5GtlV20xXbx9vgmbyj3hY38vf3Jicvv3+49+C1jz54d3LEnoaaqvdYPNe1Gdc7hwcnR6O9k5fG46PJ8TFzCPk9c20D1/dG9w/ujplbejFub0+Oju8fHjC3RkluNp7L8G43fw4uWWw+N0k3lIvYVOE8Girc5ZmA8tuka9XzOiF5pg/bx+a92a4tdO2LumX4jnUopy3kXBWvnpsf7ybJUbZpBeRg+9b/ci4lpyvaJQVPk8PvWI7SuQwm4Pyp0Ac3y2KCyb8qTFD+FcKEjtC1L+rYjztCTkfIua68bH6sQN1u/hwsVtb5hdLT5JgP4rxkH1wUI7G90XVFu8v6oNI55IOLyrExQbtVGTsre3WoHysV9qNLNLsV92MF+HdJ9o04Nlw3/j3od0W8T/dO/Ti6ZzbGuB+w8fcx7qvw3n8sik7dzA+x7Q2oR/o/gefr+feeaL9SI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9zt6E+PU6KR29W0dItuzw5ye7olt3SGnEz7d2rrzse/AAlDgmF7TwLJhZQEqBIKBlQBBRvAEVCsYAioRCgSCgOUCQUBhQJxQOKhBIARUJBol2AgkS7AAWJVkIJSLQLUJBoF6Ag0S5AGTTRmsO3nFsvoDCgSCiDJtrTUAZNtKehDJpoT0MZNNGehjJooj0JJQ6aaE9DGTTRnoYyaKI9DYUBRUJBeFuAgvC2AAXhTUJZvgRT4vlUDy9OVFi5EIvxM0cT5P0EjShqREkjWo5rliYO1sb0h8itXC6gILIaEWlETiNijchrREEjihpR0og0K8JqVoTVrAirWRFWsyKsZkUsfw/gqcOKW/luOmN5ft46IVr5zqeCyGpEpBE5jYg1IsVB2VHQiKJGlDSirBCtfJ63ILIaEWlEKysi5EOuICFijchrREEjihpR0oiyQsTlFbEg0qwI1qwIdhoRa0SaYwRrjhGsOUaw5hjBmmOE1xwjvGZFeM2K8JoV4TUrwmtWhNeY6zXmeo25QWNu1oSclSJEPJ9Uv3u7WoiCRhQ1oqQR5eeLeKUIFUTLz6fdhs4sykmISCNa2Q2Zv5Nq96OcXtSIkkaUFaKVplEQLSMPbvYpBCNEpBE5jYg1Iq8RBY0oakRJI8oK0UoVKog0K4I0K4I0K4I0K4I0K4I0K4I0K2KlCoX5sgc2GhKirBCtVKGCyGpEpBE5jYg1Iq8RLZu7W/2TiFkcYVdaTUGUFaKVVlMQWY2INCKnEbFG5DWioBFpVgRrVsRKq2EfZ1EUB5aVVlMQWY2INCKnEbFG5DWioBFFjShpRJoVETQrImhWRNCsiLUzNE9m2LUzGE+LvEb07Nrwc/fbP5d328sP11ffdpr9H7/ffLzf3t48/nr/79fpLx/uttfX2y/vv97dfrz69P3u6v317cf93zbm8Z+/XKQLl2k3mYe4T8lcUPL7X/ceueAuXPC7e93d838=", + "brillig_names": ["get_counter_value"] + }, + { + "name": "sync_notes", + "is_unconstrained": true, + "custom_attributes": [], + "abi": { + "error_types": { + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + } + }, + "parameters": [], + "return_type": null + }, + "bytecode": "H4sIAAAAAAAA/9VUyw6CMBBseURBOaiJ3kz8gyIYOJJ49x8akKMe8OKNT5eabbqpVRKlJkzSbEs3szNlW0oUKESPvAH9tGnIFdhBDCA6aN/tRgFr9hviQKs7JH/O0iQw+BtQ/5OfWtIvIPktnT+bAM+xVfzYi6w77UaIesKWZ/nPbHpe9fhc/MFnh32k1caghm+uIYci3RuYR4Y8iRlRd9prh/eV5YzJei7w++RVO67va/lrWIeafvmOFV/qrDMe1wmv+YFXVVrypcYv4KBzGnMvbGHe1wvY45yo3mjul/J0vZ0b0gNB8gCVxsvQjgYAAA==", + "debug_symbols": "nZLBCoMwEET/Zc8eTDRR8ytSJGqUQEgkxkIR/71RbLHFS3JZmGXe7GFnhV60y9hIPZgZWL2CMh130miv1i2B1kql5Nhc15DuA6HDP09c73J23DpgGU5A6B5Ynnp6kEoAo9X2SADhQH8W6M8D/STMj2/zK4LLk6gIIV8G0fSASAxEY6AiBiojoOz28RVFxQeiGf2FNi+f3EreKnEWa1h0d+mZe03ir3KTNZ3oFyv28l1652ftb2HsY330Gw==", + "brillig_names": ["sync_notes"] + }, + { + "name": "constructor", + "is_unconstrained": true, + "custom_attributes": ["public", "initializer"], + "abi": { + "error_types": { + "16761564377371454734": { + "error_kind": "string", + "string": "Array index out of bounds" + }, + "17618083556256589634": { + "error_kind": "string", + "string": "Initialization hash does not match" + }, + "17843811134343075018": { + "error_kind": "string", + "string": "Stack too deep" + }, + "2233873454491509486": { + "error_kind": "string", + "string": "Initializer address is not the contract deployer" + }, + "5019202896831570965": { + "error_kind": "string", + "string": "attempt to add with overflow" + } + }, + "parameters": [], + "return_type": null + }, + "bytecode": "JgAEAQInAASAQwABJgAEAwAmAgQAASYCBAACHxgAAgABgEMkAAAAOicCBIBDAAEmAgQAAjoNAAEAAiQAAAQALAgBAwAAAQIBJgIBAAQsDgQDLAgBAwAAAQIBJgIAAAUsDgUDLAgBAwAAAQIBJgIAA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pCCShZU7pDlIgpzt7cqKLKgwGQLTLrAUqMQvQnFFpQHE8pSDzE3+yQ4hVKco8iCIpOtnAdYRuU8gIJiCyrnNxSUKQ8zcTmMO5AgBJijkgWV2WioodiA8plorqHIhLLkhodgQplsoTehTDnvTTmfmXQP0wagwDNv4zPeRkNFCyrT39BQYkFlXvrUUMmCYpMtNunK9FI0FFtQmRf7NJSlHuZektNQwdDvDZmVZQWVWdDVUNGCorN5KGF491nIzzB8vnU5Gr2GizRHsQWVufxFQ5EJdb5NdmFtQAHPRnoh08PWUGJAUWajhYYy2QKTLTDZQpMtNNnywYQy2cocX9ZQ0YLK9LA1lCk3yNJS6HykXPQ1FM/nu4MwtmQ/R2WuUVJQmT1wGiqYUBZductCNVQ0eMPc1ZgaymQrcy2HhkoWlDfZ8iZbwZtQmUgZx9blZDY6jJmnyjSUyVbmZSsFlZn61lAmW2KyJXrdOIcy1Y1kqofJYoudpe+Vu/BJQ4kFhZYeG2d2r2koi4/iACaUyRaZdFEwoUzlFU11g015yKY8NI0c+PK2/Kv79O/t8+72bv/w0mH6L3883r/unh6PH1//+z58c/e82+93326+Pz/dP3z58fxws3+677/buOOfz15gGxz0bPqP3fz4FoH6j70gz7jtpgE6q53l/wE=", + "brillig_names": ["constructor"] + }, { "name": "increase_counter_public", "is_unconstrained": true, @@ -1834,7 +1834,7 @@ "return_type": null }, "bytecode": "JgAEAQInAASARAABJgAEAwAmAgQBAiYCBAADHxgAAwACgEMtCIBDAAEkAAAAQCcCBIBEAAEmAgQAAjoNAAEAAiQAAANzLAgBAwAAAQIBJgIBAAQsDgQDLAgBAwAAAQIBJgIAAAQsDgQDLAgBAwAAAQIBJgIAAgUsDgUDHgIAAAMeAgAABTI4AAMABQAGJgIBAQMjAgAAAJ8ABiQAAAOcLAgBAyYCBBkFABABBQEmAwQBAwAoAwIFJgIEGAYAOAYFBiwMBQcMOAcGCBYMCAgjAgAAAOQACCwOBAcAKAcCByIAAADFLA0DBQAoBQIFLA4FAywIAQUA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t0maXTGuhtvPj+l8slgXb392xWwxGmymi3lq7fZlMVxNZ7Pp58f534Wrf6Ie7NfLwbxurjeD1aZ4g6iuLKr5OF2yc+kOk+msKt6i7t/LgrGDjzzuIx3iCD/uo9DBJz7uAw66OIUuTh26FYC6OHWJ5B/t2fLS2LnQGDsfWmNgvmJNKHK0JlQ+WSNdsRbA5t4CAb5ZH/ClB3zxjXHifyo+9qE+Qat+vKc+BGzwISjdwVeCeLRWCnqBT9Arfiqwb/iHEDF7iED5Q1wvTQztyEO5E0K4iSAa7/QbIjTG6fI0pL3/woloC0dM4bAtddiWOmJLHbGljtpSR9kSjnfeFk40hXNj0vcyHFOV5b2pyvLeljpoq7LQ1nPnxjz1ZTjBFE5wlnDC099Z7YoIkfQnToRnd1akFofxEqfPlYSeL1W+1nTRU+4AuTPA3Blg7gwIcweQzAFC7gxC7gyizx2AMwdgyB0gZg4guTOQ3Blo7lGkmeuAHeUO0MPTNLg2gNx5wWp6ozfG8XJLlvtYhfWJI6Zw+liF9YljS50bMw+iZhc9bWfH33F6/b7A5CzNpZmevcPBscURusRRUzjBljrR28JhUzhsSx22pY7A63AUL3GevdH76xqeFWzhmFJHHNnCUVM4trajxHtbOGwKB9EWjpjCIVvqkK2xE2xVVrClTrT1GGRnB2efmn8Hq+lgOKuOh04n2/no7Azq5t+y+nEcdblajKrxdlXVB1NPZ1LrtLzDMn19TWnW9QqiJai+1ycbD01XgoS6CQdbV6av/IkhcfwH", "brillig_names": ["increase_counter_public"] }, { @@ -1974,21 +1974,14 @@ { "name": "parameters", "type": { - "fields": [ - { - "name": "counter_id", - "type": { - "kind": "field" - } - } - ], + "fields": [], "kind": "struct", - "path": "SimpleLogging::add_to_counter_public_parameters" + "path": "SimpleLogging::constructor_parameters" } } ], "kind": "struct", - "path": "SimpleLogging::add_to_counter_public_abi" + "path": "SimpleLogging::constructor_abi" }, { "fields": [ @@ -2004,26 +1997,33 @@ } ], "kind": "struct", - "path": "SimpleLogging::increase_counter_public_parameters" + "path": "SimpleLogging::increace_counter_private_parameters" } } ], "kind": "struct", - "path": "SimpleLogging::increase_counter_public_abi" + "path": "SimpleLogging::increace_counter_private_abi" }, { "fields": [ { "name": "parameters", "type": { - "fields": [], + "fields": [ + { + "name": "counter_id", + "type": { + "kind": "field" + } + } + ], "kind": "struct", - "path": "SimpleLogging::constructor_parameters" + "path": "SimpleLogging::add_to_counter_public_parameters" } } ], "kind": "struct", - "path": "SimpleLogging::constructor_abi" + "path": "SimpleLogging::add_to_counter_public_abi" }, { "fields": [ @@ -2039,12 +2039,12 @@ } ], "kind": "struct", - "path": "SimpleLogging::increace_counter_private_parameters" + "path": "SimpleLogging::increase_counter_public_parameters" } } ], "kind": "struct", - "path": "SimpleLogging::increace_counter_private_abi" + "path": "SimpleLogging::increase_counter_public_abi" } ] } diff --git a/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json.bak b/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json.bak index 5bbbc4b4..716181cb 100644 --- a/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json.bak +++ b/services/event-cannon/src/contract-projects/SimpleLogging/target/simple_logging-SimpleLogging.json.bak @@ -1 +1 @@ -{"noir_version":"0.38.0+c807678263164209f62fa5c9bf19f468cace1f98-x8664","name":"SimpleLogging","functions":[{"name":"add_to_counter_public","is_unconstrained":true,"custom_attributes":["public","internal"],"abi":{"parameters":[{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":null,"error_types":{"206160798890201757":{"error_kind":"string","string":"Storage slot 0 not allowed. Storage slots must start from 1."},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"10176877060487216746":{"error_kind":"string","string":"Function add_to_counter_public can only be called internally"},"13699457482007836410":{"error_kind":"string","string":"Not initialized"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+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dutLEVQSCV3AIimJTcUN+IaSugRIyCNgAQBGQQ0LbnV8T5ZqxKQQ0AeAQUANHPaXAZECIgRkEZAgoAMAkIygpGMYCQjGMkIjWSERjJCIxkxMwFkfaxPTnECEgRkEJBFQA4BeQQUANDMBFAGNH1zJf40h0SSHnZmLicDEgRkEJBFQA4BeQQUANDMD5AyIEJASEYYJCNmJpvEuAhySccyM9mUAVkE5BCQR0ABAM1MNmVAhIAYAWkEhGSERTLCIhlhkYyYmWxa9rAzk03LoJnJpgzo4mHDj+7dv3cv+7v7w+Nrhzl++O3p4W3//PT+9u2/r8Mn9y/7w2H/5fbry/PD46dvL4+3h+eH42c79f7PRw7uRpPryPSnqVM3niLxx7fUfyo3HGx31e7K/wM=","brillig_names":["add_to_counter_public"]},{"name":"public_dispatch","is_unconstrained":true,"custom_attributes":["public"],"abi":{"parameters":[{"name":"selector","type":{"kind":"field"},"visibility":"private"}],"return_type":null,"error_types":{"206160798890201757":{"error_kind":"string","string":"Storage slot 0 not allowed. Storage slots must start from 1."},"2233873454491509486":{"error_kind":"string","string":"Initializer address is not the contract deployer"},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"10176877060487216746":{"error_kind":"string","string":"Function add_to_counter_public can only be called internally"},"13699457482007836410":{"error_kind":"string","string":"Not initialized"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"16957488177269924912":{"error_kind":"fmtstring","length":16,"item_types":[]},"17618083556256589634":{"error_kind":"string","string":"Initialization hash does not match"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/91dTYhkVxW+r+tnuqq7p2omPZOZiQGRIIoQXlVX/wliyxhNIFFIUJdS01UdGyc9Q08nJG5s3fmzkGwMuDEIuhBcKMSFRLIRBTeCG0UQBdGFGAwIgiCYF96p+uqr7716r+re7okXilf17rnn75577r3n/lTkxilKn1X67QTMXvqMF0sdj7jiCSbzhMgSqpcWaqS/lyC/4lHoBtH1iX8n7vUaQj6P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C2gEzt4xHqecg4LEFlAyQLKFhBbQGIBle2gcmp32fMgsIDQAooWEFlAyQLKFhBbQGIBWXrEqZ0PD+t6ccAFCCwgtICiBUQWULKAsgXEFtD6ySWsIKLXI2w5sZyQAgILCC2gaAGRBZQsoGwBsQUkFpClR0RLjzixOgElriBeDCwnXvVXQNECIgsoWUDZAmILSCygYgCdeKVUAVl6BFl6BFl6BFl6BKXtNWyhbAGxBWS4bCgndnIRmkEi6Wil0qf9ucqJt964TvIELstDkQWULKBsAbEFtP6bi8z3EKCEtAAVA+jECyEKCCwgtICiBUQWULKAsgXEFpClR2RLj2BLj2BLj2BLj2BLj2BLj1ifbTzdvau30EJcgrIFxBaQWEDFAFq/g6aBwAJCCyhaQLQd9LAM9mpao7r8dopLzImHO6lWvsfLRVdUsaBOLc6soMCEWo9eqO9xAbAsUdGEIhMqmVDZhGITSkyoYkGduCbXUGBCmfoGmvoGmvoGmvoGmvoGmvrG+mX2+bHm1LKFQDWS4woqmlBkQiUTKptQbEKZxutoGq/JNF6Tabw+teSPgoomFJlQyYQ60Tdyja4guESxCSUmVLGgTi11o6DAhEITSu8bayhT30imvnFqORIFxSaUadxIpnEjm8aNbBo3smncyKZxI5v6Rjb1jWzqG9nUN7Kpb7DpLLPpLLPpLPPms/xr+vbfd1/v3r2///htwjz88cenD9/vPn96/vr9f1/mv7z/end/f/fv2y9fP3/4+PePrx/f3n/+8PC3m/D8z1+C4Xa6qzipeZAiId8K5Edt01fKfEuMD18ffhQBnv5aJg2Tjv8D","brillig_names":["public_dispatch"]},{"name":"constructor","is_unconstrained":true,"custom_attributes":["public","initializer"],"abi":{"parameters":[],"return_type":null,"error_types":{"2233873454491509486":{"error_kind":"string","string":"Initializer address is not the contract deployer"},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17618083556256589634":{"error_kind":"string","string":"Initialization hash does not match"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"b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ty7gscKfgzK0VEFwciOlGFv6ppr+bhSV3sz3+FwzPLIiyLZhYjUESEiBgRWUQ0XW849FnAKY5Egoimv3KhPjmFRnjWICJCRIyILCKaKfG230/+5NnsnUgQkUdEARFFRJQA0dxvBZdFhIgYEVlEhGSEQzLCIRnhkIxwSEY4JCMEyYi5nxNEHqySRyJGRBYROUQkiMgjooCIIiCauVXT9fcVkXOjCjtzz6MiYkRkEZFDRIKIPCIKiCgiogSIApIRAcmImZty3HArjwujwjJzm40icohIEJFHRAERRUSUANHMvRGKiBARkhERyYiIZEREMmLm+u5yDztzVVURRUSETBumz99G1z2OOYo9k9iZs3ZG+gphvIxEjIgsInKIaDofmtlZJ6IQRyKPiAIiiogoAaKZxXsVESEiRkQWETlEhGQEIRlBSEYQkhGEZAQjGTF9WmaxrMyclDHk+uPWjkUeEQVEFBFRAkQzZ3IUEVKULVKULVKULVKUZ87kKCKPiAIiiohoJiN8fzSZeD61szNnchQRISJGRBYROUQkiEjPiAkRkhEOyYiZMznLopkzOYoIqRGC1AhBaoQgNUKQGiFIjRAkIwTJCEEywiMZ4ZGM8MjO9cjO9cjO9Rfv3N/Nq/9unvY3t4f750bTvvnz4e5l//jw+vLl/x/dO7dP+8Nh//36x9Pj3f3Xn0/314fHu/a9nXn989lGunKGvrSP8mhecjMBY5L2Zft12+bajw2h2Wqz5T8=","brillig_names":["constructor"]},{"name":"sync_notes","is_unconstrained":true,"custom_attributes":[],"abi":{"parameters":[],"return_type":null,"error_types":{"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/9VUyw6CMBBseURBOaiJ3kz8gyIYOJJ49x8akKMe8OKNT5eabbqpVRKlJkzSbEs3szNlW0oUKESPvAH9tGnIFdhBDCA6aN/tRgFr9hviQKs7JH/O0iQw+BtQ/5OfWtIvIPktnT+bAM+xVfzYi6w77UaIesKWZ/nPbHpe9fhc/MFnh32k1caghm+uIYci3RuYR4Y8iRlRd9prh/eV5YzJei7w++RVO67va/lrWIeafvmOFV/qrDMe1wmv+YFXVVrypcYv4KBzGnMvbGHe1wvY45yo3mjul/J0vZ0b0gNB8gCVxsvQjgYAAA==","debug_symbols":"nZLBCoMwEET/Zc8eTDRR8ytSJGqUQEgkxkIR/71RbLHFS3JZmGXe7GFnhV60y9hIPZgZWL2CMh130miv1i2B1kql5Nhc15DuA6HDP09c73J23DpgGU5A6B5Ynnp6kEoAo9X2SADhQH8W6M8D/STMj2/zK4LLk6gIIV8G0fSASAxEY6AiBiojoOz28RVFxQeiGf2FNi+f3EreKnEWa1h0d+mZe03ir3KTNZ3oFyv28l1652ftb2HsY330Gw==","brillig_names":["sync_notes"]},{"name":"get_counter_value","is_unconstrained":true,"custom_attributes":[],"abi":{"parameters":[{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":{"abi_type":{"kind":"field"},"visibility":"public"},"error_types":{"206160798890201757":{"error_kind":"string","string":"Storage slot 0 not allowed. Storage slots must start from 1."},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+1bv28jRRSejb2Of8RnJwcnGqiQaL2Jc0kkisDRXAECJJAoTewcp4NEJEFCNLhC0FEhJAoaWqRr4E+gRzoqCjp6JCRabo598ZfP307WyU4IEiNZa++8ee/Nm3nfvHkzTtw/Jck/vtThHRd7t5s/B5crWYW8BgnrmZTsTCLe/ZJ/aeW/l6C+VqEBWkKXqvhvD4abLTff5wr132jlPGPax3hG4D9Yzvncmc74c1986bqzToJtmo8/K0DnyyvAz9rEtNXjsR5GtlV20xXbx9vgmbyj3hY38vf3Jicvv3+49+C1jz54d3LEnoaaqvdYPNe1Gdc7hwcnR6O9k5fG46PJ8TFzCPk9c20D1/dG9w/ujplbejFub0+Oju8fHjC3RkluNp7L8G43fw4uWWw+N0k3lIvYVOE8Girc5ZmA8tuka9XzOiF5pg/bx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Y2INCKnEbFG5DWioBFFjShpRJoVETQrImhWRNCsiLUzNE9m2LUzGE+LvEb07Nrwc/fbP5d328sP11ffdpr9H7/ffLzf3t48/nr/79fpLx/uttfX2y/vv97dfrz69P3u6v317cf93zbm8Z+/XKQLl2k3mYe4T8lcUPL7X/ceueAuXPC7e93d838=","brillig_names":["get_counter_value"]},{"name":"increace_counter_private","is_unconstrained":false,"custom_attributes":["private"],"abi":{"parameters":[{"name":"inputs","type":{"kind":"struct","path":"aztec::context::inputs::private_context_inputs::PrivateContextInputs","fields":[{"name":"call_context","type":{"kind":"struct","path":"aztec::protocol_types::abis::call_context::CallContext","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}}]}},{"name":"historical_header","type":{"kind":"struct","path":"aztec::protocol_types::header::Header","fields":[{"name":"last_archive","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"content_commitment","type":{"kind":"struct","path":"aztec::protocol_types::content_commitment::ContentCommitment","fields":[{"name":"num_txs","type":{"kind":"field"}},{"name":"txs_effects_hash","type":{"kind":"field"}},{"name":"in_hash","type":{"kind":"field"}},{"name":"out_hash","type":{"kind":"field"}}]}},{"name":"state","type":{"kind":"struct","path":"aztec::protocol_types::state_reference::StateReference","fields":[{"name":"l1_to_l2_message_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"partial","type":{"kind":"struct","path":"aztec::protocol_types::partial_state_reference::PartialStateReference","fields":[{"name":"note_hash_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"nullifier_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"public_data_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}}]}}]}},{"name":"global_variables","type":{"kind":"struct","path":"aztec::protocol_types::abis::global_variables::GlobalVariables","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"block_number","type":{"kind":"field"}},{"name":"slot_number","type":{"kind":"field"}},{"name":"timestamp","type":{"kind":"integer","sign":"unsigned","width":64}},{"name":"coinbase","type":{"kind":"struct","path":"aztec::protocol_types::address::eth_address::EthAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"fee_recipient","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"gas_fees","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}},{"name":"total_fees","type":{"kind":"field"}}]}},{"name":"tx_context","type":{"kind":"struct","path":"aztec::protocol_types::transaction::tx_context::TxContext","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"gas_settings","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_settings::GasSettings","fields":[{"name":"gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"teardown_gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"max_fees_per_gas","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}}]}},{"name":"start_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}}]},"visibility":"private"},{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":{"abi_type":{"kind":"struct","path":"aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs","fields":[{"name":"call_context","type":{"kind":"struct","path":"aztec::protocol_types::abis::call_context::CallContext","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}}]}},{"name":"args_hash","type":{"kind":"field"}},{"name":"returns_hash","type":{"kind":"field"}},{"name":"min_revertible_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"is_fee_payer","type":{"kind":"boolean"}},{"name":"max_block_number","type":{"kind":"struct","path":"aztec::protocol_types::abis::max_block_number::MaxBlockNumber","fields":[{"name":"_opt","type":{"kind":"struct","path":"std::option::Option","fields":[{"name":"_is_some","type":{"kind":"boolean"}},{"name":"_value","type":{"kind":"integer","sign":"unsigned","width":32}}]}}]}},{"name":"note_hash_read_requests","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::read_request::ReadRequest","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"nullifier_read_requests","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::read_request::ReadRequest","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"key_validation_requests_and_generators","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator","fields":[{"name":"request","type":{"kind":"struct","path":"aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest","fields":[{"name":"pk_m","type":{"kind":"struct","path":"std::embedded_curve_ops::EmbeddedCurvePoint","fields":[{"name":"x","type":{"kind":"field"}},{"name":"y","type":{"kind":"field"}},{"name":"is_infinite","type":{"kind":"boolean"}}]}},{"name":"sk_app","type":{"kind":"field"}}]}},{"name":"sk_app_generator","type":{"kind":"field"}}]}}},{"name":"note_hashes","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::note_hash::NoteHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"nullifiers","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::nullifier::Nullifier","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"note_hash","type":{"kind":"field"}}]}}},{"name":"private_call_requests","type":{"kind":"array","length":4,"type":{"kind":"struct","path":"aztec::protocol_types::abis::private_call_request::PrivateCallRequest","fields":[{"name":"call_context","type":{"kind":"struct","path":"aztec::protocol_types::abis::call_context::CallContext","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}}]}},{"name":"args_hash","type":{"kind":"field"}},{"name":"returns_hash","type":{"kind":"field"}},{"name":"start_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"end_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"public_call_requests","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::side_effect::Counted","fields":[{"name":"inner","type":{"kind":"struct","path":"aztec::protocol_types::abis::public_call_request::PublicCallRequest","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}},{"name":"args_hash","type":{"kind":"field"}}]}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"public_teardown_call_request","type":{"kind":"struct","path":"aztec::protocol_types::abis::public_call_request::PublicCallRequest","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}},{"name":"args_hash","type":{"kind":"field"}}]}},{"name":"l2_to_l1_msgs","type":{"kind":"array","length":2,"type":{"kind":"struct","path":"aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message","fields":[{"name":"recipient","type":{"kind":"struct","path":"aztec::protocol_types::address::eth_address::EthAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"content","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"start_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"end_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"note_encrypted_logs_hashes","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::log_hash::NoteLogHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"length","type":{"kind":"field"}},{"name":"note_hash_counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"encrypted_logs_hashes","type":{"kind":"array","length":4,"type":{"kind":"struct","path":"aztec::protocol_types::abis::log_hash::EncryptedLogHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"length","type":{"kind":"field"}},{"name":"randomness","type":{"kind":"field"}}]}}},{"name":"contract_class_logs_hashes","type":{"kind":"array","length":1,"type":{"kind":"struct","path":"aztec::protocol_types::abis::log_hash::LogHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"length","type":{"kind":"field"}}]}}},{"name":"historical_header","type":{"kind":"struct","path":"aztec::protocol_types::header::Header","fields":[{"name":"last_archive","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"content_commitment","type":{"kind":"struct","path":"aztec::protocol_types::content_commitment::ContentCommitment","fields":[{"name":"num_txs","type":{"kind":"field"}},{"name":"txs_effects_hash","type":{"kind":"field"}},{"name":"in_hash","type":{"kind":"field"}},{"name":"out_hash","type":{"kind":"field"}}]}},{"name":"state","type":{"kind":"struct","path":"aztec::protocol_types::state_reference::StateReference","fields":[{"name":"l1_to_l2_message_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"partial","type":{"kind":"struct","path":"aztec::protocol_types::partial_state_reference::PartialStateReference","fields":[{"name":"note_hash_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"nullifier_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"public_data_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}}]}}]}},{"name":"global_variables","type":{"kind":"struct","path":"aztec::protocol_types::abis::global_variables::GlobalVariables","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"block_number","type":{"kind":"field"}},{"name":"slot_number","type":{"kind":"field"}},{"name":"timestamp","type":{"kind":"integer","sign":"unsigned","width":64}},{"name":"coinbase","type":{"kind":"struct","path":"aztec::protocol_types::address::eth_address::EthAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"fee_recipient","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"gas_fees","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}},{"name":"total_fees","type":{"kind":"field"}}]}},{"name":"tx_context","type":{"kind":"struct","path":"aztec::protocol_types::transaction::tx_context::TxContext","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"gas_settings","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_settings::GasSettings","fields":[{"name":"gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"teardown_gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"max_fees_per_gas","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}}]}}]},"visibility":"databus"},"error_types":{"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+WdBZQTVxuGJ9ldYKEUWbwthRYoFEs22d0Ed3d3WMlSiltdtu7uTpW6u1Jvqbs7Neru9H+/knRnh8A5f3dC/+f895znJJmZzDzfzWQymbn3uwFnY2kRdJzs4MbnAZGVfLRJrTzTUo/u5zlplquTZlrdNNPqpZnWIM20JqKPZ1rLNMvtmGZaqzTTWqeZ1iY5zV0Cycc+ycdIqDAaTRTlJ8KRcHEoP14SKwhFC0oKY+FYuCBWUJYfi0QSsWisKF4SLwrFw9FIIlxeEI+UhzaW+sHKdYWqVfJLM+nZwDfPUCiTng3/uWe+d4K55Ylsl6t9XhuSz9s6lc8buKY3TD5PvS9PrxuJxqJJsHJ6qgQ9dRCqXgm38bE+m/r3uYfd3y1bb6sM14Pbvbr10CxD9dAsWQ/ZnjpIV/zcfsCz7oDP22jrZOZ4kbGdpZmPO0vzDO0szV07S+qH1snwBxlwMvtBVnfd8fxIPD9aVpjJOsjbSj9+oeqVcDOIZ5Z/6wq5D2QtvEdP70Giul9sPyuhnZOZD8vvmH08AIR3gcQc9DHm9pCYffxShjtspZhD1SvhXX2sP8qPREeH4dkJ4tkZ4tkF4tkV4hmCeIYhnvkQzwjEMwrxLIB4FkI8iyCeMYhnHOLZDeLZHeLZA+LZE+LZC+LZG+LZB+LZF+LZD+LZH+I5AOI5EOI5COI5GOI5BOI5FOI5DOI5HOI5AuI5EuI5CuI5OkOe/8v3BcdspZhD1SvhsT7Wn48tqzK6P45zGJ7jIZ4TIJ4TIZ6TIJ6TIZ5TIJ5TIZ7TIJ7TIZ4zIJ4zIZ6zIJ6zIZ5zIJ7FEM8SiGcpxLMM4pmAeJZDPOdCPHeDeM6DeO4O8ZwP8VwA8VwI8VwE8VwM8VwC8VwK8Vw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z3AfklJMduPNcXlaGVFT6/v3D4GT0BD6W4T9S4Txnyyc/qT/EdoBvnnyeWLR0ZWJlYszKkgXzSgetXFS6Yt7iRf2LFyzwHuzdO5S75HiW874v3YHd/Trb8zonzXo3937vtM3tfG5/wg/I9snX//YPyH8Av+688PxzAQA=","debug_symbols":"7ZbbisIwEIbfJde9yMzkMPFVFpGqVQqlStWFRXz3TUrTgxuQreyC4E3pJH86X/4Zhl7Ftlhf9quy3h1OYvFxFdVhk5/LQ+2jqwBq107HvA7h6Zw3Z7EA42QminrrX62Ut0zsyqoQC+Nu2Q8xMnEnRjaDGMgk1KTBdWrSDh+oHTJ0aodO92rEFAkwm4jt5KAmSokBIwiA5bF4mQlQb1+Svui3L0lfzNuXpC/2aV8UoO7ECgwMN0XTZuA/z+CezgAkVRQTuSGDtalqsYo8jg1OeBJ9g6xtbBz0pbvnR/ni/JDid4iRSI56NIlvqc9gicdAKXzN0RgDw4dByxYGn4dxUWwV2Qcw4Az2dXJmop/nJr36BdT/XgAlEkUgqUBNgXy0bsqqKveryZ+VDA+V7BYACf3IRL5vMUVzDqk5h/ScQ+bXh3wEQZueRHqohh6NFj+IlzcffuZNma+rIrgadi/1Jprsw/PXMe7EMhybw6bYXpoiFGSoRXCVZKZkGOkBRHGmqWdrl5AyZJ/VZ/4G","brillig_names":["pack_arguments_oracle_wrapper","enqueue_public_function_call_internal"]},{"name":"increase_counter_public","is_unconstrained":true,"custom_attributes":["public"],"abi":{"parameters":[{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":null,"error_types":{"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"13699457482007836410":{"error_kind":"string","string":"Not initialized"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/9VZS4sjVRSu6lTl2ZnEZB49Lbh05eJWUt1JdiUyO9GVP6BMqqRhXnS3oiCYv+HGpXvBjYLgTsGF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z7k7m3J3MuTuZc3fyGBNFbzqB+OAHVoXarVeV/tYrjTFTHBMnYuEoFI43WDj3/Yq53S5PxS7f44z6P0La1oeaS/tnT+2DdDiR+zgeC0ewcAIWTsTCUSgcMVg49Hs42l80y7P3ML9fw4vDwmEsHI+FI1g4WNtRErFwFAonGCwcwsLBcuWA5coBy5UDlisHLFcOQK58TsN/0109na2qy6nS5XE9vzlkevi/rb6cN93uNvNqcdxVzcnT66HTxr+scaW1Lt1m0yAUtSTV5qbN+9CUFH0zbMzFWk6xkhgSxxs=","brillig_names":["increase_counter_public"]},{"name":"compute_note_hash_and_optionally_a_nullifier","is_unconstrained":true,"custom_attributes":[],"abi":{"parameters":[{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]},"visibility":"private"},{"name":"nonce","type":{"kind":"field"},"visibility":"private"},{"name":"storage_slot","type":{"kind":"field"},"visibility":"private"},{"name":"note_type_id","type":{"kind":"field"},"visibility":"private"},{"name":"compute_nullifier","type":{"kind":"boolean"},"visibility":"private"},{"name":"serialized_note","type":{"kind":"array","length":0,"type":{"kind":"field"}},"visibility":"private"}],"return_type":{"abi_type":{"kind":"array","length":4,"type":{"kind":"field"}},"visibility":"public"},"error_types":{"16957488177269924912":{"error_kind":"fmtstring","length":16,"item_types":[]},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/9VZ23LaMBAV2AbshIRA0kIfM9O3dsYO5pI3ZnrJd7hJ+IJ+gB/60n51o0FrHy+bDMGrB3aGke2Vzh6dlSzJdMzOBi+/jrsOXdkz+0Z1Nq5M21mmiJX65Nk5EZ7dE+EZnAjPUJFnR+BpS5pvkdnNub7Zzcc9Jza2iQ7Ab94CYkH/uTJ2ZRf8ionJYqGzWvjrNH+MTdOU+c9jh9n3g78g/IEf/JR4fytrfOwLxQ1c+VDWWj5AG2tDd42DmHDJ1wXfd+YLwPeD+XAM/2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Tyl5SslTSp5S8pSSp5Q8peQZJc8oeUbJM0qeUfKMkmeUPKPkGSXPKHmJkpcoeYmSlyh5iZKXKHmJkpcoeYmSlyh5vq6xssfKO6zcYOWAlSNWFqysWNmwMmbQYwY9ZtBjBj1m0GMGPWNwLav3bu67/ZC/BhKn23h4mk8sH5f8Z1RxmadDPt7mvA0tfucV21dtQhXC418uC19ezzdaDikHfQI=","brillig_names":["compute_note_hash_and_optionally_a_nullifier"]}],"outputs":{"structs":{"functions":[{"kind":"struct","path":"SimpleLogging::add_to_counter_public_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::add_to_counter_public_parameters","fields":[{"name":"counter_id","type":{"kind":"field"}}]}}]},{"kind":"struct","path":"SimpleLogging::increase_counter_public_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::increase_counter_public_parameters","fields":[{"name":"counter_id","type":{"kind":"field"}}]}}]},{"kind":"struct","path":"SimpleLogging::constructor_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::constructor_parameters","fields":[]}}]},{"kind":"struct","path":"SimpleLogging::increace_counter_private_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::increace_counter_private_parameters","fields":[{"name":"counter_id","type":{"kind":"field"}}]}}]}]},"globals":{"storage":[{"kind":"struct","fields":[{"name":"contract_name","value":{"kind":"string","value":"SimpleLogging"}},{"name":"fields","value":{"kind":"struct","fields":[{"name":"counters","value":{"kind":"struct","fields":[{"name":"slot","value":{"kind":"integer","sign":false,"value":"0000000000000000000000000000000000000000000000000000000000000001"}}]}}]}}]}]}},"file_map":{"33":{"source":"use crate::default::Default;\nuse crate::hash::Hasher;\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2 {\n cache: [Field; 3],\n state: [Field; 4],\n cache_size: u32,\n squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2 {\n #[no_predicates]\n pub fn hash(input: [Field; N], message_size: u32) -> Field {\n if message_size == N {\n Poseidon2::hash_internal(input, N, false)\n } else {\n Poseidon2::hash_internal(input, message_size, true)\n }\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2 {\n let mut result =\n Poseidon2 { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = crate::hash::poseidon2_permutation(self.state, 4);\n }\n\n fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = Poseidon2::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if is_variable_length {\n sponge.absorb(1);\n }\n sponge.squeeze()\n }\n}\n\npub struct Poseidon2Hasher {\n _state: [Field],\n}\n\nimpl Hasher for Poseidon2Hasher {\n fn finish(self) -> Field {\n let iv: Field = (self._state.len() as Field) * 18446744073709551616; // iv = (self._state.len() << 64)\n let mut sponge = Poseidon2::new(iv);\n for i in 0..self._state.len() {\n sponge.absorb(self._state[i]);\n }\n sponge.squeeze()\n }\n\n fn write(&mut self, input: Field) {\n self._state = self._state.push_back(input);\n }\n}\n\nimpl Default for Poseidon2Hasher {\n fn default() -> Self {\n Poseidon2Hasher { _state: &[] }\n }\n}\n","path":"std/hash/poseidon2.nr"},"57":{"source":"use crate::cmp::{Eq, Ord, Ordering};\nuse crate::default::Default;\nuse crate::hash::{Hash, Hasher};\n\npub struct Option {\n _is_some: bool,\n _value: T,\n}\n\nimpl Option {\n /// Constructs a None value\n pub fn none() -> Self {\n Self { _is_some: false, _value: crate::mem::zeroed() }\n }\n\n /// Constructs a Some wrapper around the given value\n pub fn some(_value: T) -> Self {\n Self { _is_some: true, _value }\n }\n\n /// True if this Option is None\n pub fn is_none(self) -> bool {\n !self._is_some\n }\n\n /// True if this Option is Some\n pub fn is_some(self) -> bool {\n self._is_some\n }\n\n /// Asserts `self.is_some()` and returns the wrapped value.\n pub fn unwrap(self) -> T {\n assert(self._is_some);\n self._value\n }\n\n /// Returns the inner value without asserting `self.is_some()`\n /// Note that if `self` is `None`, there is no guarantee what value will be returned,\n /// only that it will be of type `T`.\n pub fn unwrap_unchecked(self) -> T {\n self._value\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, returns the given default value.\n pub fn unwrap_or(self, default: T) -> T {\n if self._is_some {\n self._value\n } else {\n default\n }\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, calls the given function to return\n /// a default value.\n pub fn unwrap_or_else(self, default: fn[Env]() -> T) -> T {\n if self._is_some {\n self._value\n } else {\n default()\n }\n }\n\n /// Asserts `self.is_some()` with a provided custom message and returns the contained `Some` value\n pub fn expect(self, message: fmtstr) -> T {\n assert(self.is_some(), message);\n self._value\n }\n\n /// If self is `Some(x)`, this returns `Some(f(x))`. Otherwise, this returns `None`.\n pub fn map(self, f: fn[Env](T) -> U) -> Option {\n if self._is_some {\n Option::some(f(self._value))\n } else {\n Option::none()\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns the given default value.\n pub fn map_or(self, default: U, f: fn[Env](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns `default()`.\n pub fn map_or_else(self, default: fn[Env1]() -> U, f: fn[Env2](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default()\n }\n }\n\n /// Returns None if self is None. Otherwise, this returns `other`.\n pub fn and(self, other: Self) -> Self {\n if self.is_none() {\n Option::none()\n } else {\n other\n }\n }\n\n /// If self is None, this returns None. Otherwise, this calls the given function\n /// with the Some value contained within self, and returns the result of that call.\n ///\n /// In some languages this function is called `flat_map` or `bind`.\n pub fn and_then(self, f: fn[Env](T) -> Option) -> Option {\n if self._is_some {\n f(self._value)\n } else {\n Option::none()\n }\n }\n\n /// If self is Some, return self. Otherwise, return `other`.\n pub fn or(self, other: Self) -> Self {\n if self._is_some {\n self\n } else {\n other\n }\n }\n\n /// If self is Some, return self. Otherwise, return `default()`.\n pub fn or_else(self, default: fn[Env]() -> Self) -> Self {\n if self._is_some {\n self\n } else {\n default()\n }\n }\n\n // If only one of the two Options is Some, return that option.\n // Otherwise, if both options are Some or both are None, None is returned.\n pub fn xor(self, other: Self) -> Self {\n if self._is_some {\n if other._is_some {\n Option::none()\n } else {\n self\n }\n } else if other._is_some {\n other\n } else {\n Option::none()\n }\n }\n\n /// Returns `Some(x)` if self is `Some(x)` and `predicate(x)` is true.\n /// Otherwise, this returns `None`\n pub fn filter(self, predicate: fn[Env](T) -> bool) -> Self {\n if self._is_some {\n if predicate(self._value) {\n self\n } else {\n Option::none()\n }\n } else {\n Option::none()\n }\n }\n\n /// Flattens an Option> into a Option.\n /// This returns None if the outer Option is None. Otherwise, this returns the inner Option.\n pub fn flatten(option: Option>) -> Option {\n if option._is_some {\n option._value\n } else {\n Option::none()\n }\n }\n}\n\nimpl Default for Option {\n fn default() -> Self {\n Option::none()\n }\n}\n\nimpl Eq for Option\nwhere\n T: Eq,\n{\n fn eq(self, other: Self) -> bool {\n if self._is_some == other._is_some {\n if self._is_some {\n self._value == other._value\n } else {\n true\n }\n } else {\n false\n }\n }\n}\n\nimpl Hash for Option\nwhere\n T: Hash,\n{\n fn hash(self, state: &mut H)\n where\n H: Hasher,\n {\n self._is_some.hash(state);\n if self._is_some {\n self._value.hash(state);\n }\n }\n}\n\n// For this impl we're declaring Option::none < Option::some\nimpl Ord for Option\nwhere\n T: Ord,\n{\n fn cmp(self, other: Self) -> Ordering {\n if self._is_some {\n if other._is_some {\n self._value.cmp(other._value)\n } else {\n Ordering::greater()\n }\n } else if other._is_some {\n Ordering::less()\n } else {\n Ordering::equal()\n }\n }\n}\n","path":"std/option.nr"},"58":{"source":"pub fn panic(message: fmtstr) -> U {\n assert(false, message);\n crate::mem::zeroed()\n}\n","path":"std/panic.nr"},"69":{"source":"use dep::aztec::macros::aztec;\n\n#[aztec]\ncontract SimpleLogging {\n use dep::aztec::prelude::{Map, PublicMutable};\n use dep::aztec::{\n //keys::getters::get_public_keys,\n macros::{storage::storage, functions::{public, initializer, private, internal}},\n };\n #[storage]\n struct Storage {\n counters: Map, Context>,\n }\n\n #[public]\n #[initializer]\n fn constructor() {\n }\n\n #[private]\n fn increace_counter_private(counter_id: Field) {\n //let msg_sender_npk_m_hash = get_public_keys(context.msg_sender()).npk_m.hash();\n //let secret = context.request_nsk_app(msg_sender_npk_m_hash); // get secret key of caller of function\n //let nullifier = std::hash::pedersen_hash([context.msg_sender().to_field(), secret]); // derive nullifier from sender and secret\n //context.push_nullifier(nullifier);\n SimpleLogging::at(context.this_address()).add_to_counter_public(counter_id).enqueue(\n &mut context,\n );\n }\n\n #[public]\n #[internal]\n fn add_to_counter_public(counter_id: Field) {\n let new_counter_value = storage.counters.at(counter_id).read() + 1;\n storage.counters.at(counter_id).write(new_counter_value);\n }\n\n #[public]\n fn increase_counter_public(counter_id: Field) {\n context.emit_unencrypted_log(/*message=*/\"Counter increased public\");\n SimpleLogging::at(context.this_address()).add_to_counter_public(counter_id);\n }\n unconstrained fn get_counter_value(counter_id: Field) -> pub Field {\n storage.counters.at(counter_id).read()\n }\n}\n","path":"/home/filip/c/chicmoz/services/event-cannon/src/contract-projects/SimpleLogging/src/main.nr"},"109":{"source":"use crate::state_vars::storage::Storage;\nuse dep::protocol_types::{\n storage::map::derive_storage_slot_in_map,\n traits::{Deserialize, Serialize, ToField},\n};\n\n// docs:start:map\npub struct Map {\n context: Context,\n storage_slot: Field,\n state_var_constructor: fn(Context, Field) -> V,\n}\n// docs:end:map\n\nimpl Storage for Map\nwhere\n T: Serialize + Deserialize,\n{}\n\nimpl Map {\n // docs:start:new\n pub fn new(\n context: Context,\n storage_slot: Field,\n state_var_constructor: fn(Context, Field) -> V,\n ) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n Map { context, storage_slot, state_var_constructor }\n }\n // docs:end:new\n\n // docs:start:at\n pub fn at(self, key: K) -> V\n where\n K: ToField,\n {\n // TODO(#1204): use a generator index for the storage slot\n let derived_storage_slot = derive_storage_slot_in_map(self.storage_slot, key);\n\n let state_var_constructor = self.state_var_constructor;\n state_var_constructor(self.context, derived_storage_slot)\n }\n // docs:end:at\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/state_vars/map.nr"},"122":{"source":"use crate::context::{PublicContext, UnconstrainedContext};\nuse crate::state_vars::storage::Storage;\nuse dep::protocol_types::traits::{Deserialize, Serialize};\n\n// docs:start:public_mutable_struct\npub struct PublicMutable {\n context: Context,\n storage_slot: Field,\n}\n// docs:end:public_mutable_struct\n\nimpl Storage for PublicMutable\nwhere\n T: Serialize + Deserialize,\n{}\n\nimpl PublicMutable {\n // docs:start:public_mutable_struct_new\n pub fn new(\n // Note: Passing the contexts to new(...) just to have an interface compatible with a Map.\n context: Context,\n storage_slot: Field,\n ) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n PublicMutable { context, storage_slot }\n }\n // docs:end:public_mutable_struct_new\n}\n\nimpl PublicMutable\nwhere\n T: Serialize + Deserialize,\n{\n // docs:start:public_mutable_struct_read\n pub fn read(self) -> T {\n self.context.storage_read(self.storage_slot)\n }\n // docs:end:public_mutable_struct_read\n\n // docs:start:public_mutable_struct_write\n pub fn write(self, value: T) {\n self.context.storage_write(self.storage_slot, value);\n }\n // docs:end:public_mutable_struct_write\n}\n\nimpl PublicMutable\nwhere\n T: Deserialize,\n{\n pub unconstrained fn read(self) -> T {\n self.context.storage_read(self.storage_slot)\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/state_vars/public_mutable.nr"},"126":{"source":"use crate::{\n context::{inputs::PrivateContextInputs, packed_returns::PackedReturns},\n hash::{ArgsHasher, hash_args_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n arguments,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n enqueue_public_function_call_internal, notify_set_min_revertible_side_effect_counter,\n set_public_teardown_function_call_internal,\n },\n header::get_header_at,\n key_validation_request::get_key_validation_request,\n logs::{emit_encrypted_event_log, emit_encrypted_note_log},\n returns::pack_returns,\n },\n};\nuse dep::protocol_types::{\n abis::{\n call_context::CallContext,\n function_selector::FunctionSelector,\n log_hash::{EncryptedLogHash, LogHash, NoteLogHash},\n max_block_number::MaxBlockNumber,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n public_call_request::PublicCallRequest,\n read_request::ReadRequest,\n side_effect::Counted,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENCRYPTED_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL,\n MAX_NOTE_ENCRYPTED_LOGS_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL,\n MAX_NOTE_HASHES_PER_CALL, MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, PUBLIC_DISPATCH_SELECTOR,\n },\n header::Header,\n messaging::l2_to_l1_message::L2ToL1Message,\n traits::Empty,\n};\n\n// When finished, one can call .finish() to convert back to the abi\npub struct PrivateContext {\n // docs:start:private-context\n pub inputs: PrivateContextInputs,\n pub side_effect_counter: u32,\n\n pub min_revertible_side_effect_counter: u32,\n pub is_fee_payer: bool,\n\n pub args_hash: Field,\n pub return_hash: Field,\n\n pub max_block_number: MaxBlockNumber,\n\n pub note_hash_read_requests: BoundedVec,\n pub nullifier_read_requests: BoundedVec,\n key_validation_requests_and_generators: BoundedVec,\n\n pub note_hashes: BoundedVec,\n pub nullifiers: BoundedVec,\n\n pub private_call_requests: BoundedVec,\n pub public_call_requests: BoundedVec, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec,\n // docs:end:private-context\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub historical_header: Header,\n\n pub note_encrypted_logs_hashes: BoundedVec,\n pub encrypted_logs_hashes: BoundedVec,\n pub contract_class_logs_hashes: BoundedVec,\n\n // Contains the last key validation request for each key type. This is used to cache the last request and avoid\n // fetching the same request multiple times.\n // The index of the array corresponds to the key type (0 nullifier, 1 incoming, 2 outgoing, 3 tagging).\n pub last_key_validation_requests: [Option; NUM_KEY_TYPES],\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n historical_header: inputs.historical_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n note_encrypted_logs_hashes: BoundedVec::new(),\n encrypted_logs_hashes: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n\n pub fn msg_sender(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(NoteHash { value: note_hash, counter: self.next_counter() });\n }\n\n pub fn push_nullifier(&mut self, nullifier: Field) {\n self.nullifiers.push(\n Nullifier { value: nullifier, note_hash: 0, counter: self.next_counter() },\n );\n }\n\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n self.nullifiers.push(\n Nullifier {\n value: nullifier,\n note_hash: nullified_note_hash,\n counter: self.next_counter(),\n },\n );\n }\n\n // Returns the header of a block whose state is used during private execution (not the block the transaction is\n // included in).\n pub fn get_header(self) -> Header {\n self.historical_header\n }\n\n // Returns the header of an arbitrary block whose block number is less than or equal to the block number\n // of historical header.\n pub fn get_header_at(self, block_number: u32) -> Header {\n get_header_at(block_number, self)\n }\n\n pub fn set_return_hash(&mut self, returns_hasher: ArgsHasher) {\n pack_returns(returns_hasher.fields);\n self.return_hash = returns_hasher.hash();\n }\n\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n max_block_number: self.max_block_number,\n note_hash_read_requests: self.note_hash_read_requests.storage(),\n nullifier_read_requests: self.nullifier_read_requests.storage(),\n key_validation_requests_and_generators: self\n .key_validation_requests_and_generators\n .storage(),\n note_hashes: self.note_hashes.storage(),\n nullifiers: self.nullifiers.storage(),\n private_call_requests: self.private_call_requests.storage(),\n public_call_requests: self.public_call_requests.storage(),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: self.l2_to_l1_msgs.storage(),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n note_encrypted_logs_hashes: self.note_encrypted_logs_hashes.storage(),\n encrypted_logs_hashes: self.encrypted_logs_hashes.storage(),\n contract_class_logs_hashes: self.contract_class_logs_hashes.storage(),\n historical_header: self.historical_header,\n tx_context: self.inputs.tx_context,\n }\n }\n\n pub fn set_as_fee_payer(&mut self) {\n dep::protocol_types::debug_log::debug_log_format(\n \"Setting {0} as fee payer\",\n [self.this_address().to_field()],\n );\n self.is_fee_payer = true;\n }\n\n pub fn end_setup(&mut self) {\n // dep::protocol_types::debug_log::debug_log_format(\n // \"Ending setup at counter {0}\",\n // [self.side_effect_counter as Field]\n // );\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n // docs:start:max-block-number\n pub fn set_tx_max_block_number(&mut self, max_block_number: u32) {\n // docs:end:max-block-number\n self.max_block_number =\n MaxBlockNumber::min_with_u32(self.max_block_number, max_block_number);\n }\n\n pub fn push_note_hash_read_request(&mut self, note_hash: Field) {\n let side_effect = ReadRequest { value: note_hash, counter: self.next_counter() };\n self.note_hash_read_requests.push(side_effect);\n }\n\n pub fn push_nullifier_read_request(&mut self, nullifier: Field) {\n let request = ReadRequest { value: nullifier, counter: self.next_counter() };\n self.nullifier_read_requests.push(request);\n }\n\n pub fn request_nsk_app(&mut self, npk_m_hash: Field) -> Field {\n self.request_sk_app(npk_m_hash, NULLIFIER_INDEX)\n }\n\n pub fn request_ovsk_app(&mut self, ovpk_m_hash: Field) -> Field {\n self.request_sk_app(ovpk_m_hash, OUTGOING_INDEX)\n }\n\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request =\n self.last_key_validation_requests[key_index].unwrap_or(KeyValidationRequest::empty());\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert(request.pk_m.hash() == pk_m_hash);\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index],\n },\n );\n self.last_key_validation_requests[key_index] = Option::some(request);\n request.sk_app\n }\n }\n\n // docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n // docs:end:context_message_portal\n let message = L2ToL1Message { recipient, content, counter: self.next_counter() };\n self.l2_to_l1_msgs.push(message);\n }\n\n // docs:start:context_consume_l1_to_l2_message\n // docs:start:consume_l1_to_l2_message\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n // docs:end:context_consume_l1_to_l2_message\n let nullifier = process_l1_to_l2_message(\n self.historical_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n // docs:end:consume_l1_to_l2_message\n\n // NB: A randomness value of 0 signals that the kernels should not mask the contract address\n // used in siloing later on e.g. 'handshaking' contract w/ known address.\n pub fn emit_raw_event_log_with_masked_address(\n &mut self,\n randomness: Field,\n log: [u8; M],\n log_hash: Field,\n ) {\n let counter = self.next_counter();\n let contract_address = self.this_address();\n let len = log.len() as Field + 4;\n let side_effect = EncryptedLogHash { value: log_hash, counter, length: len, randomness };\n self.encrypted_logs_hashes.push(side_effect);\n\n emit_encrypted_event_log(contract_address, randomness, log, counter);\n }\n\n pub fn emit_raw_note_log(\n &mut self,\n note_hash_counter: u32,\n log: [u8; M],\n log_hash: Field,\n ) {\n let counter = self.next_counter();\n let len = log.len() as Field + 4;\n let side_effect = NoteLogHash { value: log_hash, counter, length: len, note_hash_counter };\n self.note_encrypted_logs_hashes.push(side_effect);\n\n emit_encrypted_note_log(note_hash_counter, log, counter);\n }\n\n pub fn call_private_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_private_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_private_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> PackedReturns {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // The oracle simulates the private call and returns the value of the side effects counter after execution of\n // the call (which means that end_side_effect_counter - start_side_effect_counter is the number of side effects\n // that took place), along with the hash of the return values. We validate these by requesting a private kernel\n // iteration in which the return values are constrained to hash to `returns_hash` and the side effects counter\n // to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1;\n PackedReturns::new(returns_hash)\n }\n\n pub fn call_public_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_public_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_public_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = enqueue_public_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n // Public calls are rerouted through the dispatch function.\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n let call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n pub fn set_public_teardown_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.set_public_teardown_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn set_public_teardown_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = set_public_teardown_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n self.public_teardown_call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n }\n\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n historical_header: Header::empty(),\n note_encrypted_logs_hashes: BoundedVec::new(),\n encrypted_logs_hashes: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/private_context.nr"},"127":{"source":"use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress, traits::Deserialize,\n};\n\nuse crate::context::{gas::GasOpts, private_context::PrivateContext, public_context::PublicContext};\n\nuse crate::hash::hash_args;\nuse crate::oracle::arguments::pack_arguments;\n\npub trait CallInterface {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\npub struct PrivateCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl PrivateCallInterface {\n pub fn call(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n );\n let unpacked: T = returns.unpack_into();\n unpacked\n }\n\n pub fn view(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.unpack_into()\n }\n}\n\nimpl CallInterface for PrivateVoidCallInterface {}\n\npub struct PrivateVoidCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n}\n\nimpl PrivateVoidCallInterface {\n pub fn call(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n )\n .assert_empty();\n }\n\n pub fn view(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl CallInterface for PrivateStaticCallInterface {}\n\npub struct PrivateStaticCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl PrivateStaticCallInterface {\n pub fn view(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.unpack_into()\n }\n}\n\nimpl CallInterface for PrivateStaticVoidCallInterface {}\n\npub struct PrivateStaticVoidCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n}\n\nimpl PrivateStaticVoidCallInterface {\n pub fn view(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl CallInterface for PublicCallInterface {}\n\npub struct PublicCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args: [Field],\n pub gas_opts: GasOpts,\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl PublicCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call(self, context: &mut PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::())\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::())\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl CallInterface for PublicVoidCallInterface {}\n\npub struct PublicVoidCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n pub gas_opts: GasOpts,\n}\n\nimpl PublicVoidCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call(self, context: &mut PublicContext) {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl CallInterface for PublicStaticCallInterface {}\n\npub struct PublicStaticCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n pub gas_opts: GasOpts,\n}\n\nimpl PublicStaticCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::())\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl CallInterface for PublicStaticVoidCallInterface {}\n\npub struct PublicStaticVoidCallInterface {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str,\n args: [Field],\n return_type: (),\n is_static: bool,\n gas_opts: GasOpts,\n}\n\nimpl PublicStaticVoidCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/call_interfaces.nr"},"128":{"source":"use crate::oracle::{\n execution::{get_block_number, get_chain_id, get_contract_address, get_version},\n storage::storage_read,\n};\nuse dep::protocol_types::{address::AztecAddress, traits::Deserialize};\n\npub struct UnconstrainedContext {\n block_number: u32,\n contract_address: AztecAddress,\n version: Field,\n chain_id: Field,\n}\n\nimpl UnconstrainedContext {\n pub unconstrained fn new() -> Self {\n // We could call these oracles on the getters instead of at creation, which makes sense given that they might\n // not even be accessed. However any performance gains are minimal, and we'd rather fail early if a user\n // incorrectly attempts to create an UnconstrainedContext in an environment in which these oracles are not\n // available.\n let block_number = get_block_number();\n let contract_address = get_contract_address();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n let block_number = get_block_number();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at_historical(contract_address: AztecAddress, block_number: u32) -> Self {\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub fn block_number(self) -> u32 {\n self.block_number\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.contract_address\n }\n\n pub fn version(self) -> Field {\n self.version\n }\n\n pub fn chain_id(self) -> Field {\n self.chain_id\n }\n\n pub unconstrained fn raw_storage_read(\n self: Self,\n storage_slot: Field,\n ) -> [Field; N] {\n storage_read(self.this_address(), storage_slot, self.block_number())\n }\n\n pub unconstrained fn storage_read(self, storage_slot: Field) -> T\n where\n T: Deserialize,\n {\n T::deserialize(self.raw_storage_read(storage_slot))\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/unconstrained_context.nr"},"134":{"source":"use crate::context::gas::GasOpts;\nuse crate::hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n};\nuse dep::protocol_types::abis::function_selector::FunctionSelector;\nuse dep::protocol_types::address::{AztecAddress, EthAddress};\nuse dep::protocol_types::constants::MAX_FIELD_VALUE;\nuse dep::protocol_types::traits::{Deserialize, Empty, Serialize};\n\npub struct PublicContext {\n pub args_hash: Option,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl PublicContext {\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n pub fn emit_unencrypted_log(_self: &mut Self, log: T)\n where\n T: Serialize,\n {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_unencrypted_log(Serialize::serialize(log).as_slice()) };\n }\n\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { note_hash_exists(note_hash, leaf_index) } == 1\n }\n\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { l1_to_l2_msg_exists(msg_hash, msg_leaf_index) } == 1\n }\n\n pub fn nullifier_exists(_self: Self, unsiloed_nullifier: Field, address: AztecAddress) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { nullifier_exists(unsiloed_nullifier, address.to_field()) } == 1\n }\n\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(\n !self.nullifier_exists(nullifier, self.this_address()),\n \"L1-to-L2 message is already nullified\",\n );\n assert(\n self.l1_to_l2_msg_exists(message_hash, leaf_index),\n \"Tried to consume nonexistent L1-to-L2 message\",\n );\n\n self.push_nullifier(nullifier);\n }\n\n pub fn message_portal(_self: &mut Self, recipient: EthAddress, content: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { send_l2_to_l1_msg(recipient, content) };\n }\n\n pub unconstrained fn call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub unconstrained fn static_call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call_static(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub fn push_note_hash(_self: &mut Self, note_hash: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_note_hash(note_hash) };\n }\n pub fn push_nullifier(_self: &mut Self, nullifier: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_nullifier(nullifier) };\n }\n\n pub fn this_address(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n address()\n }\n }\n pub fn msg_sender(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n sender()\n }\n }\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // AVM opcodes are constrained by the AVM itself.\n let raw_selector: [Field; 1] = unsafe { calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n pub fn transaction_fee(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n transaction_fee()\n }\n }\n\n pub fn chain_id(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n chain_id()\n }\n }\n pub fn version(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n version()\n }\n }\n pub fn block_number(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n block_number()\n }\n }\n pub fn timestamp(_self: Self) -> u64 {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n timestamp()\n }\n }\n pub fn fee_per_l2_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_l2_gas()\n }\n }\n pub fn fee_per_da_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_da_gas()\n }\n }\n\n pub fn l2_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n l2_gas_left()\n }\n }\n pub fn da_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n da_gas_left()\n }\n }\n pub fn is_static_call(_self: Self) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { is_static_call() } == 1\n }\n\n pub fn raw_storage_read(_self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { storage_read(storage_slot + i as Field) };\n }\n out\n }\n\n pub fn storage_read(self, storage_slot: Field) -> T\n where\n T: Deserialize,\n {\n T::deserialize(self.raw_storage_read(storage_slot))\n }\n\n pub fn raw_storage_write(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n unsafe { storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n pub fn storage_write(self, storage_slot: Field, value: T)\n where\n T: Serialize,\n {\n self.raw_storage_write(storage_slot, value.serialize());\n }\n}\n\n// Helper functions\nfn gas_for_call(user_gas: GasOpts) -> [Field; 2] {\n // It's ok to use the max possible gas here, because the gas will be\n // capped by the gas left in the (STATIC)CALL instruction.\n [user_gas.l2_gas.unwrap_or(MAX_FIELD_VALUE), user_gas.da_gas.unwrap_or(MAX_FIELD_VALUE)]\n}\n\n// Unconstrained opcode wrappers (do not use directly).\nunconstrained fn address() -> AztecAddress {\n address_opcode()\n}\nunconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\n// TODO(9396): Remove.\nunconstrained fn portal() -> EthAddress {\n portal_opcode()\n}\n// TODO(9396): Remove.\n//unconstrained fn function_selector() -> u32 {\n// function_selector_opcode()\n//}\nunconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\nunconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\nunconstrained fn version() -> Field {\n version_opcode()\n}\nunconstrained fn block_number() -> Field {\n block_number_opcode()\n}\nunconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\nunconstrained fn fee_per_l2_gas() -> Field {\n fee_per_l2_gas_opcode()\n}\nunconstrained fn fee_per_da_gas() -> Field {\n fee_per_da_gas_opcode()\n}\nunconstrained fn l2_gas_left() -> Field {\n l2_gas_left_opcode()\n}\nunconstrained fn da_gas_left() -> Field {\n da_gas_left_opcode()\n}\nunconstrained fn is_static_call() -> Field {\n is_static_call_opcode()\n}\nunconstrained fn note_hash_exists(note_hash: Field, leaf_index: Field) -> u1 {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\nunconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\nunconstrained fn nullifier_exists(nullifier: Field, address: Field) -> u1 {\n nullifier_exists_opcode(nullifier, address)\n}\nunconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\nunconstrained fn emit_unencrypted_log(message: [Field]) {\n emit_unencrypted_log_opcode(message)\n}\nunconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: Field) -> u1 {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\nunconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\nunconstrained fn call(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_opcode(gas, address, args)\n}\nunconstrained fn call_static(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_static_opcode(gas, address, args)\n}\n\npub unconstrained fn calldata_copy(cdoffset: u32, copy_size: u32) -> [Field; N] {\n calldata_copy_opcode(cdoffset, copy_size)\n}\n\nunconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\nunconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\npub unconstrained fn avm_return(returndata: [Field]) {\n return_opcode(returndata)\n}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\nunconstrained fn avm_revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\nunconstrained fn storage_read(storage_slot: Field) -> Field {\n storage_read_opcode(storage_slot)\n}\n\nunconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n\n// AVM oracles (opcodes) follow, do not use directly.\n#[oracle(avmOpcodeAddress)]\nunconstrained fn address_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeSender)]\nunconstrained fn sender_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodePortal)]\nunconstrained fn portal_opcode() -> EthAddress {}\n\n// TODO(9396): Remove.\n//#[oracle(avmOpcodeFunctionSelector)]\n//unconstrained fn function_selector_opcode() -> u32 {}\n\n#[oracle(avmOpcodeTransactionFee)]\nunconstrained fn transaction_fee_opcode() -> Field {}\n\n#[oracle(avmOpcodeChainId)]\nunconstrained fn chain_id_opcode() -> Field {}\n\n#[oracle(avmOpcodeVersion)]\nunconstrained fn version_opcode() -> Field {}\n\n#[oracle(avmOpcodeBlockNumber)]\nunconstrained fn block_number_opcode() -> Field {}\n\n#[oracle(avmOpcodeTimestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(avmOpcodeFeePerL2Gas)]\nunconstrained fn fee_per_l2_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeFeePerDaGas)]\nunconstrained fn fee_per_da_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeL2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeDaGasLeft)]\nunconstrained fn da_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeIsStaticCall)]\nunconstrained fn is_static_call_opcode() -> Field {}\n\n#[oracle(avmOpcodeNoteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(avmOpcodeNullifierExists)]\nunconstrained fn nullifier_exists_opcode(nullifier: Field, address: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNullifier)]\nunconstrained fn emit_nullifier_opcode(nullifier: Field) {}\n\n#[oracle(avmOpcodeEmitUnencryptedLog)]\nunconstrained fn emit_unencrypted_log_opcode(message: [Field]) {}\n\n#[oracle(avmOpcodeL1ToL2MsgExists)]\nunconstrained fn l1_to_l2_msg_exists_opcode(msg_hash: Field, msg_leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeSendL2ToL1Msg)]\nunconstrained fn send_l2_to_l1_msg_opcode(recipient: EthAddress, content: Field) {}\n\n#[oracle(avmOpcodeCalldataCopy)]\nunconstrained fn calldata_copy_opcode(cdoffset: u32, copy_size: u32) -> [Field; N] {}\n\n#[oracle(avmOpcodeReturndataSize)]\nunconstrained fn returndata_size_opcode() -> u32 {}\n\n#[oracle(avmOpcodeReturndataCopy)]\nunconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}\n\n#[oracle(avmOpcodeReturn)]\nunconstrained fn return_opcode(returndata: [Field]) {}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\n#[oracle(avmOpcodeRevert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n#[oracle(avmOpcodeCall)]\nunconstrained fn call_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStaticCall)]\nunconstrained fn call_static_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStorageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field) -> Field {}\n\n#[oracle(avmOpcodeStorageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/public_context.nr"},"136":{"source":"use crate::utils::to_bytes::{arr_to_be_bytes_arr, str_to_be_bytes_arr};\nuse dep::protocol_types::{\n address::{AztecAddress, EthAddress},\n constants::{\n GENERATOR_INDEX__FUNCTION_ARGS, GENERATOR_INDEX__MESSAGE_NULLIFIER,\n GENERATOR_INDEX__SECRET_HASH,\n },\n hash::{poseidon2_hash_with_separator, poseidon2_hash_with_separator_slice, sha256_to_field},\n point::Point,\n traits::Hash,\n};\n\npub use dep::protocol_types::hash::{compute_siloed_nullifier, pedersen_hash};\n\npub fn pedersen_commitment(inputs: [Field; N], hash_index: u32) -> Point {\n std::hash::pedersen_commitment_with_separator(inputs, hash_index)\n}\n\npub fn compute_secret_hash(secret: Field) -> Field {\n poseidon2_hash_with_separator([secret], GENERATOR_INDEX__SECRET_HASH)\n}\n\npub fn compute_unencrypted_log_hash(\n contract_address: AztecAddress,\n log: [u8; N],\n) -> Field {\n let mut hash_bytes = [0; N + 36];\n // Address is converted to 32 bytes in ts\n let address_bytes: [u8; 32] = contract_address.to_field().to_be_bytes();\n for i in 0..32 {\n hash_bytes[i] = address_bytes[i];\n }\n let len_bytes: [u8; 4] = (N as Field).to_be_bytes();\n for i in 0..4 {\n hash_bytes[32 + i] = len_bytes[i];\n }\n for i in 0..N {\n hash_bytes[36 + i] = log[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\npub fn compute_l1_to_l2_message_hash(\n sender: EthAddress,\n chain_id: Field,\n recipient: AztecAddress,\n version: Field,\n content: Field,\n secret_hash: Field,\n leaf_index: Field,\n) -> Field {\n let mut hash_bytes = [0 as u8; 224];\n let sender_bytes: [u8; 32] = sender.to_field().to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n let recipient_bytes: [u8; 32] = recipient.to_field().to_be_bytes();\n let version_bytes: [u8; 32] = version.to_be_bytes();\n let content_bytes: [u8; 32] = content.to_be_bytes();\n let secret_hash_bytes: [u8; 32] = secret_hash.to_be_bytes();\n let leaf_index_bytes: [u8; 32] = leaf_index.to_be_bytes();\n\n for i in 0..32 {\n hash_bytes[i] = sender_bytes[i];\n hash_bytes[i + 32] = chain_id_bytes[i];\n hash_bytes[i + 64] = recipient_bytes[i];\n hash_bytes[i + 96] = version_bytes[i];\n hash_bytes[i + 128] = content_bytes[i];\n hash_bytes[i + 160] = secret_hash_bytes[i];\n hash_bytes[i + 192] = leaf_index_bytes[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\n// The nullifier of a l1 to l2 message is the hash of the message salted with the secret\npub fn compute_l1_to_l2_message_nullifier(message_hash: Field, secret: Field) -> Field {\n poseidon2_hash_with_separator([message_hash, secret], GENERATOR_INDEX__MESSAGE_NULLIFIER)\n}\n\npub struct ArgsHasher {\n pub fields: [Field],\n}\n\nimpl Hash for ArgsHasher {\n fn hash(self) -> Field {\n hash_args(self.fields)\n }\n}\n\nimpl ArgsHasher {\n pub fn new() -> Self {\n Self { fields: [] }\n }\n\n pub fn add(&mut self, field: Field) {\n self.fields = self.fields.push_back(field);\n }\n\n pub fn add_multiple(&mut self, fields: [Field; N]) {\n for i in 0..N {\n self.fields = self.fields.push_back(fields[i]);\n }\n }\n}\n\npub fn hash_args_array(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\npub fn hash_args(args: [Field]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator_slice(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\n#[test]\nunconstrained fn compute_var_args_hash() {\n let mut input = ArgsHasher::new();\n for i in 0..100 {\n input.add(i as Field);\n }\n let hash = input.hash();\n dep::std::println(hash);\n assert(hash == 0x19b0d74feb06ebde19edd85a28986c97063e84b3b351a8b666c7cac963ce655f);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_array() {\n let contract_address = AztecAddress::from_field(\n 0x233a3e0df23b2b15b324194cb4a151f26c0b7333250781d34cc269d85dc334c6,\n );\n let log = [\n 0x20660de09f35f876e3e69d227b2a35166ad05f09d82d06366ec9b6f65a51fec2,\n 0x1b52bfe3b8689761916f76dc3d38aa8810860db325cd39ca611eed980091f01c,\n 0x2e559c4045c378a56ad13b9edb1e8de4e7ad3b3aa35cc7ba9ec77f7a68fa43a4,\n 0x25d0f689c4a4178a29d59306f2675824d19be6d25e44fa03b03f49c263053dd2,\n 0x2d513a722d6f352dc0961f156afdc5e31495b9f0e35cb069261a8e55e2df67fd,\n ];\n let serialized_log = arr_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0095b2d17ab72f4b27a341f7ac63e49ec73935ae8c9181a0ac02023eb12f3284);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_addr() {\n let contract_address = AztecAddress::from_field(\n 0x233a3e0df23b2b15b324194cb4a151f26c0b7333250781d34cc269d85dc334c6,\n );\n let log = AztecAddress::from_field(\n 0x26aa302d4715fd8a687453cb26d616b0768027bd54bcae56b09d908ecd9f8303,\n );\n let serialized_log: [u8; 32] = log.to_field().to_be_bytes();\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0083ab647dfb26e7ddee90a0f4209d049d4660cab42000c544b986aaa84c55a3);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_str() {\n let contract_address = AztecAddress::from_field(\n 0x1b401e1146c5c507962287065c81f0ef7590adae3802c533d7549d6bf0a41bd8,\n );\n let log = \"dummy\";\n let serialized_log = str_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x00629e88ebd6374f44aa6cfe07e251ecf07213ebc7267e8f6b578ae57ffd6c20);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_longer_str() {\n let contract_address = AztecAddress::from_field(\n 0x1b401e1146c5c507962287065c81f0ef7590adae3802c533d7549d6bf0a41bd8,\n );\n let log = \"Hello this is a string\";\n let serialized_log = str_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0098637962f7d34fa202b7ffad8a07a238c5d1fd897b82a108f7f467fa73b841);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/hash.nr"},"150":{"source":"/// Notifies the simulator that `args` will later be used at some point during execution, referenced by their hash. This\n/// allows the simulator to know how to respond to this future request.\n///\n/// This is only used during private execution, since in public it is the VM itself that keeps track of arguments.\npub fn pack_arguments(args: [Field]) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call. When\n // unpacking however the caller must check that the returned value is indeed the preimage.\n unsafe { pack_arguments_oracle_wrapper(args) };\n}\n\n/// Same as `pack_arguments`, but using arrays instead of slices.\npub fn pack_arguments_array(args: [Field; N]) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call. When\n // unpacking however the caller must check that the returned value is indeed the preimage.\n unsafe { pack_arguments_array_oracle_wrapper(args) };\n}\n\nunconstrained fn pack_arguments_oracle_wrapper(args: [Field]) {\n let _ = pack_arguments_oracle(args);\n}\n\nunconstrained fn pack_arguments_array_oracle_wrapper(args: [Field; N]) {\n let _ = pack_arguments_array_oracle(args);\n}\n\n#[oracle(packArguments)]\nunconstrained fn pack_arguments_oracle(_args: [Field]) -> Field {}\n\n#[oracle(packArgumentsArray)]\nunconstrained fn pack_arguments_array_oracle(_args: [Field; N]) -> Field {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/arguments.nr"},"151":{"source":"use dep::protocol_types::{\n address::AztecAddress, constants::CONTRACT_INSTANCE_LENGTH, contract_class_id::ContractClassId,\n contract_instance::ContractInstance,\n};\n\n// NOTE: this is for use in private only\n#[oracle(getContractInstance)]\nunconstrained fn get_contract_instance_oracle(\n _address: AztecAddress,\n) -> [Field; CONTRACT_INSTANCE_LENGTH] {}\n\n// NOTE: this is for use in private only\nunconstrained fn get_contract_instance_internal(\n address: AztecAddress,\n) -> [Field; CONTRACT_INSTANCE_LENGTH] {\n get_contract_instance_oracle(address)\n}\n\n// NOTE: this is for use in private only\npub fn get_contract_instance(address: AztecAddress) -> ContractInstance {\n let instance =\n unsafe { ContractInstance::deserialize(get_contract_instance_internal(address)) };\n // The to_address function combines all values in the instance object to produce an address, so by checking that we\n // get the expected address we validate the entire struct.\n assert_eq(instance.to_address(), address);\n\n instance\n}\n\n// These oracles each return a ContractInstance member\n// plus a boolean indicating whether the instance was found.\n#[oracle(avmOpcodeGetContractInstanceDeployer)]\nunconstrained fn get_contract_instance_deployer_oracle_avm(\n _address: AztecAddress,\n) -> (Field, bool) {}\n#[oracle(avmOpcodeGetContractInstanceClassId)]\nunconstrained fn get_contract_instance_class_id_oracle_avm(\n _address: AztecAddress,\n) -> (Field, bool) {}\n#[oracle(avmOpcodeGetContractInstanceInitializationHash)]\nunconstrained fn get_contract_instance_initialization_hash_oracle_avm(\n _address: AztecAddress,\n) -> (Field, bool) {}\n\npub unconstrained fn get_contract_instance_deployer_internal_avm(\n address: AztecAddress,\n) -> (Field, bool) {\n get_contract_instance_deployer_oracle_avm(address)\n}\npub unconstrained fn get_contract_instance_class_id_internal_avm(\n address: AztecAddress,\n) -> (Field, bool) {\n get_contract_instance_class_id_oracle_avm(address)\n}\npub unconstrained fn get_contract_instance_initialization_hash_internal_avm(\n address: AztecAddress,\n) -> (Field, bool) {\n get_contract_instance_initialization_hash_oracle_avm(address)\n}\n\npub fn get_contract_instance_deployer_avm(address: AztecAddress) -> Option {\n let (member, exists) = get_contract_instance_deployer_internal_avm(address);\n if exists {\n Option::some(AztecAddress::from_field(member))\n } else {\n Option::none()\n }\n}\npub fn get_contract_instance_class_id_avm(address: AztecAddress) -> Option {\n let (member, exists) = get_contract_instance_class_id_internal_avm(address);\n if exists {\n Option::some(ContractClassId::from_field(member))\n } else {\n Option::none()\n }\n}\npub fn get_contract_instance_initialization_hash_avm(address: AztecAddress) -> Option {\n let (member, exists) = get_contract_instance_initialization_hash_internal_avm(address);\n if exists {\n Option::some(member)\n } else {\n Option::none()\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr"},"158":{"source":"use dep::protocol_types::address::AztecAddress;\n\n#[oracle(getContractAddress)]\nunconstrained fn get_contract_address_oracle() -> AztecAddress {}\n\n#[oracle(getBlockNumber)]\nunconstrained fn get_block_number_oracle() -> u32 {}\n\n#[oracle(getChainId)]\nunconstrained fn get_chain_id_oracle() -> Field {}\n\n#[oracle(getVersion)]\nunconstrained fn get_version_oracle() -> Field {}\n\npub unconstrained fn get_contract_address() -> AztecAddress {\n get_contract_address_oracle()\n}\n\npub unconstrained fn get_block_number() -> u32 {\n get_block_number_oracle()\n}\n\npub unconstrained fn get_chain_id() -> Field {\n get_chain_id_oracle()\n}\n\npub unconstrained fn get_version() -> Field {\n get_version_oracle()\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/execution.nr"},"160":{"source":"use crate::note::{note_header::NoteHeader, note_interface::NoteInterface};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n indexed_tagging_secret::{INDEXED_TAGGING_SECRET_LENGTH, IndexedTaggingSecret},\n utils::arr_copy_slice,\n};\n\n/// Notifies the simulator that a note has been created, so that it can be returned in future read requests in the same\n/// transaction. This note should only be added to the non-volatile database if found in an actual block.\npub fn notify_created_note(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n notify_created_note_oracle_wrapper(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n )\n };\n}\n\n/// Notifies the simulator that a note has been nullified, so that it is no longer returned in future read requests in\n/// the same transaction. This note should only be removed to the non-volatile database if its nullifier is found in an\n/// actual block.\npub fn notify_nullified_note(nullifier: Field, note_hash: Field, counter: u32) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe { notify_nullified_note_oracle_wrapper(nullifier, note_hash, counter) };\n}\n\nunconstrained fn notify_created_note_oracle_wrapper(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_created_note_oracle(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n );\n}\n\n#[oracle(notifyCreatedNote)]\nunconstrained fn notify_created_note_oracle(\n _storage_slot: Field,\n _note_type_id: Field,\n _serialized_note: [Field; N],\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\nunconstrained fn notify_nullified_note_oracle_wrapper(\n nullifier: Field,\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_nullified_note_oracle(nullifier, note_hash, counter);\n}\n\n#[oracle(notifyNullifiedNote)]\nunconstrained fn notify_nullified_note_oracle(\n _nullifier: Field,\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\n#[oracle(getNotes)]\nunconstrained fn get_notes_oracle(\n _storage_slot: Field,\n _num_selects: u8,\n _select_by_indexes: [u8; N],\n _select_by_offsets: [u8; N],\n _select_by_lengths: [u8; N],\n _select_values: [Field; N],\n _select_comparators: [u8; N],\n _sort_by_indexes: [u8; N],\n _sort_by_offsets: [u8; N],\n _sort_by_lengths: [u8; N],\n _sort_order: [u8; N],\n _limit: u32,\n _offset: u32,\n _status: u8,\n _return_size: u32,\n _placeholder_fields: [Field; S],\n) -> [Field; S] {}\n\nunconstrained fn get_notes_oracle_wrapper(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; N],\n select_by_offsets: [u8; N],\n select_by_lengths: [u8; N],\n select_values: [Field; N],\n select_comparators: [u8; N],\n sort_by_indexes: [u8; N],\n sort_by_offsets: [u8; N],\n sort_by_lengths: [u8; N],\n sort_order: [u8; N],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_fields: [Field; S],\n) -> [Field; S] {\n let return_size = placeholder_fields.len() as u32;\n get_notes_oracle(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n return_size,\n placeholder_fields,\n )\n}\n\npub unconstrained fn get_notes(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; M],\n select_by_offsets: [u8; M],\n select_by_lengths: [u8; M],\n select_values: [Field; M],\n select_comparators: [u8; M],\n sort_by_indexes: [u8; M],\n sort_by_offsets: [u8; M],\n sort_by_lengths: [u8; M],\n sort_order: [u8; M],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_opt_notes: [Option; S], // TODO: Remove it and use `limit` to initialize the note array.\n placeholder_fields: [Field; NS], // TODO: Remove it and use `limit` to initialize the note array.\n _placeholder_note_length: [Field; N], // Turbofish hack? Compiler breaks calculating read_offset unless we add this parameter\n) -> [Option; S]\nwhere\n Note: NoteInterface,\n{\n sync_notes_oracle_wrapper();\n let fields = get_notes_oracle_wrapper(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n placeholder_fields,\n );\n let num_notes = fields[0] as u32;\n let contract_address = AztecAddress::from_field(fields[1]);\n for i in 0..placeholder_opt_notes.len() {\n if i < num_notes {\n // lengths named as per typescript.\n let return_header_length: u32 = 2; // num_notes & contract_address.\n let extra_preimage_length: u32 = 2; // nonce & note_hash_counter.\n let read_offset: u32 = return_header_length + i * (N + extra_preimage_length);\n let nonce = fields[read_offset];\n let note_hash_counter = fields[read_offset + 1] as u32;\n let header = NoteHeader { contract_address, nonce, storage_slot, note_hash_counter };\n let serialized_note = arr_copy_slice(fields, [0; N], read_offset + 2);\n let mut note = Note::deserialize_content(serialized_note);\n note.set_header(header);\n placeholder_opt_notes[i] = Option::some(note);\n };\n }\n placeholder_opt_notes\n}\n\n/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before the\n/// current transaction is included in a block. While this might seem of little use at first, certain design patterns\n/// benefit from this abstraction (see e.g. `PrivateMutable`).\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n check_nullifier_exists_oracle(inner_nullifier) == 1\n}\n\n#[oracle(checkNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> Field {}\n\n/// Same as `get_app_tagging_secret_as_sender`, except it returns the derived tag as an array of bytes, ready to be included in a\n/// log.\npub unconstrained fn get_app_tag_bytes_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> [u8; 32] {\n let tag = get_app_tagging_secret_as_sender(sender, recipient).compute_tag(recipient);\n tag.to_be_bytes()\n}\n\n/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.\n/// Includes the last known index used to send a note tagged with this secret.\n/// For this to work, PXE must know the ivpsk_m of the sender.\n/// For the recipient's side, only the address is needed.\npub unconstrained fn get_app_tagging_secret_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> IndexedTaggingSecret {\n let result = get_app_tagging_secret_as_sender_oracle(sender, recipient);\n IndexedTaggingSecret::deserialize(result)\n}\n\n#[oracle(getAppTaggingSecretAsSender)]\nunconstrained fn get_app_tagging_secret_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) -> [Field; INDEXED_TAGGING_SECRET_LENGTH] {}\n\n/// Notifies the simulator that a tag has been used in a note, and to therefore increment the associated index so that\n/// future notes get a different tag and can be discovered by the recipient.\n/// This change should only be persisted in a non-volatile database if the tagged log is found in an actual block -\n/// otherwise e.g. a reverting transaction can cause the sender to accidentally skip indices and later produce notes\n/// that are not found by the recipient.\npub fn increment_app_tagging_secret_index_as_sender(sender: AztecAddress, recipient: AztecAddress) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n increment_app_tagging_secret_index_as_sender_wrapper(sender, recipient);\n }\n}\n\nunconstrained fn increment_app_tagging_secret_index_as_sender_wrapper(\n sender: AztecAddress,\n recipient: AztecAddress,\n) {\n increment_app_tagging_secret_index_as_sender_oracle(sender, recipient);\n}\n\n#[oracle(incrementAppTaggingSecretIndexAsSender)]\nunconstrained fn increment_app_tagging_secret_index_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) {}\n\n/// Finds new notes that may have been sent to all registered accounts in PXE in the current contract and makes them available\n/// for later querying via the `get_notes` oracle.\npub fn sync_notes() {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n sync_notes_oracle_wrapper();\n }\n}\n\nunconstrained fn sync_notes_oracle_wrapper() {\n sync_notes_oracle();\n}\n\n#[oracle(syncNotes)]\nunconstrained fn sync_notes_oracle() {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/notes.nr"},"161":{"source":"use dep::protocol_types::{abis::function_selector::FunctionSelector, address::AztecAddress};\n\n#[oracle(enqueuePublicFunctionCall)]\nunconstrained fn enqueue_public_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn enqueue_public_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n enqueue_public_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\n#[oracle(setPublicTeardownFunctionCall)]\nunconstrained fn set_public_teardown_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn set_public_teardown_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n set_public_teardown_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\npub fn notify_set_min_revertible_side_effect_counter(counter: u32) {\n unsafe { notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter) };\n}\n\npub unconstrained fn notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter: u32) {\n notify_set_min_revertible_side_effect_counter_oracle(counter);\n}\n\n#[oracle(notifySetMinRevertibleSideEffectCounter)]\nunconstrained fn notify_set_min_revertible_side_effect_counter_oracle(_counter: u32) {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/enqueue_public_function_call.nr"},"162":{"source":"use dep::protocol_types::{address::AztecAddress, traits::Deserialize};\n\n#[oracle(storageRead)]\nunconstrained fn storage_read_oracle(\n address: Field,\n storage_slot: Field,\n block_number: Field,\n length: Field,\n) -> [Field; N] {}\n\npub unconstrained fn raw_storage_read(\n address: AztecAddress,\n storage_slot: Field,\n block_number: u32,\n) -> [Field; N] {\n storage_read_oracle(\n address.to_field(),\n storage_slot,\n block_number as Field,\n N as Field,\n )\n}\n\npub unconstrained fn storage_read(\n address: AztecAddress,\n storage_slot: Field,\n block_number: u32,\n) -> T\nwhere\n T: Deserialize,\n{\n T::deserialize(raw_storage_read(address, storage_slot, block_number))\n}\n\nmod tests {\n use crate::oracle::storage::{raw_storage_read, storage_read};\n use dep::protocol_types::address::AztecAddress;\n\n use crate::test::mocks::mock_struct::MockStruct;\n use std::test::OracleMock;\n\n global address = AztecAddress::from_field(29);\n global slot = 7;\n global block_number = 17;\n\n #[test]\n unconstrained fn test_raw_storage_read() {\n let written = MockStruct { a: 13, b: 42 };\n\n let _ = OracleMock::mock(\"storageRead\").returns(written.serialize());\n\n let read: [Field; 2] = raw_storage_read(address, slot, block_number);\n assert_eq(read[0], 13);\n assert_eq(read[1], 42);\n }\n\n #[test]\n unconstrained fn test_storage_read() {\n let written = MockStruct { a: 13, b: 42 };\n\n let _ = OracleMock::mock(\"storageRead\").returns(written.serialize());\n\n let read: MockStruct = storage_read(address, slot, block_number);\n assert_eq(read.a, 13);\n assert_eq(read.b, 42);\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/storage.nr"},"177":{"source":"use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress,\n constants::GENERATOR_INDEX__CONSTRUCTOR, hash::poseidon2_hash_with_separator,\n};\n\nuse crate::{\n context::{PrivateContext, PublicContext},\n oracle::get_contract_instance::{\n get_contract_instance, get_contract_instance_deployer_avm,\n get_contract_instance_initialization_hash_avm,\n },\n};\n\npub fn mark_as_initialized_public(context: &mut PublicContext) {\n let init_nullifier =\n compute_unsiloed_contract_initialization_nullifier((*context).this_address());\n context.push_nullifier(init_nullifier);\n}\n\npub fn mark_as_initialized_private(context: &mut PrivateContext) {\n let init_nullifier =\n compute_unsiloed_contract_initialization_nullifier((*context).this_address());\n context.push_nullifier(init_nullifier);\n}\n\npub fn assert_is_initialized_public(context: &mut PublicContext) {\n let init_nullifier = compute_unsiloed_contract_initialization_nullifier(context.this_address());\n assert(context.nullifier_exists(init_nullifier, context.this_address()), \"Not initialized\");\n}\n\npub fn assert_is_initialized_private(context: &mut PrivateContext) {\n let init_nullifier = compute_unsiloed_contract_initialization_nullifier(context.this_address());\n context.push_nullifier_read_request(init_nullifier);\n}\n\nfn compute_unsiloed_contract_initialization_nullifier(address: AztecAddress) -> Field {\n address.to_field()\n}\n\npub fn assert_initialization_matches_address_preimage_public(context: PublicContext) {\n let address = context.this_address();\n let deployer = get_contract_instance_deployer_avm(address).unwrap();\n let initialization_hash = get_contract_instance_initialization_hash_avm(address).unwrap();\n let expected_init = compute_initialization_hash(context.selector(), context.get_args_hash());\n assert(initialization_hash == expected_init, \"Initialization hash does not match\");\n assert(\n (deployer.is_zero()) | (deployer == context.msg_sender()),\n \"Initializer address is not the contract deployer\",\n );\n}\n\npub fn assert_initialization_matches_address_preimage_private(context: PrivateContext) {\n let address = context.this_address();\n let instance = get_contract_instance(address);\n let expected_init = compute_initialization_hash(context.selector(), context.get_args_hash());\n assert(instance.initialization_hash == expected_init, \"Initialization hash does not match\");\n assert(\n (instance.deployer.is_zero()) | (instance.deployer == context.msg_sender()),\n \"Initializer address is not the contract deployer\",\n );\n}\n\npub fn compute_initialization_hash(\n init_selector: FunctionSelector,\n init_args_hash: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [init_selector.to_field(), init_args_hash],\n GENERATOR_INDEX__CONSTRUCTOR,\n )\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/initializer.nr"},"183":{"source":"use crate::{\n abis::function_selector::FunctionSelector,\n address::{\n partial_address::PartialAddress, salted_initialization_hash::SaltedInitializationHash,\n },\n constants::{\n AZTEC_ADDRESS_LENGTH, FUNCTION_TREE_HEIGHT, GENERATOR_INDEX__CONTRACT_ADDRESS_V1,\n MAX_FIELD_VALUE,\n },\n contract_class_id::ContractClassId,\n hash::{poseidon2_hash_with_separator, private_functions_root_from_siblings},\n merkle_tree::membership::MembershipWitness,\n public_keys::{IvpkM, NpkM, OvpkM, PublicKeys, TpkM},\n traits::{Deserialize, Empty, FromField, Serialize, ToField},\n utils,\n};\n\n// We do below because `use crate::point::Point;` does not work\nuse dep::std::embedded_curve_ops::EmbeddedCurvePoint as Point;\n\nuse crate::public_keys::AddressPoint;\nuse std::{\n ec::{pow, sqrt},\n embedded_curve_ops::{EmbeddedCurveScalar, fixed_base_scalar_mul as derive_public_key},\n};\n\n// Aztec address\npub struct AztecAddress {\n pub inner: Field,\n}\n\nimpl Eq for AztecAddress {\n fn eq(self, other: Self) -> bool {\n self.to_field() == other.to_field()\n }\n}\n\nimpl Empty for AztecAddress {\n fn empty() -> Self {\n Self { inner: 0 }\n }\n}\n\nimpl ToField for AztecAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl FromField for AztecAddress {\n fn from_field(value: Field) -> AztecAddress {\n AztecAddress { inner: value }\n }\n}\n\nimpl Serialize for AztecAddress {\n fn serialize(self: Self) -> [Field; AZTEC_ADDRESS_LENGTH] {\n [self.to_field()]\n }\n}\n\nimpl Deserialize for AztecAddress {\n fn deserialize(fields: [Field; AZTEC_ADDRESS_LENGTH]) -> Self {\n FromField::from_field(fields[0])\n }\n}\n\nimpl AztecAddress {\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n\n pub fn to_address_point(self) -> AddressPoint {\n // We compute the address point by taking our address, setting it to x, and then solving for y in the\n // equation which defines our bn curve:\n // y^2 = x^3 - 17; x = address\n let x = self.inner;\n let y_squared = pow(x, 3) - 17;\n\n // TODO (#8970): Handle cases where we cannot recover a point from an address\n let mut y = sqrt(y_squared);\n\n // If we get a negative y coordinate (any y where y > MAX_FIELD_VALUE / 2), we pin it to the\n // positive one (any value where y <= MAX_FIELD_VALUE / 2) by subtracting it from the Field modulus\n // note: The field modulus is MAX_FIELD_VALUE + 1\n if (!(y.lt(MAX_FIELD_VALUE / 2) | y.eq(MAX_FIELD_VALUE / 2))) {\n y = (MAX_FIELD_VALUE + 1) - y;\n }\n\n AddressPoint { inner: Point { x: self.inner, y, is_infinite: false } }\n }\n\n pub fn compute(public_keys: PublicKeys, partial_address: PartialAddress) -> AztecAddress {\n let public_keys_hash = public_keys.hash();\n\n let pre_address = poseidon2_hash_with_separator(\n [public_keys_hash.to_field(), partial_address.to_field()],\n GENERATOR_INDEX__CONTRACT_ADDRESS_V1,\n );\n\n let address_point = derive_public_key(EmbeddedCurveScalar::from_field(pre_address)).add(\n public_keys.ivpk_m.to_point(),\n );\n\n // Note that our address is only the x-coordinate of the full address_point. This is okay because when people want to encrypt something and send it to us\n // they can recover our full point using the x-coordinate (our address itself). To do this, they recompute the y-coordinate according to the equation y^2 = x^3 - 17.\n // When they do this, they may get a positive y-coordinate (a value that is less than or equal to MAX_FIELD_VALUE / 2) or\n // a negative y-coordinate (a value that is more than MAX_FIELD_VALUE), and we cannot dictate which one they get and hence the recovered point may sometimes be different than the one\n // our secrect can decrypt. Regardless though, they should and will always encrypt using point with the positive y-coordinate by convention.\n // This ensures that everyone encrypts to the same point given an arbitrary x-coordinate (address). This is allowed because even though our original point may not have a positive y-coordinate,\n // with our original secret, we will be able to derive the secret to the point with the flipped (and now positive) y-coordinate that everyone encrypts to.\n AztecAddress::from_field(address_point.x)\n }\n\n pub fn compute_from_private_function(\n function_selector: FunctionSelector,\n function_vk_hash: Field,\n function_leaf_membership_witness: MembershipWitness,\n contract_class_artifact_hash: Field,\n contract_class_public_bytecode_commitment: Field,\n salted_initialization_hash: SaltedInitializationHash,\n public_keys: PublicKeys,\n ) -> Self {\n let private_functions_root = private_functions_root_from_siblings(\n function_selector,\n function_vk_hash,\n function_leaf_membership_witness.leaf_index,\n function_leaf_membership_witness.sibling_path,\n );\n\n let contract_class_id = ContractClassId::compute(\n contract_class_artifact_hash,\n private_functions_root,\n contract_class_public_bytecode_commitment,\n );\n\n // Compute contract address using the preimage which includes the class_id.\n let partial_address = PartialAddress::compute_from_salted_initialization_hash(\n contract_class_id,\n salted_initialization_hash,\n );\n\n AztecAddress::compute(public_keys, partial_address)\n }\n\n pub fn is_zero(self) -> bool {\n self.inner == 0\n }\n\n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n\n pub fn conditional_assign(predicate: bool, lhs: Self, rhs: Self) -> Self {\n let result = utils::conditional_assign(predicate, rhs.to_field(), lhs.to_field());\n Self { inner: result }\n }\n}\n\n#[test]\nfn compute_address_from_partial_and_pub_keys() {\n let public_keys = PublicKeys {\n npk_m: NpkM {\n inner: Point {\n x: 0x22f7fcddfa3ce3e8f0cc8e82d7b94cdd740afa3e77f8e4a63ea78a239432dcab,\n y: 0x0471657de2b6216ade6c506d28fbc22ba8b8ed95c871ad9f3e3984e90d9723a7,\n is_infinite: false,\n },\n },\n ivpk_m: IvpkM {\n inner: Point {\n x: 0x111223493147f6785514b1c195bb37a2589f22a6596d30bb2bb145fdc9ca8f1e,\n y: 0x273bbffd678edce8fe30e0deafc4f66d58357c06fd4a820285294b9746c3be95,\n is_infinite: false,\n },\n },\n ovpk_m: OvpkM {\n inner: Point {\n x: 0x09115c96e962322ffed6522f57194627136b8d03ac7469109707f5e44190c484,\n y: 0x0c49773308a13d740a7f0d4f0e6163b02c5a408b6f965856b6a491002d073d5b,\n is_infinite: false,\n },\n },\n tpk_m: TpkM {\n inner: Point {\n x: 0x00d3d81beb009873eb7116327cf47c612d5758ef083d4fda78e9b63980b2a762,\n y: 0x2f567d22d2b02fe1f4ad42db9d58a36afd1983e7e2909d1cab61cafedad6193a,\n is_infinite: false,\n },\n },\n };\n\n let partial_address = PartialAddress::from_field(\n 0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de,\n );\n\n let address = AztecAddress::compute(public_keys, partial_address);\n\n // The following value was generated by `derivation.test.ts`.\n // --> Run the test with AZTEC_GENERATE_TEST_DATA=1 flag to update test data.\n let expected_computed_address_from_partial_and_pubkeys =\n 0x24e4646f58b9fbe7d38e317db8d5636c423fbbdfbe119fc190fe9c64747e0c62;\n assert(address.to_field() == expected_computed_address_from_partial_and_pubkeys);\n}\n\n#[test]\nfn from_field_to_field() {\n let address = AztecAddress { inner: 37 };\n assert_eq(FromField::from_field(address.to_field()), address);\n}\n\n#[test]\nfn serde() {\n let address = AztecAddress { inner: 37 };\n assert_eq(Deserialize::deserialize(address.serialize()), address);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/address/aztec_address.nr"},"194":{"source":"use crate::traits::{Deserialize, Serialize};\n\nglobal BOOL_SERIALIZED_LEN: u32 = 1;\nglobal U8_SERIALIZED_LEN: u32 = 1;\nglobal U16_SERIALIZED_LEN: u32 = 1;\nglobal U32_SERIALIZED_LEN: u32 = 1;\nglobal U64_SERIALIZED_LEN: u32 = 1;\nglobal U128_SERIALIZED_LEN: u32 = 1;\nglobal FIELD_SERIALIZED_LEN: u32 = 1;\nglobal I8_SERIALIZED_LEN: u32 = 1;\nglobal I16_SERIALIZED_LEN: u32 = 1;\nglobal I32_SERIALIZED_LEN: u32 = 1;\nglobal I64_SERIALIZED_LEN: u32 = 1;\n\nimpl Serialize for bool {\n fn serialize(self) -> [Field; BOOL_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for bool {\n fn deserialize(fields: [Field; BOOL_SERIALIZED_LEN]) -> bool {\n fields[0] as bool\n }\n}\n\nimpl Serialize for u8 {\n fn serialize(self) -> [Field; U8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u8 {\n fn deserialize(fields: [Field; U8_SERIALIZED_LEN]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Serialize for u16 {\n fn serialize(self) -> [Field; U16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u16 {\n fn deserialize(fields: [Field; U16_SERIALIZED_LEN]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Serialize for u32 {\n fn serialize(self) -> [Field; U32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u32 {\n fn deserialize(fields: [Field; U32_SERIALIZED_LEN]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Serialize for u64 {\n fn serialize(self) -> [Field; U64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u64 {\n fn deserialize(fields: [Field; U64_SERIALIZED_LEN]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Serialize for U128 {\n fn serialize(self) -> [Field; U128_SERIALIZED_LEN] {\n [self.to_integer()]\n }\n}\n\nimpl Deserialize for U128 {\n fn deserialize(fields: [Field; U128_SERIALIZED_LEN]) -> Self {\n U128::from_integer(fields[0])\n }\n}\n\nimpl Serialize for Field {\n fn serialize(self) -> [Field; FIELD_SERIALIZED_LEN] {\n [self]\n }\n}\n\nimpl Deserialize for Field {\n fn deserialize(fields: [Field; FIELD_SERIALIZED_LEN]) -> Self {\n fields[0]\n }\n}\n\nimpl Serialize for i8 {\n fn serialize(self) -> [Field; I8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i8 {\n fn deserialize(fields: [Field; I8_SERIALIZED_LEN]) -> Self {\n fields[0] as i8\n }\n}\n\nimpl Serialize for i16 {\n fn serialize(self) -> [Field; I16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i16 {\n fn deserialize(fields: [Field; I16_SERIALIZED_LEN]) -> Self {\n fields[0] as i16\n }\n}\n\nimpl Serialize for i32 {\n fn serialize(self) -> [Field; I32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i32 {\n fn deserialize(fields: [Field; I32_SERIALIZED_LEN]) -> Self {\n fields[0] as i32\n }\n}\n\nimpl Serialize for i64 {\n fn serialize(self) -> [Field; I64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i64 {\n fn deserialize(fields: [Field; I64_SERIALIZED_LEN]) -> Self {\n fields[0] as i64\n }\n}\n\nimpl Serialize for [T; N]\nwhere\n T: Serialize,\n{\n fn serialize(self) -> [Field; N * M] {\n let mut result: [Field; N * M] = std::mem::zeroed();\n let mut serialized: [Field; M] = std::mem::zeroed();\n for i in 0..N {\n serialized = self[i].serialize();\n for j in 0..M {\n result[i * M + j] = serialized[j];\n }\n }\n result\n }\n}\n\nimpl Deserialize for [T; N]\nwhere\n T: Deserialize,\n{\n fn deserialize(fields: [Field; N * M]) -> Self {\n let mut reader = crate::utils::reader::Reader::new(fields);\n let mut result: [T; N] = std::mem::zeroed();\n reader.read_struct_array::(Deserialize::deserialize, result)\n }\n}\n\n#[test]\nfn test_u16_serialization() {\n let a: u16 = 10;\n assert_eq(a, u16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i8_serialization() {\n let a: i8 = -10;\n assert_eq(a, i8::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i16_serialization() {\n let a: i16 = -10;\n assert_eq(a, i16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i32_serialization() {\n let a: i32 = -10;\n assert_eq(a, i32::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i64_serialization() {\n let a: i64 = -10;\n assert_eq(a, i64::deserialize(a.serialize()));\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr"},"212":{"source":"pub struct Reader {\n data: [Field; N],\n offset: u32,\n}\n\nimpl Reader {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_u32(&mut self) -> u32 {\n self.read() as u32\n }\n\n pub fn read_bool(&mut self) -> bool {\n self.read() as bool\n }\n\n pub fn read_array(&mut self) -> [Field; K] {\n let mut result = [0; K];\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array());\n result\n }\n\n pub fn read_struct_array(\n &mut self,\n deserialise: fn([Field; K]) -> T,\n mut result: [T; C],\n ) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn finish(self) {\n assert(self.offset == self.data.len(), \"Reader did not read all data\");\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr"},"227":{"source":"use crate::meta::{derive_deserialize, derive_serialize};\nuse crate::utils::field::field_from_bytes;\n\n// Trait: is_empty\n//\n// The general is_empty trait checks if a data type is is empty,\n// and it defines empty for the basic data types as 0.\n//\n// If a Field is equal to zero, then it is regarded as zero.\n// We will go with this definition for now, however it can be problematic\n// if a value can actually be zero. In a future refactor, we can\n// use the optional type for safety. Doing it now would lead to a worse devex\n// and would make it harder to sync up with the cpp code.\n// Preferred over Default trait to convey intent, as default doesn't necessarily mean empty.\npub trait Empty {\n fn empty() -> Self;\n}\n\nimpl Empty for Field {\n fn empty() -> Self {\n 0\n }\n}\n\nimpl Empty for u1 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for u8 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for u32 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for u64 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for U128 {\n fn empty() -> Self {\n U128::from_integer(0)\n }\n}\n\npub fn is_empty(item: T) -> bool\nwhere\n T: Empty + Eq,\n{\n item.eq(T::empty())\n}\n\npub fn is_empty_array(array: [T; N]) -> bool\nwhere\n T: Empty + Eq,\n{\n array.all(|elem| is_empty(elem))\n}\n\npub trait Hash {\n fn hash(self) -> Field;\n}\n\npub trait ToField {\n fn to_field(self) -> Field;\n}\n\nimpl ToField for Field {\n fn to_field(self) -> Field {\n self\n }\n}\n\nimpl ToField for bool {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u1 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u8 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u32 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u64 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for U128 {\n fn to_field(self) -> Field {\n self.to_integer()\n }\n}\nimpl ToField for str {\n fn to_field(self) -> Field {\n assert(N < 32, \"String doesn't fit in a field, consider using Serialize instead\");\n field_from_bytes(self.as_bytes(), true)\n }\n}\n\npub trait FromField {\n fn from_field(value: Field) -> Self;\n}\n\nimpl FromField for Field {\n fn from_field(value: Field) -> Self {\n value\n }\n}\n\nimpl FromField for bool {\n fn from_field(value: Field) -> Self {\n value as bool\n }\n}\nimpl FromField for u1 {\n fn from_field(value: Field) -> Self {\n value as u1\n }\n}\nimpl FromField for u8 {\n fn from_field(value: Field) -> Self {\n value as u8\n }\n}\nimpl FromField for u32 {\n fn from_field(value: Field) -> Self {\n value as u32\n }\n}\nimpl FromField for u64 {\n fn from_field(value: Field) -> Self {\n value as u64\n }\n}\nimpl FromField for U128 {\n fn from_field(value: Field) -> Self {\n U128::from_integer(value)\n }\n}\n\n// docs:start:serialize\n#[derive_via(derive_serialize)]\npub trait Serialize {\n fn serialize(self) -> [Field; N];\n}\n// docs:end:serialize\n\nimpl Serialize for str {\n fn serialize(self) -> [Field; N] {\n let bytes = self.as_bytes();\n let mut fields = [0; N];\n for i in 0..bytes.len() {\n fields[i] = bytes[i] as Field;\n }\n fields\n }\n}\n\n// docs:start:deserialize\n#[derive_via(derive_deserialize)]\npub trait Deserialize {\n fn deserialize(fields: [Field; N]) -> Self;\n}\n// docs:end:deserialize\n\nimpl Deserialize for str {\n fn deserialize(fields: [Field; N]) -> Self {\n str::from(fields.map(|value| value as u8))\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/traits.nr"},"229":{"source":"use crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n function_selector::FunctionSelector,\n log_hash::{LogHash, ScopedEncryptedLogHash, ScopedLogHash},\n note_hash::ScopedNoteHash,\n nullifier::ScopedNullifier,\n },\n address::{AztecAddress, EthAddress},\n constants::{\n FUNCTION_TREE_HEIGHT, GENERATOR_INDEX__NOTE_HASH_NONCE, GENERATOR_INDEX__OUTER_NULLIFIER,\n GENERATOR_INDEX__SILOED_NOTE_HASH, GENERATOR_INDEX__UNIQUE_NOTE_HASH,\n },\n merkle_tree::root::root_from_sibling_path,\n messaging::l2_to_l1_message::{L2ToL1Message, ScopedL2ToL1Message},\n traits::{is_empty, ToField},\n utils::field::field_from_bytes_32_trunc,\n};\nuse super::utils::field::field_from_bytes;\n\npub fn sha256_to_field(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = std::hash::sha256(bytes_to_hash);\n let hash_in_a_field = field_from_bytes_32_trunc(sha256_hashed);\n\n hash_in_a_field\n}\n\npub fn private_functions_root_from_siblings(\n selector: FunctionSelector,\n vk_hash: Field,\n function_leaf_index: Field,\n function_leaf_sibling_path: [Field; FUNCTION_TREE_HEIGHT],\n) -> Field {\n let function_leaf_preimage = ContractClassFunctionLeafPreimage { selector, vk_hash };\n let function_leaf = function_leaf_preimage.hash();\n root_from_sibling_path(\n function_leaf,\n function_leaf_index,\n function_leaf_sibling_path,\n )\n}\n\nfn compute_note_hash_nonce(tx_hash: Field, note_index_in_tx: u32) -> Field {\n // Hashing tx hash with note index in tx is guaranteed to be unique\n poseidon2_hash_with_separator(\n [tx_hash, note_index_in_tx as Field],\n GENERATOR_INDEX__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_unique_note_hash(nonce: Field, note_hash: Field) -> Field {\n let inputs = [nonce, note_hash];\n poseidon2_hash_with_separator(inputs, GENERATOR_INDEX__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_siloed_note_hash(app: AztecAddress, unique_note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), unique_note_hash],\n GENERATOR_INDEX__SILOED_NOTE_HASH,\n )\n}\n\n/// Siloing in the context of Aztec refers to the process of hashing a note hash with a contract address (this way\n/// the note hash is scoped to a specific contract). This is used to prevent intermingling of notes between contracts.\npub fn silo_note_hash(note_hash: ScopedNoteHash, tx_hash: Field, note_index_in_tx: u32) -> Field {\n if note_hash.contract_address.is_zero() {\n 0\n } else {\n let nonce = compute_note_hash_nonce(tx_hash, note_index_in_tx);\n let unique_note_hash = compute_unique_note_hash(nonce, note_hash.value());\n compute_siloed_note_hash(note_hash.contract_address, unique_note_hash)\n }\n}\n\npub fn compute_siloed_nullifier(app: AztecAddress, nullifier: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), nullifier],\n GENERATOR_INDEX__OUTER_NULLIFIER,\n )\n}\n\npub fn silo_nullifier(nullifier: ScopedNullifier) -> Field {\n if nullifier.contract_address.is_zero() {\n nullifier.value() // Return value instead of 0 because the first nullifier's contract address is zero.\n } else {\n compute_siloed_nullifier(nullifier.contract_address, nullifier.value())\n }\n}\n\npub fn silo_encrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n // We assume contract address has already been masked\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n accumulate_sha256(\n [log_hash.contract_address.to_field(), log_hash.log_hash.value],\n )\n }\n}\n\npub fn mask_encrypted_log_hash(scoped_log: ScopedEncryptedLogHash) -> AztecAddress {\n if scoped_log.contract_address.is_zero() {\n AztecAddress::from_field(0)\n } else if (scoped_log.log_hash.randomness == 0) {\n scoped_log.contract_address\n } else {\n AztecAddress::from_field(poseidon2_hash_with_separator(\n [scoped_log.contract_address.to_field(), scoped_log.log_hash.randomness],\n 0,\n ))\n }\n}\n\nfn compute_siloed_unencrypted_log_hash(address: AztecAddress, log_hash: Field) -> Field {\n accumulate_sha256([address.to_field(), log_hash])\n}\n\npub fn silo_unencrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_unencrypted_log_hash(log_hash.contract_address, log_hash.value())\n }\n}\n\npub fn merkle_hash(left: Field, right: Field) -> Field {\n poseidon2_hash([left, right])\n}\n\npub fn compute_l2_to_l1_hash(\n contract_address: AztecAddress,\n recipient: EthAddress,\n content: Field,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n let mut bytes: BoundedVec = BoundedVec::new();\n\n let inputs =\n [contract_address.to_field(), rollup_version_id, recipient.to_field(), chain_id, content];\n for i in 0..inputs.len() {\n // TODO are bytes be in fr.to_buffer() ?\n let item_bytes: [u8; 32] = inputs[i].to_be_bytes();\n for j in 0..32 {\n bytes.push(item_bytes[j]);\n }\n }\n\n sha256_to_field(bytes.storage())\n}\n\npub fn silo_l2_to_l1_message(\n msg: ScopedL2ToL1Message,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n if msg.contract_address.is_zero() {\n 0\n } else {\n compute_l2_to_l1_hash(\n msg.contract_address,\n msg.message.recipient,\n msg.message.content,\n rollup_version_id,\n chain_id,\n )\n }\n}\n\n// Computes sha256 hash of 2 input hashes.\n//\n// NB: This method now takes in two 31 byte fields - it assumes that any input\n// is the result of a sha_to_field hash and => is truncated\n//\n// TODO(Jan and David): This is used for the encrypted_log hashes.\n// Can we check to see if we can just use hash_to_field or pedersen_compress here?\n//\npub fn accumulate_sha256(input: [Field; 2]) -> Field {\n // This is a note about the cpp code, since it takes an array of Fields\n // instead of a U128.\n // 4 Field elements when converted to bytes will usually\n // occupy 4 * 32 = 128 bytes.\n // However, this function is making the assumption that each Field\n // only occupies 128 bits.\n //\n // TODO(David): This does not seem to be getting guaranteed anywhere in the code?\n // Concatentate two fields into 32x2 = 64 bytes\n // accumulate_sha256 assumes that the inputs are pre-truncated 31 byte numbers\n let mut hash_input_flattened = [0; 64];\n for offset in 0..input.len() {\n let input_as_bytes: [u8; 32] = input[offset].to_be_bytes();\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n\n sha256_to_field(hash_input_flattened)\n}\n\n// Computes the final logs hash for a tx.\npub fn compute_tx_logs_hash(logs: [LogHash; N]) -> Field {\n // Convert each field element into a byte array and append the bytes to `hash_input_flattened`\n let mut hash_input_flattened = [0; N * 32];\n for offset in 0..N {\n // TODO: This is not checking that the decomposition is smaller than P\n let input_as_bytes: [u8; 32] = logs[offset].value.to_be_radix(256);\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n // Ideally we would push to a slice then hash, but there is no sha_slice\n // Hardcode to 256 bytes for now\n let mut hash = sha256_to_field(hash_input_flattened);\n // Not having a 0 value hash for empty logs causes issues with empty txs\n // used for padding. Returning early is currently unsupported.\n // We always provide sorted logs here, so 0 being empty means all are empty.\n if is_empty(logs[0]) {\n hash = 0;\n }\n hash\n}\n\npub fn verification_key_hash(key: [Field; N]) -> Field {\n crate::hash::poseidon2_hash(key)\n}\n\n#[inline_always]\npub fn pedersen_hash(inputs: [Field; N], hash_index: u32) -> Field {\n std::hash::pedersen_hash_with_separator(inputs, hash_index)\n}\n\npub fn poseidon2_hash(inputs: [Field; N]) -> Field {\n std::hash::poseidon2::Poseidon2::hash(inputs, N)\n}\n\n#[no_predicates]\npub fn poseidon2_hash_with_separator(inputs: [Field; N], separator: T) -> Field\nwhere\n T: ToField,\n{\n // We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of N + 1\n let in_len = N + 1;\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs[i]);\n }\n\n sponge.squeeze()\n}\n\npub fn poseidon2_hash_with_separator_slice(inputs: [Field], separator: T) -> Field\nwhere\n T: ToField,\n{\n let in_len = inputs.len() + 1;\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs[i]);\n }\n\n sponge.squeeze()\n}\n\n#[no_predicates]\npub fn poseidon2_hash_bytes(inputs: [u8; N]) -> Field {\n // We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of Math.ceil(N/31)\n let mut in_len = N / 31;\n let mut has_padding = false;\n if N % 31 != 0 {\n in_len += 1;\n has_padding = true;\n }\n\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n\n let mut current_field = [0; 31];\n for i in 0..inputs.len() {\n let index = i % 31;\n current_field[index] = inputs[i];\n if index == 30 {\n sponge.absorb(field_from_bytes(current_field, false));\n current_field = [0; 31];\n }\n }\n if has_padding {\n sponge.absorb(field_from_bytes(current_field, false));\n }\n\n sponge.squeeze()\n}\n\n#[test]\nfn smoke_sha256_to_field() {\n let full_buffer = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,\n 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,\n 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,\n 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,\n 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\n ];\n let result = sha256_to_field(full_buffer);\n\n assert(result == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184c7);\n\n // to show correctness of the current ver (truncate one byte) vs old ver (mod full bytes):\n let result_bytes = std::hash::sha256(full_buffer);\n let truncated_field = crate::utils::field::field_from_bytes_32_trunc(result_bytes);\n assert(truncated_field == result);\n let mod_res = result + (result_bytes[31] as Field);\n assert(mod_res == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184e0);\n}\n\n#[test]\nfn compute_l2_l1_hash() {\n // All zeroes\n let hash_result =\n compute_l2_to_l1_hash(AztecAddress::from_field(0), EthAddress::zero(), 0, 0, 0);\n assert(hash_result == 0xb393978842a0fa3d3e1470196f098f473f9678e72463cb65ec4ab5581856c2);\n\n // Non-zero case\n let hash_result = compute_l2_to_l1_hash(\n AztecAddress::from_field(1),\n EthAddress::from_field(3),\n 5,\n 2,\n 4,\n );\n assert(hash_result == 0x3f88c1044a05e5340ed20466276500f6d45ca5603913b9091e957161734e16);\n}\n\n#[test]\nfn silo_l2_to_l1_message_matches_typescript() {\n let version = 4;\n let chainId = 5;\n\n let hash = silo_l2_to_l1_message(\n ScopedL2ToL1Message {\n message: L2ToL1Message { recipient: EthAddress::from_field(1), content: 2, counter: 0 },\n contract_address: AztecAddress::from_field(3),\n },\n version,\n chainId,\n );\n\n // The following value was generated by `l2_to_l1_message.test.ts`\n let hash_from_typescript = 0x00c6155d69febb9d5039b374dd4f77bf57b7c881709aa524a18acaa0bd57476a;\n\n assert_eq(hash, hash_from_typescript);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr"},"262":{"source":"use crate::traits::{Deserialize, Empty, FromField, Serialize, ToField};\n\npub struct FunctionSelector {\n // 1st 4-bytes of abi-encoding of function.\n pub inner: u32,\n}\n\nimpl Eq for FunctionSelector {\n fn eq(self, function_selector: FunctionSelector) -> bool {\n function_selector.inner == self.inner\n }\n}\n\nimpl Serialize<1> for FunctionSelector {\n fn serialize(self: Self) -> [Field; 1] {\n [self.inner as Field]\n }\n}\n\nimpl Deserialize<1> for FunctionSelector {\n fn deserialize(fields: [Field; 1]) -> Self {\n Self { inner: fields[0] as u32 }\n }\n}\n\nimpl FromField for FunctionSelector {\n fn from_field(field: Field) -> Self {\n Self { inner: field as u32 }\n }\n}\n\nimpl ToField for FunctionSelector {\n fn to_field(self) -> Field {\n self.inner as Field\n }\n}\n\nimpl Empty for FunctionSelector {\n fn empty() -> Self {\n Self { inner: 0 as u32 }\n }\n}\n\nimpl FunctionSelector {\n pub fn from_u32(value: u32) -> Self {\n Self { inner: value }\n }\n\n pub fn from_signature(signature: str) -> Self {\n let bytes = signature.as_bytes();\n let hash = crate::hash::poseidon2_hash_bytes(bytes);\n\n // `hash` is automatically truncated to fit within 32 bits.\n FunctionSelector::from_field(hash)\n }\n\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n}\n\n#[test]\nfn test_is_valid_selector() {\n let selector = FunctionSelector::from_signature(\"IS_VALID()\");\n assert_eq(selector.to_field(), 0x73cdda47);\n}\n\n#[test]\nfn test_long_selector() {\n let selector =\n FunctionSelector::from_signature(\"foo_and_bar_and_baz_and_foo_bar_baz_and_bar_foo\");\n assert_eq(selector.to_field(), 0x7590a997);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/abis/function_selector.nr"},"311":{"source":"use crate::{hash::poseidon2_hash, traits::ToField};\n\npub fn derive_storage_slot_in_map(storage_slot: Field, key: K) -> Field\nwhere\n K: ToField,\n{\n poseidon2_hash([storage_slot, key.to_field()])\n}\n\nmod test {\n use crate::{address::AztecAddress, storage::map::derive_storage_slot_in_map};\n\n #[test]\n fn test_derive_storage_slot_in_map_matches_typescript() {\n let map_slot = 0x132258fb6962c4387ba659d9556521102d227549a386d39f0b22d1890d59c2b5;\n let key = AztecAddress::from_field(\n 0x302dbc2f9b50a73283d5fb2f35bc01eae8935615817a0b4219a057b2ba8a5a3f,\n );\n\n let slot = derive_storage_slot_in_map(map_slot, key);\n\n // The following value was generated by `map_slot.test.ts`\n let slot_from_typescript =\n 0x15b9fe39449affd8b377461263e9d2b610b9ad40580553500b4e41d9cbd887ac;\n\n assert_eq(slot, slot_from_typescript);\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr"}}} \ No newline at end of file +{"noir_version":"0.38.0+c807678263164209f62fa5c9bf19f468cace1f98-x8664","name":"SimpleLogging","functions":[{"name":"increace_counter_private","is_unconstrained":false,"custom_attributes":["private"],"abi":{"parameters":[{"name":"inputs","type":{"kind":"struct","path":"aztec::context::inputs::private_context_inputs::PrivateContextInputs","fields":[{"name":"call_context","type":{"kind":"struct","path":"aztec::protocol_types::abis::call_context::CallContext","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}}]}},{"name":"historical_header","type":{"kind":"struct","path":"aztec::protocol_types::header::Header","fields":[{"name":"last_archive","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"content_commitment","type":{"kind":"struct","path":"aztec::protocol_types::content_commitment::ContentCommitment","fields":[{"name":"num_txs","type":{"kind":"field"}},{"name":"txs_effects_hash","type":{"kind":"field"}},{"name":"in_hash","type":{"kind":"field"}},{"name":"out_hash","type":{"kind":"field"}}]}},{"name":"state","type":{"kind":"struct","path":"aztec::protocol_types::state_reference::StateReference","fields":[{"name":"l1_to_l2_message_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"partial","type":{"kind":"struct","path":"aztec::protocol_types::partial_state_reference::PartialStateReference","fields":[{"name":"note_hash_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"nullifier_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"public_data_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}}]}}]}},{"name":"global_variables","type":{"kind":"struct","path":"aztec::protocol_types::abis::global_variables::GlobalVariables","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"block_number","type":{"kind":"field"}},{"name":"slot_number","type":{"kind":"field"}},{"name":"timestamp","type":{"kind":"integer","sign":"unsigned","width":64}},{"name":"coinbase","type":{"kind":"struct","path":"aztec::protocol_types::address::eth_address::EthAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"fee_recipient","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"gas_fees","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}},{"name":"total_fees","type":{"kind":"field"}}]}},{"name":"tx_context","type":{"kind":"struct","path":"aztec::protocol_types::transaction::tx_context::TxContext","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"gas_settings","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_settings::GasSettings","fields":[{"name":"gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"teardown_gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"max_fees_per_gas","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}}]}},{"name":"start_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}}]},"visibility":"private"},{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":{"abi_type":{"kind":"struct","path":"aztec::protocol_types::abis::private_circuit_public_inputs::PrivateCircuitPublicInputs","fields":[{"name":"call_context","type":{"kind":"struct","path":"aztec::protocol_types::abis::call_context::CallContext","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}}]}},{"name":"args_hash","type":{"kind":"field"}},{"name":"returns_hash","type":{"kind":"field"}},{"name":"min_revertible_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"is_fee_payer","type":{"kind":"boolean"}},{"name":"max_block_number","type":{"kind":"struct","path":"aztec::protocol_types::abis::max_block_number::MaxBlockNumber","fields":[{"name":"_opt","type":{"kind":"struct","path":"std::option::Option","fields":[{"name":"_is_some","type":{"kind":"boolean"}},{"name":"_value","type":{"kind":"integer","sign":"unsigned","width":32}}]}}]}},{"name":"note_hash_read_requests","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::read_request::ReadRequest","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"nullifier_read_requests","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::read_request::ReadRequest","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"key_validation_requests_and_generators","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::validation_requests::key_validation_request_and_generator::KeyValidationRequestAndGenerator","fields":[{"name":"request","type":{"kind":"struct","path":"aztec::protocol_types::abis::validation_requests::key_validation_request::KeyValidationRequest","fields":[{"name":"pk_m","type":{"kind":"struct","path":"std::embedded_curve_ops::EmbeddedCurvePoint","fields":[{"name":"x","type":{"kind":"field"}},{"name":"y","type":{"kind":"field"}},{"name":"is_infinite","type":{"kind":"boolean"}}]}},{"name":"sk_app","type":{"kind":"field"}}]}},{"name":"sk_app_generator","type":{"kind":"field"}}]}}},{"name":"note_hashes","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::note_hash::NoteHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"nullifiers","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::nullifier::Nullifier","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"note_hash","type":{"kind":"field"}}]}}},{"name":"private_call_requests","type":{"kind":"array","length":4,"type":{"kind":"struct","path":"aztec::protocol_types::abis::private_call_request::PrivateCallRequest","fields":[{"name":"call_context","type":{"kind":"struct","path":"aztec::protocol_types::abis::call_context::CallContext","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}}]}},{"name":"args_hash","type":{"kind":"field"}},{"name":"returns_hash","type":{"kind":"field"}},{"name":"start_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"end_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"public_call_requests","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::side_effect::Counted","fields":[{"name":"inner","type":{"kind":"struct","path":"aztec::protocol_types::abis::public_call_request::PublicCallRequest","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}},{"name":"args_hash","type":{"kind":"field"}}]}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"public_teardown_call_request","type":{"kind":"struct","path":"aztec::protocol_types::abis::public_call_request::PublicCallRequest","fields":[{"name":"msg_sender","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"function_selector","type":{"kind":"struct","path":"aztec::protocol_types::abis::function_selector::FunctionSelector","fields":[{"name":"inner","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"is_static_call","type":{"kind":"boolean"}},{"name":"args_hash","type":{"kind":"field"}}]}},{"name":"l2_to_l1_msgs","type":{"kind":"array","length":2,"type":{"kind":"struct","path":"aztec::protocol_types::messaging::l2_to_l1_message::L2ToL1Message","fields":[{"name":"recipient","type":{"kind":"struct","path":"aztec::protocol_types::address::eth_address::EthAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"content","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"start_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"end_side_effect_counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"note_encrypted_logs_hashes","type":{"kind":"array","length":16,"type":{"kind":"struct","path":"aztec::protocol_types::abis::log_hash::NoteLogHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"length","type":{"kind":"field"}},{"name":"note_hash_counter","type":{"kind":"integer","sign":"unsigned","width":32}}]}}},{"name":"encrypted_logs_hashes","type":{"kind":"array","length":4,"type":{"kind":"struct","path":"aztec::protocol_types::abis::log_hash::EncryptedLogHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"length","type":{"kind":"field"}},{"name":"randomness","type":{"kind":"field"}}]}}},{"name":"contract_class_logs_hashes","type":{"kind":"array","length":1,"type":{"kind":"struct","path":"aztec::protocol_types::abis::log_hash::LogHash","fields":[{"name":"value","type":{"kind":"field"}},{"name":"counter","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"length","type":{"kind":"field"}}]}}},{"name":"historical_header","type":{"kind":"struct","path":"aztec::protocol_types::header::Header","fields":[{"name":"last_archive","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"content_commitment","type":{"kind":"struct","path":"aztec::protocol_types::content_commitment::ContentCommitment","fields":[{"name":"num_txs","type":{"kind":"field"}},{"name":"txs_effects_hash","type":{"kind":"field"}},{"name":"in_hash","type":{"kind":"field"}},{"name":"out_hash","type":{"kind":"field"}}]}},{"name":"state","type":{"kind":"struct","path":"aztec::protocol_types::state_reference::StateReference","fields":[{"name":"l1_to_l2_message_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"partial","type":{"kind":"struct","path":"aztec::protocol_types::partial_state_reference::PartialStateReference","fields":[{"name":"note_hash_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"nullifier_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"public_data_tree","type":{"kind":"struct","path":"aztec::protocol_types::abis::append_only_tree_snapshot::AppendOnlyTreeSnapshot","fields":[{"name":"root","type":{"kind":"field"}},{"name":"next_available_leaf_index","type":{"kind":"integer","sign":"unsigned","width":32}}]}}]}}]}},{"name":"global_variables","type":{"kind":"struct","path":"aztec::protocol_types::abis::global_variables::GlobalVariables","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"block_number","type":{"kind":"field"}},{"name":"slot_number","type":{"kind":"field"}},{"name":"timestamp","type":{"kind":"integer","sign":"unsigned","width":64}},{"name":"coinbase","type":{"kind":"struct","path":"aztec::protocol_types::address::eth_address::EthAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"fee_recipient","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]}},{"name":"gas_fees","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}},{"name":"total_fees","type":{"kind":"field"}}]}},{"name":"tx_context","type":{"kind":"struct","path":"aztec::protocol_types::transaction::tx_context::TxContext","fields":[{"name":"chain_id","type":{"kind":"field"}},{"name":"version","type":{"kind":"field"}},{"name":"gas_settings","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_settings::GasSettings","fields":[{"name":"gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"teardown_gas_limits","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas::Gas","fields":[{"name":"da_gas","type":{"kind":"integer","sign":"unsigned","width":32}},{"name":"l2_gas","type":{"kind":"integer","sign":"unsigned","width":32}}]}},{"name":"max_fees_per_gas","type":{"kind":"struct","path":"aztec::protocol_types::abis::gas_fees::GasFees","fields":[{"name":"fee_per_da_gas","type":{"kind":"field"}},{"name":"fee_per_l2_gas","type":{"kind":"field"}}]}}]}}]}}]},"visibility":"databus"},"error_types":{"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+WdBZQTVxuGJ9ldYKEUWbwthRYoFEs22d0Ed3d3WMlSiltdtu7uTpW6u1Jvqbs7Neru9H+/knRnh8A5f3dC/+f895znJJmZzDzfzWQymbn3uwFnY2kRdJzs4MbnAZGVfLRJrTzTUo/u5zlplquTZlrdNNPqpZnWIM20JqKPZ1rLNMvtmGZaqzTTWqeZ1iY5zV0Cycc+ycdIqDAaTRTlJ8KRcHEoP14SKwhFC0oKY+FYuCBWUJYfi0QSsWisKF4SLwrFw9FIIlxeEI+UhzaW+sHKdYWqVfJLM+nZwDfPUCiTng3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J9g6xtbBz0pbvnR/ni/JDid4iRSI56NIlvqc9gicdAKXzN0RgDw4dByxYGn4dxUWwV2Qcw4Az2dXJmop/nJr36BdT/XgAlEkUgqUBNgXy0bsqqKveryZ+VDA+V7BYACf3IRL5vMUVzDqk5h/ScQ+bXh3wEQZueRHqohh6NFj+IlzcffuZNma+rIrgadi/1Jprsw/PXMe7EMhybw6bYXpoiFGSoRXCVZKZkGOkBRHGmqWdrl5AyZJ/VZ/4G","brillig_names":["pack_arguments_oracle_wrapper","enqueue_public_function_call_internal"]},{"name":"add_to_counter_public","is_unconstrained":true,"custom_attributes":["public","internal"],"abi":{"parameters":[{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":null,"error_types":{"206160798890201757":{"error_kind":"string","string":"Storage slot 0 not allowed. Storage slots must start from 1."},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"10176877060487216746":{"error_kind":"string","string":"Function add_to_counter_public can only be called internally"},"13699457482007836410":{"error_kind":"string","string":"Not initialized"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+1cS29kxRWu636/3D325LFJpAgpUhZR7u1ujz2KEnWUoGSVSGHBBiF63LeRJWDAM7x2zYIFAsEGJCS2/AU2/BEEG34JAi6q4/789XfL3eNbxgtKsm73PafOq06dU3Wq2olbt8Q/6/TdCZyZf6bXa1mFtNJLQoaUKFPqG/+h47/vAbxWodId4lsl/ZN0Ou0I/SqUf9LxNGPax2hGoJ+2PJ1/rtb0WZeiDfx39CHr0/7xr+ffdQgvxnhGtHd6KOQ3XoWeH5E9amCPpOTp3OXxs7ZHNuN5OqtIp5Hb9KE66VGvUI8GwGYV64A2apAOzQp1aFWvw3hEciKf/o9/I/95/sbL/3v19OEi/8dicZ4/epSQXi0hv2q70GzvQPO3TPO/r7/00tnyLD9/+q2zR483aHcEbfu857RuLBfiYePxqjopN0iH3/tnIdcnYJM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public"]},{"name":"public_dispatch","is_unconstrained":true,"custom_attributes":["public"],"abi":{"parameters":[{"name":"selector","type":{"kind":"field"},"visibility":"private"}],"return_type":null,"error_types":{"206160798890201757":{"error_kind":"string","string":"Storage slot 0 not allowed. Storage slots must start from 1."},"2233873454491509486":{"error_kind":"string","string":"Initializer address is not the contract deployer"},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"10176877060487216746":{"error_kind":"string","string":"Function add_to_counter_public can only be called internally"},"13699457482007836410":{"error_kind":"string","string":"Not initialized"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"16957488177269924912":{"error_kind":"fmtstring","length":16,"item_types":[]},"17618083556256589634":{"error_kind":"string","string":"Initialization hash does not match"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/91dTYhkVxW+r+tnuqq7p2omPZOZiQGRIIoQXlVX/wliyxhNIFFIUJdS01UdGyc9Q08nJG5s3fmzkGwMuDEIuhBcKMSFRLIRBTeCG0UQBdGFGAwIgiCYF96p+uqr7716r+re7okXilf17rnn75577r3n/lTkxilKn1X67QTMXvqMF0sdj7jiCSbzhMgSqpcWaqS/lyC/4lHoBtH1iX8n7vUaQj6P/G80Upwh9WM4A+CPL6R4bp6O8bMsSVpLf6MNWZnltz8r6bsGwYWoz4D6jh8Q/ButRM7fRpNyLoE+FuWhs33Q6e7s7KBcSarl8BRaH4a/Fhj/hTD4N0xvdainipDJ6JudVwE+yngaLs4zWk037X99+oY82ZB/s402wbMOsnDVS+JqiLwQdVrLkRvp19xke3o4fSb5HyCeA/nZzTXBswNanCoCxt4lfuj3aaE1AYffy9hHy03bhJUN3E67kZuUEXlFOzL6qym/Seq/8Nyn7+7fGQyfHp48f3zkKC2RSpbgPVd5LaNMBeAx5ZmQ86Ce3e7Gbrc32GL+VJdQyeAj1JCk7lFOS8rMQuBf9s/7Vo3qKAYbeTX9bm4Ah6UR1VszTL11i3ZfRr9JvIbqvprED+vH2mLS5K+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ImHO6lWvsfLRVdUsaBOLc6soMCEWo9eqO9xAbAsUdGEIhMqmVDZhGITSkyoYkGduCbXUGBCmfoGmvoGmvoGmvoGmvoGmvrG+mX2+bHm1LKFQDWS4woqmlBkQiUTKptQbEKZxutoGq/JNF6Tabw+teSPgoomFJlQyYQ60Tdyja4guESxCSUmVLGgTi11o6DAhEITSu8bayhT30imvnFqORIFxSaUadxIpnEjm8aNbBo3smncyKZxI5v6Rjb1jWzqG9nUN7Kpb7DpLLPpLLPpLPPms/xr+vbfd1/v3r2///htwjz88cenD9/vPn96/vr9f1/mv7z/end/f/fv2y9fP3/4+PePrx/f3n/+8PC3m/D8z1+C4Xa6qzipeZAiId8K5Edt01fKfEuMD18ffhQBnv5aJg2Tjv8D","brillig_names":["public_dispatch"]},{"name":"get_counter_value","is_unconstrained":true,"custom_attributes":[],"abi":{"parameters":[{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":{"abi_type":{"kind":"field"},"visibility":"public"},"error_types":{"206160798890201757":{"error_kind":"string","string":"Storage slot 0 not allowed. Storage slots must start from 1."},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+1bv28jRRSejb2Of8RnJwcnGqiQaL2Jc0kkisDRXAECJJAoTewcp4NEJEFCNLhC0FEhJAoaWqRr4E+gRzoqCjp6JCRabo598ZfP307WyU4IEiNZa++8ee/Nm3nfvHkzTtw/Jck/vtThHRd7t5s/B5crWYW8BgnrmZTsTCLe/ZJ/aeW/l6C+VqEBWkKXqvhvD4abLTff5wr132jlPGPax3hG4D9Yzvncmc74c1986bqzToJtmo8/K0DnyyvAz9rEtNXjsR5GtlV20xXbx9vgmbyj3hY38vf3Jicvv3+49+C1jz54d3LEnoaaqvdYPNe1Gdc7hwcnR6O9k5fG46PJ8TFzCPk9c20D1/dG9w/ujplbejFub0+Oju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YVdaTUGUFaKVVlMQWY2INCKnEbFG5DWioBFpVgRrVsRKq2EfZ1EUB5aVVlMQWY2INCKnEbFG5DWioBFFjShpRJoVETQrImhWRNCsiLUzNE9m2LUzGE+LvEb07Nrwc/fbP5d328sP11ffdpr9H7/ffLzf3t48/nr/79fpLx/uttfX2y/vv97dfrz69P3u6v317cf93zbm8Z+/XKQLl2k3mYe4T8lcUPL7X/ceueAuXPC7e93d838=","brillig_names":["get_counter_value"]},{"name":"sync_notes","is_unconstrained":true,"custom_attributes":[],"abi":{"parameters":[],"return_type":null,"error_types":{"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/9VUyw6CMBBseURBOaiJ3kz8gyIYOJJ49x8akKMe8OKNT5eabbqpVRKlJkzSbEs3szNlW0oUKESPvAH9tGnIFdhBDCA6aN/tRgFr9hviQKs7JH/O0iQw+BtQ/5OfWtIvIPktnT+bAM+xVfzYi6w77UaIesKWZ/nPbHpe9fhc/MFnh32k1caghm+uIYci3RuYR4Y8iRlRd9prh/eV5YzJei7w++RVO67va/lrWIeafvmOFV/qrDMe1wmv+YFXVVrypcYv4KBzGnMvbGHe1wvY45yo3mjul/J0vZ0b0gNB8gCVxsvQjgYAAA==","debug_symbols":"nZLBCoMwEET/Zc8eTDRR8ytSJGqUQEgkxkIR/71RbLHFS3JZmGXe7GFnhV60y9hIPZgZWL2CMh130miv1i2B1kql5Nhc15DuA6HDP09c73J23DpgGU5A6B5Ynnp6kEoAo9X2SADhQH8W6M8D/STMj2/zK4LLk6gIIV8G0fSASAxEY6AiBiojoOz28RVFxQeiGf2FNi+f3EreKnEWa1h0d+mZe03ir3KTNZ3oFyv28l1652ftb2HsY330Gw==","brillig_names":["sync_notes"]},{"name":"constructor","is_unconstrained":true,"custom_attributes":["public","initializer"],"abi":{"parameters":[],"return_type":null,"error_types":{"2233873454491509486":{"error_kind":"string","string":"Initializer address is not the contract deployer"},"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17618083556256589634":{"error_kind":"string","string":"Initialization hash does not match"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/+1azW4jRRDuiT2Of9fOLrsnJCRYJARiNeM4JLkZwt9e2AMHjmgU28IimyyJAe1KSEYIiQtC8BackHgBXgFxgRsnrrwCpFdd8ZfP5fYkns4uEi1ZPZ6qqb+uqq7+icysRa4vmwUt8gEVXNt+cA81938N4KXTX9/9T1ZraY34Fkl/J+lt1hT9CpT/Mf0okPy2Cf1A9k/WHZ296Yw+6iJ8q6e/upn5RCidZcxC6nxjiZ6/uecW8DaAq/UG8PDdGtmsTDj9gnTqkKzIK4QeMcD6AXWIA+pQKV6HrqaD8Gme/jruOfvs/r0H+0eD4euDwfHw5CQivTT5tWZp3maa7wwne0eHk+Nsf3L38GSSHe4P3xw+ODh6ODxeIz4V+r9OtjIEx36ZrGLnKsH7rk9Wa2lMMj/neqvTs+5Z/AZl57jAPBMDjec9NKoeGhWFRkw0XiQb4TxYZK67DnQN8bK+c8c9+3zn7uF4Ms4Oxo+yyfjo8N3s5CP2IvYIrhoMwY3J70Ux0XzF9da6L7lnGYUK0OBRXgcYjvIdD42qh0ak0IiJRur6mqJj6FEuXRHvmmK3IitEsT1WchHpVg/Du5tnZkH+dRM0mtOI+Ik8bB+JOxvhN93zWYTvZQcHg2yS7R09eIhKsCG558CMiBkqjP8rS/AiUML+GiafcoLfVPAbCp+2mdex6fmOnYplYVlbZn5wogW98OR3olvdBHXs1GfruiLPhR0JCct7hGttWW1SWoDHjtRSZOCM0aRv+u5/slrr5c0Ywr9udIftFyNPmidI0KZiu5Yia0eBxfCMMOTTUvhcFa22mR/vBvHRbNP08MHvm//zWYlPS/nuskmz45G5ZuZ9vu/65GJtk19wzKB8wvcavC8wvrfy5hvhXzfzsRIi31wjeRbFrtiurcjaUWCcI9oKn7bC579ES3xUYhB9p0V8NDtf8/DB7wWv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uYKBL3Xjl97RG/iln9w08Es/X2ng1+26pS9rZOCXvq6RhV+365a+spGFX7frlr62UXK+x6cT+KW7roFfuusa+KW7roFfuusa+KW77ll8Ln2BIwu/dNc18Et3XQO/dNc18Kt2XS59gSMLv2rX5dIXODLwJ1aKSJIGIjpQxb+q017Nw5O6OBz/CocnlkU4L5pYjMAQESJiROQR0el6w7HPAs5pJFJEdPorV+qTU2mE5x0iIkTEiMgjookS7/v9FA6ezd6JFBEFRBQRUUJEGRBN/VbwvIgQESMij4iQjBAkIwTJCEEyQpCMECQjFMmIqZ8TJB6skkciRkQeEQkiUkQUEFFERAkQTdyqKf19RSQyqrAT9zwaIkZEHhEJIlJEFBBRREQJEWVAFJGMiEhGTNyUI8OtPBJHhWXiNhtDJIhIEVFARBERJUSUAdHEvRGGiBARkhEJyYiEZERCMmLi+u75HnbiqqohSogImTacPn+bpHscc1J/JPETZ+2c9hXCBR2JGBF5RCSI6HQ+NLOzTkQxjUQBEUVElBBRBkQTi/caIkJEjIg8IhJEhGQEIRlBSEYQkhGEZAQjGXH6tMzZsjJxUsaR9MetH4sCIoqIKCGiDIgmzuQYIqQoe6Qoe6Qoe6QoT5zJMUQBEUVElBDRREaE/mhy6Xhq5yfO5BgiQkSMiDwiEkSkiMjOiBMiJCMEyYiJMznnRRNncgwRUiMUqRGK1AhFaoQiNUKRGqFIRiiSEYpkREAyIiAZEZCdG5CdG5CdGy7eub+bV//dPG1vbnf3z42mffPnw93L9vHh9eXL/z+6d26ftrvd9vv1j6fHu/uvP5/ur3ePd+17G/f657NPdCWOvrSP8mhecjMBY9L2Zft1+8hXPkqz1WbLfwA=","brillig_names":["constructor"]},{"name":"increase_counter_public","is_unconstrained":true,"custom_attributes":["public"],"abi":{"parameters":[{"name":"counter_id","type":{"kind":"field"},"visibility":"private"}],"return_type":null,"error_types":{"5019202896831570965":{"error_kind":"string","string":"attempt to add with overflow"},"13699457482007836410":{"error_kind":"string","string":"Not initialized"},"16761564377371454734":{"error_kind":"string","string":"Array index out of bounds"},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/9VZS4sjVRSu6lTl2ZnEZB49Lbh05eJWUt1JdiUyO9GVP6BMqqRhXnS3oiCYv+HGpXvBjYLgTsGFuHEnCv6RmRrOSb6cOkl3p+6dx4FwX+d+53kfueV7a/KpDETbU3gSKk01iiximQ0ldxmxzaj/qWxReQDjNYtGt4Rcm/hTE8ctxT6L+o9bhOnSP4zpAN80COeD5Rpf2lJQl9qYQzyn+fzXob6W4HMRT4f+NkNFf5ZV2Pmj8EcN/OFvKT1vM35MB8Jncp0mlmzqe+UcCl6CHW+yDaF9G0aaDSzn8PmvT/X0i0cfP50/WWTvLxbn2cWFL+zS9NfoJpjhDTCPJOZHnz98eJafZecPvjy7uCxh1xVsrh94um1SL+RD0vbHghIqTTWKQmHDO1QWe8HPVN+VfzKf7O5X0ew6+Y3y257T8yTyvfL6qXll/8j1Vnfjn6kv8FGfuuIfjmVDGWOsJrVDwEL+OtiI/Fjn+dj3HpV9BTMQOjS8sj3Yx/4tdHmX6j1Pz0XE1eIWKri79rKuMm/f/bi/Q+fWFhsSaptKdDrXzmWL+LGW+xbxV3fThhP8yYjxm270zxi/5QQ/XvmnLXLLDr4xjN9x45+V/w/dxHfln64b/WeMf8sN/gnj99z4Z4Xfd5M/Ee+jb3lrkveKgRPZ179XsPy20NXVvWIg9JH+4XODfTdUdO0rY3KPGSpyhoocjsNtMT+xYvdprul6e09dNayeRazmnljswztifkJtU4kmsabrHYt237KI1dgTi314V8xPqG0q0chout61aHfXIta+eahh1S1i7RtbmznHeXJPzE+obSrRaaTpes+i3YcWsWyu28Ai1r7rimN7JOYn1DaVaKLuAUcW7bZ5FnUsYtUsYtnc53hvcnwXnPJdCt/c+T9TocPXwiaf2vg+gnMHMI783wLmN1TvCR7fW78FaP/PXbwdse41sAffuF/OW5YZ+8J+T9EH5Vd9F0dZr9u7ofYuJPfgm75laVivMqboa3kP0d4zfcU23m9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UF7MUF7MUF7MUF7MUF7MUF7MUF7MUF7MUF7MUF5Meu6mapc+xrB0ceauHMctjjddnClLR16XJR+LN9KSWGDShU+vAKUW0KkFTGoBTi1gUwu41AI+tUDqTjapO5lTdzKn7mRO3cmcupM5dSdz6k6eYqJoVSsQBn5gxVGz9Squu/VKU8wUp8QJWDgChWMVFk6/XzE32+Wx2N3XOJP+jxC39aHm0nbuqb13LU7gLo7FwnFYOB4LJ2DhCBSOU1g49HM40l00u7n3ML9ewzuDhcNYOBYLx2HhYG1HuYCFI1A4XmHhEBYOlit7LFf2WK7ssVzZY7myB3LlWxz+WVblcrUrHqdKt5f9+uWQ6fnvsfjvvOmxOqyLzaUq6pOnz0OntX9pZXKtTbzNukEoSE4i9U2r+1DlFGw9pHusyrXSkSFy/AM=","brillig_names":["increase_counter_public"]},{"name":"compute_note_hash_and_optionally_a_nullifier","is_unconstrained":true,"custom_attributes":[],"abi":{"parameters":[{"name":"contract_address","type":{"kind":"struct","path":"aztec::protocol_types::address::aztec_address::AztecAddress","fields":[{"name":"inner","type":{"kind":"field"}}]},"visibility":"private"},{"name":"nonce","type":{"kind":"field"},"visibility":"private"},{"name":"storage_slot","type":{"kind":"field"},"visibility":"private"},{"name":"note_type_id","type":{"kind":"field"},"visibility":"private"},{"name":"compute_nullifier","type":{"kind":"boolean"},"visibility":"private"},{"name":"serialized_note","type":{"kind":"array","length":0,"type":{"kind":"field"}},"visibility":"private"}],"return_type":{"abi_type":{"kind":"array","length":4,"type":{"kind":"field"}},"visibility":"public"},"error_types":{"16957488177269924912":{"error_kind":"fmtstring","length":16,"item_types":[]},"17843811134343075018":{"error_kind":"string","string":"Stack too deep"}}},"bytecode":"H4sIAAAAAAAA/9VZ23LaMBAV2AbshIRA0kIfM9O3dsYO5pI3ZnrJd7hJ+IJ+gB/60n51o0FrHy+bDMGrB3aGke2Vzh6dlSzJdMzOBi+/jrsOXdkz+0Z1Nq5M21mmiJX65Nk5EZ7dE+EZnAjPUJFnR+BpS5pv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XpduXlzb7CqXx6NrQ12ePvVDdq2ktfq3Ub83qv5sjLa+Vi4oFTYqnKBwrKmwp8I7KtxQ4UCFIxWm5EVKXqTkRUqeUPKEkieUPKHkCSVPKHlCyRNKnlDyhJKnlDyl5CklTyl5SslTSp5S8pSSp5Q8peQZJc8oeUbJM0qeUfKMkmeUPKPkGSXPKHmJkpcoeYmSlyh5iZKXKHmJkpcoeYmSlyh5vq6xssfKO6zcYOWAlSNWFqysWNmwMmbQYwY9ZtBjBj1m0GMGPWNwLav3bu67/ZC/BhKn23h4mk8sH5f8Z1RxmadDPt7mvA0tfucV21dtQhXC418uC19ezzdaDikHfQI=","brillig_names":["compute_note_hash_and_optionally_a_nullifier"]}],"outputs":{"structs":{"functions":[{"kind":"struct","path":"SimpleLogging::constructor_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::constructor_parameters","fields":[]}}]},{"kind":"struct","path":"SimpleLogging::increace_counter_private_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::increace_counter_private_parameters","fields":[{"name":"counter_id","type":{"kind":"field"}}]}}]},{"kind":"struct","path":"SimpleLogging::add_to_counter_public_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::add_to_counter_public_parameters","fields":[{"name":"counter_id","type":{"kind":"field"}}]}}]},{"kind":"struct","path":"SimpleLogging::increase_counter_public_abi","fields":[{"name":"parameters","type":{"kind":"struct","path":"SimpleLogging::increase_counter_public_parameters","fields":[{"name":"counter_id","type":{"kind":"field"}}]}}]}]},"globals":{"storage":[{"kind":"struct","fields":[{"name":"contract_name","value":{"kind":"string","value":"SimpleLogging"}},{"name":"fields","value":{"kind":"struct","fields":[{"name":"counters","value":{"kind":"struct","fields":[{"name":"slot","value":{"kind":"integer","sign":false,"value":"0000000000000000000000000000000000000000000000000000000000000001"}}]}}]}}]}]}},"file_map":{"33":{"source":"use crate::default::Default;\nuse crate::hash::Hasher;\n\ncomptime global RATE: u32 = 3;\n\npub struct Poseidon2 {\n cache: [Field; 3],\n state: [Field; 4],\n cache_size: u32,\n squeeze_mode: bool, // 0 => absorb, 1 => squeeze\n}\n\nimpl Poseidon2 {\n #[no_predicates]\n pub fn hash(input: [Field; N], message_size: u32) -> Field {\n if message_size == N {\n Poseidon2::hash_internal(input, N, false)\n } else {\n Poseidon2::hash_internal(input, message_size, true)\n }\n }\n\n pub(crate) fn new(iv: Field) -> Poseidon2 {\n let mut result =\n Poseidon2 { cache: [0; 3], state: [0; 4], cache_size: 0, squeeze_mode: false };\n result.state[RATE] = iv;\n result\n }\n\n fn perform_duplex(&mut self) {\n // add the cache into sponge state\n for i in 0..RATE {\n // We effectively zero-pad the cache by only adding to the state\n // cache that is less than the specified `cache_size`\n if i < self.cache_size {\n self.state[i] += self.cache[i];\n }\n }\n self.state = crate::hash::poseidon2_permutation(self.state, 4);\n }\n\n fn absorb(&mut self, input: Field) {\n assert(!self.squeeze_mode);\n if self.cache_size == RATE {\n // If we're absorbing, and the cache is full, apply the sponge permutation to compress the cache\n self.perform_duplex();\n self.cache[0] = input;\n self.cache_size = 1;\n } else {\n // If we're absorbing, and the cache is not full, add the input into the cache\n self.cache[self.cache_size] = input;\n self.cache_size += 1;\n }\n }\n\n fn squeeze(&mut self) -> Field {\n assert(!self.squeeze_mode);\n // If we're in absorb mode, apply sponge permutation to compress the cache.\n self.perform_duplex();\n self.squeeze_mode = true;\n\n // Pop one item off the top of the permutation and return it.\n self.state[0]\n }\n\n fn hash_internal(\n input: [Field; N],\n in_len: u32,\n is_variable_length: bool,\n ) -> Field {\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = Poseidon2::new(iv);\n for i in 0..input.len() {\n if i < in_len {\n sponge.absorb(input[i]);\n }\n }\n\n // In the case where the hash preimage is variable-length, we append `1` to the end of the input, to distinguish\n // from fixed-length hashes. (the combination of this additional field element + the hash IV ensures\n // fixed-length and variable-length hashes do not collide)\n if is_variable_length {\n sponge.absorb(1);\n }\n sponge.squeeze()\n }\n}\n\npub struct Poseidon2Hasher {\n _state: [Field],\n}\n\nimpl Hasher for Poseidon2Hasher {\n fn finish(self) -> Field {\n let iv: Field = (self._state.len() as Field) * 18446744073709551616; // iv = (self._state.len() << 64)\n let mut sponge = Poseidon2::new(iv);\n for i in 0..self._state.len() {\n sponge.absorb(self._state[i]);\n }\n sponge.squeeze()\n }\n\n fn write(&mut self, input: Field) {\n self._state = self._state.push_back(input);\n }\n}\n\nimpl Default for Poseidon2Hasher {\n fn default() -> Self {\n Poseidon2Hasher { _state: &[] }\n }\n}\n","path":"std/hash/poseidon2.nr"},"57":{"source":"use crate::cmp::{Eq, Ord, Ordering};\nuse crate::default::Default;\nuse crate::hash::{Hash, Hasher};\n\npub struct Option {\n _is_some: bool,\n _value: T,\n}\n\nimpl Option {\n /// Constructs a None value\n pub fn none() -> Self {\n Self { _is_some: false, _value: crate::mem::zeroed() }\n }\n\n /// Constructs a Some wrapper around the given value\n pub fn some(_value: T) -> Self {\n Self { _is_some: true, _value }\n }\n\n /// True if this Option is None\n pub fn is_none(self) -> bool {\n !self._is_some\n }\n\n /// True if this Option is Some\n pub fn is_some(self) -> bool {\n self._is_some\n }\n\n /// Asserts `self.is_some()` and returns the wrapped value.\n pub fn unwrap(self) -> T {\n assert(self._is_some);\n self._value\n }\n\n /// Returns the inner value without asserting `self.is_some()`\n /// Note that if `self` is `None`, there is no guarantee what value will be returned,\n /// only that it will be of type `T`.\n pub fn unwrap_unchecked(self) -> T {\n self._value\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, returns the given default value.\n pub fn unwrap_or(self, default: T) -> T {\n if self._is_some {\n self._value\n } else {\n default\n }\n }\n\n /// Returns the wrapped value if `self.is_some()`. Otherwise, calls the given function to return\n /// a default value.\n pub fn unwrap_or_else(self, default: fn[Env]() -> T) -> T {\n if self._is_some {\n self._value\n } else {\n default()\n }\n }\n\n /// Asserts `self.is_some()` with a provided custom message and returns the contained `Some` value\n pub fn expect(self, message: fmtstr) -> T {\n assert(self.is_some(), message);\n self._value\n }\n\n /// If self is `Some(x)`, this returns `Some(f(x))`. Otherwise, this returns `None`.\n pub fn map(self, f: fn[Env](T) -> U) -> Option {\n if self._is_some {\n Option::some(f(self._value))\n } else {\n Option::none()\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns the given default value.\n pub fn map_or(self, default: U, f: fn[Env](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default\n }\n }\n\n /// If self is `Some(x)`, this returns `f(x)`. Otherwise, this returns `default()`.\n pub fn map_or_else(self, default: fn[Env1]() -> U, f: fn[Env2](T) -> U) -> U {\n if self._is_some {\n f(self._value)\n } else {\n default()\n }\n }\n\n /// Returns None if self is None. Otherwise, this returns `other`.\n pub fn and(self, other: Self) -> Self {\n if self.is_none() {\n Option::none()\n } else {\n other\n }\n }\n\n /// If self is None, this returns None. Otherwise, this calls the given function\n /// with the Some value contained within self, and returns the result of that call.\n ///\n /// In some languages this function is called `flat_map` or `bind`.\n pub fn and_then(self, f: fn[Env](T) -> Option) -> Option {\n if self._is_some {\n f(self._value)\n } else {\n Option::none()\n }\n }\n\n /// If self is Some, return self. Otherwise, return `other`.\n pub fn or(self, other: Self) -> Self {\n if self._is_some {\n self\n } else {\n other\n }\n }\n\n /// If self is Some, return self. Otherwise, return `default()`.\n pub fn or_else(self, default: fn[Env]() -> Self) -> Self {\n if self._is_some {\n self\n } else {\n default()\n }\n }\n\n // If only one of the two Options is Some, return that option.\n // Otherwise, if both options are Some or both are None, None is returned.\n pub fn xor(self, other: Self) -> Self {\n if self._is_some {\n if other._is_some {\n Option::none()\n } else {\n self\n }\n } else if other._is_some {\n other\n } else {\n Option::none()\n }\n }\n\n /// Returns `Some(x)` if self is `Some(x)` and `predicate(x)` is true.\n /// Otherwise, this returns `None`\n pub fn filter(self, predicate: fn[Env](T) -> bool) -> Self {\n if self._is_some {\n if predicate(self._value) {\n self\n } else {\n Option::none()\n }\n } else {\n Option::none()\n }\n }\n\n /// Flattens an Option> into a Option.\n /// This returns None if the outer Option is None. Otherwise, this returns the inner Option.\n pub fn flatten(option: Option>) -> Option {\n if option._is_some {\n option._value\n } else {\n Option::none()\n }\n }\n}\n\nimpl Default for Option {\n fn default() -> Self {\n Option::none()\n }\n}\n\nimpl Eq for Option\nwhere\n T: Eq,\n{\n fn eq(self, other: Self) -> bool {\n if self._is_some == other._is_some {\n if self._is_some {\n self._value == other._value\n } else {\n true\n }\n } else {\n false\n }\n }\n}\n\nimpl Hash for Option\nwhere\n T: Hash,\n{\n fn hash(self, state: &mut H)\n where\n H: Hasher,\n {\n self._is_some.hash(state);\n if self._is_some {\n self._value.hash(state);\n }\n }\n}\n\n// For this impl we're declaring Option::none < Option::some\nimpl Ord for Option\nwhere\n T: Ord,\n{\n fn cmp(self, other: Self) -> Ordering {\n if self._is_some {\n if other._is_some {\n self._value.cmp(other._value)\n } else {\n Ordering::greater()\n }\n } else if other._is_some {\n Ordering::less()\n } else {\n Ordering::equal()\n }\n }\n}\n","path":"std/option.nr"},"58":{"source":"pub fn panic(message: fmtstr) -> U {\n assert(false, message);\n crate::mem::zeroed()\n}\n","path":"std/panic.nr"},"69":{"source":"use dep::aztec::macros::aztec;\n\n#[aztec]\ncontract SimpleLogging {\n use dep::aztec::prelude::{Map, PublicMutable};\n use dep::aztec::{\n //keys::getters::get_public_keys,\n macros::{storage::storage, functions::{public, initializer, private, internal}},\n };\n #[storage]\n struct Storage {\n counters: Map, Context>,\n }\n\n #[public]\n #[initializer]\n fn constructor() {\n }\n\n #[private]\n fn increace_counter_private(counter_id: Field) {\n //let msg_sender_npk_m_hash = get_public_keys(context.msg_sender()).npk_m.hash();\n //let secret = context.request_nsk_app(msg_sender_npk_m_hash); // get secret key of caller of function\n //let nullifier = std::hash::pedersen_hash([context.msg_sender().to_field(), secret]); // derive nullifier from sender and secret\n //context.push_nullifier(nullifier);\n SimpleLogging::at(context.this_address()).add_to_counter_public(counter_id).enqueue(\n &mut context,\n );\n }\n\n #[public]\n #[internal]\n fn add_to_counter_public(counter_id: Field) {\n let new_counter_value = storage.counters.at(counter_id).read() + 1;\n storage.counters.at(counter_id).write(new_counter_value);\n }\n\n #[public]\n fn increase_counter_public(counter_id: Field) {\n context.emit_unencrypted_log(/*message=*/\"Counter increased public\");\n SimpleLogging::at(context.this_address()).add_to_counter_public(counter_id);\n }\n unconstrained fn get_counter_value(counter_id: Field) -> pub Field {\n storage.counters.at(counter_id).read()\n }\n}\n","path":"/home/filip/c/chicmoz/services/event-cannon/src/contract-projects/SimpleLogging/src/main.nr"},"109":{"source":"use crate::state_vars::storage::Storage;\nuse dep::protocol_types::{\n storage::map::derive_storage_slot_in_map,\n traits::{Deserialize, Serialize, ToField},\n};\n\n// docs:start:map\npub struct Map {\n context: Context,\n storage_slot: Field,\n state_var_constructor: fn(Context, Field) -> V,\n}\n// docs:end:map\n\nimpl Storage for Map\nwhere\n T: Serialize + Deserialize,\n{}\n\nimpl Map {\n // docs:start:new\n pub fn new(\n context: Context,\n storage_slot: Field,\n state_var_constructor: fn(Context, Field) -> V,\n ) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n Map { context, storage_slot, state_var_constructor }\n }\n // docs:end:new\n\n // docs:start:at\n pub fn at(self, key: K) -> V\n where\n K: ToField,\n {\n // TODO(#1204): use a generator index for the storage slot\n let derived_storage_slot = derive_storage_slot_in_map(self.storage_slot, key);\n\n let state_var_constructor = self.state_var_constructor;\n state_var_constructor(self.context, derived_storage_slot)\n }\n // docs:end:at\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/state_vars/map.nr"},"122":{"source":"use crate::context::{PublicContext, UnconstrainedContext};\nuse crate::state_vars::storage::Storage;\nuse dep::protocol_types::traits::{Deserialize, Serialize};\n\n// docs:start:public_mutable_struct\npub struct PublicMutable {\n context: Context,\n storage_slot: Field,\n}\n// docs:end:public_mutable_struct\n\nimpl Storage for PublicMutable\nwhere\n T: Serialize + Deserialize,\n{}\n\nimpl PublicMutable {\n // docs:start:public_mutable_struct_new\n pub fn new(\n // Note: Passing the contexts to new(...) just to have an interface compatible with a Map.\n context: Context,\n storage_slot: Field,\n ) -> Self {\n assert(storage_slot != 0, \"Storage slot 0 not allowed. Storage slots must start from 1.\");\n PublicMutable { context, storage_slot }\n }\n // docs:end:public_mutable_struct_new\n}\n\nimpl PublicMutable\nwhere\n T: Serialize + Deserialize,\n{\n // docs:start:public_mutable_struct_read\n pub fn read(self) -> T {\n self.context.storage_read(self.storage_slot)\n }\n // docs:end:public_mutable_struct_read\n\n // docs:start:public_mutable_struct_write\n pub fn write(self, value: T) {\n self.context.storage_write(self.storage_slot, value);\n }\n // docs:end:public_mutable_struct_write\n}\n\nimpl PublicMutable\nwhere\n T: Deserialize,\n{\n pub unconstrained fn read(self) -> T {\n self.context.storage_read(self.storage_slot)\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/state_vars/public_mutable.nr"},"126":{"source":"use crate::{\n context::{inputs::PrivateContextInputs, packed_returns::PackedReturns},\n hash::{ArgsHasher, hash_args_array},\n keys::constants::{NULLIFIER_INDEX, NUM_KEY_TYPES, OUTGOING_INDEX, sk_generators},\n messaging::process_l1_to_l2_message,\n oracle::{\n arguments,\n call_private_function::call_private_function_internal,\n enqueue_public_function_call::{\n enqueue_public_function_call_internal, notify_set_min_revertible_side_effect_counter,\n set_public_teardown_function_call_internal,\n },\n header::get_header_at,\n key_validation_request::get_key_validation_request,\n logs::{emit_encrypted_event_log, emit_encrypted_note_log},\n returns::pack_returns,\n },\n};\nuse dep::protocol_types::{\n abis::{\n call_context::CallContext,\n function_selector::FunctionSelector,\n log_hash::{EncryptedLogHash, LogHash, NoteLogHash},\n max_block_number::MaxBlockNumber,\n note_hash::NoteHash,\n nullifier::Nullifier,\n private_call_request::PrivateCallRequest,\n private_circuit_public_inputs::PrivateCircuitPublicInputs,\n public_call_request::PublicCallRequest,\n read_request::ReadRequest,\n side_effect::Counted,\n validation_requests::{KeyValidationRequest, KeyValidationRequestAndGenerator},\n },\n address::{AztecAddress, EthAddress},\n constants::{\n MAX_CONTRACT_CLASS_LOGS_PER_CALL, MAX_ENCRYPTED_LOGS_PER_CALL, MAX_ENQUEUED_CALLS_PER_CALL,\n MAX_KEY_VALIDATION_REQUESTS_PER_CALL, MAX_L2_TO_L1_MSGS_PER_CALL,\n MAX_NOTE_ENCRYPTED_LOGS_PER_CALL, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL,\n MAX_NOTE_HASHES_PER_CALL, MAX_NULLIFIER_READ_REQUESTS_PER_CALL, MAX_NULLIFIERS_PER_CALL,\n MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, PUBLIC_DISPATCH_SELECTOR,\n },\n header::Header,\n messaging::l2_to_l1_message::L2ToL1Message,\n traits::Empty,\n};\n\n// When finished, one can call .finish() to convert back to the abi\npub struct PrivateContext {\n // docs:start:private-context\n pub inputs: PrivateContextInputs,\n pub side_effect_counter: u32,\n\n pub min_revertible_side_effect_counter: u32,\n pub is_fee_payer: bool,\n\n pub args_hash: Field,\n pub return_hash: Field,\n\n pub max_block_number: MaxBlockNumber,\n\n pub note_hash_read_requests: BoundedVec,\n pub nullifier_read_requests: BoundedVec,\n key_validation_requests_and_generators: BoundedVec,\n\n pub note_hashes: BoundedVec,\n pub nullifiers: BoundedVec,\n\n pub private_call_requests: BoundedVec,\n pub public_call_requests: BoundedVec, MAX_ENQUEUED_CALLS_PER_CALL>,\n pub public_teardown_call_request: PublicCallRequest,\n pub l2_to_l1_msgs: BoundedVec,\n // docs:end:private-context\n\n // Header of a block whose state is used during private execution (not the block the transaction is included in).\n pub historical_header: Header,\n\n pub note_encrypted_logs_hashes: BoundedVec,\n pub encrypted_logs_hashes: BoundedVec,\n pub contract_class_logs_hashes: BoundedVec,\n\n // Contains the last key validation request for each key type. This is used to cache the last request and avoid\n // fetching the same request multiple times.\n // The index of the array corresponds to the key type (0 nullifier, 1 incoming, 2 outgoing, 3 tagging).\n pub last_key_validation_requests: [Option; NUM_KEY_TYPES],\n}\n\nimpl PrivateContext {\n pub fn new(inputs: PrivateContextInputs, args_hash: Field) -> PrivateContext {\n PrivateContext {\n inputs,\n side_effect_counter: inputs.start_side_effect_counter + 1,\n min_revertible_side_effect_counter: 0,\n is_fee_payer: false,\n args_hash,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n historical_header: inputs.historical_header,\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n note_encrypted_logs_hashes: BoundedVec::new(),\n encrypted_logs_hashes: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n\n pub fn msg_sender(self) -> AztecAddress {\n self.inputs.call_context.msg_sender\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.inputs.call_context.contract_address\n }\n\n pub fn chain_id(self) -> Field {\n self.inputs.tx_context.chain_id\n }\n\n pub fn version(self) -> Field {\n self.inputs.tx_context.version\n }\n\n pub fn selector(self) -> FunctionSelector {\n self.inputs.call_context.function_selector\n }\n\n pub fn get_args_hash(self) -> Field {\n self.args_hash\n }\n\n pub fn push_note_hash(&mut self, note_hash: Field) {\n self.note_hashes.push(NoteHash { value: note_hash, counter: self.next_counter() });\n }\n\n pub fn push_nullifier(&mut self, nullifier: Field) {\n self.nullifiers.push(\n Nullifier { value: nullifier, note_hash: 0, counter: self.next_counter() },\n );\n }\n\n pub fn push_nullifier_for_note_hash(&mut self, nullifier: Field, nullified_note_hash: Field) {\n self.nullifiers.push(\n Nullifier {\n value: nullifier,\n note_hash: nullified_note_hash,\n counter: self.next_counter(),\n },\n );\n }\n\n // Returns the header of a block whose state is used during private execution (not the block the transaction is\n // included in).\n pub fn get_header(self) -> Header {\n self.historical_header\n }\n\n // Returns the header of an arbitrary block whose block number is less than or equal to the block number\n // of historical header.\n pub fn get_header_at(self, block_number: u32) -> Header {\n get_header_at(block_number, self)\n }\n\n pub fn set_return_hash(&mut self, returns_hasher: ArgsHasher) {\n pack_returns(returns_hasher.fields);\n self.return_hash = returns_hasher.hash();\n }\n\n pub fn finish(self) -> PrivateCircuitPublicInputs {\n PrivateCircuitPublicInputs {\n call_context: self.inputs.call_context,\n args_hash: self.args_hash,\n returns_hash: self.return_hash,\n min_revertible_side_effect_counter: self.min_revertible_side_effect_counter,\n is_fee_payer: self.is_fee_payer,\n max_block_number: self.max_block_number,\n note_hash_read_requests: self.note_hash_read_requests.storage(),\n nullifier_read_requests: self.nullifier_read_requests.storage(),\n key_validation_requests_and_generators: self\n .key_validation_requests_and_generators\n .storage(),\n note_hashes: self.note_hashes.storage(),\n nullifiers: self.nullifiers.storage(),\n private_call_requests: self.private_call_requests.storage(),\n public_call_requests: self.public_call_requests.storage(),\n public_teardown_call_request: self.public_teardown_call_request,\n l2_to_l1_msgs: self.l2_to_l1_msgs.storage(),\n start_side_effect_counter: self.inputs.start_side_effect_counter,\n end_side_effect_counter: self.side_effect_counter,\n note_encrypted_logs_hashes: self.note_encrypted_logs_hashes.storage(),\n encrypted_logs_hashes: self.encrypted_logs_hashes.storage(),\n contract_class_logs_hashes: self.contract_class_logs_hashes.storage(),\n historical_header: self.historical_header,\n tx_context: self.inputs.tx_context,\n }\n }\n\n pub fn set_as_fee_payer(&mut self) {\n dep::protocol_types::debug_log::debug_log_format(\n \"Setting {0} as fee payer\",\n [self.this_address().to_field()],\n );\n self.is_fee_payer = true;\n }\n\n pub fn end_setup(&mut self) {\n // dep::protocol_types::debug_log::debug_log_format(\n // \"Ending setup at counter {0}\",\n // [self.side_effect_counter as Field]\n // );\n self.min_revertible_side_effect_counter = self.side_effect_counter;\n notify_set_min_revertible_side_effect_counter(self.min_revertible_side_effect_counter);\n }\n\n // docs:start:max-block-number\n pub fn set_tx_max_block_number(&mut self, max_block_number: u32) {\n // docs:end:max-block-number\n self.max_block_number =\n MaxBlockNumber::min_with_u32(self.max_block_number, max_block_number);\n }\n\n pub fn push_note_hash_read_request(&mut self, note_hash: Field) {\n let side_effect = ReadRequest { value: note_hash, counter: self.next_counter() };\n self.note_hash_read_requests.push(side_effect);\n }\n\n pub fn push_nullifier_read_request(&mut self, nullifier: Field) {\n let request = ReadRequest { value: nullifier, counter: self.next_counter() };\n self.nullifier_read_requests.push(request);\n }\n\n pub fn request_nsk_app(&mut self, npk_m_hash: Field) -> Field {\n self.request_sk_app(npk_m_hash, NULLIFIER_INDEX)\n }\n\n pub fn request_ovsk_app(&mut self, ovpk_m_hash: Field) -> Field {\n self.request_sk_app(ovpk_m_hash, OUTGOING_INDEX)\n }\n\n fn request_sk_app(&mut self, pk_m_hash: Field, key_index: Field) -> Field {\n let cached_request =\n self.last_key_validation_requests[key_index].unwrap_or(KeyValidationRequest::empty());\n\n if cached_request.pk_m.hash() == pk_m_hash {\n // We get a match so the cached request is the latest one\n cached_request.sk_app\n } else {\n // We didn't get a match meaning the cached result is stale\n // Typically we'd validate keys by showing that they are the preimage of `pk_m_hash`, but that'd require\n // the oracle returning the master secret keys, which could cause malicious contracts to leak it or learn\n // about secrets from other contracts. We therefore silo secret keys, and rely on the private kernel to\n // validate that we siloed secret key corresponds to correct siloing of the master secret key that hashes\n // to `pk_m_hash`.\n let request = unsafe { get_key_validation_request(pk_m_hash, key_index) };\n assert(request.pk_m.hash() == pk_m_hash);\n\n self.key_validation_requests_and_generators.push(\n KeyValidationRequestAndGenerator {\n request,\n sk_app_generator: sk_generators[key_index],\n },\n );\n self.last_key_validation_requests[key_index] = Option::some(request);\n request.sk_app\n }\n }\n\n // docs:start:context_message_portal\n pub fn message_portal(&mut self, recipient: EthAddress, content: Field) {\n // docs:end:context_message_portal\n let message = L2ToL1Message { recipient, content, counter: self.next_counter() };\n self.l2_to_l1_msgs.push(message);\n }\n\n // docs:start:context_consume_l1_to_l2_message\n // docs:start:consume_l1_to_l2_message\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n // docs:end:context_consume_l1_to_l2_message\n let nullifier = process_l1_to_l2_message(\n self.historical_header.state.l1_to_l2_message_tree.root,\n self.this_address(),\n sender,\n self.chain_id(),\n self.version(),\n content,\n secret,\n leaf_index,\n );\n\n // Push nullifier (and the \"commitment\" corresponding to this can be \"empty\")\n self.push_nullifier(nullifier)\n }\n // docs:end:consume_l1_to_l2_message\n\n // NB: A randomness value of 0 signals that the kernels should not mask the contract address\n // used in siloing later on e.g. 'handshaking' contract w/ known address.\n pub fn emit_raw_event_log_with_masked_address(\n &mut self,\n randomness: Field,\n log: [u8; M],\n log_hash: Field,\n ) {\n let counter = self.next_counter();\n let contract_address = self.this_address();\n let len = log.len() as Field + 4;\n let side_effect = EncryptedLogHash { value: log_hash, counter, length: len, randomness };\n self.encrypted_logs_hashes.push(side_effect);\n\n emit_encrypted_event_log(contract_address, randomness, log, counter);\n }\n\n pub fn emit_raw_note_log(\n &mut self,\n note_hash_counter: u32,\n log: [u8; M],\n log_hash: Field,\n ) {\n let counter = self.next_counter();\n let len = log.len() as Field + 4;\n let side_effect = NoteLogHash { value: log_hash, counter, length: len, note_hash_counter };\n self.note_encrypted_logs_hashes.push(side_effect);\n\n emit_encrypted_note_log(note_hash_counter, log, counter);\n }\n\n pub fn call_private_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_private_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) -> PackedReturns {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_private_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_private_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) -> PackedReturns {\n self.call_private_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_private_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) -> PackedReturns {\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n let start_side_effect_counter = self.side_effect_counter;\n\n // The oracle simulates the private call and returns the value of the side effects counter after execution of\n // the call (which means that end_side_effect_counter - start_side_effect_counter is the number of side effects\n // that took place), along with the hash of the return values. We validate these by requesting a private kernel\n // iteration in which the return values are constrained to hash to `returns_hash` and the side effects counter\n // to increment from start to end.\n let (end_side_effect_counter, returns_hash) = unsafe {\n call_private_function_internal(\n contract_address,\n function_selector,\n args_hash,\n start_side_effect_counter,\n is_static_call,\n )\n };\n\n self.private_call_requests.push(\n PrivateCallRequest {\n call_context: CallContext {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n },\n args_hash,\n returns_hash,\n start_side_effect_counter,\n end_side_effect_counter,\n },\n );\n\n // TODO (fees) figure out why this crashes the prover and enable it\n // we need this in order to pay fees inside child call contexts\n // assert(\n // (item.public_inputs.min_revertible_side_effect_counter == 0 as u32)\n // | (item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter)\n // );\n // if item.public_inputs.min_revertible_side_effect_counter\n // > self.min_revertible_side_effect_counter {\n // self.min_revertible_side_effect_counter = item.public_inputs.min_revertible_side_effect_counter;\n // }\n self.side_effect_counter = end_side_effect_counter + 1;\n PackedReturns::new(returns_hash)\n }\n\n pub fn call_public_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn static_call_public_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.call_public_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n true,\n )\n }\n\n pub fn call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, false)\n }\n\n pub fn static_call_public_function_no_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n ) {\n self.call_public_function_with_packed_args(contract_address, function_selector, 0, true)\n }\n\n pub fn call_public_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = enqueue_public_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n // Public calls are rerouted through the dispatch function.\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n let call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n\n self.public_call_requests.push(Counted::new(call_request, counter));\n }\n\n pub fn set_public_teardown_function(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field; ARGS_COUNT],\n ) {\n let args_hash = hash_args_array(args);\n arguments::pack_arguments_array(args);\n self.set_public_teardown_function_with_packed_args(\n contract_address,\n function_selector,\n args_hash,\n false,\n )\n }\n\n pub fn set_public_teardown_function_with_packed_args(\n &mut self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n is_static_call: bool,\n ) {\n let counter = self.next_counter();\n\n let mut is_static_call = is_static_call | self.inputs.call_context.is_static_call;\n // TODO(https://github.com/AztecProtocol/aztec-packages/issues/8985): Fix this.\n // WARNING: This is insecure and should be temporary!\n // The oracle repacks the arguments and returns a new args_hash.\n // new_args = [selector, ...old_args], so as to make it suitable to call the public dispatch function.\n // We don't validate or compute it in the circuit because a) it's harder to do with slices, and\n // b) this is only temporary.\n let args_hash = set_public_teardown_function_call_internal(\n contract_address,\n function_selector,\n args_hash,\n counter,\n is_static_call,\n );\n\n let function_selector = comptime { FunctionSelector::from_field(PUBLIC_DISPATCH_SELECTOR) };\n\n self.public_teardown_call_request = PublicCallRequest {\n msg_sender: self.this_address(),\n contract_address,\n function_selector,\n is_static_call,\n args_hash,\n };\n }\n\n fn next_counter(&mut self) -> u32 {\n let counter = self.side_effect_counter;\n self.side_effect_counter += 1;\n counter\n }\n}\n\nimpl Empty for PrivateContext {\n fn empty() -> Self {\n PrivateContext {\n inputs: PrivateContextInputs::empty(),\n side_effect_counter: 0 as u32,\n min_revertible_side_effect_counter: 0 as u32,\n is_fee_payer: false,\n args_hash: 0,\n return_hash: 0,\n max_block_number: MaxBlockNumber::empty(),\n note_hash_read_requests: BoundedVec::new(),\n nullifier_read_requests: BoundedVec::new(),\n key_validation_requests_and_generators: BoundedVec::new(),\n note_hashes: BoundedVec::new(),\n nullifiers: BoundedVec::new(),\n private_call_requests: BoundedVec::new(),\n public_call_requests: BoundedVec::new(),\n public_teardown_call_request: PublicCallRequest::empty(),\n l2_to_l1_msgs: BoundedVec::new(),\n historical_header: Header::empty(),\n note_encrypted_logs_hashes: BoundedVec::new(),\n encrypted_logs_hashes: BoundedVec::new(),\n contract_class_logs_hashes: BoundedVec::new(),\n last_key_validation_requests: [Option::none(); NUM_KEY_TYPES],\n }\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/private_context.nr"},"127":{"source":"use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress, traits::Deserialize,\n};\n\nuse crate::context::{gas::GasOpts, private_context::PrivateContext, public_context::PublicContext};\n\nuse crate::hash::hash_args;\nuse crate::oracle::arguments::pack_arguments;\n\npub trait CallInterface {\n fn get_args(self) -> [Field] {\n self.args\n }\n\n fn get_selector(self) -> FunctionSelector {\n self.selector\n }\n\n fn get_name(self) -> str {\n self.name\n }\n\n fn get_contract_address(self) -> AztecAddress {\n self.target_contract\n }\n\n fn get_is_static(self) -> bool {\n self.is_static\n }\n}\n\npub struct PrivateCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl PrivateCallInterface {\n pub fn call(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n );\n let unpacked: T = returns.unpack_into();\n unpacked\n }\n\n pub fn view(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.unpack_into()\n }\n}\n\nimpl CallInterface for PrivateVoidCallInterface {}\n\npub struct PrivateVoidCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n}\n\nimpl PrivateVoidCallInterface {\n pub fn call(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n false,\n )\n .assert_empty();\n }\n\n pub fn view(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl CallInterface for PrivateStaticCallInterface {}\n\npub struct PrivateStaticCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl PrivateStaticCallInterface {\n pub fn view(self, context: &mut PrivateContext) -> T\n where\n T: Deserialize,\n {\n pack_arguments(self.args);\n let returns = context.call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n );\n returns.unpack_into()\n }\n}\n\nimpl CallInterface for PrivateStaticVoidCallInterface {}\n\npub struct PrivateStaticVoidCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args_hash: Field,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n}\n\nimpl PrivateStaticVoidCallInterface {\n pub fn view(self, context: &mut PrivateContext) {\n pack_arguments(self.args);\n context\n .call_private_function_with_packed_args(\n self.target_contract,\n self.selector,\n self.args_hash,\n true,\n )\n .assert_empty();\n }\n}\n\nimpl CallInterface for PublicCallInterface {}\n\npub struct PublicCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args: [Field],\n pub gas_opts: GasOpts,\n pub return_type: T,\n pub is_static: bool,\n}\n\nimpl PublicCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call(self, context: &mut PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::())\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::())\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl CallInterface for PublicVoidCallInterface {}\n\npub struct PublicVoidCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args: [Field],\n pub return_type: (),\n pub is_static: bool,\n pub gas_opts: GasOpts,\n}\n\nimpl PublicVoidCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn call(self, context: &mut PublicContext) {\n let returns = context.call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n false,\n )\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl CallInterface for PublicStaticCallInterface {}\n\npub struct PublicStaticCallInterface {\n pub target_contract: AztecAddress,\n pub selector: FunctionSelector,\n pub name: str,\n pub args: [Field],\n pub return_type: T,\n pub is_static: bool,\n pub gas_opts: GasOpts,\n}\n\nimpl PublicStaticCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) -> T\n where\n T: Deserialize,\n {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n Deserialize::deserialize(returns.as_array::())\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n\nimpl CallInterface for PublicStaticVoidCallInterface {}\n\npub struct PublicStaticVoidCallInterface {\n target_contract: AztecAddress,\n selector: FunctionSelector,\n name: str,\n args: [Field],\n return_type: (),\n is_static: bool,\n gas_opts: GasOpts,\n}\n\nimpl PublicStaticVoidCallInterface {\n pub fn with_gas(self: &mut Self, gas_opts: GasOpts) -> &mut Self {\n self.gas_opts = gas_opts;\n self\n }\n\n pub unconstrained fn view(self, context: &mut PublicContext) {\n let returns = context.static_call_public_function(\n self.target_contract,\n self.selector,\n self.args,\n self.gas_opts,\n );\n assert(returns.len() == 0);\n }\n\n pub fn enqueue_view(self, context: &mut PrivateContext) {\n let args_hash = hash_args(self.args);\n pack_arguments(self.args);\n context.call_public_function_with_packed_args(\n self.target_contract,\n self.selector,\n args_hash,\n /*static=*/\n true,\n )\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/call_interfaces.nr"},"128":{"source":"use crate::oracle::{\n execution::{get_block_number, get_chain_id, get_contract_address, get_version},\n storage::storage_read,\n};\nuse dep::protocol_types::{address::AztecAddress, traits::Deserialize};\n\npub struct UnconstrainedContext {\n block_number: u32,\n contract_address: AztecAddress,\n version: Field,\n chain_id: Field,\n}\n\nimpl UnconstrainedContext {\n pub unconstrained fn new() -> Self {\n // We could call these oracles on the getters instead of at creation, which makes sense given that they might\n // not even be accessed. However any performance gains are minimal, and we'd rather fail early if a user\n // incorrectly attempts to create an UnconstrainedContext in an environment in which these oracles are not\n // available.\n let block_number = get_block_number();\n let contract_address = get_contract_address();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at(contract_address: AztecAddress) -> Self {\n let block_number = get_block_number();\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub unconstrained fn at_historical(contract_address: AztecAddress, block_number: u32) -> Self {\n let chain_id = get_chain_id();\n let version = get_version();\n Self { block_number, contract_address, version, chain_id }\n }\n\n pub fn block_number(self) -> u32 {\n self.block_number\n }\n\n pub fn this_address(self) -> AztecAddress {\n self.contract_address\n }\n\n pub fn version(self) -> Field {\n self.version\n }\n\n pub fn chain_id(self) -> Field {\n self.chain_id\n }\n\n pub unconstrained fn raw_storage_read(\n self: Self,\n storage_slot: Field,\n ) -> [Field; N] {\n storage_read(self.this_address(), storage_slot, self.block_number())\n }\n\n pub unconstrained fn storage_read(self, storage_slot: Field) -> T\n where\n T: Deserialize,\n {\n T::deserialize(self.raw_storage_read(storage_slot))\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/unconstrained_context.nr"},"134":{"source":"use crate::context::gas::GasOpts;\nuse crate::hash::{\n compute_l1_to_l2_message_hash, compute_l1_to_l2_message_nullifier, compute_secret_hash,\n};\nuse dep::protocol_types::abis::function_selector::FunctionSelector;\nuse dep::protocol_types::address::{AztecAddress, EthAddress};\nuse dep::protocol_types::constants::MAX_FIELD_VALUE;\nuse dep::protocol_types::traits::{Deserialize, Empty, Serialize};\n\npub struct PublicContext {\n pub args_hash: Option,\n pub compute_args_hash: fn() -> Field,\n}\n\nimpl PublicContext {\n pub fn new(compute_args_hash: fn() -> Field) -> Self {\n PublicContext { args_hash: Option::none(), compute_args_hash }\n }\n\n pub fn emit_unencrypted_log(_self: &mut Self, log: T)\n where\n T: Serialize,\n {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_unencrypted_log(Serialize::serialize(log).as_slice()) };\n }\n\n pub fn note_hash_exists(_self: Self, note_hash: Field, leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { note_hash_exists(note_hash, leaf_index) } == 1\n }\n\n pub fn l1_to_l2_msg_exists(_self: Self, msg_hash: Field, msg_leaf_index: Field) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { l1_to_l2_msg_exists(msg_hash, msg_leaf_index) } == 1\n }\n\n pub fn nullifier_exists(_self: Self, unsiloed_nullifier: Field, address: AztecAddress) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { nullifier_exists(unsiloed_nullifier, address.to_field()) } == 1\n }\n\n pub fn consume_l1_to_l2_message(\n &mut self,\n content: Field,\n secret: Field,\n sender: EthAddress,\n leaf_index: Field,\n ) {\n let secret_hash = compute_secret_hash(secret);\n let message_hash = compute_l1_to_l2_message_hash(\n sender,\n self.chain_id(),\n /*recipient=*/\n self.this_address(),\n self.version(),\n content,\n secret_hash,\n leaf_index,\n );\n let nullifier = compute_l1_to_l2_message_nullifier(message_hash, secret);\n\n assert(\n !self.nullifier_exists(nullifier, self.this_address()),\n \"L1-to-L2 message is already nullified\",\n );\n assert(\n self.l1_to_l2_msg_exists(message_hash, leaf_index),\n \"Tried to consume nonexistent L1-to-L2 message\",\n );\n\n self.push_nullifier(nullifier);\n }\n\n pub fn message_portal(_self: &mut Self, recipient: EthAddress, content: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { send_l2_to_l1_msg(recipient, content) };\n }\n\n pub unconstrained fn call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub unconstrained fn static_call_public_function(\n _self: &mut Self,\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args: [Field],\n gas_opts: GasOpts,\n ) -> [Field] {\n let args = args.push_front(function_selector.to_field());\n let success = call_static(gas_for_call(gas_opts), contract_address, args);\n\n let result_data = returndata_copy(0, returndata_size());\n if !success {\n // Rethrow the revert data.\n avm_revert(result_data);\n }\n result_data\n }\n\n pub fn push_note_hash(_self: &mut Self, note_hash: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_note_hash(note_hash) };\n }\n pub fn push_nullifier(_self: &mut Self, nullifier: Field) {\n // AVM opcodes are constrained by the AVM itself\n unsafe { emit_nullifier(nullifier) };\n }\n\n pub fn this_address(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n address()\n }\n }\n pub fn msg_sender(_self: Self) -> AztecAddress {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n sender()\n }\n }\n pub fn selector(_self: Self) -> FunctionSelector {\n // The selector is the first element of the calldata when calling a public function through dispatch.\n // AVM opcodes are constrained by the AVM itself.\n let raw_selector: [Field; 1] = unsafe { calldata_copy(0, 1) };\n FunctionSelector::from_field(raw_selector[0])\n }\n pub fn get_args_hash(mut self) -> Field {\n if !self.args_hash.is_some() {\n self.args_hash = Option::some((self.compute_args_hash)());\n }\n\n self.args_hash.unwrap_unchecked()\n }\n pub fn transaction_fee(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n transaction_fee()\n }\n }\n\n pub fn chain_id(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n chain_id()\n }\n }\n pub fn version(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n version()\n }\n }\n pub fn block_number(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n block_number()\n }\n }\n pub fn timestamp(_self: Self) -> u64 {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n timestamp()\n }\n }\n pub fn fee_per_l2_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_l2_gas()\n }\n }\n pub fn fee_per_da_gas(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n fee_per_da_gas()\n }\n }\n\n pub fn l2_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n l2_gas_left()\n }\n }\n pub fn da_gas_left(_self: Self) -> Field {\n // AVM opcodes are constrained by the AVM itself\n unsafe {\n da_gas_left()\n }\n }\n pub fn is_static_call(_self: Self) -> bool {\n // AVM opcodes are constrained by the AVM itself\n unsafe { is_static_call() } == 1\n }\n\n pub fn raw_storage_read(_self: Self, storage_slot: Field) -> [Field; N] {\n let mut out = [0; N];\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n out[i] = unsafe { storage_read(storage_slot + i as Field) };\n }\n out\n }\n\n pub fn storage_read(self, storage_slot: Field) -> T\n where\n T: Deserialize,\n {\n T::deserialize(self.raw_storage_read(storage_slot))\n }\n\n pub fn raw_storage_write(_self: Self, storage_slot: Field, values: [Field; N]) {\n for i in 0..N {\n // AVM opcodes are constrained by the AVM itself\n unsafe { storage_write(storage_slot + i as Field, values[i]) };\n }\n }\n\n pub fn storage_write(self, storage_slot: Field, value: T)\n where\n T: Serialize,\n {\n self.raw_storage_write(storage_slot, value.serialize());\n }\n}\n\n// Helper functions\nfn gas_for_call(user_gas: GasOpts) -> [Field; 2] {\n // It's ok to use the max possible gas here, because the gas will be\n // capped by the gas left in the (STATIC)CALL instruction.\n [user_gas.l2_gas.unwrap_or(MAX_FIELD_VALUE), user_gas.da_gas.unwrap_or(MAX_FIELD_VALUE)]\n}\n\n// Unconstrained opcode wrappers (do not use directly).\nunconstrained fn address() -> AztecAddress {\n address_opcode()\n}\nunconstrained fn sender() -> AztecAddress {\n sender_opcode()\n}\n// TODO(9396): Remove.\nunconstrained fn portal() -> EthAddress {\n portal_opcode()\n}\n// TODO(9396): Remove.\n//unconstrained fn function_selector() -> u32 {\n// function_selector_opcode()\n//}\nunconstrained fn transaction_fee() -> Field {\n transaction_fee_opcode()\n}\nunconstrained fn chain_id() -> Field {\n chain_id_opcode()\n}\nunconstrained fn version() -> Field {\n version_opcode()\n}\nunconstrained fn block_number() -> Field {\n block_number_opcode()\n}\nunconstrained fn timestamp() -> u64 {\n timestamp_opcode()\n}\nunconstrained fn fee_per_l2_gas() -> Field {\n fee_per_l2_gas_opcode()\n}\nunconstrained fn fee_per_da_gas() -> Field {\n fee_per_da_gas_opcode()\n}\nunconstrained fn l2_gas_left() -> Field {\n l2_gas_left_opcode()\n}\nunconstrained fn da_gas_left() -> Field {\n da_gas_left_opcode()\n}\nunconstrained fn is_static_call() -> Field {\n is_static_call_opcode()\n}\nunconstrained fn note_hash_exists(note_hash: Field, leaf_index: Field) -> u1 {\n note_hash_exists_opcode(note_hash, leaf_index)\n}\nunconstrained fn emit_note_hash(note_hash: Field) {\n emit_note_hash_opcode(note_hash)\n}\nunconstrained fn nullifier_exists(nullifier: Field, address: Field) -> u1 {\n nullifier_exists_opcode(nullifier, address)\n}\nunconstrained fn emit_nullifier(nullifier: Field) {\n emit_nullifier_opcode(nullifier)\n}\nunconstrained fn emit_unencrypted_log(message: [Field]) {\n emit_unencrypted_log_opcode(message)\n}\nunconstrained fn l1_to_l2_msg_exists(msg_hash: Field, msg_leaf_index: Field) -> u1 {\n l1_to_l2_msg_exists_opcode(msg_hash, msg_leaf_index)\n}\nunconstrained fn send_l2_to_l1_msg(recipient: EthAddress, content: Field) {\n send_l2_to_l1_msg_opcode(recipient, content)\n}\nunconstrained fn call(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_opcode(gas, address, args)\n}\nunconstrained fn call_static(gas: [Field; 2], address: AztecAddress, args: [Field]) -> bool {\n call_static_opcode(gas, address, args)\n}\n\npub unconstrained fn calldata_copy(cdoffset: u32, copy_size: u32) -> [Field; N] {\n calldata_copy_opcode(cdoffset, copy_size)\n}\n\nunconstrained fn returndata_size() -> u32 {\n returndata_size_opcode()\n}\n\nunconstrained fn returndata_copy(rdoffset: u32, copy_size: u32) -> [Field] {\n returndata_copy_opcode(rdoffset, copy_size)\n}\n\npub unconstrained fn avm_return(returndata: [Field]) {\n return_opcode(returndata)\n}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\nunconstrained fn avm_revert(revertdata: [Field]) {\n revert_opcode(revertdata)\n}\n\nunconstrained fn storage_read(storage_slot: Field) -> Field {\n storage_read_opcode(storage_slot)\n}\n\nunconstrained fn storage_write(storage_slot: Field, value: Field) {\n storage_write_opcode(storage_slot, value);\n}\n\nimpl Empty for PublicContext {\n fn empty() -> Self {\n PublicContext::new(|| 0)\n }\n}\n\n// AVM oracles (opcodes) follow, do not use directly.\n#[oracle(avmOpcodeAddress)]\nunconstrained fn address_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodeSender)]\nunconstrained fn sender_opcode() -> AztecAddress {}\n\n#[oracle(avmOpcodePortal)]\nunconstrained fn portal_opcode() -> EthAddress {}\n\n// TODO(9396): Remove.\n//#[oracle(avmOpcodeFunctionSelector)]\n//unconstrained fn function_selector_opcode() -> u32 {}\n\n#[oracle(avmOpcodeTransactionFee)]\nunconstrained fn transaction_fee_opcode() -> Field {}\n\n#[oracle(avmOpcodeChainId)]\nunconstrained fn chain_id_opcode() -> Field {}\n\n#[oracle(avmOpcodeVersion)]\nunconstrained fn version_opcode() -> Field {}\n\n#[oracle(avmOpcodeBlockNumber)]\nunconstrained fn block_number_opcode() -> Field {}\n\n#[oracle(avmOpcodeTimestamp)]\nunconstrained fn timestamp_opcode() -> u64 {}\n\n#[oracle(avmOpcodeFeePerL2Gas)]\nunconstrained fn fee_per_l2_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeFeePerDaGas)]\nunconstrained fn fee_per_da_gas_opcode() -> Field {}\n\n#[oracle(avmOpcodeL2GasLeft)]\nunconstrained fn l2_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeDaGasLeft)]\nunconstrained fn da_gas_left_opcode() -> Field {}\n\n#[oracle(avmOpcodeIsStaticCall)]\nunconstrained fn is_static_call_opcode() -> Field {}\n\n#[oracle(avmOpcodeNoteHashExists)]\nunconstrained fn note_hash_exists_opcode(note_hash: Field, leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNoteHash)]\nunconstrained fn emit_note_hash_opcode(note_hash: Field) {}\n\n#[oracle(avmOpcodeNullifierExists)]\nunconstrained fn nullifier_exists_opcode(nullifier: Field, address: Field) -> u1 {}\n\n#[oracle(avmOpcodeEmitNullifier)]\nunconstrained fn emit_nullifier_opcode(nullifier: Field) {}\n\n#[oracle(avmOpcodeEmitUnencryptedLog)]\nunconstrained fn emit_unencrypted_log_opcode(message: [Field]) {}\n\n#[oracle(avmOpcodeL1ToL2MsgExists)]\nunconstrained fn l1_to_l2_msg_exists_opcode(msg_hash: Field, msg_leaf_index: Field) -> u1 {}\n\n#[oracle(avmOpcodeSendL2ToL1Msg)]\nunconstrained fn send_l2_to_l1_msg_opcode(recipient: EthAddress, content: Field) {}\n\n#[oracle(avmOpcodeCalldataCopy)]\nunconstrained fn calldata_copy_opcode(cdoffset: u32, copy_size: u32) -> [Field; N] {}\n\n#[oracle(avmOpcodeReturndataSize)]\nunconstrained fn returndata_size_opcode() -> u32 {}\n\n#[oracle(avmOpcodeReturndataCopy)]\nunconstrained fn returndata_copy_opcode(rdoffset: u32, copy_size: u32) -> [Field] {}\n\n#[oracle(avmOpcodeReturn)]\nunconstrained fn return_opcode(returndata: [Field]) {}\n\n// This opcode reverts using the exact data given. In general it should only be used\n// to do rethrows, where the revert data is the same as the original revert data.\n// For normal reverts, use Noir's `assert` which, on top of reverting, will also add\n// an error selector to the revert data.\n#[oracle(avmOpcodeRevert)]\nunconstrained fn revert_opcode(revertdata: [Field]) {}\n\n#[oracle(avmOpcodeCall)]\nunconstrained fn call_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStaticCall)]\nunconstrained fn call_static_opcode(\n gas: [Field; 2], // gas allocation: [l2_gas, da_gas]\n address: AztecAddress,\n args: [Field],\n) -> bool {}\n\n#[oracle(avmOpcodeStorageRead)]\nunconstrained fn storage_read_opcode(storage_slot: Field) -> Field {}\n\n#[oracle(avmOpcodeStorageWrite)]\nunconstrained fn storage_write_opcode(storage_slot: Field, value: Field) {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/context/public_context.nr"},"136":{"source":"use crate::utils::to_bytes::{arr_to_be_bytes_arr, str_to_be_bytes_arr};\nuse dep::protocol_types::{\n address::{AztecAddress, EthAddress},\n constants::{\n GENERATOR_INDEX__FUNCTION_ARGS, GENERATOR_INDEX__MESSAGE_NULLIFIER,\n GENERATOR_INDEX__SECRET_HASH,\n },\n hash::{poseidon2_hash_with_separator, poseidon2_hash_with_separator_slice, sha256_to_field},\n point::Point,\n traits::Hash,\n};\n\npub use dep::protocol_types::hash::{compute_siloed_nullifier, pedersen_hash};\n\npub fn pedersen_commitment(inputs: [Field; N], hash_index: u32) -> Point {\n std::hash::pedersen_commitment_with_separator(inputs, hash_index)\n}\n\npub fn compute_secret_hash(secret: Field) -> Field {\n poseidon2_hash_with_separator([secret], GENERATOR_INDEX__SECRET_HASH)\n}\n\npub fn compute_unencrypted_log_hash(\n contract_address: AztecAddress,\n log: [u8; N],\n) -> Field {\n let mut hash_bytes = [0; N + 36];\n // Address is converted to 32 bytes in ts\n let address_bytes: [u8; 32] = contract_address.to_field().to_be_bytes();\n for i in 0..32 {\n hash_bytes[i] = address_bytes[i];\n }\n let len_bytes: [u8; 4] = (N as Field).to_be_bytes();\n for i in 0..4 {\n hash_bytes[32 + i] = len_bytes[i];\n }\n for i in 0..N {\n hash_bytes[36 + i] = log[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\npub fn compute_l1_to_l2_message_hash(\n sender: EthAddress,\n chain_id: Field,\n recipient: AztecAddress,\n version: Field,\n content: Field,\n secret_hash: Field,\n leaf_index: Field,\n) -> Field {\n let mut hash_bytes = [0 as u8; 224];\n let sender_bytes: [u8; 32] = sender.to_field().to_be_bytes();\n let chain_id_bytes: [u8; 32] = chain_id.to_be_bytes();\n let recipient_bytes: [u8; 32] = recipient.to_field().to_be_bytes();\n let version_bytes: [u8; 32] = version.to_be_bytes();\n let content_bytes: [u8; 32] = content.to_be_bytes();\n let secret_hash_bytes: [u8; 32] = secret_hash.to_be_bytes();\n let leaf_index_bytes: [u8; 32] = leaf_index.to_be_bytes();\n\n for i in 0..32 {\n hash_bytes[i] = sender_bytes[i];\n hash_bytes[i + 32] = chain_id_bytes[i];\n hash_bytes[i + 64] = recipient_bytes[i];\n hash_bytes[i + 96] = version_bytes[i];\n hash_bytes[i + 128] = content_bytes[i];\n hash_bytes[i + 160] = secret_hash_bytes[i];\n hash_bytes[i + 192] = leaf_index_bytes[i];\n }\n\n sha256_to_field(hash_bytes)\n}\n\n// The nullifier of a l1 to l2 message is the hash of the message salted with the secret\npub fn compute_l1_to_l2_message_nullifier(message_hash: Field, secret: Field) -> Field {\n poseidon2_hash_with_separator([message_hash, secret], GENERATOR_INDEX__MESSAGE_NULLIFIER)\n}\n\npub struct ArgsHasher {\n pub fields: [Field],\n}\n\nimpl Hash for ArgsHasher {\n fn hash(self) -> Field {\n hash_args(self.fields)\n }\n}\n\nimpl ArgsHasher {\n pub fn new() -> Self {\n Self { fields: [] }\n }\n\n pub fn add(&mut self, field: Field) {\n self.fields = self.fields.push_back(field);\n }\n\n pub fn add_multiple(&mut self, fields: [Field; N]) {\n for i in 0..N {\n self.fields = self.fields.push_back(fields[i]);\n }\n }\n}\n\npub fn hash_args_array(args: [Field; N]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\npub fn hash_args(args: [Field]) -> Field {\n if args.len() == 0 {\n 0\n } else {\n poseidon2_hash_with_separator_slice(args, GENERATOR_INDEX__FUNCTION_ARGS)\n }\n}\n\n#[test]\nunconstrained fn compute_var_args_hash() {\n let mut input = ArgsHasher::new();\n for i in 0..100 {\n input.add(i as Field);\n }\n let hash = input.hash();\n dep::std::println(hash);\n assert(hash == 0x19b0d74feb06ebde19edd85a28986c97063e84b3b351a8b666c7cac963ce655f);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_array() {\n let contract_address = AztecAddress::from_field(\n 0x233a3e0df23b2b15b324194cb4a151f26c0b7333250781d34cc269d85dc334c6,\n );\n let log = [\n 0x20660de09f35f876e3e69d227b2a35166ad05f09d82d06366ec9b6f65a51fec2,\n 0x1b52bfe3b8689761916f76dc3d38aa8810860db325cd39ca611eed980091f01c,\n 0x2e559c4045c378a56ad13b9edb1e8de4e7ad3b3aa35cc7ba9ec77f7a68fa43a4,\n 0x25d0f689c4a4178a29d59306f2675824d19be6d25e44fa03b03f49c263053dd2,\n 0x2d513a722d6f352dc0961f156afdc5e31495b9f0e35cb069261a8e55e2df67fd,\n ];\n let serialized_log = arr_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0095b2d17ab72f4b27a341f7ac63e49ec73935ae8c9181a0ac02023eb12f3284);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_addr() {\n let contract_address = AztecAddress::from_field(\n 0x233a3e0df23b2b15b324194cb4a151f26c0b7333250781d34cc269d85dc334c6,\n );\n let log = AztecAddress::from_field(\n 0x26aa302d4715fd8a687453cb26d616b0768027bd54bcae56b09d908ecd9f8303,\n );\n let serialized_log: [u8; 32] = log.to_field().to_be_bytes();\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0083ab647dfb26e7ddee90a0f4209d049d4660cab42000c544b986aaa84c55a3);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_str() {\n let contract_address = AztecAddress::from_field(\n 0x1b401e1146c5c507962287065c81f0ef7590adae3802c533d7549d6bf0a41bd8,\n );\n let log = \"dummy\";\n let serialized_log = str_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x00629e88ebd6374f44aa6cfe07e251ecf07213ebc7267e8f6b578ae57ffd6c20);\n}\n\n#[test]\nunconstrained fn compute_unenc_log_hash_longer_str() {\n let contract_address = AztecAddress::from_field(\n 0x1b401e1146c5c507962287065c81f0ef7590adae3802c533d7549d6bf0a41bd8,\n );\n let log = \"Hello this is a string\";\n let serialized_log = str_to_be_bytes_arr(log);\n let hash = compute_unencrypted_log_hash(contract_address, serialized_log);\n assert(hash == 0x0098637962f7d34fa202b7ffad8a07a238c5d1fd897b82a108f7f467fa73b841);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/hash.nr"},"150":{"source":"/// Notifies the simulator that `args` will later be used at some point during execution, referenced by their hash. This\n/// allows the simulator to know how to respond to this future request.\n///\n/// This is only used during private execution, since in public it is the VM itself that keeps track of arguments.\npub fn pack_arguments(args: [Field]) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call. When\n // unpacking however the caller must check that the returned value is indeed the preimage.\n unsafe { pack_arguments_oracle_wrapper(args) };\n}\n\n/// Same as `pack_arguments`, but using arrays instead of slices.\npub fn pack_arguments_array(args: [Field; N]) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call. When\n // unpacking however the caller must check that the returned value is indeed the preimage.\n unsafe { pack_arguments_array_oracle_wrapper(args) };\n}\n\nunconstrained fn pack_arguments_oracle_wrapper(args: [Field]) {\n let _ = pack_arguments_oracle(args);\n}\n\nunconstrained fn pack_arguments_array_oracle_wrapper(args: [Field; N]) {\n let _ = pack_arguments_array_oracle(args);\n}\n\n#[oracle(packArguments)]\nunconstrained fn pack_arguments_oracle(_args: [Field]) -> Field {}\n\n#[oracle(packArgumentsArray)]\nunconstrained fn pack_arguments_array_oracle(_args: [Field; N]) -> Field {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/arguments.nr"},"151":{"source":"use dep::protocol_types::{\n address::AztecAddress, constants::CONTRACT_INSTANCE_LENGTH, contract_class_id::ContractClassId,\n contract_instance::ContractInstance,\n};\n\n// NOTE: this is for use in private only\n#[oracle(getContractInstance)]\nunconstrained fn get_contract_instance_oracle(\n _address: AztecAddress,\n) -> [Field; CONTRACT_INSTANCE_LENGTH] {}\n\n// NOTE: this is for use in private only\nunconstrained fn get_contract_instance_internal(\n address: AztecAddress,\n) -> [Field; CONTRACT_INSTANCE_LENGTH] {\n get_contract_instance_oracle(address)\n}\n\n// NOTE: this is for use in private only\npub fn get_contract_instance(address: AztecAddress) -> ContractInstance {\n let instance =\n unsafe { ContractInstance::deserialize(get_contract_instance_internal(address)) };\n // The to_address function combines all values in the instance object to produce an address, so by checking that we\n // get the expected address we validate the entire struct.\n assert_eq(instance.to_address(), address);\n\n instance\n}\n\n// These oracles each return a ContractInstance member\n// plus a boolean indicating whether the instance was found.\n#[oracle(avmOpcodeGetContractInstanceDeployer)]\nunconstrained fn get_contract_instance_deployer_oracle_avm(\n _address: AztecAddress,\n) -> (Field, bool) {}\n#[oracle(avmOpcodeGetContractInstanceClassId)]\nunconstrained fn get_contract_instance_class_id_oracle_avm(\n _address: AztecAddress,\n) -> (Field, bool) {}\n#[oracle(avmOpcodeGetContractInstanceInitializationHash)]\nunconstrained fn get_contract_instance_initialization_hash_oracle_avm(\n _address: AztecAddress,\n) -> (Field, bool) {}\n\npub unconstrained fn get_contract_instance_deployer_internal_avm(\n address: AztecAddress,\n) -> (Field, bool) {\n get_contract_instance_deployer_oracle_avm(address)\n}\npub unconstrained fn get_contract_instance_class_id_internal_avm(\n address: AztecAddress,\n) -> (Field, bool) {\n get_contract_instance_class_id_oracle_avm(address)\n}\npub unconstrained fn get_contract_instance_initialization_hash_internal_avm(\n address: AztecAddress,\n) -> (Field, bool) {\n get_contract_instance_initialization_hash_oracle_avm(address)\n}\n\npub fn get_contract_instance_deployer_avm(address: AztecAddress) -> Option {\n let (member, exists) = get_contract_instance_deployer_internal_avm(address);\n if exists {\n Option::some(AztecAddress::from_field(member))\n } else {\n Option::none()\n }\n}\npub fn get_contract_instance_class_id_avm(address: AztecAddress) -> Option {\n let (member, exists) = get_contract_instance_class_id_internal_avm(address);\n if exists {\n Option::some(ContractClassId::from_field(member))\n } else {\n Option::none()\n }\n}\npub fn get_contract_instance_initialization_hash_avm(address: AztecAddress) -> Option {\n let (member, exists) = get_contract_instance_initialization_hash_internal_avm(address);\n if exists {\n Option::some(member)\n } else {\n Option::none()\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/get_contract_instance.nr"},"158":{"source":"use dep::protocol_types::address::AztecAddress;\n\n#[oracle(getContractAddress)]\nunconstrained fn get_contract_address_oracle() -> AztecAddress {}\n\n#[oracle(getBlockNumber)]\nunconstrained fn get_block_number_oracle() -> u32 {}\n\n#[oracle(getChainId)]\nunconstrained fn get_chain_id_oracle() -> Field {}\n\n#[oracle(getVersion)]\nunconstrained fn get_version_oracle() -> Field {}\n\npub unconstrained fn get_contract_address() -> AztecAddress {\n get_contract_address_oracle()\n}\n\npub unconstrained fn get_block_number() -> u32 {\n get_block_number_oracle()\n}\n\npub unconstrained fn get_chain_id() -> Field {\n get_chain_id_oracle()\n}\n\npub unconstrained fn get_version() -> Field {\n get_version_oracle()\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/execution.nr"},"160":{"source":"use crate::note::{note_header::NoteHeader, note_interface::NoteInterface};\n\nuse dep::protocol_types::{\n address::AztecAddress,\n indexed_tagging_secret::{INDEXED_TAGGING_SECRET_LENGTH, IndexedTaggingSecret},\n utils::arr_copy_slice,\n};\n\n/// Notifies the simulator that a note has been created, so that it can be returned in future read requests in the same\n/// transaction. This note should only be added to the non-volatile database if found in an actual block.\npub fn notify_created_note(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n notify_created_note_oracle_wrapper(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n )\n };\n}\n\n/// Notifies the simulator that a note has been nullified, so that it is no longer returned in future read requests in\n/// the same transaction. This note should only be removed to the non-volatile database if its nullifier is found in an\n/// actual block.\npub fn notify_nullified_note(nullifier: Field, note_hash: Field, counter: u32) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe { notify_nullified_note_oracle_wrapper(nullifier, note_hash, counter) };\n}\n\nunconstrained fn notify_created_note_oracle_wrapper(\n storage_slot: Field,\n note_type_id: Field,\n serialized_note: [Field; N],\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_created_note_oracle(\n storage_slot,\n note_type_id,\n serialized_note,\n note_hash,\n counter,\n );\n}\n\n#[oracle(notifyCreatedNote)]\nunconstrained fn notify_created_note_oracle(\n _storage_slot: Field,\n _note_type_id: Field,\n _serialized_note: [Field; N],\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\nunconstrained fn notify_nullified_note_oracle_wrapper(\n nullifier: Field,\n note_hash: Field,\n counter: u32,\n) {\n let _ = notify_nullified_note_oracle(nullifier, note_hash, counter);\n}\n\n#[oracle(notifyNullifiedNote)]\nunconstrained fn notify_nullified_note_oracle(\n _nullifier: Field,\n _note_hash: Field,\n _counter: u32,\n) -> Field {}\n\n#[oracle(getNotes)]\nunconstrained fn get_notes_oracle(\n _storage_slot: Field,\n _num_selects: u8,\n _select_by_indexes: [u8; N],\n _select_by_offsets: [u8; N],\n _select_by_lengths: [u8; N],\n _select_values: [Field; N],\n _select_comparators: [u8; N],\n _sort_by_indexes: [u8; N],\n _sort_by_offsets: [u8; N],\n _sort_by_lengths: [u8; N],\n _sort_order: [u8; N],\n _limit: u32,\n _offset: u32,\n _status: u8,\n _return_size: u32,\n _placeholder_fields: [Field; S],\n) -> [Field; S] {}\n\nunconstrained fn get_notes_oracle_wrapper(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; N],\n select_by_offsets: [u8; N],\n select_by_lengths: [u8; N],\n select_values: [Field; N],\n select_comparators: [u8; N],\n sort_by_indexes: [u8; N],\n sort_by_offsets: [u8; N],\n sort_by_lengths: [u8; N],\n sort_order: [u8; N],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_fields: [Field; S],\n) -> [Field; S] {\n let return_size = placeholder_fields.len() as u32;\n get_notes_oracle(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n return_size,\n placeholder_fields,\n )\n}\n\npub unconstrained fn get_notes(\n storage_slot: Field,\n num_selects: u8,\n select_by_indexes: [u8; M],\n select_by_offsets: [u8; M],\n select_by_lengths: [u8; M],\n select_values: [Field; M],\n select_comparators: [u8; M],\n sort_by_indexes: [u8; M],\n sort_by_offsets: [u8; M],\n sort_by_lengths: [u8; M],\n sort_order: [u8; M],\n limit: u32,\n offset: u32,\n status: u8,\n mut placeholder_opt_notes: [Option; S], // TODO: Remove it and use `limit` to initialize the note array.\n placeholder_fields: [Field; NS], // TODO: Remove it and use `limit` to initialize the note array.\n _placeholder_note_length: [Field; N], // Turbofish hack? Compiler breaks calculating read_offset unless we add this parameter\n) -> [Option; S]\nwhere\n Note: NoteInterface,\n{\n sync_notes_oracle_wrapper();\n let fields = get_notes_oracle_wrapper(\n storage_slot,\n num_selects,\n select_by_indexes,\n select_by_offsets,\n select_by_lengths,\n select_values,\n select_comparators,\n sort_by_indexes,\n sort_by_offsets,\n sort_by_lengths,\n sort_order,\n limit,\n offset,\n status,\n placeholder_fields,\n );\n let num_notes = fields[0] as u32;\n let contract_address = AztecAddress::from_field(fields[1]);\n for i in 0..placeholder_opt_notes.len() {\n if i < num_notes {\n // lengths named as per typescript.\n let return_header_length: u32 = 2; // num_notes & contract_address.\n let extra_preimage_length: u32 = 2; // nonce & note_hash_counter.\n let read_offset: u32 = return_header_length + i * (N + extra_preimage_length);\n let nonce = fields[read_offset];\n let note_hash_counter = fields[read_offset + 1] as u32;\n let header = NoteHeader { contract_address, nonce, storage_slot, note_hash_counter };\n let serialized_note = arr_copy_slice(fields, [0; N], read_offset + 2);\n let mut note = Note::deserialize_content(serialized_note);\n note.set_header(header);\n placeholder_opt_notes[i] = Option::some(note);\n };\n }\n placeholder_opt_notes\n}\n\n/// Returns true if the nullifier exists. Note that a `true` value can be constrained by proving existence of the\n/// nullifier, but a `false` value should not be relied upon since other transactions may emit this nullifier before the\n/// current transaction is included in a block. While this might seem of little use at first, certain design patterns\n/// benefit from this abstraction (see e.g. `PrivateMutable`).\npub unconstrained fn check_nullifier_exists(inner_nullifier: Field) -> bool {\n check_nullifier_exists_oracle(inner_nullifier) == 1\n}\n\n#[oracle(checkNullifierExists)]\nunconstrained fn check_nullifier_exists_oracle(_inner_nullifier: Field) -> Field {}\n\n/// Same as `get_app_tagging_secret_as_sender`, except it returns the derived tag as an array of bytes, ready to be included in a\n/// log.\npub unconstrained fn get_app_tag_bytes_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> [u8; 32] {\n let tag = get_app_tagging_secret_as_sender(sender, recipient).compute_tag(recipient);\n tag.to_be_bytes()\n}\n\n/// Returns the tagging secret for a given sender and recipient pair, siloed for the current contract address.\n/// Includes the last known index used to send a note tagged with this secret.\n/// For this to work, PXE must know the ivpsk_m of the sender.\n/// For the recipient's side, only the address is needed.\npub unconstrained fn get_app_tagging_secret_as_sender(\n sender: AztecAddress,\n recipient: AztecAddress,\n) -> IndexedTaggingSecret {\n let result = get_app_tagging_secret_as_sender_oracle(sender, recipient);\n IndexedTaggingSecret::deserialize(result)\n}\n\n#[oracle(getAppTaggingSecretAsSender)]\nunconstrained fn get_app_tagging_secret_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) -> [Field; INDEXED_TAGGING_SECRET_LENGTH] {}\n\n/// Notifies the simulator that a tag has been used in a note, and to therefore increment the associated index so that\n/// future notes get a different tag and can be discovered by the recipient.\n/// This change should only be persisted in a non-volatile database if the tagged log is found in an actual block -\n/// otherwise e.g. a reverting transaction can cause the sender to accidentally skip indices and later produce notes\n/// that are not found by the recipient.\npub fn increment_app_tagging_secret_index_as_sender(sender: AztecAddress, recipient: AztecAddress) {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n increment_app_tagging_secret_index_as_sender_wrapper(sender, recipient);\n }\n}\n\nunconstrained fn increment_app_tagging_secret_index_as_sender_wrapper(\n sender: AztecAddress,\n recipient: AztecAddress,\n) {\n increment_app_tagging_secret_index_as_sender_oracle(sender, recipient);\n}\n\n#[oracle(incrementAppTaggingSecretIndexAsSender)]\nunconstrained fn increment_app_tagging_secret_index_as_sender_oracle(\n _sender: AztecAddress,\n _recipient: AztecAddress,\n) {}\n\n/// Finds new notes that may have been sent to all registered accounts in PXE in the current contract and makes them available\n/// for later querying via the `get_notes` oracle.\npub fn sync_notes() {\n // This oracle call returns nothing: we only call it for its side effects. It is therefore always safe to call.\n unsafe {\n sync_notes_oracle_wrapper();\n }\n}\n\nunconstrained fn sync_notes_oracle_wrapper() {\n sync_notes_oracle();\n}\n\n#[oracle(syncNotes)]\nunconstrained fn sync_notes_oracle() {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/notes.nr"},"161":{"source":"use dep::protocol_types::{abis::function_selector::FunctionSelector, address::AztecAddress};\n\n#[oracle(enqueuePublicFunctionCall)]\nunconstrained fn enqueue_public_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn enqueue_public_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n enqueue_public_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\n#[oracle(setPublicTeardownFunctionCall)]\nunconstrained fn set_public_teardown_function_call_oracle(\n _contract_address: AztecAddress,\n _function_selector: FunctionSelector,\n _args_hash: Field,\n _side_effect_counter: u32,\n _is_static_call: bool,\n) -> Field {}\n\npub unconstrained fn set_public_teardown_function_call_internal(\n contract_address: AztecAddress,\n function_selector: FunctionSelector,\n args_hash: Field,\n side_effect_counter: u32,\n is_static_call: bool,\n) -> Field {\n set_public_teardown_function_call_oracle(\n contract_address,\n function_selector,\n args_hash,\n side_effect_counter,\n is_static_call,\n )\n}\n\npub fn notify_set_min_revertible_side_effect_counter(counter: u32) {\n unsafe { notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter) };\n}\n\npub unconstrained fn notify_set_min_revertible_side_effect_counter_oracle_wrapper(counter: u32) {\n notify_set_min_revertible_side_effect_counter_oracle(counter);\n}\n\n#[oracle(notifySetMinRevertibleSideEffectCounter)]\nunconstrained fn notify_set_min_revertible_side_effect_counter_oracle(_counter: u32) {}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/enqueue_public_function_call.nr"},"162":{"source":"use dep::protocol_types::{address::AztecAddress, traits::Deserialize};\n\n#[oracle(storageRead)]\nunconstrained fn storage_read_oracle(\n address: Field,\n storage_slot: Field,\n block_number: Field,\n length: Field,\n) -> [Field; N] {}\n\npub unconstrained fn raw_storage_read(\n address: AztecAddress,\n storage_slot: Field,\n block_number: u32,\n) -> [Field; N] {\n storage_read_oracle(\n address.to_field(),\n storage_slot,\n block_number as Field,\n N as Field,\n )\n}\n\npub unconstrained fn storage_read(\n address: AztecAddress,\n storage_slot: Field,\n block_number: u32,\n) -> T\nwhere\n T: Deserialize,\n{\n T::deserialize(raw_storage_read(address, storage_slot, block_number))\n}\n\nmod tests {\n use crate::oracle::storage::{raw_storage_read, storage_read};\n use dep::protocol_types::address::AztecAddress;\n\n use crate::test::mocks::mock_struct::MockStruct;\n use std::test::OracleMock;\n\n global address = AztecAddress::from_field(29);\n global slot = 7;\n global block_number = 17;\n\n #[test]\n unconstrained fn test_raw_storage_read() {\n let written = MockStruct { a: 13, b: 42 };\n\n let _ = OracleMock::mock(\"storageRead\").returns(written.serialize());\n\n let read: [Field; 2] = raw_storage_read(address, slot, block_number);\n assert_eq(read[0], 13);\n assert_eq(read[1], 42);\n }\n\n #[test]\n unconstrained fn test_storage_read() {\n let written = MockStruct { a: 13, b: 42 };\n\n let _ = OracleMock::mock(\"storageRead\").returns(written.serialize());\n\n let read: MockStruct = storage_read(address, slot, block_number);\n assert_eq(read.a, 13);\n assert_eq(read.b, 42);\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/oracle/storage.nr"},"177":{"source":"use dep::protocol_types::{\n abis::function_selector::FunctionSelector, address::AztecAddress,\n constants::GENERATOR_INDEX__CONSTRUCTOR, hash::poseidon2_hash_with_separator,\n};\n\nuse crate::{\n context::{PrivateContext, PublicContext},\n oracle::get_contract_instance::{\n get_contract_instance, get_contract_instance_deployer_avm,\n get_contract_instance_initialization_hash_avm,\n },\n};\n\npub fn mark_as_initialized_public(context: &mut PublicContext) {\n let init_nullifier =\n compute_unsiloed_contract_initialization_nullifier((*context).this_address());\n context.push_nullifier(init_nullifier);\n}\n\npub fn mark_as_initialized_private(context: &mut PrivateContext) {\n let init_nullifier =\n compute_unsiloed_contract_initialization_nullifier((*context).this_address());\n context.push_nullifier(init_nullifier);\n}\n\npub fn assert_is_initialized_public(context: &mut PublicContext) {\n let init_nullifier = compute_unsiloed_contract_initialization_nullifier(context.this_address());\n assert(context.nullifier_exists(init_nullifier, context.this_address()), \"Not initialized\");\n}\n\npub fn assert_is_initialized_private(context: &mut PrivateContext) {\n let init_nullifier = compute_unsiloed_contract_initialization_nullifier(context.this_address());\n context.push_nullifier_read_request(init_nullifier);\n}\n\nfn compute_unsiloed_contract_initialization_nullifier(address: AztecAddress) -> Field {\n address.to_field()\n}\n\npub fn assert_initialization_matches_address_preimage_public(context: PublicContext) {\n let address = context.this_address();\n let deployer = get_contract_instance_deployer_avm(address).unwrap();\n let initialization_hash = get_contract_instance_initialization_hash_avm(address).unwrap();\n let expected_init = compute_initialization_hash(context.selector(), context.get_args_hash());\n assert(initialization_hash == expected_init, \"Initialization hash does not match\");\n assert(\n (deployer.is_zero()) | (deployer == context.msg_sender()),\n \"Initializer address is not the contract deployer\",\n );\n}\n\npub fn assert_initialization_matches_address_preimage_private(context: PrivateContext) {\n let address = context.this_address();\n let instance = get_contract_instance(address);\n let expected_init = compute_initialization_hash(context.selector(), context.get_args_hash());\n assert(instance.initialization_hash == expected_init, \"Initialization hash does not match\");\n assert(\n (instance.deployer.is_zero()) | (instance.deployer == context.msg_sender()),\n \"Initializer address is not the contract deployer\",\n );\n}\n\npub fn compute_initialization_hash(\n init_selector: FunctionSelector,\n init_args_hash: Field,\n) -> Field {\n poseidon2_hash_with_separator(\n [init_selector.to_field(), init_args_hash],\n GENERATOR_INDEX__CONSTRUCTOR,\n )\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/aztec-nr/aztec/src/initializer.nr"},"183":{"source":"use crate::{\n abis::function_selector::FunctionSelector,\n address::{\n partial_address::PartialAddress, salted_initialization_hash::SaltedInitializationHash,\n },\n constants::{\n AZTEC_ADDRESS_LENGTH, FUNCTION_TREE_HEIGHT, GENERATOR_INDEX__CONTRACT_ADDRESS_V1,\n MAX_FIELD_VALUE,\n },\n contract_class_id::ContractClassId,\n hash::{poseidon2_hash_with_separator, private_functions_root_from_siblings},\n merkle_tree::membership::MembershipWitness,\n public_keys::{IvpkM, NpkM, OvpkM, PublicKeys, TpkM},\n traits::{Deserialize, Empty, FromField, Serialize, ToField},\n utils,\n};\n\n// We do below because `use crate::point::Point;` does not work\nuse dep::std::embedded_curve_ops::EmbeddedCurvePoint as Point;\n\nuse crate::public_keys::AddressPoint;\nuse std::{\n ec::{pow, sqrt},\n embedded_curve_ops::{EmbeddedCurveScalar, fixed_base_scalar_mul as derive_public_key},\n};\n\n// Aztec address\npub struct AztecAddress {\n pub inner: Field,\n}\n\nimpl Eq for AztecAddress {\n fn eq(self, other: Self) -> bool {\n self.to_field() == other.to_field()\n }\n}\n\nimpl Empty for AztecAddress {\n fn empty() -> Self {\n Self { inner: 0 }\n }\n}\n\nimpl ToField for AztecAddress {\n fn to_field(self) -> Field {\n self.inner\n }\n}\n\nimpl FromField for AztecAddress {\n fn from_field(value: Field) -> AztecAddress {\n AztecAddress { inner: value }\n }\n}\n\nimpl Serialize for AztecAddress {\n fn serialize(self: Self) -> [Field; AZTEC_ADDRESS_LENGTH] {\n [self.to_field()]\n }\n}\n\nimpl Deserialize for AztecAddress {\n fn deserialize(fields: [Field; AZTEC_ADDRESS_LENGTH]) -> Self {\n FromField::from_field(fields[0])\n }\n}\n\nimpl AztecAddress {\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n\n pub fn to_address_point(self) -> AddressPoint {\n // We compute the address point by taking our address, setting it to x, and then solving for y in the\n // equation which defines our bn curve:\n // y^2 = x^3 - 17; x = address\n let x = self.inner;\n let y_squared = pow(x, 3) - 17;\n\n // TODO (#8970): Handle cases where we cannot recover a point from an address\n let mut y = sqrt(y_squared);\n\n // If we get a negative y coordinate (any y where y > MAX_FIELD_VALUE / 2), we pin it to the\n // positive one (any value where y <= MAX_FIELD_VALUE / 2) by subtracting it from the Field modulus\n // note: The field modulus is MAX_FIELD_VALUE + 1\n if (!(y.lt(MAX_FIELD_VALUE / 2) | y.eq(MAX_FIELD_VALUE / 2))) {\n y = (MAX_FIELD_VALUE + 1) - y;\n }\n\n AddressPoint { inner: Point { x: self.inner, y, is_infinite: false } }\n }\n\n pub fn compute(public_keys: PublicKeys, partial_address: PartialAddress) -> AztecAddress {\n let public_keys_hash = public_keys.hash();\n\n let pre_address = poseidon2_hash_with_separator(\n [public_keys_hash.to_field(), partial_address.to_field()],\n GENERATOR_INDEX__CONTRACT_ADDRESS_V1,\n );\n\n let address_point = derive_public_key(EmbeddedCurveScalar::from_field(pre_address)).add(\n public_keys.ivpk_m.to_point(),\n );\n\n // Note that our address is only the x-coordinate of the full address_point. This is okay because when people want to encrypt something and send it to us\n // they can recover our full point using the x-coordinate (our address itself). To do this, they recompute the y-coordinate according to the equation y^2 = x^3 - 17.\n // When they do this, they may get a positive y-coordinate (a value that is less than or equal to MAX_FIELD_VALUE / 2) or\n // a negative y-coordinate (a value that is more than MAX_FIELD_VALUE), and we cannot dictate which one they get and hence the recovered point may sometimes be different than the one\n // our secrect can decrypt. Regardless though, they should and will always encrypt using point with the positive y-coordinate by convention.\n // This ensures that everyone encrypts to the same point given an arbitrary x-coordinate (address). This is allowed because even though our original point may not have a positive y-coordinate,\n // with our original secret, we will be able to derive the secret to the point with the flipped (and now positive) y-coordinate that everyone encrypts to.\n AztecAddress::from_field(address_point.x)\n }\n\n pub fn compute_from_private_function(\n function_selector: FunctionSelector,\n function_vk_hash: Field,\n function_leaf_membership_witness: MembershipWitness,\n contract_class_artifact_hash: Field,\n contract_class_public_bytecode_commitment: Field,\n salted_initialization_hash: SaltedInitializationHash,\n public_keys: PublicKeys,\n ) -> Self {\n let private_functions_root = private_functions_root_from_siblings(\n function_selector,\n function_vk_hash,\n function_leaf_membership_witness.leaf_index,\n function_leaf_membership_witness.sibling_path,\n );\n\n let contract_class_id = ContractClassId::compute(\n contract_class_artifact_hash,\n private_functions_root,\n contract_class_public_bytecode_commitment,\n );\n\n // Compute contract address using the preimage which includes the class_id.\n let partial_address = PartialAddress::compute_from_salted_initialization_hash(\n contract_class_id,\n salted_initialization_hash,\n );\n\n AztecAddress::compute(public_keys, partial_address)\n }\n\n pub fn is_zero(self) -> bool {\n self.inner == 0\n }\n\n pub fn assert_is_zero(self) {\n assert(self.to_field() == 0);\n }\n\n pub fn conditional_assign(predicate: bool, lhs: Self, rhs: Self) -> Self {\n let result = utils::conditional_assign(predicate, rhs.to_field(), lhs.to_field());\n Self { inner: result }\n }\n}\n\n#[test]\nfn compute_address_from_partial_and_pub_keys() {\n let public_keys = PublicKeys {\n npk_m: NpkM {\n inner: Point {\n x: 0x22f7fcddfa3ce3e8f0cc8e82d7b94cdd740afa3e77f8e4a63ea78a239432dcab,\n y: 0x0471657de2b6216ade6c506d28fbc22ba8b8ed95c871ad9f3e3984e90d9723a7,\n is_infinite: false,\n },\n },\n ivpk_m: IvpkM {\n inner: Point {\n x: 0x111223493147f6785514b1c195bb37a2589f22a6596d30bb2bb145fdc9ca8f1e,\n y: 0x273bbffd678edce8fe30e0deafc4f66d58357c06fd4a820285294b9746c3be95,\n is_infinite: false,\n },\n },\n ovpk_m: OvpkM {\n inner: Point {\n x: 0x09115c96e962322ffed6522f57194627136b8d03ac7469109707f5e44190c484,\n y: 0x0c49773308a13d740a7f0d4f0e6163b02c5a408b6f965856b6a491002d073d5b,\n is_infinite: false,\n },\n },\n tpk_m: TpkM {\n inner: Point {\n x: 0x00d3d81beb009873eb7116327cf47c612d5758ef083d4fda78e9b63980b2a762,\n y: 0x2f567d22d2b02fe1f4ad42db9d58a36afd1983e7e2909d1cab61cafedad6193a,\n is_infinite: false,\n },\n },\n };\n\n let partial_address = PartialAddress::from_field(\n 0x0a7c585381b10f4666044266a02405bf6e01fa564c8517d4ad5823493abd31de,\n );\n\n let address = AztecAddress::compute(public_keys, partial_address);\n\n // The following value was generated by `derivation.test.ts`.\n // --> Run the test with AZTEC_GENERATE_TEST_DATA=1 flag to update test data.\n let expected_computed_address_from_partial_and_pubkeys =\n 0x24e4646f58b9fbe7d38e317db8d5636c423fbbdfbe119fc190fe9c64747e0c62;\n assert(address.to_field() == expected_computed_address_from_partial_and_pubkeys);\n}\n\n#[test]\nfn from_field_to_field() {\n let address = AztecAddress { inner: 37 };\n assert_eq(FromField::from_field(address.to_field()), address);\n}\n\n#[test]\nfn serde() {\n let address = AztecAddress { inner: 37 };\n assert_eq(Deserialize::deserialize(address.serialize()), address);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/address/aztec_address.nr"},"194":{"source":"use crate::traits::{Deserialize, Serialize};\n\nglobal BOOL_SERIALIZED_LEN: u32 = 1;\nglobal U8_SERIALIZED_LEN: u32 = 1;\nglobal U16_SERIALIZED_LEN: u32 = 1;\nglobal U32_SERIALIZED_LEN: u32 = 1;\nglobal U64_SERIALIZED_LEN: u32 = 1;\nglobal U128_SERIALIZED_LEN: u32 = 1;\nglobal FIELD_SERIALIZED_LEN: u32 = 1;\nglobal I8_SERIALIZED_LEN: u32 = 1;\nglobal I16_SERIALIZED_LEN: u32 = 1;\nglobal I32_SERIALIZED_LEN: u32 = 1;\nglobal I64_SERIALIZED_LEN: u32 = 1;\n\nimpl Serialize for bool {\n fn serialize(self) -> [Field; BOOL_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for bool {\n fn deserialize(fields: [Field; BOOL_SERIALIZED_LEN]) -> bool {\n fields[0] as bool\n }\n}\n\nimpl Serialize for u8 {\n fn serialize(self) -> [Field; U8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u8 {\n fn deserialize(fields: [Field; U8_SERIALIZED_LEN]) -> Self {\n fields[0] as u8\n }\n}\n\nimpl Serialize for u16 {\n fn serialize(self) -> [Field; U16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u16 {\n fn deserialize(fields: [Field; U16_SERIALIZED_LEN]) -> Self {\n fields[0] as u16\n }\n}\n\nimpl Serialize for u32 {\n fn serialize(self) -> [Field; U32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u32 {\n fn deserialize(fields: [Field; U32_SERIALIZED_LEN]) -> Self {\n fields[0] as u32\n }\n}\n\nimpl Serialize for u64 {\n fn serialize(self) -> [Field; U64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for u64 {\n fn deserialize(fields: [Field; U64_SERIALIZED_LEN]) -> Self {\n fields[0] as u64\n }\n}\n\nimpl Serialize for U128 {\n fn serialize(self) -> [Field; U128_SERIALIZED_LEN] {\n [self.to_integer()]\n }\n}\n\nimpl Deserialize for U128 {\n fn deserialize(fields: [Field; U128_SERIALIZED_LEN]) -> Self {\n U128::from_integer(fields[0])\n }\n}\n\nimpl Serialize for Field {\n fn serialize(self) -> [Field; FIELD_SERIALIZED_LEN] {\n [self]\n }\n}\n\nimpl Deserialize for Field {\n fn deserialize(fields: [Field; FIELD_SERIALIZED_LEN]) -> Self {\n fields[0]\n }\n}\n\nimpl Serialize for i8 {\n fn serialize(self) -> [Field; I8_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i8 {\n fn deserialize(fields: [Field; I8_SERIALIZED_LEN]) -> Self {\n fields[0] as i8\n }\n}\n\nimpl Serialize for i16 {\n fn serialize(self) -> [Field; I16_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i16 {\n fn deserialize(fields: [Field; I16_SERIALIZED_LEN]) -> Self {\n fields[0] as i16\n }\n}\n\nimpl Serialize for i32 {\n fn serialize(self) -> [Field; I32_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i32 {\n fn deserialize(fields: [Field; I32_SERIALIZED_LEN]) -> Self {\n fields[0] as i32\n }\n}\n\nimpl Serialize for i64 {\n fn serialize(self) -> [Field; I64_SERIALIZED_LEN] {\n [self as Field]\n }\n}\n\nimpl Deserialize for i64 {\n fn deserialize(fields: [Field; I64_SERIALIZED_LEN]) -> Self {\n fields[0] as i64\n }\n}\n\nimpl Serialize for [T; N]\nwhere\n T: Serialize,\n{\n fn serialize(self) -> [Field; N * M] {\n let mut result: [Field; N * M] = std::mem::zeroed();\n let mut serialized: [Field; M] = std::mem::zeroed();\n for i in 0..N {\n serialized = self[i].serialize();\n for j in 0..M {\n result[i * M + j] = serialized[j];\n }\n }\n result\n }\n}\n\nimpl Deserialize for [T; N]\nwhere\n T: Deserialize,\n{\n fn deserialize(fields: [Field; N * M]) -> Self {\n let mut reader = crate::utils::reader::Reader::new(fields);\n let mut result: [T; N] = std::mem::zeroed();\n reader.read_struct_array::(Deserialize::deserialize, result)\n }\n}\n\n#[test]\nfn test_u16_serialization() {\n let a: u16 = 10;\n assert_eq(a, u16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i8_serialization() {\n let a: i8 = -10;\n assert_eq(a, i8::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i16_serialization() {\n let a: i16 = -10;\n assert_eq(a, i16::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i32_serialization() {\n let a: i32 = -10;\n assert_eq(a, i32::deserialize(a.serialize()));\n}\n\n#[test]\nfn test_i64_serialization() {\n let a: i64 = -10;\n assert_eq(a, i64::deserialize(a.serialize()));\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/type_serialization.nr"},"212":{"source":"pub struct Reader {\n data: [Field; N],\n offset: u32,\n}\n\nimpl Reader {\n pub fn new(data: [Field; N]) -> Self {\n Self { data, offset: 0 }\n }\n\n pub fn read(&mut self) -> Field {\n let result = self.data[self.offset];\n self.offset += 1;\n result\n }\n\n pub fn read_u32(&mut self) -> u32 {\n self.read() as u32\n }\n\n pub fn read_bool(&mut self) -> bool {\n self.read() as bool\n }\n\n pub fn read_array(&mut self) -> [Field; K] {\n let mut result = [0; K];\n for i in 0..K {\n result[i] = self.data[self.offset + i];\n }\n self.offset += K;\n result\n }\n\n pub fn read_struct(&mut self, deserialise: fn([Field; K]) -> T) -> T {\n let result = deserialise(self.read_array());\n result\n }\n\n pub fn read_struct_array(\n &mut self,\n deserialise: fn([Field; K]) -> T,\n mut result: [T; C],\n ) -> [T; C] {\n for i in 0..C {\n result[i] = self.read_struct(deserialise);\n }\n result\n }\n\n pub fn finish(self) {\n assert(self.offset == self.data.len(), \"Reader did not read all data\");\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/utils/reader.nr"},"227":{"source":"use crate::meta::{derive_deserialize, derive_serialize};\nuse crate::utils::field::field_from_bytes;\n\n// Trait: is_empty\n//\n// The general is_empty trait checks if a data type is is empty,\n// and it defines empty for the basic data types as 0.\n//\n// If a Field is equal to zero, then it is regarded as zero.\n// We will go with this definition for now, however it can be problematic\n// if a value can actually be zero. In a future refactor, we can\n// use the optional type for safety. Doing it now would lead to a worse devex\n// and would make it harder to sync up with the cpp code.\n// Preferred over Default trait to convey intent, as default doesn't necessarily mean empty.\npub trait Empty {\n fn empty() -> Self;\n}\n\nimpl Empty for Field {\n fn empty() -> Self {\n 0\n }\n}\n\nimpl Empty for u1 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for u8 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for u32 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for u64 {\n fn empty() -> Self {\n 0\n }\n}\nimpl Empty for U128 {\n fn empty() -> Self {\n U128::from_integer(0)\n }\n}\n\npub fn is_empty(item: T) -> bool\nwhere\n T: Empty + Eq,\n{\n item.eq(T::empty())\n}\n\npub fn is_empty_array(array: [T; N]) -> bool\nwhere\n T: Empty + Eq,\n{\n array.all(|elem| is_empty(elem))\n}\n\npub trait Hash {\n fn hash(self) -> Field;\n}\n\npub trait ToField {\n fn to_field(self) -> Field;\n}\n\nimpl ToField for Field {\n fn to_field(self) -> Field {\n self\n }\n}\n\nimpl ToField for bool {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u1 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u8 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u32 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for u64 {\n fn to_field(self) -> Field {\n self as Field\n }\n}\nimpl ToField for U128 {\n fn to_field(self) -> Field {\n self.to_integer()\n }\n}\nimpl ToField for str {\n fn to_field(self) -> Field {\n assert(N < 32, \"String doesn't fit in a field, consider using Serialize instead\");\n field_from_bytes(self.as_bytes(), true)\n }\n}\n\npub trait FromField {\n fn from_field(value: Field) -> Self;\n}\n\nimpl FromField for Field {\n fn from_field(value: Field) -> Self {\n value\n }\n}\n\nimpl FromField for bool {\n fn from_field(value: Field) -> Self {\n value as bool\n }\n}\nimpl FromField for u1 {\n fn from_field(value: Field) -> Self {\n value as u1\n }\n}\nimpl FromField for u8 {\n fn from_field(value: Field) -> Self {\n value as u8\n }\n}\nimpl FromField for u32 {\n fn from_field(value: Field) -> Self {\n value as u32\n }\n}\nimpl FromField for u64 {\n fn from_field(value: Field) -> Self {\n value as u64\n }\n}\nimpl FromField for U128 {\n fn from_field(value: Field) -> Self {\n U128::from_integer(value)\n }\n}\n\n// docs:start:serialize\n#[derive_via(derive_serialize)]\npub trait Serialize {\n fn serialize(self) -> [Field; N];\n}\n// docs:end:serialize\n\nimpl Serialize for str {\n fn serialize(self) -> [Field; N] {\n let bytes = self.as_bytes();\n let mut fields = [0; N];\n for i in 0..bytes.len() {\n fields[i] = bytes[i] as Field;\n }\n fields\n }\n}\n\n// docs:start:deserialize\n#[derive_via(derive_deserialize)]\npub trait Deserialize {\n fn deserialize(fields: [Field; N]) -> Self;\n}\n// docs:end:deserialize\n\nimpl Deserialize for str {\n fn deserialize(fields: [Field; N]) -> Self {\n str::from(fields.map(|value| value as u8))\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/traits.nr"},"229":{"source":"use crate::{\n abis::{\n contract_class_function_leaf_preimage::ContractClassFunctionLeafPreimage,\n function_selector::FunctionSelector,\n log_hash::{LogHash, ScopedEncryptedLogHash, ScopedLogHash},\n note_hash::ScopedNoteHash,\n nullifier::ScopedNullifier,\n },\n address::{AztecAddress, EthAddress},\n constants::{\n FUNCTION_TREE_HEIGHT, GENERATOR_INDEX__NOTE_HASH_NONCE, GENERATOR_INDEX__OUTER_NULLIFIER,\n GENERATOR_INDEX__SILOED_NOTE_HASH, GENERATOR_INDEX__UNIQUE_NOTE_HASH,\n },\n merkle_tree::root::root_from_sibling_path,\n messaging::l2_to_l1_message::{L2ToL1Message, ScopedL2ToL1Message},\n traits::{is_empty, ToField},\n utils::field::field_from_bytes_32_trunc,\n};\nuse super::utils::field::field_from_bytes;\n\npub fn sha256_to_field(bytes_to_hash: [u8; N]) -> Field {\n let sha256_hashed = std::hash::sha256(bytes_to_hash);\n let hash_in_a_field = field_from_bytes_32_trunc(sha256_hashed);\n\n hash_in_a_field\n}\n\npub fn private_functions_root_from_siblings(\n selector: FunctionSelector,\n vk_hash: Field,\n function_leaf_index: Field,\n function_leaf_sibling_path: [Field; FUNCTION_TREE_HEIGHT],\n) -> Field {\n let function_leaf_preimage = ContractClassFunctionLeafPreimage { selector, vk_hash };\n let function_leaf = function_leaf_preimage.hash();\n root_from_sibling_path(\n function_leaf,\n function_leaf_index,\n function_leaf_sibling_path,\n )\n}\n\nfn compute_note_hash_nonce(tx_hash: Field, note_index_in_tx: u32) -> Field {\n // Hashing tx hash with note index in tx is guaranteed to be unique\n poseidon2_hash_with_separator(\n [tx_hash, note_index_in_tx as Field],\n GENERATOR_INDEX__NOTE_HASH_NONCE,\n )\n}\n\npub fn compute_unique_note_hash(nonce: Field, note_hash: Field) -> Field {\n let inputs = [nonce, note_hash];\n poseidon2_hash_with_separator(inputs, GENERATOR_INDEX__UNIQUE_NOTE_HASH)\n}\n\npub fn compute_siloed_note_hash(app: AztecAddress, unique_note_hash: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), unique_note_hash],\n GENERATOR_INDEX__SILOED_NOTE_HASH,\n )\n}\n\n/// Siloing in the context of Aztec refers to the process of hashing a note hash with a contract address (this way\n/// the note hash is scoped to a specific contract). This is used to prevent intermingling of notes between contracts.\npub fn silo_note_hash(note_hash: ScopedNoteHash, tx_hash: Field, note_index_in_tx: u32) -> Field {\n if note_hash.contract_address.is_zero() {\n 0\n } else {\n let nonce = compute_note_hash_nonce(tx_hash, note_index_in_tx);\n let unique_note_hash = compute_unique_note_hash(nonce, note_hash.value());\n compute_siloed_note_hash(note_hash.contract_address, unique_note_hash)\n }\n}\n\npub fn compute_siloed_nullifier(app: AztecAddress, nullifier: Field) -> Field {\n poseidon2_hash_with_separator(\n [app.to_field(), nullifier],\n GENERATOR_INDEX__OUTER_NULLIFIER,\n )\n}\n\npub fn silo_nullifier(nullifier: ScopedNullifier) -> Field {\n if nullifier.contract_address.is_zero() {\n nullifier.value() // Return value instead of 0 because the first nullifier's contract address is zero.\n } else {\n compute_siloed_nullifier(nullifier.contract_address, nullifier.value())\n }\n}\n\npub fn silo_encrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n // We assume contract address has already been masked\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n accumulate_sha256(\n [log_hash.contract_address.to_field(), log_hash.log_hash.value],\n )\n }\n}\n\npub fn mask_encrypted_log_hash(scoped_log: ScopedEncryptedLogHash) -> AztecAddress {\n if scoped_log.contract_address.is_zero() {\n AztecAddress::from_field(0)\n } else if (scoped_log.log_hash.randomness == 0) {\n scoped_log.contract_address\n } else {\n AztecAddress::from_field(poseidon2_hash_with_separator(\n [scoped_log.contract_address.to_field(), scoped_log.log_hash.randomness],\n 0,\n ))\n }\n}\n\nfn compute_siloed_unencrypted_log_hash(address: AztecAddress, log_hash: Field) -> Field {\n accumulate_sha256([address.to_field(), log_hash])\n}\n\npub fn silo_unencrypted_log_hash(log_hash: ScopedLogHash) -> Field {\n if log_hash.contract_address.is_zero() {\n 0\n } else {\n compute_siloed_unencrypted_log_hash(log_hash.contract_address, log_hash.value())\n }\n}\n\npub fn merkle_hash(left: Field, right: Field) -> Field {\n poseidon2_hash([left, right])\n}\n\npub fn compute_l2_to_l1_hash(\n contract_address: AztecAddress,\n recipient: EthAddress,\n content: Field,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n let mut bytes: BoundedVec = BoundedVec::new();\n\n let inputs =\n [contract_address.to_field(), rollup_version_id, recipient.to_field(), chain_id, content];\n for i in 0..inputs.len() {\n // TODO are bytes be in fr.to_buffer() ?\n let item_bytes: [u8; 32] = inputs[i].to_be_bytes();\n for j in 0..32 {\n bytes.push(item_bytes[j]);\n }\n }\n\n sha256_to_field(bytes.storage())\n}\n\npub fn silo_l2_to_l1_message(\n msg: ScopedL2ToL1Message,\n rollup_version_id: Field,\n chain_id: Field,\n) -> Field {\n if msg.contract_address.is_zero() {\n 0\n } else {\n compute_l2_to_l1_hash(\n msg.contract_address,\n msg.message.recipient,\n msg.message.content,\n rollup_version_id,\n chain_id,\n )\n }\n}\n\n// Computes sha256 hash of 2 input hashes.\n//\n// NB: This method now takes in two 31 byte fields - it assumes that any input\n// is the result of a sha_to_field hash and => is truncated\n//\n// TODO(Jan and David): This is used for the encrypted_log hashes.\n// Can we check to see if we can just use hash_to_field or pedersen_compress here?\n//\npub fn accumulate_sha256(input: [Field; 2]) -> Field {\n // This is a note about the cpp code, since it takes an array of Fields\n // instead of a U128.\n // 4 Field elements when converted to bytes will usually\n // occupy 4 * 32 = 128 bytes.\n // However, this function is making the assumption that each Field\n // only occupies 128 bits.\n //\n // TODO(David): This does not seem to be getting guaranteed anywhere in the code?\n // Concatentate two fields into 32x2 = 64 bytes\n // accumulate_sha256 assumes that the inputs are pre-truncated 31 byte numbers\n let mut hash_input_flattened = [0; 64];\n for offset in 0..input.len() {\n let input_as_bytes: [u8; 32] = input[offset].to_be_bytes();\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n\n sha256_to_field(hash_input_flattened)\n}\n\n// Computes the final logs hash for a tx.\npub fn compute_tx_logs_hash(logs: [LogHash; N]) -> Field {\n // Convert each field element into a byte array and append the bytes to `hash_input_flattened`\n let mut hash_input_flattened = [0; N * 32];\n for offset in 0..N {\n // TODO: This is not checking that the decomposition is smaller than P\n let input_as_bytes: [u8; 32] = logs[offset].value.to_be_radix(256);\n for byte_index in 0..32 {\n hash_input_flattened[offset * 32 + byte_index] = input_as_bytes[byte_index];\n }\n }\n // Ideally we would push to a slice then hash, but there is no sha_slice\n // Hardcode to 256 bytes for now\n let mut hash = sha256_to_field(hash_input_flattened);\n // Not having a 0 value hash for empty logs causes issues with empty txs\n // used for padding. Returning early is currently unsupported.\n // We always provide sorted logs here, so 0 being empty means all are empty.\n if is_empty(logs[0]) {\n hash = 0;\n }\n hash\n}\n\npub fn verification_key_hash(key: [Field; N]) -> Field {\n crate::hash::poseidon2_hash(key)\n}\n\n#[inline_always]\npub fn pedersen_hash(inputs: [Field; N], hash_index: u32) -> Field {\n std::hash::pedersen_hash_with_separator(inputs, hash_index)\n}\n\npub fn poseidon2_hash(inputs: [Field; N]) -> Field {\n std::hash::poseidon2::Poseidon2::hash(inputs, N)\n}\n\n#[no_predicates]\npub fn poseidon2_hash_with_separator(inputs: [Field; N], separator: T) -> Field\nwhere\n T: ToField,\n{\n // We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of N + 1\n let in_len = N + 1;\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs[i]);\n }\n\n sponge.squeeze()\n}\n\npub fn poseidon2_hash_with_separator_slice(inputs: [Field], separator: T) -> Field\nwhere\n T: ToField,\n{\n let in_len = inputs.len() + 1;\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n sponge.absorb(separator.to_field());\n\n for i in 0..inputs.len() {\n sponge.absorb(inputs[i]);\n }\n\n sponge.squeeze()\n}\n\n#[no_predicates]\npub fn poseidon2_hash_bytes(inputs: [u8; N]) -> Field {\n // We manually hash the inputs here, since we cannot express with the type system a constant size inputs array of Math.ceil(N/31)\n let mut in_len = N / 31;\n let mut has_padding = false;\n if N % 31 != 0 {\n in_len += 1;\n has_padding = true;\n }\n\n let two_pow_64 = 18446744073709551616;\n let iv: Field = (in_len as Field) * two_pow_64;\n let mut sponge = std::hash::poseidon2::Poseidon2::new(iv);\n\n let mut current_field = [0; 31];\n for i in 0..inputs.len() {\n let index = i % 31;\n current_field[index] = inputs[i];\n if index == 30 {\n sponge.absorb(field_from_bytes(current_field, false));\n current_field = [0; 31];\n }\n }\n if has_padding {\n sponge.absorb(field_from_bytes(current_field, false));\n }\n\n sponge.squeeze()\n}\n\n#[test]\nfn smoke_sha256_to_field() {\n let full_buffer = [\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,\n 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,\n 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,\n 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93,\n 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,\n 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130,\n 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148,\n 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,\n ];\n let result = sha256_to_field(full_buffer);\n\n assert(result == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184c7);\n\n // to show correctness of the current ver (truncate one byte) vs old ver (mod full bytes):\n let result_bytes = std::hash::sha256(full_buffer);\n let truncated_field = crate::utils::field::field_from_bytes_32_trunc(result_bytes);\n assert(truncated_field == result);\n let mod_res = result + (result_bytes[31] as Field);\n assert(mod_res == 0x448ebbc9e1a31220a2f3830c18eef61b9bd070e5084b7fa2a359fe729184e0);\n}\n\n#[test]\nfn compute_l2_l1_hash() {\n // All zeroes\n let hash_result =\n compute_l2_to_l1_hash(AztecAddress::from_field(0), EthAddress::zero(), 0, 0, 0);\n assert(hash_result == 0xb393978842a0fa3d3e1470196f098f473f9678e72463cb65ec4ab5581856c2);\n\n // Non-zero case\n let hash_result = compute_l2_to_l1_hash(\n AztecAddress::from_field(1),\n EthAddress::from_field(3),\n 5,\n 2,\n 4,\n );\n assert(hash_result == 0x3f88c1044a05e5340ed20466276500f6d45ca5603913b9091e957161734e16);\n}\n\n#[test]\nfn silo_l2_to_l1_message_matches_typescript() {\n let version = 4;\n let chainId = 5;\n\n let hash = silo_l2_to_l1_message(\n ScopedL2ToL1Message {\n message: L2ToL1Message { recipient: EthAddress::from_field(1), content: 2, counter: 0 },\n contract_address: AztecAddress::from_field(3),\n },\n version,\n chainId,\n );\n\n // The following value was generated by `l2_to_l1_message.test.ts`\n let hash_from_typescript = 0x00c6155d69febb9d5039b374dd4f77bf57b7c881709aa524a18acaa0bd57476a;\n\n assert_eq(hash, hash_from_typescript);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/hash.nr"},"262":{"source":"use crate::traits::{Deserialize, Empty, FromField, Serialize, ToField};\n\npub struct FunctionSelector {\n // 1st 4-bytes of abi-encoding of function.\n pub inner: u32,\n}\n\nimpl Eq for FunctionSelector {\n fn eq(self, function_selector: FunctionSelector) -> bool {\n function_selector.inner == self.inner\n }\n}\n\nimpl Serialize<1> for FunctionSelector {\n fn serialize(self: Self) -> [Field; 1] {\n [self.inner as Field]\n }\n}\n\nimpl Deserialize<1> for FunctionSelector {\n fn deserialize(fields: [Field; 1]) -> Self {\n Self { inner: fields[0] as u32 }\n }\n}\n\nimpl FromField for FunctionSelector {\n fn from_field(field: Field) -> Self {\n Self { inner: field as u32 }\n }\n}\n\nimpl ToField for FunctionSelector {\n fn to_field(self) -> Field {\n self.inner as Field\n }\n}\n\nimpl Empty for FunctionSelector {\n fn empty() -> Self {\n Self { inner: 0 as u32 }\n }\n}\n\nimpl FunctionSelector {\n pub fn from_u32(value: u32) -> Self {\n Self { inner: value }\n }\n\n pub fn from_signature(signature: str) -> Self {\n let bytes = signature.as_bytes();\n let hash = crate::hash::poseidon2_hash_bytes(bytes);\n\n // `hash` is automatically truncated to fit within 32 bits.\n FunctionSelector::from_field(hash)\n }\n\n pub fn zero() -> Self {\n Self { inner: 0 }\n }\n}\n\n#[test]\nfn test_is_valid_selector() {\n let selector = FunctionSelector::from_signature(\"IS_VALID()\");\n assert_eq(selector.to_field(), 0x73cdda47);\n}\n\n#[test]\nfn test_long_selector() {\n let selector =\n FunctionSelector::from_signature(\"foo_and_bar_and_baz_and_foo_bar_baz_and_bar_foo\");\n assert_eq(selector.to_field(), 0x7590a997);\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/abis/function_selector.nr"},"311":{"source":"use crate::{hash::poseidon2_hash, traits::ToField};\n\npub fn derive_storage_slot_in_map(storage_slot: Field, key: K) -> Field\nwhere\n K: ToField,\n{\n poseidon2_hash([storage_slot, key.to_field()])\n}\n\nmod test {\n use crate::{address::AztecAddress, storage::map::derive_storage_slot_in_map};\n\n #[test]\n fn test_derive_storage_slot_in_map_matches_typescript() {\n let map_slot = 0x132258fb6962c4387ba659d9556521102d227549a386d39f0b22d1890d59c2b5;\n let key = AztecAddress::from_field(\n 0x302dbc2f9b50a73283d5fb2f35bc01eae8935615817a0b4219a057b2ba8a5a3f,\n );\n\n let slot = derive_storage_slot_in_map(map_slot, key);\n\n // The following value was generated by `map_slot.test.ts`\n let slot_from_typescript =\n 0x15b9fe39449affd8b377461263e9d2b610b9ad40580553500b4e41d9cbd887ac;\n\n assert_eq(slot, slot_from_typescript);\n }\n}\n","path":"/home/filip/nargo/github.com/AztecProtocol/aztec-packages/aztec-packages-v0.65.0/noir-projects/noir-protocol-circuits/crates/types/src/storage/map.nr"}}} \ No newline at end of file diff --git a/services/explorer-api/migrations/0000_worried_impossible_man.sql b/services/explorer-api/migrations/0000_dry_puppet_master.sql similarity index 99% rename from services/explorer-api/migrations/0000_worried_impossible_man.sql rename to services/explorer-api/migrations/0000_dry_puppet_master.sql index 0839a622..154d5ae9 100644 --- a/services/explorer-api/migrations/0000_worried_impossible_man.sql +++ b/services/explorer-api/migrations/0000_dry_puppet_master.sql @@ -43,7 +43,7 @@ CREATE TABLE IF NOT EXISTS "logs" ( "index" integer NOT NULL, "tx_effect_to_logs_id" uuid NOT NULL, "type" varchar(20) NOT NULL, - "data" varchar NOT NULL, + "data" "bytea" NOT NULL, "masked_contract_address" varchar(66), "contract_address" varchar(66) ); diff --git a/services/explorer-api/migrations/meta/0000_snapshot.json b/services/explorer-api/migrations/meta/0000_snapshot.json index bc3ff745..a0188005 100644 --- a/services/explorer-api/migrations/meta/0000_snapshot.json +++ b/services/explorer-api/migrations/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "af074cee-b3a6-4eff-9768-66ad1eace0e0", + "id": "4fe591f8-e500-430d-a332-4c1c8cde201c", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -271,7 +271,7 @@ }, "data": { "name": "data", - "type": "varchar", + "type": "bytea", "primaryKey": false, "notNull": true }, diff --git a/services/explorer-api/migrations/meta/_journal.json b/services/explorer-api/migrations/meta/_journal.json index 1ec5572f..3ff992f7 100644 --- a/services/explorer-api/migrations/meta/_journal.json +++ b/services/explorer-api/migrations/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1733146511848, - "tag": "0000_worried_impossible_man", + "when": 1733239184791, + "tag": "0000_dry_puppet_master", "breakpoints": true } ] diff --git a/services/explorer-api/src/constants.ts b/services/explorer-api/src/constants.ts index 334e0986..9aae6d85 100644 --- a/services/explorer-api/src/constants.ts +++ b/services/explorer-api/src/constants.ts @@ -1,2 +1,12 @@ export const CHAIN_NAME = "AZTEC"; export const SERVICE_NAME = "explorer-api"; + +export const DEFAULT_VERIFIED_CONTRACT_ADDRESSES_DEV = [ + "0x11a81043f8c2cb2e95fa28e051f042a87e76c9e42d442188638eb2c07ae445b2", // Account address added by Sandbox + "0x17eafcd0961cc68c56b79305fa6fa8ee49bf8185b2bff279be84f3ceb1ae03ec", // Account address added by Sandbox + "0x12fb76c6e2ccbad0919c554c07257fc69993ddd9c799c62179345b5b82a95dd8", // Account address added by Sandbox +]; + +export const DEFAULT_VERIFIED_CONTRACT_ADDRESSES_PROD: string[] = [ + // TODO: Add verified contract addresses for production +]; diff --git a/services/explorer-api/src/database/controllers/l2contract/utils.ts b/services/explorer-api/src/database/controllers/l2contract/utils.ts index 432712ef..c29296c3 100644 --- a/services/explorer-api/src/database/controllers/l2contract/utils.ts +++ b/services/explorer-api/src/database/controllers/l2contract/utils.ts @@ -2,11 +2,13 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-argument */ import { ChicmozL2ContractInstanceDeluxe, chicmozL2ContractInstanceDeluxeSchema } from "@chicmoz-pkg/types"; +import { VERIFIED_CONTRACT_ADDRESSES } from "../../../environment.js"; // eslint-disable-next-line @typescript-eslint/no-explicit-any export const parseDeluxe = (contractClass: any, instance: any): ChicmozL2ContractInstanceDeluxe => { return chicmozL2ContractInstanceDeluxeSchema.parse({ ...contractClass, + aztecScoutVerified: VERIFIED_CONTRACT_ADDRESSES.some((address) => address === instance.address), blockHash: instance.blockHash, packedPublicBytecode: Buffer.from(contractClass.packedPublicBytecode), address: instance.address, diff --git a/services/explorer-api/src/database/controllers/sign-of-life.ts b/services/explorer-api/src/database/controllers/sign-of-life.ts index 661717c1..714cb620 100644 --- a/services/explorer-api/src/database/controllers/sign-of-life.ts +++ b/services/explorer-api/src/database/controllers/sign-of-life.ts @@ -1,10 +1,12 @@ -import { desc, eq, sql } from "drizzle-orm"; +import { desc, eq, isNotNull, sql } from "drizzle-orm"; import { NodePgDatabase } from "drizzle-orm/node-postgres"; import { getDb as db } from "../../database/index.js"; import { body, l2Block, + logs, txEffect, + txEffectToLogs, } from "../../database/schema/l2block/index.js"; import { l2ContractInstanceDeployed, l2PrivateFunction, l2UnconstrainedFunction } from "../schema/index.js"; @@ -64,6 +66,20 @@ export const getABlockWithTxEffects = async () => { }; }; +export const getSomeTxEffectWithUnencryptedLogs = async () => { + const dbRes = await db() + .select({ + hash: txEffectToLogs.txEffectHash, + }) + .from(logs) + .where(isNotNull(logs.contractAddress)) + .innerJoin(txEffectToLogs, eq(logs.txEffectToLogsId, txEffectToLogs.id)) + .limit(10) + .execute(); + if (dbRes.length === 0) return null; + return dbRes.map((row) => row.hash); +} + export const getABlockWithContractInstances = async () => { const dbRes = await db() .select({ diff --git a/services/explorer-api/src/database/schema/l2block/body.ts b/services/explorer-api/src/database/schema/l2block/body.ts index cdcc922f..46344aeb 100644 --- a/services/explorer-api/src/database/schema/l2block/body.ts +++ b/services/explorer-api/src/database/schema/l2block/body.ts @@ -10,6 +10,7 @@ import { varchar, } from "drizzle-orm/pg-core"; import { + bufferType, generateAztecAddressColumn, generateFrColumn, generateFrNumberColumn, @@ -74,7 +75,7 @@ export const logs = pgTable("logs", { .notNull() .references(() => txEffectToLogs.id, { onDelete: "cascade" }), type: varchar("type", { length: 20 }).notNull(), // 'noteEncrypted', 'encrypted', or 'unencrypted' - data: varchar("data").notNull(), + data: bufferType("data").notNull(), maskedContractAddress: generateFrColumn("masked_contract_address"), contractAddress: generateAztecAddressColumn("contract_address"), }); diff --git a/services/explorer-api/src/environment.ts b/services/explorer-api/src/environment.ts index e5f95f82..9d1c2e1d 100644 --- a/services/explorer-api/src/environment.ts +++ b/services/explorer-api/src/environment.ts @@ -1,16 +1,29 @@ -import { CHAIN_NAME } from "./constants.js"; +export const NODE_ENV = process.env.NODE_ENV ?? "development"; +import { + CHAIN_NAME, + DEFAULT_VERIFIED_CONTRACT_ADDRESSES_DEV, + DEFAULT_VERIFIED_CONTRACT_ADDRESSES_PROD, +} from "./constants.js"; + +const verifiedContractAddresses = + NODE_ENV === "production" + ? DEFAULT_VERIFIED_CONTRACT_ADDRESSES_PROD + : DEFAULT_VERIFIED_CONTRACT_ADDRESSES_DEV; -export const PUBLIC_API_KEY = process.env.PUBLIC_API_KEY ?? "d1e2083a-660c-4314-a6f2-1d42f4b944f4"; +export const VERIFIED_CONTRACT_ADDRESSES = verifiedContractAddresses + +export const PUBLIC_API_KEY = + process.env.PUBLIC_API_KEY ?? "d1e2083a-660c-4314-a6f2-1d42f4b944f4"; export const CACHE_TTL_SECONDS = Number(process.env.CACHE_TTL) || 60; -export const CACHE_LATEST_TTL_SECONDS = Number(process.env.CACHE_LATEST_TTL) || 10; +export const CACHE_LATEST_TTL_SECONDS = + Number(process.env.CACHE_LATEST_TTL) || 10; export const REDIS_HOST = process.env.REDIS_HOST ?? "redis-master"; export const REDIS_PORT = Number(process.env.REDIS_PORT) || 6379; export const PORT = Number(process.env.PORT) || 5000; export const BODY_LIMIT = process.env.BODY_LIMIT ?? "64kb"; export const PARAMETER_LIMIT = Number(process.env.PARAMETER_LIMIT) || 100; -export const NODE_ENV = process.env.NODE_ENV ?? "development"; export const DB_MAX_BLOCKS = 20; export const DB_MAX_TX_EFFECTS = 20; diff --git a/services/explorer-api/src/event-handler/on-block/contracts.ts b/services/explorer-api/src/event-handler/on-block/contracts.ts index fe14904c..7c17a7f6 100644 --- a/services/explorer-api/src/event-handler/on-block/contracts.ts +++ b/services/explorer-api/src/event-handler/on-block/contracts.ts @@ -33,14 +33,10 @@ const parseObjs = ( const parsedObjs: T[] = []; for (const obj of objs) { try { - const parsed = parseFn( - JSON.parse( - JSON.stringify({ - blockHash, - ...obj, - }) - ) - ); + const parsed = parseFn({ + blockHash, + ...obj, + }); parsedObjs.push(parsed); } catch (e) { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions @@ -78,6 +74,7 @@ export const storeContracts = async (b: L2Block, blockHash: string) => { contractClassLogs, ProtocolContractAddress.ContractClassRegisterer ); + const unencryptedBlockLogs = b.body.txEffects.flatMap((txEffect) => txEffect.unencryptedLogs.unrollLogs() ); @@ -90,6 +87,22 @@ export const storeContracts = async (b: L2Block, blockHash: string) => { ProtocolContractAddress.ContractClassRegisterer ); + if ( + contractClasses.length > 0 + ) { + logger.info( + contractClasses.map((contractClass) => contractClass.contractClassId.toString()) + ); + } + + if ( + contractInstances.length > 0 + ) { + logger.info( + contractInstances.map((contractInstance) => `Contract instance: ${contractInstance.address.toString()} Contract class: ${contractInstance.contractClassId.toString()}`) + ); + } + logger.info( `📜 Parsing and storing ${contractClasses.length} contract classes and ${contractInstances.length} contract instances, ${privateFnEvents.length} private function events, and ${unconstrainedFnEvents.length} unconstrained function events` ); diff --git a/services/explorer-api/src/event-handler/on-block/index.ts b/services/explorer-api/src/event-handler/on-block/index.ts index ef0080f8..0e8dc3a0 100644 --- a/services/explorer-api/src/event-handler/on-block/index.ts +++ b/services/explorer-api/src/event-handler/on-block/index.ts @@ -5,6 +5,24 @@ import { controllers } from "../../database/index.js"; import { logger } from "../../logger.js"; import { storeContracts } from "./contracts.js"; import { handleDuplicateBlockError } from "../utils.js"; +import {L2Block} from "@aztec/aztec.js"; + +const truncateString = (value: string) => { + const startHash = value.substring(0, 100); + const endHash = value.substring(value.length - 100, value.length); + return `${startHash}...${endHash}`; +}; + +const hackyLogBlock = (b: L2Block) => { + const blockString = JSON.stringify(b, null, 2); + const logString = blockString.split(":").map((v) => { + if (v.length > 200 && v.includes(",")) + return truncateString(v); + + return v; + }).join(":"); + logger.error(`🚫 Block: ${logString}`); +}; export const onBlock = async ({ block, blockNumber }: NewBlockEvent) => { // TODO: start storing NODE_INFO connected to the block @@ -22,6 +40,7 @@ export const onBlock = async ({ block, blockNumber }: NewBlockEvent) => { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions `Failed to parse block ${blockNumber}: ${(e as Error)?.stack ?? e}`, ); + hackyLogBlock(b); return; } await storeBlock(parsedBlock); diff --git a/services/explorer-api/src/http-server/express-config.ts b/services/explorer-api/src/http-server/express-config.ts index 726419c0..d7f7dfb3 100644 --- a/services/explorer-api/src/http-server/express-config.ts +++ b/services/explorer-api/src/http-server/express-config.ts @@ -2,7 +2,7 @@ import bodyParser from "body-parser"; import cors from "cors"; import express from "express"; import helmet from "helmet"; -import morgan from "morgan"; +//import morgan from "morgan"; import { init as initApiRoutes } from "./routes/index.js"; import { createErrorMiddleware } from "@chicmoz-pkg/error-middleware"; import { genereateOpenApiSpec } from "./open-api-spec.js"; @@ -35,7 +35,7 @@ export function setup( parameterLimit: options.PARAMETER_LIMIT, }) ); - app.use(morgan("common")); + //app.use(morgan("common")); const router = express.Router(); router.get("/health", geHealthHandler); diff --git a/services/explorer-api/src/http-server/routes/controllers/inofficial.ts b/services/explorer-api/src/http-server/routes/controllers/inofficial.ts index 7cc947b6..9e8aed04 100644 --- a/services/explorer-api/src/http-server/routes/controllers/inofficial.ts +++ b/services/explorer-api/src/http-server/routes/controllers/inofficial.ts @@ -29,6 +29,7 @@ export const GET_ROUTES = asyncHandler(async (_req, res) => { await db.signOfLife.getABlockWithContractInstances(); const { privateFunction, unconstrainedFunction } = await db.signOfLife.getL2ContractFunctions(); + const someUnencryptedLogsTxEffects = await db.signOfLife.getSomeTxEffectWithUnencryptedLogs(); const r = [paths.latestHeight, paths.latestBlock, `${paths.blocks}?from=0`]; const searchRoutes = []; @@ -59,7 +60,7 @@ export const GET_ROUTES = asyncHandler(async (_req, res) => { ) ); r.push( - paths.txEffectsByTxHash.replace( + paths.txEffectsByTxEffectHash.replace( `:${txEffectHash}`, blockAndTxEffect.txEffects[0].hash ) @@ -70,7 +71,7 @@ export const GET_ROUTES = asyncHandler(async (_req, res) => { } else { r.push(paths.txEffectsByBlockHeight + "NOT FOUND"); r.push(paths.txEffectByBlockHeightAndIndex + "NOT FOUND"); - r.push(paths.txEffectsByTxHash + "NOT FOUND"); + r.push(paths.txEffectsByTxEffectHash + "NOT FOUND"); } if (blockAndAContractInstance) { @@ -171,6 +172,13 @@ export const GET_ROUTES = asyncHandler(async (_req, res) => { .join("")}
+

Some unencrypted logs tx effects

+
    + ${someUnencryptedLogsTxEffects + ?.map((hash) => `
  • ${hash}
  • `) + .join("")} +
+

Search routes

    ${searchRoutes diff --git a/services/explorer-api/src/http-server/routes/index.ts b/services/explorer-api/src/http-server/routes/index.ts index 91b0ac4c..028804e4 100644 --- a/services/explorer-api/src/http-server/routes/index.ts +++ b/services/explorer-api/src/http-server/routes/index.ts @@ -84,7 +84,7 @@ export const init = ({ router }: { router: Router }) => { router.get(paths.txEffectsByBlockHeight, controller.GET_L2_TX_EFFECTS_BY_BLOCK_HEIGHT); router.get(paths.txEffectByBlockHeightAndIndex, controller.GET_L2_TX_EFFECT_BY_BLOCK_HEIGHT_AND_INDEX); - router.get(paths.txEffectsByTxHash, controller.GET_L2_TX_EFFECT_BY_TX_EFFECT_HASH); + router.get(paths.txEffectsByTxEffectHash, controller.GET_L2_TX_EFFECT_BY_TX_EFFECT_HASH); router.get(paths.txs, controller.GET_PENDING_TXS); diff --git a/services/explorer-api/src/http-server/routes/paths_and_validation.ts b/services/explorer-api/src/http-server/routes/paths_and_validation.ts index 5cca464a..af973999 100644 --- a/services/explorer-api/src/http-server/routes/paths_and_validation.ts +++ b/services/explorer-api/src/http-server/routes/paths_and_validation.ts @@ -19,7 +19,7 @@ export const paths = { txEffectsByBlockHeight: `/l2/blocks/:${blockHeight}/tx-effects`, txEffectByBlockHeightAndIndex: `/l2/blocks/:${blockHeight}/tx-effects/:${txEffectIndex}`, - txEffectsByTxHash: `/l2/tx-effects/:${txEffectHash}`, + txEffectsByTxEffectHash: `/l2/tx-effects/:${txEffectHash}`, txs: "/l2/txs", diff --git a/services/explorer-ui/src/pages/contract-instance-details/index.tsx b/services/explorer-ui/src/pages/contract-instance-details/index.tsx index 4fd10248..2fca9e27 100644 --- a/services/explorer-ui/src/pages/contract-instance-details/index.tsx +++ b/services/explorer-ui/src/pages/contract-instance-details/index.tsx @@ -1,5 +1,6 @@ import { useParams } from "@tanstack/react-router"; import { type FC } from "react"; +import { CheckCircledIcon } from "@radix-ui/react-icons"; import { KeyValueDisplay } from "~/components/info-display/key-value-display"; import { useContractInstance } from "~/hooks/"; import { getContractData } from "./util"; @@ -19,12 +20,25 @@ export const ContractInstanceDetails: FC = () => { if (error) return
    Error
    ; if (!contractInstanceDetails) return
    No data
    ; + // TODO: link to a page on verified contracts and what verified means + const verifiedIcon = contractInstanceDetails.aztecScoutVerified ? ( +
    + +
    + Contract verified by Aztec Scout +
    +
    + ) : ( +
    Not verified
    + ); return (
    -

    Contract instance details

    +

    + Contract instance details {verifiedIcon} +

    diff --git a/services/explorer-ui/src/pages/contract-instance-details/util.ts b/services/explorer-ui/src/pages/contract-instance-details/util.ts index 5c89112e..fdd41d1b 100644 --- a/services/explorer-ui/src/pages/contract-instance-details/util.ts +++ b/services/explorer-ui/src/pages/contract-instance-details/util.ts @@ -4,7 +4,7 @@ import { API_URL, aztecExplorer } from "~/service/constants"; export const getContractData = (data: ChicmozL2ContractInstanceDeluxe) => { const link = `${routes.contracts.route}${routes.contracts.children.classes.route}/${data.contractClassId}/versions/${data.version}`; - return [ + const displayData = [ { label: "ADDRESS", value: data.address, @@ -27,4 +27,12 @@ export const getContractData = (data: ChicmozL2ContractInstanceDeluxe) => { extLink: `${API_URL}/${aztecExplorer.getL2ContractInstance(data.address)}`, }, ]; + if (data.aztecScoutVerified) { + displayData.push({ + label: "VERIFIED ✅", + value: "Contract deployer verified by Aztec Scout.", + link: routes.verifiedContracts.route, + }); + } + return displayData; }; diff --git a/services/explorer-ui/src/pages/tx-effect-details/index.tsx b/services/explorer-ui/src/pages/tx-effect-details/index.tsx index f471165f..22df7fb4 100644 --- a/services/explorer-ui/src/pages/tx-effect-details/index.tsx +++ b/services/explorer-ui/src/pages/tx-effect-details/index.tsx @@ -6,6 +6,42 @@ import { txEffectTabs, type TabId } from "./constants"; import { getTxEffectData, mapTxEffectsData } from "./utils"; import { OptionButtons } from "./tabs"; +const naiveDecode = (data: Buffer): string => { + // TODO + let counterZero = 0; + let counterAbove128 = 0; + let counterAbove255 = 0; + let sum = 0; + let totCount = 0; + const res = data.toString("hex").match(/.{1,64}/g) + ?.map((hex) => parseInt(hex, 16)) + .map((charCode): string => { + if (charCode === 0) { + counterZero++; + } else { + //console.log(`charCode: ${charCode} char: ${String.fromCharCode(charCode)}`); + } + if (charCode > 128) { + counterAbove128++; + } + if (charCode > 255) { + counterAbove255++; + } + sum += charCode; + totCount++; + const char = String.fromCharCode(charCode); + return char; + }) + .join(""); + const avg = sum / totCount; + //console.log("avg", avg); + //console.log("counterAbove128", counterAbove128); + //console.log("counterAbove255", counterAbove255); + //console.log("counterZero", counterZero); + //console.log("totCount", totCount); + return res ?? ""; +}; + export const TxEffectDetails: FC = () => { const [selectedTab, setSelectedTab] = useState("encryptedLogs"); const { hash } = useParams({ @@ -19,7 +55,7 @@ export const TxEffectDetails: FC = () => { // check for the first avalible tab with data if (txEffects) { const firstAvailableTab = txEffectTabs.find( - (tab) => tab.id in txEffectData, + (tab) => tab.id in txEffectData ); if (firstAvailableTab) setSelectedTab(firstAvailableTab.id); @@ -62,7 +98,8 @@ export const TxEffectDetails: FC = () => { return Object.entries(log).map(([key, value]) => { return { label: key, - value: value, + value: + value instanceof Buffer ? value.toString() : value, isClickable: false, }; }); @@ -77,7 +114,7 @@ export const TxEffectDetails: FC = () => {
    ); - }, + } )}
    )} @@ -85,29 +122,21 @@ export const TxEffectDetails: FC = () => {
    {txEffects.unencryptedLogs.functionLogs.map( (unencrypted, index) => { - const entries = unencrypted.logs.map( - ({ data, contractAddress }) => { - return [ - { - label: "data", - value: - data - .match(/.{1,64}/g) - ?.map((hex) => parseInt(hex, 16)) - .map((charCode) => - String.fromCharCode(charCode), - ) - .join("") ?? "", - isClickable: false, - }, - { - label: "Contract Address", - value: contractAddress, - isClickable: true, - }, - ]; - }, - ); + const entries = unencrypted.logs.map((unEncLog) => { + return [ + { + label: "data", + value: naiveDecode(unEncLog.data), + isClickable: false, + }, + { + label: "Contract Address", + value: (unEncLog as { contractAddress: string }) + .contractAddress, + isClickable: true, + }, + ]; + }); // Flatten the nested arrays const flattenedEntries = entries.flat(); @@ -118,7 +147,7 @@ export const TxEffectDetails: FC = () => {
    ); - }, + } )}
    )} @@ -139,7 +168,8 @@ export const TxEffectDetails: FC = () => { const entries = noteEncryptedLogs.logs.map((log) => { return Object.entries(log).map(([key, value]) => ({ label: key, - value: value, + value: + value instanceof Buffer ? value.toString() : value, isClickable: false, })); }); @@ -153,7 +183,7 @@ export const TxEffectDetails: FC = () => {
    ); - }, + } )}
    )} diff --git a/services/explorer-ui/src/pages/tx-effect-details/utils.ts b/services/explorer-ui/src/pages/tx-effect-details/utils.ts index 8259d16d..c3237713 100644 --- a/services/explorer-ui/src/pages/tx-effect-details/utils.ts +++ b/services/explorer-ui/src/pages/tx-effect-details/utils.ts @@ -4,14 +4,14 @@ import { formatTimeSince } from "~/lib/utils"; import { API_URL, aztecExplorer } from "~/service/constants"; export type TxEffectDataType = | string[] - | Array<{ logs: Array<{ data: string; contractAddress: string }> }> + | Array<{ logs: Array<{ data: Buffer; contractAddress: string }> }> | Array<{ logs: Array<{ - data: string; + data: Buffer; maskedContractAddress: string; }>; }> - | Array<{ logs: Array<{ data: string }> }> + | Array<{ logs: Array<{ data: Buffer }> }> | Array<{ leafSlot: string; value: string }>; export const getTxEffectData = (data: ChicmozL2TxEffectDeluxe) => [ diff --git a/services/explorer-ui/src/pages/verified-contracts.tsx b/services/explorer-ui/src/pages/verified-contracts.tsx new file mode 100644 index 00000000..39d40986 --- /dev/null +++ b/services/explorer-ui/src/pages/verified-contracts.tsx @@ -0,0 +1,33 @@ +import { type FC } from "react"; +// TODO: make verified contracts link process env + +export const VerifiedContracts: FC = () => { + return ( +
    +

    Verified contracts

    +
    +

    + Verified contracts mean that we have verified the deployer of the + contract. +

    +
    +

    + ⚠️ Please note that this does not mean that the contract is safe to + use. ⚠️ +

    +
    +

    + You can always find the latest verified contracts by checking{" "} + + our github-repo + + . If you think your contract should be verified, please create a PR to + that file. +

    +
    +
    + ); +}; diff --git a/services/explorer-ui/src/routeTree.gen.ts b/services/explorer-ui/src/routeTree.gen.ts index 51f81ce7..7f5925e0 100644 --- a/services/explorer-ui/src/routeTree.gen.ts +++ b/services/explorer-ui/src/routeTree.gen.ts @@ -17,6 +17,7 @@ import { Route as TermsAndConditionsImport } from './routes/terms-and-conditions // Create Virtual Routes +const VerifiedContractsLazyImport = createFileRoute('/verified-contracts')() const PrivacyPolicyLazyImport = createFileRoute('/privacy-policy')() const AboutUsLazyImport = createFileRoute('/about-us')() const IndexLazyImport = createFileRoute('/')() @@ -34,6 +35,13 @@ const ContractsClassesIdVersionsVersionLazyImport = createFileRoute( // Create/Update Routes +const VerifiedContractsLazyRoute = VerifiedContractsLazyImport.update({ + path: '/verified-contracts', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/verified-contracts.lazy').then((d) => d.Route), +) + const PrivacyPolicyLazyRoute = PrivacyPolicyLazyImport.update({ path: '/privacy-policy', getParentRoute: () => rootRoute, @@ -139,6 +147,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PrivacyPolicyLazyImport parentRoute: typeof rootRoute } + '/verified-contracts': { + id: '/verified-contracts' + path: '/verified-contracts' + fullPath: '/verified-contracts' + preLoaderRoute: typeof VerifiedContractsLazyImport + parentRoute: typeof rootRoute + } '/blocks/$blockNumber': { id: '/blocks/$blockNumber' path: '/blocks/$blockNumber' @@ -198,6 +213,7 @@ export const routeTree = rootRoute.addChildren({ TermsAndConditionsRoute, AboutUsLazyRoute, PrivacyPolicyLazyRoute, + VerifiedContractsLazyRoute, BlocksBlockNumberLazyRoute, TxEffectsHashLazyRoute, BlocksIndexLazyRoute, @@ -219,6 +235,7 @@ export const routeTree = rootRoute.addChildren({ "/terms-and-conditions", "/about-us", "/privacy-policy", + "/verified-contracts", "/blocks/$blockNumber", "/tx-effects/$hash", "/blocks/", @@ -240,6 +257,9 @@ export const routeTree = rootRoute.addChildren({ "/privacy-policy": { "filePath": "privacy-policy.lazy.tsx" }, + "/verified-contracts": { + "filePath": "verified-contracts.lazy.tsx" + }, "/blocks/$blockNumber": { "filePath": "blocks/$blockNumber.lazy.tsx" }, diff --git a/services/explorer-ui/src/routes/__root.tsx b/services/explorer-ui/src/routes/__root.tsx index 0761b392..c962f8bf 100644 --- a/services/explorer-ui/src/routes/__root.tsx +++ b/services/explorer-ui/src/routes/__root.tsx @@ -111,6 +111,10 @@ export const routes = { route: "/terms-and-conditions", title: "Terms and Conditions", }, + verifiedContracts: { + route: "/verified-contracts", + title: "Verified Contracts", + }, }; function notFoundComponent() { diff --git a/services/explorer-ui/src/routes/verified-contracts.lazy.tsx b/services/explorer-ui/src/routes/verified-contracts.lazy.tsx new file mode 100644 index 00000000..edfcaf8b --- /dev/null +++ b/services/explorer-ui/src/routes/verified-contracts.lazy.tsx @@ -0,0 +1,6 @@ +import { createLazyFileRoute } from "@tanstack/react-router"; +import { VerifiedContracts } from "~/pages/verified-contracts"; + +export const Route = createLazyFileRoute("/verified-contracts")({ + component: VerifiedContracts, +});