From f27dfcd21d93ce634a162124e49e0d47fe15a422 Mon Sep 17 00:00:00 2001 From: JulesCrown Date: Tue, 17 Sep 2024 15:05:22 +0200 Subject: [PATCH] updated for new new deployment --- services/txnBot/.graphclientrc.yml | 3 +-- services/txnBot/README.md | 3 ++- services/txnBot/service.js | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/services/txnBot/.graphclientrc.yml b/services/txnBot/.graphclientrc.yml index 236c065..8cb9bcf 100644 --- a/services/txnBot/.graphclientrc.yml +++ b/services/txnBot/.graphclientrc.yml @@ -3,8 +3,7 @@ sources: - name: harberg handler: graphql: - # endpoint: https://api.studio.thegraph.com/query/47986/harberg-base-sepolia/version/latest - endpoint: https://api.studio.thegraph.com/query/47986/harberg-base-sepolia/version/latest + endpoint: https://api.studio.thegraph.com/query/47986/harberg-base-sepolia/v0.0.5 transforms: - autoPagination: # You might want to disable schema validation for faster startup diff --git a/services/txnBot/README.md b/services/txnBot/README.md index e13b8a7..8ebae2f 100644 --- a/services/txnBot/README.md +++ b/services/txnBot/README.md @@ -1,4 +1,5 @@ ## RUN - +yarn +yarn graphclient --fileType json build node service.js diff --git a/services/txnBot/service.js b/services/txnBot/service.js index 567a803..c75c462 100644 --- a/services/txnBot/service.js +++ b/services/txnBot/service.js @@ -23,11 +23,9 @@ const LM_CONTRACT_ADDRESS = process.env.LM_CONTRACT_ADDRESS; const STAKE_CONTRACT_ADDRESS = process.env.STAKE_CONTRACT_ADDRESS; const LM_ABI = [ - // Add your contract's ABI here {"type":"function","name":"recenter","inputs":[],"outputs":[],"stateMutability":"nonpayable"} ]; const STAKE_ABI = [ - // Add your contract's ABI here {"inputs":[{"internalType":"uint256","name":"positionId","type":"uint256"}],"name":"payTax","outputs":[],"stateMutability":"nonpayable","type":"function"} ]; @@ -148,8 +146,8 @@ app.get('/status', async (req, res) => { const status = { balance: `${balance} ETH`, uptime: uptime, - lastRecenterTime: lastRecenterTime ? lastRecenterTime.toString() : 'Never', - lastLiquidationTime: lastLiquidationTime ? lastLiquidationTime.toString() : 'Never' + lastRecenterTime: lastRecenterTime ? lastRecenterTime.toISOString() : 'Never', + lastLiquidationTime: lastLiquidationTime ? lastLiquidationTime.toISOString() : 'Never' }; if (parseFloat(balance) < 0.1) {