Skip to content

Instantly share code, notes, and snippets.

View evertonfraga's full-sized avatar

Ev evertonfraga

View GitHub Profile
@evertonfraga
evertonfraga / ABI
Last active October 13, 2017 17:22
Exemplo de entrega de projeto
[{"constant":false,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
@evertonfraga
evertonfraga / delegatecall.sol
Last active December 19, 2017 03:01
Prevent library direct code execution
/**
This code snippet aims to show how to prevent library methods from being executed directly.
That's achieved by baking in the address of the library before it's deployed, then comparing `address(this)` against the saved address within a modifier.
A contract/library address is deterministic, so one could inject that in: keccak256(creator_address, nonceValue).
Thanks to @pirapira, @chriseth and @arachnid for the idea.
*/

Keybase proof

I hereby claim:

  • I am evertonfraga on github.
  • I am everton (https://keybase.io/everton) on keybase.
  • I have a public key ASBzaHxoHqlqZvNq_3BvVu-0V1vfCE-NaJixEGSRDQfAJgo

To claim this, I am signing this object:

[
{
"constant": true,
"inputs": [
{
"name": "factIndex",
"type": "uint256"
},
{
"name": "validator",
@evertonfraga
evertonfraga / gist:245addbaa4f9b22197dc78bd45032554
Created May 11, 2018 14:54
UX unconf videos for download.
http://download1041.mediafire.com/hc5zv5fb018g/mipd74z5gai6xtm/Presentation+1+Tom+Creighton.mp4
http://download1632.mediafire.com/el9htaigy5xg/esnd0bbmba5phsv/Presentation+2+Dan+Finlay.mp4
http://download614.mediafire.com/p9rmwl2obirg/gn3lglmmw9ed6r9/Presentation+3+Dan+Ternyak.mp4
http://download1953.mediafire.com/isa189kx5egg/oo2cjibijwnwnpg/Presentation+4+Richard+Burton.mp4
http://download1301.mediafire.com/fsohdx961d9g/0cdtbimsm9fk8hw/Presentation+5+Alex+Van+de+Sande.mp4
http://download31.mediafire.com/v0ha7iwetlag/oa11rxa6a024w4x/Presentation+6+Philippe+Castonguay+and+Panashe+Mahachi.mp4
http://download1511.mediafire.com/6o2r27h50ycg/95n4q9a65tuj4e0/Presentation+7+Viktor+Radchenko.mp4
http://download1608.mediafire.com/t4xf41g7gbbg/5tjpkgg6859f8tc/Presentation+8+Sid+Coelho-Prabhu.mp4
http://download1085.mediafire.com/ye4vakh4leqg/xtmbjv5atxgxkdc/Presentation+9+Andy+Tudhope.mp4
http://download1424.mediafire.com/nauwtoxyu1tg/8ubrlfjsl3zzt59/Presentation+10+Beltran+Berrocal.mp4
@evertonfraga
evertonfraga / 0.11.0 release candidate.md
Last active June 22, 2018 20:41
Mist browser and Ethereum Wallet 0.11.0-rc
File Checksum (SHA256)
Ethereum-Wallet-installer-0-11-0-rc.exe f5431a32a419fdd51a379a02806a0d1cf9fa6a80213661aba2e4713731010615
Ethereum-Wallet-linux32-0-11-0-rc.deb 161f69d2546999363c64b1c85f938469a37afc51719ed48d4f4b02f33fd0206e
Ethereum-Wallet-linux32-0-11-0-rc.zip 9da6da638b3cb851df78fbe5bf65229147e5a43555463da65ef3a31f7cf93034
Ethereum-Wallet-linux64-0-11-0-rc.deb dd32ee3c36e4dc2ef04a118b4a6a3402097d722947b09fac9f8914672df39642
[Ethereum-Wallet-linux64-0-11-0-rc.zip](http://ethereum-mist.s3.amazonaws.com/mist/0.11.
@evertonfraga
evertonfraga / convert-genesis.md
Created November 8, 2019 22:10
genesis balance formats

1. exporting fresh genesis.json for mainnet and ropsten with balances in hex

This PR adds dumpgenesis capability to geth: ethereum/go-ethereum#20191

git clone git@github.com:etclabscore/ethereum.go-ethereum.git etc-geth
cd etc-geth
git checkout etclabscore:feat/cmd-dumpgenesis
make geth

./build/geth dumpgenesis > genesis-mainnet.json
#!/bin/sh
#
# It wraps the provided JSON file and adds some metadata to it (source, commit, date).
# Based on these instructions: https://github.com/ethereumjs/ethereumjs-block/issues/55
#
# Usage:
# ./wrap-ethereum-test.sh "https://raw.githubusercontent.com/ethereum/tests/eea4bfbeec5524b2e2c0ff84c8a350fcb3edec23/BasicTests/difficultyEIP2384.json"
# The url must contain the commit hash and should point to a raw JSON file
#
@evertonfraga
evertonfraga / test tree.md
Last active December 6, 2019 13:37
test tree
graph TD
  vm("vm (11)")
  tx("tx (9)")
  bl("block (9)")
  bc("blockchain (5)")
  co("common (4)")
  ac("account (5)")
  
 tx --> bl
#!/bin/bash
# Saving current directory
CWD=`pwd`
ALL_REPOS="account block blockchain tx vm"
# initialize/clean tmp file
echo "" > all-tags.txt