Skip to content

Instantly share code, notes, and snippets.

View bonustrack's full-sized avatar

Less bonustrack

View GitHub Profile

Verifying myself: I am 0xdD36Aa96D9BD4b49DA6E6734fF18Cc69F90F9435

Verifying myself: I am 0xdD36Aa96D9BD4b49DA6E6734fF18Cc69F90F9435

[
{
"to": "0xDEf1CA1fb7FBcDC777520aa7f396b4E015F497aB",
"data": "0xa9059cbb000000000000000000000000ef8305e140ac520225daf050e2f71d5fbcc543e7000000000000000000000000000000000000000000000006b14bd1e6eea00000",
"value": "0",
"_type": "sendToken",
"_form": {
"recipient": "0xeF8305E140ac520225DAf050e2f71d5fBcC543e7",
"token": {
"name": "CoW Protocol Token",
@bonustrack
bonustrack / generate-vote-msg.js
Created November 15, 2023 21:33
Generate offchain votes for Snapshot X
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;