Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add oracle + improvements #15

Merged
merged 3 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading