Skip to content

Instantly share code, notes, and snippets.

Fight for freedom

Jorge Izquierdo izqui

Fight for freedom
View GitHub Profile
izqui / HiddenCalldataProxy.sol
Created Aug 16, 2021
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
View HiddenCalldataProxy.sol
pragma solidity >= 0.8.7;
// HiddenCalldataProxy reads the version that identifies the implementation contract from 4 bytes at the
// end of the calldata
contract HiddenCalldataProxy {
mapping (uint32 => address) public implementationForVersion;
constructor() {
// set up a couple of dummy test target contracts that have a function that acts slightly differently
// depending on its constructor param
View burn-and-prosope.sol
import "./ERC20.sol";
interface ApproveAndCallReceiver {
function receiveApproval(address _from, uint256 _amount, address _token, bytes memory _data) public;
contract BurnAndPropose is ApproveAndCallReceiver {
ERC20 constant public ANT = ERC20(0x960b236A07cf122663c4303350609A66A7B288C0);
address public voting;
uint256 public burn;
izqui / ActorApp.sol
Last active Jul 27, 2018
Prototype of Aragon app that can be used for interacting with other protocols and external contracts. 🚨Unaudited and experimental code, do not deploy to production!
View ActorApp.sol
pragma solidity 0.4.18;
import "./Vault.sol";
contract Actor is Vault {
bytes32 constant public PERFORM_ACTION_ROLE = keccak256("PERFORM_ACTION_ROLE");
bytes32 constant public RETURN_TO_PARENT_ROLE = keccak256("RETURN_TO_PARENT_ROLE");
bytes4 constant internal ERC20_TRANSFER_SIG = 0xa9059cbb; // bytes4(keccak256("transfer(address,uint256)"))
izqui / account-proxy.sol
Last active Jun 17, 2018
Quick spike to demonstrate a generic account proxy pattern and a specific implementation for cold/hot wallets. Not reviewed, use it at your own risk.
View account-proxy.sol
contract AccountProxy {
event Fwded(address indexed to, uint256 value, bytes calldata, bool succeeded);
// must be implemented by super contract
function canFwd(address who, address to, uint256 value, bytes calldata) public view returns (bool);
function () payable {} // allow to deposit eth
function fwd(address to, uint256 value, bytes calldata) external {
require(canFwd(msg.sender, to, value, calldata));
View gist:bd3afb85f2b97c5d7f150cc873bad432
Hash: SHA256
izqui / forwarder.sol
Last active Aug 30, 2021
Very cheap to deploy (66k gas) forwarder contracts that can clone any contract and still have their own storage
View forwarder.sol
// Bytecode origin
// Modified version of Vitalik's
// Credits to Jordi Baylina for this way of deploying contracts
// Forwarder is slightly modified to only return 256 bytes (8 normal returns)
// Deployed Factory in Kovan:
// Example of a Forwarder deploy using the Factory:
// Just 66349 gas per contract
izqui /
Last active May 3, 2018
Senior Solidity/EVM/Ethereum opening at Aragon

Senior Solidity/EVM/Ethereum opening at Aragon

We are looking for an Ethereum wizard to work with us on Aragon Core and the future Aragon Network.


  • Fulltime commitment. Side projects and open source are accepted (and encouraged).
  • Completely remote position, no relocation required.
  • Very competitive and negotiable compensation.
  • You decide how to allocate your salary in USD, ETH or ANT. Rates will be revisited every 6 months.
View fix_test.js
it('fixes', () => {
.then(c => {
contract = c
return contract.broken()
.then(broken => {
assert.equal(broken, true)
return contract.executeCode(Fixer.binary)
View gist:527649e48ba3b6a087470f09db267376
contract Fixer is BrokenContract {
function execute(address fixer) {
broken = false;
View broken.sol
contract BrokenContract is Fixeable {
function BrokenContract() {
broken = true;
creator = msg.sender;
function canExecuteArbitraryCode() returns (bool) {
return broken && msg.sender == creator;