diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d5c4ae3..2ab04ec 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,24 +17,24 @@ jobs: name: Linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.0 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + - uses: pre-commit/action@v3.0.1 test: name: Testing runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: 3.10.10 # Install poetry - name: Load cached Poetry installation - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.local key: poetry-0 @@ -58,7 +58,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -78,7 +78,7 @@ jobs: username: _json_key password: ${{ secrets.GAR_JSON_KEY }} - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: ${{ github.event_name != 'pull_request' }} diff --git a/oracle/keeper/utils.py b/oracle/keeper/utils.py index 68ca4e9..93af359 100644 --- a/oracle/keeper/utils.py +++ b/oracle/keeper/utils.py @@ -243,7 +243,7 @@ def submit_update(web3_client: Web3, function_call: ContractFunction) -> None: raise e logger.exception(e) if i < ATTEMPTS_WITH_DEFAULT_GAS - 1: # skip last sleep - time.sleep(NETWORK_CONFIG.SECONDS_PER_BLOCK) + time.sleep(NETWORK_CONFIG["SECONDS_PER_BLOCK"]) else: tx_params = get_high_priority_tx_params(web3_client) tx_hash = function_call.transact(tx_params) diff --git a/oracle/networks.py b/oracle/networks.py index 17153dc..041478c 100644 --- a/oracle/networks.py +++ b/oracle/networks.py @@ -75,6 +75,7 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=False, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), HARBOUR_MAINNET: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -135,6 +136,7 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=False, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), GOERLI: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -192,6 +194,7 @@ SYNC_PERIOD=timedelta(hours=1), IS_POA=True, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), HARBOUR_GOERLI: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -252,6 +255,7 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=True, DEPOSIT_TOKEN_SYMBOL="ETH", + SECONDS_PER_BLOCK=12, ), GNOSIS_CHAIN: dict( STAKEWISE_SUBGRAPH_URLS=config( @@ -311,5 +315,6 @@ SYNC_PERIOD=timedelta(days=1), IS_POA=True, DEPOSIT_TOKEN_SYMBOL="GNO", + SECONDS_PER_BLOCK=5, ), } diff --git a/pyproject.toml b/pyproject.toml index 2cd5d48..f34452d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oracle" -version = "3.4.0" +version = "3.5.1" description = "StakeWise Oracles are responsible for submitting off-chain data." authors = ["Dmitri Tsumak "] license = "AGPL-3.0-only"