Skip to content

Instantly share code, notes, and snippets.

View masonforest's full-sized avatar

Mason Fischer masonforest

View GitHub Profile
0xe7410170f87102df0055eb195163a03b7f2bff4a
var MetaCoin = artifacts.require("./MetaCoin.sol");
contract('MetaCoin', function(accounts) {
it("should put 10000 MetaCoin in the first account", function() {
return MetaCoin.deployed().then(function(instance) {
return instance.getBalance.call(accounts[0]);
}).then(function(balance) {
assert.equal(balance.valueOf(), 10000, "10000 wasn't in the first account");
});
});
import React from 'react';
import { Provider } from 'react-redux';
import ContactsContainer from './ContactsContainer';
import ContactsComponent from 'components/Contacts';
import { mountWithIntl } from 'helpers/intl-enzyme-test-helper';
import configureStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import { FULL_SCREEN_MODAL_ACTION_OPEN } from 'modules/FullScreenModal';
import { CONTACT_MODAL } from 'modules/ContactModal';
import { SCHEDULE_MODAL } from 'modules/ScheduleModal';
import { connect } from 'react-redux';
import Contacts from 'components/Contacts';
import { openFullScreenModal } from 'modules/FullScreenModal';
import { SCHEDULE_MODAL } from 'modules/ScheduleModal';
import { CONTACT_MODAL } from 'modules/ContactModal';
import { START_CALL_MODAL, VIDEO_CALL, AUDIO_CALL } from 'modules/StartCallModal';
import {
actions,
CONTACTS_FILTER_OPTION_AVAILABLE,
CONTACTS_FILTER_OPTION_MY_CONTACTS
// <ORACLIZE_API>
/*
Copyright (c) 2015-2016 Oraclize srl, Thomas Bertani
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
contract Token {
/* This is a slight change to the ERC20 base standard.
function totalSupply() constant returns (uint256 supply);
is replaced with:
uint256 public totalSupply;
This automatically creates a getter function for the totalSupply.
This is moved to the base contract since public getter functions are not
currently recognised as an implementation of the matching abstract
function by the compiler.
*/
@masonforest
masonforest / build.sh
Created August 21, 2016 17:39
go-ethereum#2926 bug report
abigen --sol token.sol --pkg main --out token.go && go run main.go token.go
# ./test.go:121: too many arguments in call to bind.NewBoundContract
@masonforest
masonforest / run.js
Created February 10, 2015 22:59
Node-github add team membership example
var GitHubApi = require("github");
var teamId = "<your user id>";
var token = "<your token>";
var username = "<username>";
var github = new GitHubApi({version: "3.0.0"});
github.authenticate({
type: "oauth",
token: token
});
thrthrt
blah