Skip to content

Instantly share code, notes, and snippets.

View srameshr's full-sized avatar

Siddharth Ramesh srameshr

View GitHub Profile
const fs = require("fs");
const solc = require('solc')
let Web3 = require('web3');
let web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var input = {
'strings.sol': fs.readFileSync('strings.sol', 'utf8'),
'StringLib.sol': fs.readFileSync('StringLib.sol', 'utf8'),
@fabdarice
fabdarice / Dispatcher.sol
Created February 7, 2018 07:35
OldContract
pragma solidity ^0.4.4;
/**
* The dispatcher is a minimal 'shim' that dispatches calls to a targeted
* contract. Calls are made using 'delegatecall', meaning all storage and value
* is kept on the dispatcher. As a result, when the target is updated, the new
* contract inherits all the stored data and value from the old contract.
*/
import './Upgradeable.sol';
contract Dispatcher is Upgradeable {