-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This file is for reference only, each oracle provider should make their own | ||
# Documentation on what variables can be configured can be found here: https://github.com/celo-org/celo-oracle/blob/main/README-config.md | ||
|
||
MID_AGGREGATION_MAX_EXCHANGE_VOLUME_SHARE=1 | ||
MID_AGGREGATION_MAX_PERCENTAGE_DEVIATION=0.05 | ||
MID_AGGREGATION_MAX_PERCENTAGE_BID_ASK_SPREAD=0.025 | ||
|
||
METRICS=true | ||
PROMETHEUS_PORT=9090 | ||
|
||
API_REQUEST_TIMEOUT=5000 | ||
CIRCUIT_BREAKER_PRICE_CHANGE_THRESHOLD=0.25 | ||
MINIMUM_PRICE_SOURCES=2 | ||
REPORT_STRATEGY=BLOCK_BASED | ||
MIN_REPORT_PRICE_CHANGE_THRESHOLD=0.005 | ||
|
||
# Replace with your RPC | ||
HTTP_RPC_PROVIDER_URL= | ||
# Replace with your RPC WS | ||
WS_RPC_PROVIDER_URL= | ||
|
||
|
||
# Replace with your address (at least your using private key) | ||
ADDRESS= | ||
|
||
DEVMODE=true | ||
OVERRIDE_INDEX=1 | ||
OVERRIDE_ORACLE_COUNT=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle" | ||
|
||
PACKAGE_NAME=$(grep name package.json | awk -F \" '{print $4}') | ||
PACKAGE_VERSION=$(grep version package.json | awk -F \" '{print $4}') | ||
COMMIT_HASH=$(git log -1 --pretty=%h) | ||
|
||
VERSION="$PACKAGE_NAME-$PACKAGE_VERSION" | ||
|
||
echo "Building version $VERSION" | ||
|
||
docker buildx build --platform linux/amd64 -t $PACKAGE_NAME . | ||
|
||
echo "Taggimg image" | ||
docker tag $PACKAGE_NAME $REPOSITORY/$PACKAGE_NAME:$PACKAGE_VERSION | ||
docker tag $PACKAGE_NAME $REPOSITORY/$PACKAGE_NAME:$COMMIT_HASH | ||
|
||
echo "Pushing" | ||
|
||
# Pushing requires a one time set-up: | ||
# gcloud auth configure-docker \ | ||
# us-west1-docker.pkg.dev | ||
|
||
docker push $REPOSITORY/$PACKAGE_NAME:$PACKAGE_VERSION | ||
docker push $REPOSITORY/$PACKAGE_NAME:$COMMIT_HASH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters