Skip to content

Instantly share code, notes, and snippets.

const signerData = {
currency : 'ETH',
paymentAddress : PAYMENT_ADDRESS,
expectedAmount : '10000000000000000000',
data: { description: 'request-signer signed request' },
}
export async function signRequest() {
// you need get the necessary information to sign
// pass in your API_KEY to be able to sign requests
<script type="module">
import SimplePayment from "https://unpkg.com/payment-components@0.1.0/dist/payment-components.esm.production.js";
async function checkout() {
const response = await fetch("/pay", { method: "POST" });
const data = await response.json();
return { signedRequestData: data };
}
document.addEventListener("DOMContentLoaded", function() {
pragma solidity ^0.4.17;
contract AssetFactory {
event NewAsset(string name);
struct Asset {
string name;
}
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*",
}
}
};
@benjaminshafii
benjaminshafii / index.js
Last active March 14, 2018 14:54
create-react-app with drizzle
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import registerServiceWorker from "./registerServiceWorker";
// A json dump of our abi
import AssetFactory from "./AssetFactory.json"
// A way to provide to set the state of Drizzle to the rest of our app