Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Johnson Arachnid

View GitHub Profile
View wordle1.md

Total missed: 2

Total guesses: 6158

First guess: spend

aback

  • 🟩🟩🟩: quack

abate

@Arachnid
Arachnid / airdrop.sql
Last active Apr 2, 2022
BigQuery queries for generating ENS airdrop data
View airdrop.sql
--- Generate `ens-manager.airdrop.ownership_extents`, recording start time, end time, name, and owner tuples. ---
SELECT
transaction_hash,
event,
id,
block_timestamp AS start_time,
LEAST(LEAD(block_timestamp, 1, TIMESTAMP "9999-12-31 23:59:59.999999 UTC") OVER (PARTITION BY id ORDER BY block_timestamp, log_index), LAST_VALUE(TIMESTAMP_ADD(timestamp "1970-01-01 00:00:00+00", INTERVAL expires SECOND) IGNORE NULLS) OVER (PARTITION BY id ORDER BY block_timestamp, log_index)) AS end_time,
LAST_VALUE(owner IGNORE NULLS) OVER (PARTITION BY id ORDER BY block_timestamp, log_index) AS owner,
FROM (
SELECT
View beerlabels.py
#!/usr/bin/env python3
import argparse
import cups
from datetime import datetime, date
from flask import Flask, make_response, request, render_template_string
import io
import json
import logging
from reportlab.pdfgen import canvas
from reportlab.lib import units
View contracts.txt
address count
0xc669eaad75042be84daaf9b461b0e868b9ac1871 4208495
0x4983d36b1d178653b8511b84e3d92e511d83ee1a 2695834
0xd1dd82d1ded8f40c200b89455050e9c18d918504 1586939
0xb16a11abe403864ce3797196572f6045541fa483 699308
0x42c2b07062de15781a6098ba36eb72e0d3f30d83 633892
0x06b6a2d98a31f92daea8a7dbc5efaa9d20cf1b15 570600
0x5190157323c4515799bc603def4a9a0845f5265e 540361
0x4b3fcc7c5cb01f6fbf84dd4f053cae302d94a09a 540361
0xa77025daad3b83b5598eff4d738f942a73c21f2f 479129
View registrar.sol
contract Registrar is Owned {
ENS public ens;
mapping(address=>boolean) public controllers;
constructor(ENS _ens) public {
ens = _ens;
setController(msg.sender, true);
}
function setController(address controller, boolean isController) ownerOnly {
View ResolverProxy.sol
pragma solidity ^0.5.0;
import './ENS.sol';
library BytesUtils {
/*
* @dev Returns the 32 byte value at the specified index of self.
* @param self The byte string.
* @param idx The index into the bytes
* @return The specified 32 bytes of the string.
View gist:3e383e6a721163eed8810a2959bdcf3a
https://etherscan.io/address/0x285088c75a8508664ad77df63e2d60a408e5284a
https://etherscan.io/address/0x911143d946ba5d467bfc476491fdb235fef4d667
View create2proxy.yul
object "Create2Proxy" {
code {
let size := datasize("runtime")
datacopy(0, dataoffset("runtime"), size)
return(0, size)
}
object "runtime" {
code {
let salt := calldataload(0)
let size := sub(calldatasize(), 32)
View UserToken.sol
contract UserTokenFactory {
mapping(address=>UserToken) public userTokens;
function getUserToken(address owner) returns(UserToken) {
if(userTokens[owner] == 0) {
UserToken token = new UserToken(owner);
userTokens[owner] = token;
}
return userTokens[owner];
}
View create2proxy.yul
object "Create2Proxy" {
code {
let size := datasize("runtime")
datacopy(0, dataoffset("runtime"), size)
return(0, size)
}
object "runtime" {
code {
let salt := calldataload(0)
let size := sub(calldatasize(), 32)