Skip to content

Instantly share code, notes, and snippets.

View pcowgill's full-sized avatar

Paul Cowgill pcowgill

View GitHub Profile
@nenadjaja
nenadjaja / ipfs.js
Created August 9, 2021 15:43
IPFS helpers
import base from 'base-x'
const ipfsClient = require('ipfs-http-client')
const ENDPOINT = new URL('api/v0', 'http://ipfs.network.thegraph.com/').href
const ipfs = new ipfsClient(ENDPOINT)
// convert ipfsHash to Hex string
export const ipfsHexHash = (ipfsHash: string) => {
const base58 = base('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz')
// 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

Script

import os
from subprocess import call

def main():
    extensions = ('.sol')
    for subdir, dirs, files in os.walk("."):
        for file in files:
 ext = os.path.splitext(file)[-1].lower()
@asselstine
asselstine / config.yml
Created August 24, 2018 22:05
Run Truffle Tests on CircleCI 2.0
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
#
version: 2
jobs:
build:
docker:
# specify the version you desire here