updated ids.json
This commit is contained in:
parent
d607e9becf
commit
85e77fae8a
|
@ -38,13 +38,13 @@
|
||||||
},
|
},
|
||||||
"mango_program_id": "AHKufSeSqvjehJcW1uTy1RKhV4BafbpQxVGXGHn7G3hX",
|
"mango_program_id": "AHKufSeSqvjehJcW1uTy1RKhV4BafbpQxVGXGHn7G3hX",
|
||||||
"oracles": {
|
"oracles": {
|
||||||
"BTC/USDC": "WZsNe3EBSwg1kRccs7M86DYBeSzYzwrkVtEp8iVb6RJ",
|
|
||||||
"ETH/USDC": "DBiZZ6riT6QVoGVBMBnSsYFwkie1GAxWdac3NCpyrDR1"
|
|
||||||
},
|
|
||||||
"spot_markets": {
|
|
||||||
"BTC/USDC": "3iQqi9nBREjVvKtVWd44Jcbvs39CDAe6zSd613QzxuPE",
|
"BTC/USDC": "3iQqi9nBREjVvKtVWd44Jcbvs39CDAe6zSd613QzxuPE",
|
||||||
"ETH/USDC": "5qxMJFJXB42j3kKo3FbTughREjziottXHcgLnjCNwjEs"
|
"ETH/USDC": "5qxMJFJXB42j3kKo3FbTughREjziottXHcgLnjCNwjEs"
|
||||||
},
|
},
|
||||||
|
"spot_markets": {
|
||||||
|
"BTC/USDC": "DY6X83vWk5VdHQEtVxFdecmEsGXHyLskkeQeo8BHn75s",
|
||||||
|
"ETH/USDC": "CQwr1dHHPeoUpzGcQHLtEYE1LdXkszxha8oG6Y7v5KWZ"
|
||||||
|
},
|
||||||
"symbols": {
|
"symbols": {
|
||||||
"BTC": "C6kYXcaRUMqeBF5fhg165RWU7AnpT9z92fvKNoMqjmz6",
|
"BTC": "C6kYXcaRUMqeBF5fhg165RWU7AnpT9z92fvKNoMqjmz6",
|
||||||
"ETH": "8p968u9m7jZzKSsqxFDqki69MjqdFkwPM9FN4AN8hvHR",
|
"ETH": "8p968u9m7jZzKSsqxFDqki69MjqdFkwPM9FN4AN8hvHR",
|
||||||
|
|
30
src/index.ts
30
src/index.ts
|
@ -13,21 +13,21 @@ import { Aggregator } from './schema';
|
||||||
export { IDS }
|
export { IDS }
|
||||||
|
|
||||||
|
|
||||||
async function testSolink() {
|
// async function testSolink() {
|
||||||
const cluster = "devnet";
|
// const cluster = "devnet";
|
||||||
const client = new MangoClient();
|
// const client = new MangoClient();
|
||||||
const clusterIds = IDS[cluster]
|
// const clusterIds = IDS[cluster]
|
||||||
|
//
|
||||||
const connection = new Connection(IDS.cluster_urls[cluster], 'singleGossip')
|
// const connection = new Connection(IDS.cluster_urls[cluster], 'singleGossip')
|
||||||
const mangoGroupPk = new PublicKey(clusterIds.mango_groups.BTC_ETH_USDC.mango_group_pk);
|
// const mangoGroupPk = new PublicKey(clusterIds.mango_groups.BTC_ETH_USDC.mango_group_pk);
|
||||||
const mangoProgramId = new PublicKey(clusterIds.mango_program_id);
|
// const mangoProgramId = new PublicKey(clusterIds.mango_program_id);
|
||||||
const oraclePk = new PublicKey(IDS.devnet.spot_markets['BTC/USDC'])
|
// const oraclePk = new PublicKey(IDS.devnet.oracles['BTC/USDC'])
|
||||||
const agg = await Aggregator.loadWithConnection(oraclePk, connection)
|
// const agg = await Aggregator.loadWithConnection(oraclePk, connection)
|
||||||
// const agg = await Aggregator.loadWithConnection(oraclePk, connection)
|
// // const agg = await Aggregator.loadWithConnection(oraclePk, connection)
|
||||||
console.log(agg.answer.median.toNumber())
|
// console.log(agg.answer.median.toNumber())
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
testSolink()
|
// testSolink()
|
||||||
|
|
||||||
|
|
||||||
// async function main() {
|
// async function main() {
|
||||||
|
|
Loading…
Reference in New Issue