This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
contracts: | |
platform: linux/amd64 | |
image: aztecprotocol/contracts:latest | |
environment: | |
ETHEREUM_HOST: ${ETHEREUM_HOST:-} | |
PORT: 8547 | |
command: ./scripts/start_e2e.sh | |
ports: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "_escapeBlockLowerBound", | |
"type": "uint256" | |
}, | |
{ | |
"internalType": "uint256", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"abi": [ | |
{ | |
"inputs": [ | |
{ | |
"internalType": "address", | |
"name": "_verifierAddress", | |
"type": "address" | |
}, | |
{ | |
"internalType": "uint256", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"anonymous": false, | |
"inputs": [ | |
{ | |
"indexed": true, | |
"internalType": "uint256", | |
"name": "assetId", | |
"type": "uint256" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
AccountId, | |
AztecSdk, | |
createAztecSdk, | |
WalletProvider, | |
EthersAdapter, | |
EthAddress, | |
EthereumProvider, | |
SchnorrSigner, | |
TxSettlementTime, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const regex = /^0x[a-fA-F0-9]{40}$/ | |
const validAddress = "0x3cF01283119ECb00590F7eD1f5BFf863B43160b3" | |
const validResult = regex.exec(validAddress) | |
console.log(validResult) | |
const invalidAddress = "0xabv342{" | |
const invalidResult = regex.exec(invalidAddress) | |
console.log(invalidResult) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ethers } = require("ethers"); | |
const wallet = new ethers.Wallet.createRandom(); | |
console.log(`PRIVATE_KEY="` + wallet.privateKey + `"`); | |
console.log(`Your account address: `, wallet.address); |