Skip to content

Instantly share code, notes, and snippets.

View theethernaut's full-sized avatar

Alejandro Santander theethernaut

View GitHub Profile
{
"public_identifier": "johnrmarty",
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/johnrmarty/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230807%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230807T011526Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=2966fb9cd36c8e26a3fef8efc442e524b969c2a7868d019cce513b7517dbb668",
"background_cover_image_url": null,
"first_name": "John",
"last_name": "Marty",
"full_name": "John Marty",
"follower_count": null,
"occupation": "Co-Founder at FF Real Estate",
"headline": "LinkedIn Top Voice",
@theethernaut
theethernaut / create_dao.sh
Last active November 27, 2019 22:10
Aragon app installers using EVM scripts, bundling multiple arbitrary transactions into a single vote. Note: Requires that you use the #encode-commands branch of aragon-cli.
#!/bin/bash
set -x
set -e
lastWordAtLine() {
tail -$1 | head -1 | grep -oE '[^ ]+$'
}
# Identify main account
@theethernaut
theethernaut / Hasher.sol
Created September 5, 2019 20:48
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.5.11+commit.c082d0b4.js&optimize=false&gist=
/*
* SPDX-License-Identitifer: MIT
*/
pragma solidity ^0.4.24;
contract APMNamehash {
string pm = "aragonpm";
@theethernaut
theethernaut / Hasher.sol
Created September 5, 2019 15:51
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.5.11+commit.c082d0b4.js&optimize=false&gist=
/*
* SPDX-License-Identitifer: MIT
*/
pragma solidity ^0.4.24;
contract APMNamehash {
/* Hardcoded constants to save gas
bytes32 internal constant APM_NODE = keccak256(abi.encodePacked(ETH_TLD_NODE, keccak256(abi.encodePacked("aragonpm"))));
@theethernaut
theethernaut / LotsaValues.sol
Created August 7, 2019 13:37
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.0;
contract Configuration {
uint256 public val1 = 1;
uint256 public val2 = 2;
uint256 public val3 = 3;
uint256 public val4 = 4;
uint256 public val5 = 5;
uint256 public val6 = 6;
uint256 public val7 = 7;

Keybase proof

I hereby claim:

  • I am ajsantander on github.
  • I am ajsantander (https://keybase.io/ajsantander) on keybase.
  • I have a public key whose fingerprint is A6E1 E886 5788 3183 598C A02B D50A 71EE 4A4C AF5F

To claim this, I am signing this object:

@theethernaut
theethernaut / BadError.sol
Created April 16, 2019 21:11
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.5.0+commit.1d4f565a.js&optimize=false&gist=
pragma solidity ^0.5.0;
contract BadError {
function test() public payable {
require(address(this).balance < msg.value + 1);
msg.sender.transfer(msg.value + 1);
}
}
@theethernaut
theethernaut / Loopy.sol
Created April 10, 2019 11:37
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.0;
contract Loopy {
// 7750 gas
// 5732 gas (optimized)
function loop_1() public pure returns (uint acum) {
for(uint i = 0; i < 100; i++) {
acum++;
}
@theethernaut
theethernaut / Changeling.sol
Created April 4, 2019 01:35
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.7;
import "./ImplementationProvider.sol";
contract Changeling {
constructor(address implementationProvider) public {
// Request the current implementation address from the provider.
address implementation = ImplementationProvider(implementationProvider).getImplementation();
@theethernaut
theethernaut / Changeling.sol
Last active April 10, 2019 18:59
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.5.1+commit.c8a2cb62.js&optimize=false&gist=
pragma solidity ^0.5.7;
import "./ImplementationProvider.sol";
contract Changeling {
constructor(address implementationProvider) public {
// Request the current implementation address from the provider.
address implementation = ImplementationProvider(implementationProvider).implementation();