Skip to content

Instantly share code, notes, and snippets.

View HenryNguyen5's full-sized avatar
🎯
Focusing

HenryNguyen5

🎯
Focusing
View GitHub Profile
const JSONPostParser = (parser = null) => ({ result }) =>
parser && typeof parser === 'function' ? parser(result) : result;
const JSONErrorHandler = (handler = null) => e => {
if (handler && typeof handler === 'function') {
return handler(e);
} else {
throw Error(e.message);
}
@HenryNguyen5
HenryNguyen5 / ABIFunction.js
Created September 5, 2017 23:12
ABI Function parser that maps an ABI function to an object that contains call and decode methods, and allows for run-time checking/parsing of given arguments
import abi from 'ethereumjs-abi';
class AbiFunction {
constant;
inputs;
name;
outputs;
payable;
type;
methodInputTypes;
0x5732f471a5408C69E99a49F38Cb4C0Bce0830cE6
import EthApi from './eth-api'
import store from '../store'
import * as actionCreator from '../actions/proj-actions'
import Utils from './api-helpers'
const loadAppState = async () => {
const ethApi = new EthApi()
console.log('Loading and deploying contracts')
await ethApi.loadContracts()
await ethApi.deployContract({
_contract: EthApi.projResolver,
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->