Skip to content

Commit

Permalink
⬆️ 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EvolveArt committed Sep 12, 2023
1 parent 844117d commit 0a2b670
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 117 deletions.
3 changes: 1 addition & 2 deletions empiric-package/empiric/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
NonceMixin,
OracleMixin,
PublisherRegistryMixin,
RandomnessMixin,
TransactionMixin,
)
from starknet_py.net.account.account import Account
Expand All @@ -17,7 +16,7 @@
logger = logging.getLogger(__name__)

class EmpiricClient(
NonceMixin, OracleMixin, PublisherRegistryMixin, RandomnessMixin, TransactionMixin
NonceMixin, OracleMixin, PublisherRegistryMixin, TransactionMixin
):
is_user_client: bool = False
account_contract_address: Optional[int] = None
Expand Down
1 change: 0 additions & 1 deletion empiric-package/empiric/core/mixins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from empiric.core.mixins.nonce import NonceMixin
from empiric.core.mixins.oracle import OracleMixin
from empiric.core.mixins.publisher_registry import PublisherRegistryMixin
from empiric.core.mixins.randomness import RandomnessMixin
from empiric.core.mixins.transactions import TransactionMixin
99 changes: 0 additions & 99 deletions empiric-package/empiric/core/mixins/randomness.py

This file was deleted.

16 changes: 8 additions & 8 deletions empiric-package/empiric/publisher/fetchers/gecko.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
import requests
from aiohttp import ClientSession

from pragma.core.assets import PragmaAsset, PragmaSpotAsset
from pragma.core.entry import SpotEntry
from pragma.core.utils import currency_pair_to_pair_id
from pragma.publisher.types import PublisherFetchError, PublisherInterfaceT
from empiric.core.entry import SpotEntry
from empiric.core.utils import currency_pair_to_pair_id
from empiric.publisher.assets import EmpiricAsset, EmpiricSpotAsset
from empiric.publisher.types import PublisherFetchError, PublisherInterfaceT

logger = logging.getLogger(__name__)

Expand All @@ -36,12 +36,12 @@ class GeckoTerminalFetcher(PublisherInterfaceT):

publisher: str

def __init__(self, assets: List[PragmaAsset], publisher):
def __init__(self, assets: List[EmpiricAsset], publisher):
self.assets = assets
self.publisher = publisher

async def _fetch_pair(
self, asset: PragmaSpotAsset, session: ClientSession
self, asset: EmpiricSpotAsset, session: ClientSession
) -> SpotEntry:
pair = asset["pair"]
pool = ASSET_MAPPING.get(pair[0])
Expand All @@ -68,7 +68,7 @@ async def _fetch_pair(
)
return self._construct(asset, result)

def _fetch_pair_sync(self, asset: PragmaSpotAsset) -> SpotEntry:
def _fetch_pair_sync(self, asset: EmpiricSpotAsset) -> SpotEntry:
pair = asset["pair"]
pool = ASSET_MAPPING.get(pair[0])
if pool is None:
Expand Down Expand Up @@ -131,5 +131,5 @@ def _construct(self, asset, result) -> SpotEntry:
timestamp=timestamp,
source=self.SOURCE,
publisher=self.publisher,
volume=volume,
volume=int(volume),
)
2 changes: 1 addition & 1 deletion empiric-package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ profile = "black"

[tool.poetry]
name = "empiric-network"
version = "1.8.0"
version = "1.8.1"
authors = ["Pragma <[email protected]>"]
description = "Core package for rollup-native Pragma Oracle"
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pragma"
version = "1.8.0"
version = "1.8.1"
description = "Pragma, the leading Oracle on zkRollups."
authors = ["0xevolve <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion stagecoach/jobs/publishers/starknet-publisher/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN yum install -y gcc python-devel gmp-devel git

RUN python -m pip install --upgrade pip

RUN pip install empiric-network==1.6.6 typeguard==2.13.3
RUN pip install empiric-network==1.8.1 typeguard==2.13.3

COPY app.py ${LAMBDA_TASK_ROOT}

Expand Down
10 changes: 6 additions & 4 deletions stagecoach/jobs/publishers/starknet-publisher/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
CoinbaseFetcher,
AscendexFetcher,
KaikoFetcher,
DefillamaFetcher
DefillamaFetcher,
GeckoTerminalFetcher
)
from empiric.publisher.future_fetchers import (BinanceFutureFetcher, OkxFutureFetcher, ByBitFutureFetcher)

Expand Down Expand Up @@ -53,8 +54,8 @@ def _get_pvt_key():


async def _handler(assets):
# publisher_private_key = _get_pvt_key()
publisher_private_key = os.environ["PUBLISHER_PRIVATE_KEY"]
publisher_private_key = _get_pvt_key()
# publisher_private_key = int(os.environ["PUBLISHER_PRIVATE_KEY"], 0)

publisher_client = EmpiricPublisherClient(
network=NETWORK,
Expand All @@ -73,7 +74,8 @@ async def _handler(assets):
DefillamaFetcher,
BinanceFutureFetcher,
OkxFutureFetcher,
ByBitFutureFetcher
ByBitFutureFetcher,
GeckoTerminalFetcher
)
]
)
Expand Down

0 comments on commit 0a2b670

Please sign in to comment.