Skip to content

Instantly share code, notes, and snippets.

View 3esmit's full-sized avatar

Ricardo Guilherme Schmidt 3esmit

View GitHub Profile
pragma solidity ^0.4.0;
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";
contract GitHubAPITest is usingOraclize {
string public computationResult;
event newOraclizeQuery(string description);
event newResult(string result);
0:00:00.00 [GitHubOracle] 2017-05-21 05:31:14.673256
0:00:00.00 [GitHubOracle] Started 'start ethereans/TheEtherian,develop
0:00:00.00 [GitHubOracle] Using Secret Mode
0:00:00.69 [GitHubOracle] API calls remaining: 4987
0:00:09.60 [GitHubOracle] Rule loaded user-agent: *
0:00:09.60 [GitHubOracle] Rule loaded reward-mode: words
0:00:09.60 [GitHubOracle] Loaded branch develop
0:00:10.28 [GitHubOracle] Loading from 39e20742756dca5c0cde0ab81f2280bb00761c78.
0:00:13.33 [GitHubOracle] page 1 contains 100 commits.
0:00:14.07 [GitHubOracle] 39e20742756dca5c0cde0ab81f2280bb00761c78: 3esmit +5
@3esmit
3esmit / MultiChannel.sol
Last active August 30, 2018 07:15
Example of a ethereum Off chain Multi channel Token Bank ERC23 ERC20 ERC223 MiniMe
import "./TokenBank.sol";
pragma solidity ^0.4.9;
/**
* @title MultiChannel
* @author Ricardo Guilherme Schmidt <3esmit>
* MultiChannel is a ERC20 and ETH bank that allows multiple offchain transactions.
**/
contract MultiChannel is TokenBank {
# This config should be placed in following path:
# %AppData%\Parity\Ethereum\config.toml
[parity]
# Parity syncs initially, then sleeps and wakes regularly to resync
mode = "passive"
# Auto-updates only to consensus/security updates.
auto_update = "critical"
[footprint]
@3esmit
3esmit / Cloner.sol
Last active August 11, 2017 02:54 — forked from holiman/Cloner.sol
A generic 'cloner' contract which clones other contract instances
pragma solidity ^0.4.4;
contract X{
uint myVar;
string junk;
function X(uint i){
myVar = i;
}
pragma solidity ^0.4.15;
import "./DelegatedCall.sol";
//import "./LibraryReg.sol";
/**
* @title MultiSigStub
* Contract that delegates calls to a library to build a full MultiSigWallet that is cheap to create.
*/
pragma solidity ^0.4.11;
import "../token/MiniMeToken.sol";
/**
* @title DelegationProxy
* @author Ricardo Guilherme Schmidt (Status Research & Development GmbH)
* Create a delegation proxy to MiniMeTokens that store checkpoints from all changes and parent proxy to fall back in case of no delegation at this level.
*/
contract DelegationProxy {
const DelegationProxy = artifacts.require("DelegationProxy.sol")
const MiniMeTokenFactory = artifacts.require("MiniMeTokenFactory.sol")
const MiniMeToken = artifacts.require("MiniMeToken.sol")
const TestUtils = require("./TestUtils.js")
/**
*
0x0000a5f7a9669e0db02a4294bf289e009710705d,0x000e3c6b3464fde97576340146675e1842fcb2f9,0x003063d3ab7b2b90654ce4041cca2b15fa8d2f65,0x003f93dafb3338dd7aaade51d595f63195a7f51f,0x004e21f0fb982434cfe8b4e96a71f73278319708,0x005bab06189b79583a9aa152fb17b9f072ace79a,0x006a3edf9855bb26bec23b52a158ba0ac14aaafa,0x0078ffa5da34554b5eec74ddad291466a26b0f11,0x00a329c0648769a73afac7f9381e08fb43dbea72,0x00c9c5cb7096de7262b09202867cacdb5fb2793c,0x00ce5d959c1a0501bf9caaf98ac2d6d9d3c00cd1,0x00d994ef966d2f3c2459acb968a344ef1dcd2629
*/
@3esmit
3esmit / ERC725.sol
Last active June 29, 2020 04:24
Ethereum ERC725 ERC735 ERC745
pragma solidity ^0.4.15;
contract ERC725 {
uint256 constant MANAGEMENT_KEY = 1;
uint256 constant ACTION_KEY = 2;
uint256 constant CLAIM_SIGNER_KEY = 3;
uint256 constant ENCRYPTION_KEY = 4;
event KeyAdded(address indexed key, uint256 indexed keyType);
@3esmit
3esmit / MultiSig.sol
Last active February 14, 2018 21:53
MultiSigPreSigned.sol
pragma solidity ^0.4.17;
/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.
/// @author Stefan George - <stefan.george@consensys.net> & Ricardo Guilherme Schmidt <ricardo3@status.im>
contract MultiSig {
uint constant public MAX_OWNER_COUNT = 50;
event Confirmation(address indexed sender, uint indexed transactionId);