Skip to content

Instantly share code, notes, and snippets.

View bonustrack's full-sized avatar

Less bonustrack

View GitHub Profile
bonustrack / generate-vote-msg.js
Created November 15, 2023 21:33
Generate offchain votes for Snapshot X
View generate-vote-msg.js
const { Wallet } = require('@ethersproject/wallet');
const space = '0x1a9fdebf62ed1312354394979c2000d4e7912f9a';
const proposalId = 1;
const choice = 1; // 1: Approve, 2: Reject, 3: Abstain
const chainId = 5; // Goerli
const signer = new Wallet.createRandom(); // Or new Wallet(PRIVATE_KEY);
const voter = signer.address;
View execution.json
"to": "0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB",
"data": "0xa9059cbb000000000000000000000000ef8305e140ac520225daf050e2f71d5fbcc543e7000000000000000000000000000000000000000000000006b14bd1e6eea00000",
"value": "0",
"_type": "sendToken",
"_form": {
"recipient": "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7",
"token": {
"name": "CoW Protocol Token",

Verifying myself: I am 0xdD36Aa96D9BD4b49DA6E6734fF18Cc69F90F9435


Verifying myself: I am 0xdD36Aa96D9BD4b49DA6E6734fF18Cc69F90F9435



View execution.json
"safeSnap": {
"safes": [
"network": "1",
"realityAddress": "0x0eBaC21F7f6A6599B5fa5f57Baaa974ADFEC4613",
"hash": "0x71e7f8c0f85999b34e4e26f47a489a1a183d4c3763c8c706f8cc2cce8feb0e45",
"txs": [
"nonce": 0,
bonustrack / NFT.MD
Created October 21, 2021 15:27
Voting with NFT

1. Register a domain on ENS

Head to this website to register a new domain

2. Create a Snapshot space

  • Go on this page
  • Connect your wallet (the same one used to register the ENS domain)
  • Type the ENS domain on the page and click Next
  • Click on the copy icon to copy the IPNS url
  • Click on "Set record on ENS"
View delegation.ts
const snapshot = require('@snapshot-labs/snapshot.js');
const space = 'cvx.eth';
const network = '1';
const strategies = [
name: 'erc20-balance-of',
params: {
symbol: 'CVX',
address: '0xD18140b4B819b895A3dba5442F959fA44994AF50',

Keybase proof

I hereby claim:

  • I am bonustrack on github.
  • I am bonustrack ( on keybase.
  • I have a public key whose fingerprint is 161A EB18 0A30 19E9 4AE7 8CE8 4C27 FBDF 5B0F EE36

To claim this, I am signing this object:


Verifying myself: I am 0xeF8305E140ac520225DAf050e2f71d5fBcC543e7