Skip to content

Instantly share code, notes, and snippets.

View thebalaa's full-sized avatar
❤️
Making self-hosting accessible to grandmothers everywhere.

Mo Balaa thebalaa

❤️
Making self-hosting accessible to grandmothers everywhere.
  • Founder @ Fractal Networks
  • United States
  • X @fractal_mo
View GitHub Profile
pragma solidity ^0.4.4;
contract suVerify {
mapping(uint256 => address) credentials;
function addCredential(uint256 hash, address owner){
credentials[hash] = owner;
}
# create an account and unlock it
web3.personal.newAccount('password')
web3.personal.unlockAccount(web3.eth.accounts[0], 'password')
# load bytcode and abi from local file
bytecode = open('provenanve.bytcode', 'r').read()
abi = open('provenanve.abi', 'r').read()
# instantiate and deploy contract
contract = web3.eth.contract(abi, bytecode=bytecode)
pragma solidity ^0.4.9;
contract MultiPartyContract {
// a multi-party document `authenticity` scheme where by
// the 3 hard-coded owners are certifying the authenticity of a single document
address constant owner1 = 0x0;
address constant owner2 = 0x0;
address constant owner3 = 0x0;
<?xml version="1.0"?>
<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" Destination="http://sso.tcg.stanford.edu:8000/saml2/acs/" ID="_75a3585f0231334484eff2e628b13540" InResponseTo="id-yUrmWoOcV0nTihY12" IssueInstant="2017-04-06T00:17:31.700Z" Version="2.0">
<saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://idp.stanford.edu/</saml2:Issuer>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">\n<ds:SignedInfo>\n<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\n<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>\n<ds:Reference URI="#_75a3585f0231334484eff2e628b13540">\n<ds:Transforms>\n<ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>\n<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>\n</ds:Transforms>\n<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>\n<ds:DigestValue>t/3RKZeFUbhR920bRKutbaXSnco=</ds:DigestValue>\n</ds:Reference>\n
[
{
"model": "client_api.account",
"pk": 1,
"fields": {
"address": "0x60d6df9517f0ed6d03a38beb4898b508c3af176e",
"role": "",
"user": 1,
"name": "",
"description": "",
elbalaa$ npm run setup
> react-boilerplate@3.4.0 presetup /Users/elbalaa/src/frontend-react
> npm i chalk shelljs
react-boilerplate@3.4.0 /Users/elbalaa/src/frontend-react
├─┬ chalk@1.1.3
│ ├── ansi-styles@2.2.1
│ ├── escape-string-regexp@1.0.5
│ ├─┬ has-ansi@2.0.0
{"account":"0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae","accountType":1,"balance":"748997604382925139479303","nonce":1,"firstTime":1439048640,"numNormalTxns":355,"numInternalTxns":92,"totalReceived":"11907196749482925141369303","totalSent":"11158199145100000001890000","totalFee":"0","createdBy":"0x5abfec25f74cd88437631a7731906932776356f9","createdIn":"0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4","txns":[{"blockNumber":54092,"timeStamp":1439048640,"hash":"0x9c81f44c29ff0226f835cd0a8a2f2a7eca6db52a711f8211b566fd15d3e0e8d4","nonce":"0x0","blockHash":"0xd3cabad6adab0b52eb632c386ea194036805713682c62cb589b5abcd76de2159","transactionIndex":0,"from":"0x5abfec25f74cd88437631a7731906932776356f9","to":null,"value":"11901464239480000000000000","gas":2000000,"gasPrice":10000000000000,"gasUsed":1436963,"input":"0x6060604052600760018181557305096a47749d8bfab0a90c1bb7a95115dbe4cea6600355737c56d94ebeccb769524379c450873519a9d805ff600490815573cda0ad7542e30bf520652a05056ebe0105c7e49a60055573775e18be7a50a0ab
leth_sil_localnet | /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go:804 +0x277
leth_sil_localnet | created by github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb.openDB
leth_sil_localnet | /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/vendor/github.com/syndtr/goleveldb/leveldb/db.go:149 +0x627
leth_sil_localnet |
leth_sil_localnet | goroutine 116 [select]:
leth_sil_localnet | github.com/ethereum/go-ethereum/eth/downloader.(*Downloader).qosTuner(0xc42030a000)
leth_sil_localnet | /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:1584 +0x33e
leth_sil_localnet | created by github.com/ethereum/go-ethereum/eth/downloader.New
leth_sil_localnet | /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/downloader/downloader.go:231 +0x45c
leth_sil_localnet |
leth_sil_localnet | INFO [09-21|07:05:29.000] Successfully sealed new block number=1819 hash=e99479…9c4be2
leth_sil_localnet | fatal error: concurrent map iteration and map write
leth_sil_localnet |
leth_sil_localnet | goroutine 3154792 [running]:
leth_sil_localnet | runtime.throw(0xf59684, 0x26)
leth_sil_localnet | /usr/local/go/src/runtime/panic.go:616 +0x81 fp=0xc42d9ebf38 sp=0xc42d9ebf18 pc=0x43f8b1
leth_sil_localnet | runtime.mapiternext(0xc42d9ec2c0)
leth_sil_localnet | /usr/local/go/src/runtime/hashmap.go:747 +0x55c fp=0xc42d9ebfc8 sp=0xc42d9ebf38 pc=0x41d56c
leth_sil_localnet | github.com/ethereum/go-ethereum/core/state.(*StateDB).Copy(0xc4218f8a80, 0x0)
leth_sil_localnet | /go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/core/state/statedb.go:486 +0x53a fp=0xc42d9ec390 sp=0xc42d9ebfc8 pc=0x70b66a
info:
version: 0.2.0
title: Spring Labs Relay Provider
description: APIs to interact with Relay Providers
termsOfService: https://springlabs.com/terms/
contact:
name: Spring
email: apiteam@springlabs.com
url: https://springlabs.com
swagger: "2.0"