Skip to content

Instantly share code, notes, and snippets.

View main.go
package main
import (
ToJen / Bakery.sol
Last active Aug 31, 2018
Example factory contract
View Bakery.sol
pragma solidity ^0.4.9;
contract Cookie {
bool public hasChocolate;
function Cookie(bool _hasChocolate) public {
hasChocolate = _hasChocolate;
View pingland_json_stuff
function mapToJson(map) {
return JSON.stringify([]);
function jsonToMap(jsonStr) {
return new Map(JSON.parse(jsonStr));
// map to JSON
ToJen / Escrow-Smart-Contract
Last active May 8, 2018 — forked from bitgord/Escrow-Smart-Contract
Example of an escrow smart contract
View Escrow-Smart-Contract
// package.json
"dependencies": {
"web3": "0.20.0",
"solc": "^0.4.19"
//Create file Ecrow.sol and create 3 variables: a buyer, a seller, and an arbiter
contract Escrow {
ToJen /
Created Nov 15, 2017
How to view Truffle/TestRPC accounts on MetaMask

If you want to access the accounts on MetaMask, you will need to do the following:

  • Log out of MetaMask: click on the hamburger menu and select Lock
  • Select Restore from seed phrase
  • Paste the mnemonic that was created when you ran truffle develop
  • Create a new password and confirm

Source: How can I import the accounts from truffle develop into MetaMask?