Skip to content

Instantly share code, notes, and snippets.

@jennijuju
jennijuju / dealstate_etl.bash
Created February 9, 2022 02:39 — forked from ribasushi/dealstate_etl.bash
Simple Filecoin StorageMarkets ETL
#!/bin/bash
set -eu
set -o pipefail
# derive API_INFO from implied defaults if necessary
LOTUS_PATH="${LOTUS_PATH:-$HOME/.lotus}"
LOTUS_CFG_MADDR="$( cat $LOTUS_PATH/api 2>/dev/null || true )"
FULLNODE_API_INFO="${FULLNODE_API_INFO:-${LOTUS_CFG_MADDR:-/ip4/127.0.0.1/tcp/1234/http}}"