Skip to content

Instantly share code, notes, and snippets.

@franckc
franckc / gist:532698008a1abc26db35b0da0242c58b
Created August 10, 2018 23:56
EventListener failure on newly created listing from DApp
Decoding ABI for log: { logIndex: 0,
transactionIndex: 0,
transactionHash: '0xc2db77da67fba788fe9833e4b3af609935e358f40ce80bb3b87b57330f54abb9',
blockHash: '0x99768f8177e1c73fd9b862ecded3a1755f2551307f828770fc7df37cb5f94a0f',
blockNumber: 40,
address: '0x2a504B5e7eC284ACa5b6f49716611237239F0b97',
data: '0x0a6212e6873788f2f77bbdef103e73da9f74064393df70ce893a823ad3c3f2ff',
topics:
[ '0xec3d306143145322b45d2788d826e3b7b9ad062f16e1ec59a5eaba214f96ee3c',
'0x000000000000000000000000627306090abab3a6e1400e9345bc60c78a8bef57',
@franckc
franckc / gist:d3a16788168f6529c2c36d6fb0e1792f
Created August 13, 2018 05:59
Apollo server prototype
const { ApolloServer, gql } = require('apollo-server');
var elasticsearch = require('elasticsearch');
var client = new elasticsearch.Client( {
hosts: [
'http://192.168.1.44:9200/'
]
});
const { Pool } = require('pg')
{
"schemaVersion": "1.0.0",
"listingId": "000-123-456",
"listingType": "unit",
"category": "ForSale",
"subCategory": "Mushrooms",
"language": "en-US",
"title": "my listing",
"description": "my description",
"expiry": "1996-12-19T16:39:57-08:00",
francks-mbp:deployment franck$ ./deploy.sh -c origin-bridge -n staging
Deployed container tag is 2062a05
Deployed container tag is the same as new deploy tag, appending unix timestamp to tag to force Kubernetes to update deployment
This will build and deploy a container for origin-bridge@2062a05, proceed (y/n)? y
Building container for origin-bridge...
Sending build context to Docker daemon 268.8MB
Step 1/11 : FROM python:3.6
---> d49c41b6e6c4
Step 2/11 : RUN apt-get update
---> Using cache
francks-mbp:deployment franck$ ./deploy.sh -c origin-messaging -n staging
Deployed container tag is c3f2e57
This will build and deploy a container for origin-messaging@fd9e658, proceed (y/n)? y
Building container for origin-messaging...
Sending build context to Docker daemon 268.8MB
Step 1/6 : FROM node:9
---> 08a8c8089ab1
Step 2/6 : ADD https://api.github.com/repos/OriginProtocol/origin-box/git/refs/heads/master /version.json
Downloading 349B
---> a355f91adbdf
francks-mbp:deployment franck$ ./deploy.sh -c origin-dapp -n staging
Deployed container tag is fdb11e5
This will build and deploy a container for origin-dapp@782028c, proceed (y/n)? y
Building container for origin-dapp...
Sending build context to Docker daemon 271.1MB
Step 1/20 : FROM node:9 as origin-js-build
---> 08a8c8089ab1
Step 2/20 : WORKDIR /app
---> Using cache
---> 8bc43674d47c
# francks-mbp:deployment franck$ kubectl describe ingress staging-bridge
Name: staging-bridge
Namespace: staging
Address: 35.233.222.140
Default backend: default-http-backend:80 (10.8.8.29:8080)
TLS:
bridge.staging.originprotocol.com terminates bridge.staging.originprotocol.com
Rules:
Host Path Backends
---- ---- --------
# francks-mbp:deployment franck$ kubectl describe ingress staging-bridge
Name: staging-bridge
Namespace: staging
Address: 35.233.222.140
Default backend: default-http-backend:80 (10.8.8.29:8080)
TLS:
bridge.staging.originprotocol.com terminates bridge.staging.originprotocol.com
Rules:
Host Path Backends
---- ---- --------
Uncaught (in promise) Error: Returned values aren't valid, did it run Out of Gas?
at s.decodeParameters (app.7f507472.js:6371)
at s.decodeLog (app.7f507472.js:6371)
at Object.d._decodeEventABI (app.7f507472.js:6377)
at app.7f507472.js:1345
at Array.map (<anonymous>)
at c.formatOutput (app.7f507472.js:1345)
at a (app.7f507472.js:1345)
at app.7f507472.js:15831
at inpage.js:1
@franckc
franckc / gist:edb81f886b43acb1b88c8056681209ad
Last active September 24, 2018 05:45
EventListener logs
Francks-MBP:deployment franck$ kubectl logs staging-eventlistener-544784d48-fpzbn -c event-listener -f
Running database migrations for discovery
[INFO] No migrations to run
[INFO] Done
Starting event listener
Web3 URL: https://rinkeby.infura.io/emIXjs9eDuy57IlTYsIP
IPFS URL: https://ipfs.staging.originprotocol.com
New block: 3042692
Looking for logs from block 3000001 to 3003000
No new block.