Skip to content

Commit

Permalink
Update oracle (#55)
Browse files Browse the repository at this point in the history
* bump action versions

* bump deps

* add new oracle contracts

* retrieve oracle data from youves contract

replaces coinbase oracle which has been deprecated

* bump api version
  • Loading branch information
skenaja authored Dec 11, 2024
1 parent d6e6927 commit b0cb231
Show file tree
Hide file tree
Showing 12 changed files with 1,770 additions and 300 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v2
uses: actions/cache@v3
id: node-cache
with:
path: node_modules
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: '16'
scope: '@hover-labs'
registry-url: 'https://registry.npmjs.org'

- name: Retrieve the cached "node_modules" directory (if present)
uses: actions/cache@v2
uses: actions/cache@v3
id: node-cache
with:
path: node_modules
Expand Down
6 changes: 4 additions & 2 deletions __tests__/harbinger-client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ import BigNumber from 'bignumber.js'
* Tests for Harbinger client.
*
* These tests are not hermetic.
*
* Using the new mainnet Youves Oracle contract's view as contract not deployed to sandbox.
*/

const NODE_URL = 'https://sandbox.hover.engineering'
const NODE_URL = 'https://mainnet.smartpy.io'

// Allow extra time for RPCs
jest.setTimeout(30_000) // 30 seconds

// Client under test
const harbingerClient = new HarbingerClient(NODE_URL, CONTRACTS.SANDBOX.HARBINGER_NORMALIZER!)
const harbingerClient = new HarbingerClient(NODE_URL, CONTRACTS.MAIN.YOUVES_PROXY!, CONTRACTS.MAIN.OVEN_PROXY!)

test('harbinger client - gets date', async function () {
// GIVEN a Harbinger Client
Expand Down
Loading

0 comments on commit b0cb231

Please sign in to comment.