Skip to content

Instantly share code, notes, and snippets.

@nenadjaja
nenadjaja / Graph node logs
Created August 1, 2019 16:35
Local node logs
$ cargo run -p graph-node --release -- \  5  09:29:11 
--postgres-url postgresql://nevena@localhost:5432/graph-node \
--ethereum-rpc mainnet:https://mainnet.infura.io/ \
--ipfs 127.0.0.1:5001 \
--debug
Finished release [optimized] target(s) in 1.41s
Running `target/release/graph-node --postgres-url 'postgresql://nevena@localhost:5432/graph-node' --ethereum-rpc 'mainnet:https://mainnet.infura.io/' --ipfs '127.0.0.1:5001' --debug`
Aug 01 09:31:03.462 INFO Graph Node version: 0.14.0 :: v0.5.0+798 (397ffff3d 2019-07-30) dirty 33 modifications
Aug 01 09:31:03.464 DEBG Setting up Sentry
Aug 01 09:31:03.466 INFO Starting up
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:muport:Qmckjnwkfh64YnVJT3Yo18yYhyVmJPspRe1fATNCdf6jgg ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@nenadjaja
nenadjaja / everest-script.js
Created March 17, 2020 02:58
everest script
const fs = require('fs')
const path = require('path')
const execa = require('execa')
const projectId = '0x3da18463aac062323bcef2d408c2724da3868da1'
const filename = path.join(__dirname, 'public/project', 'index.html')
const newDir = path.join(__dirname, `public/project/${projectId}`)
const newFilename = path.join(
__dirname,
{
"data": {
"communitySubgraphs": {
"subgraphs": [
{
"id": "197",
"name": "augur-v2-kovan",
"displayName": "Augur V2 Kovan",
"image": "https://storage.googleapis.com/subgraph-images/default/sg-5.png",
"draft": true,
export default [
{
name: 'ariel',
fullName: 'Ariel Barmat',
role: 'Smart Contracts Lead',
},
{
name: 'brandon',
fullName: 'Brandon Ramirez',
role: 'Research & Product Lead',
@nenadjaja
nenadjaja / Broken images and displayNames
Last active April 30, 2021 18:37
Indexer allocations that are linking to empty images and displayNames on the Subgraph entity
[
{
displayName: "Opyn Gamma Mainnet",
image: "https://ipfs.network.thegraph.com/api/v0/cat?arg=QmQB3FSVSiYx9XoUjSeprzi35tYhPvMG6zS4NnFRfLcyM6
},
{
displayName: "mStable Protocol",
image: "https://ipfs.network.thegraph.com/api/v0/cat?arg=Qmd3ewU7FgzxfxKpE3Fp1BDkPgw4WeqnjQSrvzw66Fca7L"
},
{
import { Contract, BigNumber } from 'ethers'
import { tokensToNSignal, tokensToSignal } from '@graphprotocol/common-ts'
import { bigNumberify } from '../services/ethers'
import { Subgraph, SubgraphDeployment, Network } from '../utils/types'
const E18_100K = bigNumberify('100000000000000000000000')
export const checkAllowance = async (
contractGraphToken: Contract,
contractToCheckAddress: string,
@nenadjaja
nenadjaja / GNS ABI
Created July 15, 2021 18:45
gns abi file
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "graphAccount",
"type": "address"
},
// Ethereum account of the subgraph owner
const ethereumAccount = 0xbeb123....
// you need to upload the version metadata object to IPFS
const versionData = {
label: "v0.0.1",
description: "can be empty"
}
// IPFS Qm hash of the file with version metadata
// Ethereum account of the subgraph owner
const ethereumAccount = 0xbeb123....
// Network subgraph number - you get it from the id
// if subgraphId is this: 0x87d11bd744b882b7bc5a6b5450cba8c35d90eb10-1
// the networkSubgraphNumber will be the number after the dash, so here number 1
const networkSubgraphNumber = subgraph.id.split('-')[1],
// you need to upload the version metadata object to IPFS
const versionData = {