Skip to content

Instantly share code, notes, and snippets.

View SpiralOutDotEu's full-sized avatar
🤯
If ZK hasn't profoundly shocked you, you haven't understood it yet

Nikos Koumbakis SpiralOutDotEu

🤯
If ZK hasn't profoundly shocked you, you haven't understood it yet
View GitHub Profile
@SpiralOutDotEu
SpiralOutDotEu / semaphore-binary-merkle-root-fix_attestation.log
Created August 5, 2025 07:21
Attestation for Semaphore Binary Merkle Root Fix MPC Phase 2 Trusted Setup ceremony
Hey, I'm SpiralOutDotEu-15322814 and I have contributed to the Semaphore Binary Merkle Root Fix MPC Phase2 Trusted Setup ceremony.
The following are my contribution signatures:
Circuit # 1 (semaphore-1)
Contributor # 125
Contribution Hash: 46cc7e4d cd5952d2 595b2b52 ecc42fcb
12a47a2d 332fcef1 49e9804f 2cd22e8e
494c12b0 226a2bb7 19945268 f24ccc69
447ba7de 00b9458b 5b338d28 f92e00d5
@SpiralOutDotEu
SpiralOutDotEu / subgraph.yml
Created March 5, 2025 15:02 — forked from dabit3/subgraph.yml
Example subgraph with two contract data sources
specVersion: 0.0.2
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum/contract
name: Token
network: mainnet
source:
address: "0xabEFBc9fD2F806065b4f3C237d4b59D9A97Bcac7"
abi: Token
@SpiralOutDotEu
SpiralOutDotEu / react-app-env.d.ts
Last active October 28, 2024 13:10
window ethereum not found
// src/react-app-env.d.ts
// for ethers v6
/// <reference types="react-scripts" />
import { BrowserProvider, Eip1193Provider } from "ethers/types/providers";
declare global {
interface Window {
ethereum: Eip1193Provider & BrowserProvider;
}
@SpiralOutDotEu
SpiralOutDotEu / ArrayContract.sol
Created September 29, 2024 12:55
Solidity Library Use
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ArrayLib.sol";
contract ArrayContract {
using ArrayLib for uint256[]; // Import the library for use with uint256[] arrays
uint256[] private arr; // The array to store uint256 elements
@SpiralOutDotEu
SpiralOutDotEu / FunctionInjection.sol
Last active September 29, 2024 12:58
Solidity function injection
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Reference: https://ethereum.stackexchange.com/questions/117725/passing-functions-as-parameters-how-to-invoke
contract A {
enum Action { Walk, Fly, Swim }
function walk() internal pure returns (uint) {
{
"@context": [
{
"@protected": true,
"@version": 1.1,
"id": "@id",
"type": "@type",
"DriversLicense": {
"@context": {
"@propagate": true,
@SpiralOutDotEu
SpiralOutDotEu / HelloWormhole.sol
Last active June 25, 2024 20:42
Basic Wormhole interaction
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "wormhole-solidity-sdk/interfaces/IWormholeRelayer.sol";
import "wormhole-solidity-sdk/interfaces/IWormholeReceiver.sol";
contract HelloWormhole is IWormholeReceiver {
event GreetingReceived(string greeting, uint16 senderChain, address sender, address senderContract);
uint256 constant GAS_LIMIT = 50_000;
@SpiralOutDotEu
SpiralOutDotEu / EthersTxGasCalculations.js
Last active February 26, 2024 17:35
Ethers calculate transaction fee
import { ethers } from "ethers";
// Using this if cannot serialize bigint
BigInt.prototype.toJSON = function () {
const int = Number.parseInt(this.toString());
return int ?? this.toString();
};
// Define provider
const provider = new ethers.JsonRpcProvider(RPC_URL)
@SpiralOutDotEu
SpiralOutDotEu / TheGovernor.sol
Last active November 7, 2023 23:04
erc721a DAO
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/governance/Governor.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default