Skip to content

Commit

Permalink
Merge pull request #15 from vegaprotocol/feature/pyth-stuff
Browse files Browse the repository at this point in the history
feat: Add oracle + improvements
  • Loading branch information
jeremyletang authored Jun 25, 2024
2 parents 7e1e290 + bb45b70 commit 89d129d
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 0 deletions.
28 changes: 28 additions & 0 deletions __generated__/oracle-proofs.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name = "Pyth Oracle"
type = "PYTH"
url ="https://pyth.network"
description_markdown = """
# The Pyth oracles contract
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name = "Pyth scaled rebased prices oracle"
type = "PYTH"
url =" https://github.com/vegaprotocol/pyth-rebase-contract"
description_markdown = """
# Pyth scaled rebased prices oracle
A simple contract providing scaled prices from the pyth on chain oracles quoted in USDT
"""

[oracle]
source_chain = "gnosis"
source_chain_id = "100"
type = "eth_address"
eth_address= "0x2BA6654FdB605637994047ecA217a02E224c4828"
status = "GOOD"
status_reason = ""
first_verified = 2024-06-25T00:00:00Z
last_verified = 2024-06-25T00:00:00Z

[[proofs]]
type = "web"
format = "url"
url = "https://gnosisscan.io/address/0x2BA6654FdB605637994047ecA217a02E224c4828#code"
available = true
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name = "Pyth rebased prices oracle"
type = "PYTH"
url =" https://github.com/vegaprotocol/pyth-rebase-contract"
description_markdown = """
# Pyth rebased prices oracle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name = "Uniswap price sources"
type = "UNISWAP"
url ="https://github.com/jeremyletang/uniswap_price_source"
description_markdown = """
# Uniswap price source
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name = "Coinbase Oracle"
type = "COINBASE"
url ="https://coinbase.com"
description_markdown = """
# Coinbase Oracle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name = "Vega Admin Oracle for Testnet"
type = "UNKNOWN"
url ="https://fairground.wtf"
description_markdown = """
The Vega Fairground admin oracle, uses a json file to settle based on Binance Spot price.
Expand Down
8 changes: 8 additions & 0 deletions scripts/process-oracle-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ const STATUS = z.enum([
"COMPROMISED",
]);

const PROVIDER_TYPE = z.enum([
"UNKNOWN",
"PYTH",
"COINBASE",
"UNISWAP",
]);

const BASE_PROOF_SCHEMA = z.object({
format: z.enum(["url", "signed_message"]),
available: z.boolean(),
Expand Down Expand Up @@ -69,6 +76,7 @@ const ORACLE_SCHEMA = z.discriminatedUnion("type", [

const PROVIDER_SCHEMA = z.object({
name: z.string().min(1),
type: PROVIDER_TYPE,
url: z.string().url(),
description_markdown: z.string(),
oracle: ORACLE_SCHEMA,
Expand Down

0 comments on commit 89d129d

Please sign in to comment.