Skip to content

Instantly share code, notes, and snippets.

View ianmonkuk's full-sized avatar

Ian Monk ianmonkuk

View GitHub Profile
<html>
<head>
<script type="text/javascript" src="bower_components/web3/dist/web3.min.js"></script>
<script type="text/javascript">
function testETH(){
console.log('starting...');
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://localhost:8545"));
<html>
<head>
<script type="text/javascript" src="bower_components/web3/dist/web3.min.js"></script>
<script type="text/javascript">
function testETH(){
console.log('starting...');
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://localhost:8545"));
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*",
from: "0xda9b1a939350dc7198165ff84c43ce77a723ef73"
}
}
};
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function (global){
var ethJSABI = require("ethjs-abi");
var BlockchainUtils = require("truffle-blockchain-utils");
var Web3 = require("web3");
// For browserified version. If browserify gave us an empty version,
// look for the one provided by the user.
if (typeof Web3 == "object" && Object.keys(Web3).length == 0) {
Web3 = global.Web3;
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="./bower_components/web3/dist/web3.min.js"></script>
<script type="text/javascript" src="./bower_components/jquery/dist/jquery.js"></script>
<script>
window.onload = function() {
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="./bower_components/web3/dist/web3.min.js"></script>
<script type="text/javascript" src="./bower_components/jquery/dist/jquery.js"></script>
<script>
window.onload = function() {
if (typeof web3 !== 'undefined') {
web3 = new Web3(web3.currentProvider);
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="./bower_components/web3/dist/web3.min.js"></script>
<script type="text/javascript" src="./bower_components/jquery/dist/jquery.js"></script>
<script type="text/javascript" src="./javascript/truffle-contract/dist/truffle-contract.js"></script>
<script>
window.onload = function() {
if (typeof web3 !== 'undefined') {
var DefaultBuilder = require("truffle-default-builder");
module.exports = {
build: new DefaultBuilder({
"index.html": "index.html",
"app.js": [
"javascripts/app.js"
],
"app.css": [
"stylesheets/app.css"
<!doctype html>
<html lang="en">
<head>
<script type="text/javascript" src="./app.js"></script>
<script>
window.onload = function() {
console.log( "Account" + web3.eth.accounts[2] );
pragma solidity ^0.4.4;
import "./ConvertLib.sol";
contract MetaCoin {
mapping (address => uint) balances;
address originAddress;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
function MetaCoin() {
balances[tx.origin] = 10000;