This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Address { | |
address: String | |
} | |
type Node { | |
name: String | |
nameHash: String | |
label: String | |
node: String | |
subNodes: [Node] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://etherscan.io/address/0x285088c75a8508664ad77df63e2d60a408e5284a | |
https://etherscan.io/address/0x911143d946ba5d467bfc476491fdb235fef4d667 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |