Skip to content

Instantly share code, notes, and snippets.


Fabien bonustrack

View GitHub Profile
bonustrack / NFT.MD
Created Oct 21, 2021
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

View attestation.txt
I contributed to the Trusted Setup Multi-Party Ceremony.
The following are my contribution signatures:
Circuit: qvt32
Contributor # 120
Hash: b63094a2 81a9068b bbaeecbc f43d92bc
70a314ff fa0a8f2a 817c607a 7f2cec1e
927aa579 e2410f45 90f21f50 5989675e
2e9e4abf 7bd83eb2 1cd2452b 2cebb190

1: Go on the settings page here:

2: Delete the strategies "erc20-balance-of" and "erc20-balance-of-delegation"

3: Add a strategy "pagination" with these params:

    "symbol": "YFI",
  "symbol": "FEI-TRIBE Staked LP",
  "strategy": {
bonustrack / index.ts
Last active Sep 26, 2020
STONK pool balances block 10356001
View index.ts
// Transaction
// Balancer pool
const { JsonRpcProvider } = require('@ethersproject/providers');
const snapshot = require('@bonustrack/snapshot.js/src');
const poolShares = require('./subgraph-pool-shares.json');
const url = '';
const provider = new JsonRpcProvider(url);
View balancer-verify-message.js
const { verifyMessage } = require('@ethersproject/wallet');
async function verify(signedMessage, sig, address, type) {
const message = JSON.parse(JSON.stringify(signedMessage));
if (type === 'author') {
delete message.authors[0].sig;
delete message.relayers;
if (type === 'relayer') delete message.relayers[0].sig;
const recovered = await verifyMessage(JSON.stringify(message), sig);
View balancer.js
const fs = require('fs');
const { getAddress } = require('ethers/utils');
const subgraphResult = require('./poolTokens.json');
const { mainnet } = require('./deployed.json');
const trustwalletImgs = require('./trustwallet.json');
const tokens = [];
const deployedTokens = => token.address.toLowerCase());
const tokensIds = [];