From 02dff484f64d2924dac6abad85d63245fc5804a5 Mon Sep 17 00:00:00 2001 From: mas walker Date: Fri, 17 Sep 2021 00:54:33 +0800 Subject: [PATCH] change IOTEX server URI (#63) --- src/strategies/iotex-balance/examples.json | 8 ++++---- src/strategies/iotex-balance/index.ts | 4 ++-- src/strategies/iotex-staked-balance/index.ts | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/strategies/iotex-balance/examples.json b/src/strategies/iotex-balance/examples.json index 617b04f6f..aedf82629 100644 --- a/src/strategies/iotex-balance/examples.json +++ b/src/strategies/iotex-balance/examples.json @@ -9,11 +9,11 @@ "decimals": 18 } }, - "network": "4690", + "network": "4689", "addresses": [ - "0x1904BFcb93EdC9BF961Eead2e5c0de81dCc1D37D", - "0x87Eea07540789af85B64947aEA21A3f00400B597" + "0x515c2c35c3ec82c30affc5ec06da9a30ef008741", + "0xa00744882684c3e4747faefd68d283ea44099d03" ], - "snapshot": 8947000 + "snapshot": 13000000 } ] \ No newline at end of file diff --git a/src/strategies/iotex-balance/index.ts b/src/strategies/iotex-balance/index.ts index fe80587fc..5f6184686 100644 --- a/src/strategies/iotex-balance/index.ts +++ b/src/strategies/iotex-balance/index.ts @@ -7,8 +7,8 @@ interface ApiReturn { export const author = 'iotex'; export const version = '0.0.1'; -const testNetUrl = 'https://testnet.iotexscout.io/apiproxy'; -const mainNetUrl = 'https://iotexscout.io/apiproxy'; +const testNetUrl = 'https://iotex-analyser-api-testnet.chainanalytics.org'; +const mainNetUrl = 'https://iotex-analyser-api-mainnet.chainanalytics.org'; function getUrl(network) { return network == 4689 ? mainNetUrl : testNetUrl; diff --git a/src/strategies/iotex-staked-balance/index.ts b/src/strategies/iotex-staked-balance/index.ts index 03c613adc..8e49c0ad0 100644 --- a/src/strategies/iotex-staked-balance/index.ts +++ b/src/strategies/iotex-staked-balance/index.ts @@ -6,8 +6,8 @@ interface ApiReturn { export const author = 'iotex'; export const version = '0.0.1'; -const testNetUrl = 'https://testnet.iotexscout.io/apiproxy'; -const mainNetUrl = 'https://iotexscout.io/apiproxy'; +const testNetUrl = 'https://iotex-analyser-api-testnet.chainanalytics.org'; +const mainNetUrl = 'https://iotex-analyser-api-mainnet.chainanalytics.org'; function getUrl(network) { return network == 4689 ? mainNetUrl : testNetUrl; @@ -24,7 +24,7 @@ export async function strategy( const height = typeof snapshot === 'number' ? snapshot : 10000000000; const apiUrl = getUrl(network); const response = await fetch( - `${apiUrl}/api.AccountVoteService.GetVoteByHeight`, + `${apiUrl}/api.StakingService.GetVoteByHeight`, { method: 'POST', headers: {