Skip to content

Instantly share code, notes, and snippets.

@koeppelmann
koeppelmann / DelayTokenWrapper.sol
Created April 4, 2024 09:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.25+commit.b61c2a91.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function transfer(address recipient, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
contract DelayTokenWrapper {
import json
import requests
import pprint
#response = requests.get("https://api.circles.garden/api/users/Martin")
#pprint.pprint(response.content)
martinsavings = "0x052b4793d50d37FD3BFcBf93AAC9Cda6292F81Fa"
martin = "0x42cEDde51198D1773590311E2A340DC06B24cB37"
import json
import requests
import pprint
#response = requests.get("https://api.circles.garden/api/users/Martin")
#pprint.pprint(response.content)
martinsavings = "0x052b4793d50d37FD3BFcBf93AAC9Cda6292F81Fa"
martin = "0x42cEDde51198D1773590311E2A340DC06B24cB37"
// SPDX-License-Identifier: CC0
pragma solidity ^0.8.0;
// author @koeppelmann
// Detector Factory allows to deploy new CensorshipDetector
// Each CensorshipDetector monitors wether a specific address is being cencored on Ethereum
// Each CensorshipDetector must be funded with ETH (anyone can send ETH to the CensorshipDetector)
// Once funded anyone can call the "withdrawal" in the "CensorshipDetector" every 1h and it will pay a small bounty to tx.origin (100k * basefee)
// During this transaction the "CensorshipDetector" will send 1 wei to the address that is endangered of being cencored.
// CensorshipDetector will log the coinbase (validator address) (those are NOT censoring) and the number of blocks that has passed.
from web3.auto import w3
from eth_account.messages import encode_defunct
import requests
import json
import pprint
from eip712_structs import make_domain
from eip712_structs import Address, Boolean, Bytes, String, Uint
from eip712_structs import EIP712Struct
import time
from hexbytes import HexBytes
### Keybase proof
I hereby claim:
* I am koeppelmann on github.
* I am koeppelmann (https://keybase.io/koeppelmann) on keybase.
* I have a public key ASBMM6EsbvSa-ANGIeEwVeYuzfv1lW5N0f62LQ5Oq48TIAo
To claim this, I am signing this object:
This is Martin Köppelmann
0x7b2e78d4dfaaba045a167a70da285e30e8fca196
@koeppelmann
koeppelmann / dutchX.sol
Created July 3, 2018 21:10
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.21;
// File: contracts/Oracle/DSAuth.sol
contract DSAuthority {
function canCall(
address src, address dst, bytes4 sig
) public view returns (bool);
}
0x7b2e78d4dfaaba045a167a70da285e30e8fca196