Skip to content

Instantly share code, notes, and snippets.

reader.readAsDataURL(input.files[0]);
var formData = new FormData();
formData.append('file', input.files[0]);
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://ipfs.infura.io:5001/api/v0/add');
xhr.onreadystatechange = function() {
if (xhr.readyState == XMLHttpRequest.DONE) {
alert(xhr.responseText);
var resp = JSON.parse(xhr.responseText)
ipfsHash = resp['Hash'];
@rollodex
rollodex / SimulatedKyber.sol
Created October 18, 2019 05:38 — forked from JayWelsh/SimulatedKyber.sol
SimulatedKyber.sol
pragma solidity 0.5.7;
pragma experimental ABIEncoderV2;
import { IERC20 } from "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import { SafeMath } from "openzeppelin-solidity/contracts/math/SafeMath.sol";
contract SimulatedKyber {
using SafeMath for uint256;
IERC20 public dai;

Keybase proof

I hereby claim:

  • I am rollodex on github.
  • I am themichaelc3 (https://keybase.io/themichaelc3) on keybase.
  • I have a public key ASBIyWpDSDXLEFsUxwXDsRBZHmIRDDwSkeZTHuuFZROHCgo

To claim this, I am signing this object: