Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomisin Jenrola ToJen

View GitHub Profile
View collapse.md
View main.go
package main
import (
"fmt"
"io"
"os"
"time"
"context"
@ToJen
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([...map]);
}
function jsonToMap(jsonStr) {
return new Map(JSON.parse(jsonStr));
}
// map to JSON
@ToJen
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
ToJen / LoadTestnetAccountsOnMetaMask.md
Created Nov 15, 2017
How to view Truffle/TestRPC accounts on MetaMask
View LoadTestnetAccountsOnMetaMask.md

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?

You can’t perform that action at this time.