Skip to content

Commit

Permalink
Merge branch 'dockerify' into onchain_pooler
Browse files Browse the repository at this point in the history
  • Loading branch information
xadahiya committed May 31, 2023
2 parents 1a02a02 + da7f16d commit 1452c16
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 83 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ uniswapTokenData
**/*projects.json
**/*aggregator.json
**/*settings.json
**/*.backup
78 changes: 56 additions & 22 deletions config/aggregator.example.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"config": [
{
"config": [{
"project_type": "aggregate_uniswap_pairContract_24h_trade_volume",
"aggregate_on": "SingleProject",
"filters": {
Expand All @@ -23,53 +22,88 @@
}
},
{
"project_type": "aggregate_uniswap_24h_top_pairs",
"project_type": "aggregate_uniswap_24h_top_pairs_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_24h_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod"
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_pairs_24h",
"class_name": "AggreagateTopPairsProcessor"
}
},
{
"project_type": "aggregate_uniswap_7d_top_pairs",
"project_type": "aggregate_uniswap_24h_top_tokens_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_7d_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod"
"aggregate_uniswap_pairContract_24h_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_pairs_7d",
"class_name": "AggreagateTopPairsProcessor"
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_tokens",
"class_name": "AggreagateTopTokensProcessor"
}
},
{
"project_type": "aggregate_uniswap_24h_top_tokens",
"project_type": "aggregate_uniswap_7d_top_pairs_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod"
"aggregate_uniswap_pairContract_7d_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_7d_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_tokens",
"class_name": "AggreagateTopTokensProcessor"
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_top_pairs_7d",
"class_name": "AggreagateTopPairsProcessor"
}
},
{
"project_type": "aggregate_uniswap_24h_stats",
"project_type": "aggregate_uniswap_24h_stats_lite",
"aggregate_on": "MultiProject",
"projects_to_wait_for": [
"aggregate_uniswap_pairContract_24h_trade_volume:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x3041cbd36888becc7bbcbc0045e3b1f144466f5f:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xd3d2e2692501a5c9ca623199d38826e513033a17:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xbb2b8038a1640196fbe3e38816f3e67cba72d940:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod",
"aggregate_uniswap_pairContract_24h_trade_volume:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod",
"uniswap_pairContract_pair_total_reserves:0x11181bd3baf5ce2a478e98361985d42625de35d1:UNISWAPV2-ph15-prod"
"uniswap_pairContract_pair_total_reserves:0xa478c2975ab1ea89e8196811f51a7b7ade33eb11:UNISWAPV2-ph15-prod"
],
"processor": {
"module": "pooler.modules.uniswapv2.aggregate.multi_uniswap_stats",
Expand Down
30 changes: 2 additions & 28 deletions config/projects.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,12 @@
"project_type": "uniswap_pairContract_pair_total_reserves",
"projects":[
"0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
"0x21b8065d10f73ee2e260e5b47d3344d3ced7596e",
"0x9928e4046d7c6513326ccea028cd3e7a91c7590a",
"0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5",
"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
"0xe1573b9d29e2183b1af0e743dc2754979a40d237",
"0xccb63225a7b19dcf66717e4d40c9a72b39331d61",
"0x61b62c5d56ccd158a38367ef2f539668a06356ab",
"0x3041cbd36888becc7bbcbc0045e3b1f144466f5f",
"0x9c4fe5ffd9a9fc5678cfbd93aa2d4fd684b67c4c",
"0xd3d2e2692501a5c9ca623199d38826e513033a17",
"0x149148acc3b06b8cc73af3a10e84189243a35925",
"0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
"0x11181bd3baf5ce2a478e98361985d42625de35d1",
"0x7b73644935b8e68019ac6356c40661e1bc315860",
"0x0af81cd5d9c124b4859d65697a4cd10ee223746a",
"0x252b9a9ad1e85d9eff8a3e4782491f87e7109e3a",
"0x470e8de2ebaef52014a47cb5e6af86884947f08c",
"0x582e3da39948c6339433008703211ad2c13eb2ac"
"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11"
],
"processor":{
"module": "pooler.modules.uniswapv2.pair_total_reserves",
Expand All @@ -32,25 +19,12 @@
"project_type": "uniswap_pairContract_trade_volume",
"projects":[
"0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc",
"0x21b8065d10f73ee2e260e5b47d3344d3ced7596e",
"0x9928e4046d7c6513326ccea028cd3e7a91c7590a",
"0xae461ca67b15dc8dc81ce7615e0320da1a9ab8d5",
"0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
"0xe1573b9d29e2183b1af0e743dc2754979a40d237",
"0xccb63225a7b19dcf66717e4d40c9a72b39331d61",
"0x61b62c5d56ccd158a38367ef2f539668a06356ab",
"0x3041cbd36888becc7bbcbc0045e3b1f144466f5f",
"0x9c4fe5ffd9a9fc5678cfbd93aa2d4fd684b67c4c",
"0xd3d2e2692501a5c9ca623199d38826e513033a17",
"0x149148acc3b06b8cc73af3a10e84189243a35925",
"0xbb2b8038a1640196fbe3e38816f3e67cba72d940",
"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11",
"0x11181bd3baf5ce2a478e98361985d42625de35d1",
"0x7b73644935b8e68019ac6356c40661e1bc315860",
"0x0af81cd5d9c124b4859d65697a4cd10ee223746a",
"0x252b9a9ad1e85d9eff8a3e4782491f87e7109e3a",
"0x470e8de2ebaef52014a47cb5e6af86884947f08c",
"0x582e3da39948c6339433008703211ad2c13eb2ac"
"0xa478c2975ab1ea89e8196811f51a7b7ade33eb11"
],
"processor":{
"module": "pooler.modules.uniswapv2.trade_volume",
Expand Down
26 changes: 13 additions & 13 deletions config/settings.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
}
},
"reporting": {
"slack_url": "",
"service_url": "http://reporting-service:9030/reportIssue"
"slack_url": "https://slack-reporting-url",
"service_url": "https://powerloom-reporting-url"
},
"redis": {
"host": "redis",
Expand All @@ -77,28 +77,28 @@
"pair_contract_abi": "pooler/static/abis/UniswapV2Pair.json",
"protocol_state": {
"abi": "pooler/static/abis/ProtocolContract.json",
"address": "0x568355e16e1bf2fE3CcFe155B987f1D603188028"
"address": "protocol-state-contract"
},
"callback_worker_config": {
"num_snapshot_workers": 8,
"num_aggregation_workers": 16
},
"ipfs": {
"url": "/dns/ipfs/tcp/5001",
"url": "ipfs-writer-url",
"url_auth": {
"apiKey": "",
"apiSecret": ""
"apiKey": "ipfs-writer-key",
"apiSecret": "ipfs-writer-secret"
},
"reader_url": "/dns/ipfs/tcp/5001",
"reader_url": "ipfs-reader-url",
"reader_url_auth": {
"apiKey": "",
"apiSecret": ""
"apiKey": "ipfs-reader-key",
"apiSecret": "ipfs-reader-secret"
},
"write_rate_limit": {
"req_per_sec": 10,
"burst": 10
},
"timeout": 20,
"timeout": 60,
"local_cache_path": "/home/ubuntu/local_cache/",
"connection_limits":{
"max_connections": 100,
Expand All @@ -107,13 +107,13 @@
}
},
"web3storage":{
"upload_snapshots": true,
"upload_snapshots": false,
"upload_aggregates": true
},
"anchor_chain_rpc": {
"full_nodes": [{
"url": "https://rpc-url",
"rate_limit": "10000000/day;2000/minute;100/second"
"url": "https://prost-rpc-url",
"rate_limit": "100000000/day;18000/minute;300/second"
}],
"retry": 5,
"request_time_out": 5,
Expand Down
11 changes: 8 additions & 3 deletions pooler/utils/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
logger = logger.bind(module='data_helper')


async def retry_state_callback(retry_state: tenacity.RetryCallState):
def retry_state_callback(retry_state: tenacity.RetryCallState):
logger.warning(f'Encountered IPFS cat exception: {retry_state.outcome.exception()}')


Expand Down Expand Up @@ -149,7 +149,7 @@ async def get_submission_data(redis_conn: aioredis.Redis, cid, ipfs_reader, proj
try:
submission_data = await fetch_file_from_ipfs(ipfs_reader, cid)
except:
logger.error('Error while fetching data from IPFS | Project {} | CID {}', project_id, cid)
logger.error('Error while fetching data from IPFS | Project {} | CID {}', project_id, cid)
submission_data = dict()
else:
# Cache it
Expand All @@ -158,7 +158,12 @@ async def get_submission_data(redis_conn: aioredis.Redis, cid, ipfs_reader, proj
return submission_data


async def get_sumbmission_data_bulk(redis_conn: aioredis.Redis, cids: List[str], ipfs_reader, project_ids: List[str]) -> List[dict]:
async def get_sumbmission_data_bulk(
redis_conn: aioredis.Redis,
cids: List[str],
ipfs_reader,
project_ids: List[str],
) -> List[dict]:
batch_size = 10
all_snapshot_data = []
for i in range(0, len(cids), batch_size):
Expand Down
85 changes: 68 additions & 17 deletions snapshotter_autofill.sh
Original file line number Diff line number Diff line change
@@ -1,46 +1,97 @@
#!/bin/bash

#This script is run from high level docker-compose. Refer to https://github.com/PowerLoom/deploy

# TODO: Update this script according to new settings.json changes
set -e

echo 'populating setting from environment values...';

if [ -z "$RPC_URL" ]; then
if [ -z "$SOURCE_RPC_URL" ]; then
echo "RPC URL not found, please set this in your .env!";
exit 1;
fi

if [ -z "$UUID" ]; then
echo "UUID not found, please set this in your .env!";
if [ -z "$SIGNER_ACCOUNT_ADDRESS" ]; then
echo "SIGNER_ACCOUNT_ADDRESS not found, please set this in your .env!";
exit 1;
fi

echo "Got RPC URL: ${RPC_URL}"
echo "Found SOURCE RPC URL ${SOURCE_RPC_URL}";

echo "Found SIGNER ACCOUNT ADDRESS ${SIGNER_ACCOUNT_ADDRESS}";

if [ "$PROST_RPC_URL" ]; then
echo "Found PROST_RPC_URL ${PROST_RPC_URL}";
fi

if [ "$IPFS_URL" ]; then
echo "Found IPFS_URL ${IPFS_URL}";
fi

if [ "$PROTOCOL_STATE_CONTRACT" ]; then
echo "Found PROTOCOL_STATE_CONTRACT ${PROTOCOL_STATE_CONTRACT}";
fi

if [ "$SLACK_REPORTING_URL" ]; then
echo "Found SLACK_REPORTING_URL ${SLACK_REPORTING_URL}";
fi

echo "Got UUID: ${UUID}"
if [ "$POWERLOOM_REPORTING_URL" ]; then
echo "Found SLACK_REPORTING_URL ${POWERLOOM_REPORTING_URL}";
fi

echo "Got CONSENSUS_URL: ${CONSENSUS_URL}"

cp config/projects.example.json config/projects.json
cp config/aggregator.example.json config/aggregator.json
cp config/auth_settings.example.json config/auth_settings.json
cp config/settings.example.json config/settings.json

export namespace=UNISWAPV2-ph15-prod
export consensus_url="${CONSENSUS_URL:-https://offchain-consensus-api.powerloom.io}"
export prost_rpc_url="${PROST_RPC_URL:-https://rpc-prost1b.powerloom.io}"

export ipfs_url="${IPFS_URL:-/dns/ipfs/tcp/5001}"
export ipfs_api_key="${IPFS_API_KEY:-}"
export ipfs_api_secret="${IPFS_API_SECRET:-}"

export protocol_state_contract="${PROTOCOL_STATE_CONTRACT:-0xb71EAc336ffd776BAe4b1F861E58FaF13aB7c34B}"
export slack_reporting_url="${SLACK_REPORTING_URL:-}"
export powerloom_reporting_url="${POWERLOOM_REPORTING_URL:-}"



# If IPFS_URL is empty, clear IPFS API key and secret
if [ -z "$IPFS_URL" ]; then
ipfs_api_key=""
ipfs_api_secret=""
fi

echo "Using Namespace: ${namespace}"
echo "Using CONSENSUS_URL: ${consensus_url}"
echo "Using Prost RPC URL: ${prost_rpc_url}"
echo "Using IPFS URL: ${ipfs_url}"
echo "Using IPFS API KEY: ${ipfs_api_key}"
echo "Using protocol state contract: ${protocol_state_contract}"
echo "Using slack reporting url: ${slack_reporting_url}"
echo "Using powerloom reporting url: ${powerloom_reporting_url}"

sed -i "s|relevant-namespace|$namespace|" config/settings.json
sed -i'.backup' "s#relevant-namespace#$namespace#" config/settings.json

sed -i "s|https://rpc-url|$RPC_URL|" config/settings.json
sed -i'.backup' "s#account-address#$SIGNER_ACCOUNT_ADDRESS#" config/settings.json

sed -i "s|generated-uuid|$UUID|" config/settings.json
sed -i'.backup' "s#https://rpc-url#$SOURCE_RPC_URL#" config/settings.json

sed -i "s|https://consensus-url|$consensus_url|" config/settings.json
sed -i'.backup' "s#https://prost-rpc-url#$prost_rpc_url#" config/settings.json

cp config/auth_settings.example.json config/auth_settings.json
sed -i'.backup' "s#ipfs-writer-url#$ipfs_url#" config/settings.json
sed -i'.backup' "s#ipfs-writer-key#$ipfs_api_key#" config/settings.json
sed -i'.backup' "s#ipfs-writer-secret#$ipfs_api_secret#" config/settings.json

cp config/projects.example.json config/projects.json
cp config/aggregator.example.json config/aggregator.json
sed -i'.backup' "s#ipfs-reader-url#$ipfs_url#" config/settings.json
sed -i'.backup' "s#ipfs-reader-key#$ipfs_api_key#" config/settings.json
sed -i'.backup' "s#ipfs-reader-secret#$ipfs_api_secret#" config/settings.json

sed -i'.backup' "s#protocol-state-contract#$protocol_state_contract#" config/settings.json

sed -i'.backup' "s#https://slack-reporting-url#$slack_reporting_url#" config/settings.json

sed -i'.backup' "s#https://powerloom-reporting-url#$powerloom_reporting_url#" config/settings.json

echo 'settings has been populated!'

0 comments on commit 1452c16

Please sign in to comment.