This file contains hidden or 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 { assignDiscordRole } from '../../utils/discord.js'; | |
| import example_circuit from '../../shared/example_circuit.json' with { type: 'json' }; | |
| import { UltraHonkBackend } from '@aztec/bb.js'; | |
| const backend = new UltraHonkBackend(example_circuit.bytecode); | |
| export default async function discordRoutes(fastify) { | |
| fastify.route({ | |
| method: 'POST', |
This file contains hidden or 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 { HexGrid } from "./HexGrid"; | |
| import { Hex } from "./Hex"; | |
| import { Matrix2D } from "../util"; | |
| interface MapConfig { | |
| size: number; | |
| theme: MapTheme; | |
| difficulty: number; | |
| features: MapFeatures; | |
| } |
This file contains hidden or 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
| { | |
| transaction: | |
| '{"feePayer":{"body":{"publicKey":"B62qm8YHJAvZit7qRXwvmVTLsAwsX5GjRZ7APAtLmQZiPVAB5LjMdf8","fee":"100000000","validUntil":null,"nonce":"10"},"authorization":"7mWxjLYgbJUkZNcGouvhVj5tJ8yu9hoexb9ntvPK8t5LHqzmrL6QJjjKtf5SgmxB4QWkDw7qoMMbbNGtHVpsbJHPyTy2EzRQ"},"accountUpdates":[{"body":{"publicKey":"B62qs2NthDuxAT94tTFg6MtuaP1gaBxTZyNv9D3uQiQciy1VsaimNFT","tokenId":"wSHV2S4qX9jFsLjQo8r1BsMLH2ZRKsZx6EJd1sbozGPieEC4Jf","update":{"appState":[null,null,null,null,null,null,null,null],"delegate":null,"verificationKey":null,"permissions":null,"zkappUri":null,"tokenSymbol":null,"timing":null,"votingFor":null},"balanceChange":{"magnitude":"0","sgn":"Positive"},"incrementNonce":false,"events":[["2","116061048837531722551099048644889289986486862114220372","12734247283082517782182378308377226560174176991545248296599550711913059465986","0","24157098283612104140600617543129141372403717057837862439633945511216398195023","1","0","8161054844798290198029438477645468625607270933885159334286498488969715994219", |
This file contains hidden or 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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.24; | |
| contract Voting { | |
| struct Candidate { | |
| string name; | |
| uint256 voteCount; | |
| } | |
| Candidate[] public candidates; |
This file contains hidden or 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
| REMIX EXAMPLE PROJECT | |
| Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
| It contains 3 directories: | |
| 1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
| 2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
| 3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
| SCRIPTS |
This file contains hidden or 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
| REMIX EXAMPLE PROJECT | |
| Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer. | |
| It contains 3 directories: | |
| 1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
| 2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
| 3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
| SCRIPTS |
This file contains hidden or 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
| { | |
| "name": "workshop-setup", | |
| "version": "1.0.0", | |
| "description": "This is the common setup script for most of my workshops", | |
| "bin": "./setup.js" | |
| } |
This file contains hidden or 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
| { | |
| "name": "service name", | |
| "version": "1.0.0", | |
| "main": "src/index.js", | |
| "engines": { | |
| "node": ">=8.9.1" | |
| }, | |
| "scripts": { | |
| "start": "node src/index.js", | |
| "lint": "eslint --fix ." |
This file contains hidden or 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
| module.exports = { | |
| env: { | |
| browser: true, | |
| node: true, | |
| es6: true | |
| }, | |
| extends: ['eslint:recommended', 'plugin:node/recommended'], | |
| parserOptions: { | |
| ecmaVersion: 2017, | |
| ecmaFeatures: { |
This file contains hidden or 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
| 1.GraphQL |
NewerOlder