Skip to content

Commit

Permalink
feat: update slinky oracle contract to connect v2
Browse files Browse the repository at this point in the history
  • Loading branch information
tansawit committed Oct 16, 2024
1 parent 8915f78 commit 507f2d4
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 262 deletions.
52 changes: 52 additions & 0 deletions abis/ConnectOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[
{ "type": "constructor", "inputs": [], "stateMutability": "nonpayable" },
{
"type": "function",
"name": "get_all_currency_pairs",
"inputs": [],
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "get_price",
"inputs": [{ "name": "pair_id", "type": "string", "internalType": "string" }],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct ConnectOracle.Price",
"components": [
{ "name": "price", "type": "uint256", "internalType": "uint256" },
{ "name": "timestamp", "type": "uint256", "internalType": "uint256" },
{ "name": "height", "type": "uint64", "internalType": "uint64" },
{ "name": "nonce", "type": "uint64", "internalType": "uint64" },
{ "name": "decimal", "type": "uint64", "internalType": "uint64" },
{ "name": "id", "type": "uint64", "internalType": "uint64" }
]
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "get_prices",
"inputs": [{ "name": "pair_ids", "type": "string[]", "internalType": "string[]" }],
"outputs": [
{
"name": "",
"type": "tuple[]",
"internalType": "struct ConnectOracle.Price[]",
"components": [
{ "name": "price", "type": "uint256", "internalType": "uint256" },
{ "name": "timestamp", "type": "uint256", "internalType": "uint256" },
{ "name": "height", "type": "uint64", "internalType": "uint64" },
{ "name": "nonce", "type": "uint64", "internalType": "uint64" },
{ "name": "decimal", "type": "uint64", "internalType": "uint64" },
{ "name": "id", "type": "uint64", "internalType": "uint64" }
]
}
],
"stateMutability": "nonpayable"
}
]
54 changes: 54 additions & 0 deletions abis/IConnectOracle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
[
{
"type": "function",
"name": "get_all_currency_pairs",
"inputs": [],
"outputs": [{ "name": "", "type": "string", "internalType": "string" }],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "get_price",
"inputs": [
{ "name": "base", "type": "string", "internalType": "string" },
{ "name": "quote", "type": "string", "internalType": "string" }
],
"outputs": [
{
"name": "",
"type": "tuple",
"internalType": "struct ConnectOracle.Price",
"components": [
{ "name": "price", "type": "uint256", "internalType": "uint256" },
{ "name": "timestamp", "type": "uint256", "internalType": "uint256" },
{ "name": "height", "type": "uint64", "internalType": "uint64" },
{ "name": "nonce", "type": "uint64", "internalType": "uint64" },
{ "name": "decimal", "type": "uint64", "internalType": "uint64" },
{ "name": "id", "type": "uint64", "internalType": "uint64" }
]
}
],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "get_prices",
"inputs": [{ "name": "pair_ids", "type": "string[]", "internalType": "string[]" }],
"outputs": [
{
"name": "",
"type": "tuple[]",
"internalType": "struct ConnectOracle.Price[]",
"components": [
{ "name": "price", "type": "uint256", "internalType": "uint256" },
{ "name": "timestamp", "type": "uint256", "internalType": "uint256" },
{ "name": "height", "type": "uint64", "internalType": "uint64" },
{ "name": "nonce", "type": "uint64", "internalType": "uint64" },
{ "name": "decimal", "type": "uint64", "internalType": "uint64" },
{ "name": "id", "type": "uint64", "internalType": "uint64" }
]
}
],
"stateMutability": "nonpayable"
}
]
122 changes: 0 additions & 122 deletions abis/ISlinky.abi.json

This file was deleted.

127 changes: 0 additions & 127 deletions abis/Slinky.abi.json

This file was deleted.

Loading

0 comments on commit 507f2d4

Please sign in to comment.