Skip to content

Instantly share code, notes, and snippets.

Nick Johnson Arachnid

Block or report user

Report or block Arachnid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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)
View web3graphql.py
#import asyncio
import logging
from flask import Blueprint, Flask, request, render_template, g
from flask_graphql import GraphQLView
from google.cloud import logging as glogging
#from graphql.execution.executors.asyncio import AsyncioExecutor
from web3 import Web3, HTTPProvider
from werkzeug.serving import run_simple
from graphql import (
graphql,
@Arachnid
Arachnid / ensTypes.graphql
Last active Sep 26, 2018 — forked from jefflau/ensTypes.graphql
ensTypes.graphql
View ensTypes.graphql
type Address {
address: String
}
type Node {
name: String
nameHash: String
label: String
node: String
subNodes: [Node]
View DumbMultisig.sol
// WHATEVER YOU DO, DON'T USE THIS.
// This is a bit of demo code posted to illustrate a principle. It is unaudited,
// probably full of bugs, and definintely not production ready.
// https://twitter.com/nicksdjohnson/status/1041642345467404291
import "./DumbWallet.sol";
contract DumbMultisig {
struct MultisigConfig {
mapping(address=>bool) signatories;
View WalletDelegator.sol
// WHATEVER YOU DO, DON'T USE THIS.
// This is a bit of demo code posted to illustrate a principle. It is unaudited,
// probably full of bugs, and definintely not production ready.
// https://twitter.com/nicksdjohnson/status/1041642345467404291
import "./DumbWallet.sol";
contract WalletDelegator {
mapping(address=>uint) public nonces;
View DumbWallet.sol
// WHATEVER YOU DO, DON'T USE THIS.
// This is a bit of demo code posted to illustrate a principle. It is unaudited,
// probably full of bugs, and definintely not production ready.
// https://twitter.com/nicksdjohnson/status/1041642345467404291
contract DumbWallet {
mapping(address=>bool) public authorised;
event Authorised(address indexed target, bool value);
event Call(address indexed target, uint value);
You can’t perform that action at this time.