Skip to content

Instantly share code, notes, and snippets.

View critesjosh's full-sized avatar
🥸

josh crites critesjosh

🥸
View GitHub Profile
{
"bridgeConfigs": [
{
"numTxs": 40,
"gas": 500000,
"bridgeAddressId": 1,
"permittedAssets": [
1
]
},
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec.
pragma solidity >=0.8.4;
import {BaseDeployment} from "../base/BaseDeployment.s.sol";
import {AddressRegistry} from "../../bridges/registry/AddressRegistry.sol";
contract AddressRegistryDeployment is BaseDeployment {
function deploy() public returns (address) {
@critesjosh
critesjosh / docker-compose.fork.yml
Last active January 11, 2023 20:05
A docker compose script to start an Ethereum mainnet fork with anvil and the Aztec stack locally, use chain id 3567
version: '3'
services:
fork:
image: ghcr.io/foundry-rs/foundry:nightly-8c4294c1d2321e20a3543fbd9a813d47053a8303
entrypoint: 'anvil -p=8545 --host 0.0.0.0 --fork-url ${FORK_URL} --chain-id ${CHAIN_ID}'
ports:
- '8545:8545'
contracts:
platform: linux/amd64
@critesjosh
critesjosh / docker-compose.dev.yml
Last active January 5, 2023 01:16
A docker compose script to start the Aztec stack locally (no bridges), chain id 31337
version: '3'
services:
contracts:
platform: linux/amd64
image: aztecprotocol/contracts:latest
environment:
ETHEREUM_HOST: ${ETHEREUM_HOST:-}
PORT: 8547
command: ./scripts/start_e2e.sh
ports:
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = function override(config) {
let fallback = config.resolve.fallback || {};
// These fallbacks are required for the @aztec/sdk v2.1.0-testnet.30 or greater
Object.assign(fallback, {
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
@critesjosh
critesjosh / rollupprocessor.json
Created June 6, 2022 19:15
aztec rollup processor abi
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "_escapeBlockLowerBound",
"type": "uint256"
},
{
"internalType": "uint256",
"abi": [
{
"inputs": [
{
"internalType": "address",
"name": "_verifierAddress",
"type": "address"
},
{
"internalType": "uint256",
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "uint256",
"name": "assetId",
"type": "uint256"
},
@critesjosh
critesjosh / setupSdk.js
Created May 19, 2022 14:45
[WIP] broken setup script for the aztec sdk
import {
AccountId,
AztecSdk,
createAztecSdk,
WalletProvider,
EthersAdapter,
EthAddress,
EthereumProvider,
SchnorrSigner,
TxSettlementTime,
@critesjosh
critesjosh / Example.sol
Last active April 15, 2022 17:41
Example solidity contract that uses the randomness contract
import "celo-monorepo/packages/protocol/identity/interfaces/IRandom.sol";
import "celo-monorepo/packages/protocol/common/interfaces/IRegistry.sol";
contract Example {
function test() external view returns (bytes32 randomness) {
randomness = IRandom(
IRegistry(0x000000000000000000000000000000000000ce10)
.getAddressFor(keccak256(abi.encodePacked("Random")))
).random();
}