Skip to content

Instantly share code, notes, and snippets.

View ianmonkuk's full-sized avatar

Ian Monk ianmonkuk

View GitHub Profile
pragma solidity ^0.4.8;
contract Underlying {
string public name;
string public symbol;
address public owner;
string public category;
struct KPILink {
address KPI;
<!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] );
MetaCoin.deployed().then(function(instance) {
return instance.getBalance.call(web3.eth.accounts[2]);
<!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') {
web3 = new Web3(web3.currentProvider);
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;
<!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] );
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="./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') {
<!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);
(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;