Skip to content

Instantly share code, notes, and snippets.

View Sowmayjain's full-sized avatar
🎯
Focusing

Sowmay Jain Sowmayjain

🎯
Focusing
View GitHub Profile
@Sowmayjain
Sowmayjain / ProxyRegistry.sol
Created March 8, 2019 21:02
Proxy Registry used in MakerDAO Protocol.
// proxy.sol - execute actions atomically through the proxy's identity
// Copyright (C) 2017 DappHub, LLC
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
@Sowmayjain
Sowmayjain / kyberTrade.js
Created November 14, 2018 09:28
Kyber Network Web3 Calls (created to fixed errors in the gist: https://gist.github.com/RohanKapurDEV/5fc4dc3cd73e54268b0f5895be58228a)
var Tx = require('ethereumjs-tx');
var Web3 = require('web3');
var web3 = new Web3('https://ropsten.infura.io');
const PRIVATE_KEY = Buffer.from('257C463ADDD55B757CCF109E4D7A3CC0E47F04D8EE591C4F7432C7501AC4C875', 'hex');
const srcTokenAddress = '0x4BFBa4a8F28755Cb2061c413459EE562c6B9c51b'; // OMG Token Address
const srcTokenABI = [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"",
[
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "proposals",
@Sowmayjain
Sowmayjain / BlockEther ABI
Last active May 1, 2018 05:59
ABI JSON file of BlockEther
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "previousOwner",
"type": "address"
},
{
[
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "proposals",
[
{
"constant": false,
"inputs": [
{
"name": "tokenAddress",
"type": "address"
},
{
"name": "amount",
[
{
"constant": false,
"inputs": [
{
"name": "tokenAddress",
"type": "address"
},
{
"name": "amount",
@Sowmayjain
Sowmayjain / index.css
Created February 22, 2018 10:13
Dapp css file
body {
background-color:#F0F0F0;
padding: 2em;
font-family: 'Raleway','Source Sans Pro', 'Arial';
}
.container {
width: 50%;
margin: 0 auto;
}
label {
@Sowmayjain
Sowmayjain / index.html
Created February 22, 2018 10:12
Dapp HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>MTC Dapp</title>
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
@Sowmayjain
Sowmayjain / MoatBoard ABI
Created February 21, 2018 18:47
Smart Contract ABI of MoatBoard
[
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "proposals",