Skip to content

Instantly share code, notes, and snippets.

@EdsonAlcala
Created April 7, 2018 07:38
Show Gist options
  • Save EdsonAlcala/0dc177a921a0d788343291c7d7225e10 to your computer and use it in GitHub Desktop.
Save EdsonAlcala/0dc177a921a0d788343291c7d7225e10 to your computer and use it in GitHub Desktop.
import { Connect, SimpleSigner } from 'uport-connect'
import OrganizationContract from '../build/Organization.json';
//modify according to you information from uPort
export const uport = new Connect('dapp-workshop', {
clientId: '2onBp3mzTkqL6yYScbJdAj1BmyNXarWX5sT',
network: 'rinkeby',
signer: SimpleSigner('f8ee568811f011ba93b5cd7105dbdd25d9de2d34ace72ffd6c909ea79a4ff2e2')
});
export const web3 = uport.getWeb3()
const Contract = require('truffle-contract');
const organization = Contract(OrganizationContract);
organization.setProvider(web3.currentProvider);
//this will be the address of the contract you deployed
const CONTRACT_ADDRESS = "0x68931f7b876e20dfbce5389b658046852395ad75";
export const contract = organization.at(CONTRACT_ADDRESS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment