Skip to content

Commit

Permalink
move eth node to env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
nnn-gif committed Nov 1, 2023
1 parent 9c54c01 commit ebb3f3a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/interlay/cbETHhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const {collaterlaratio} = require("./utils")
const Web3 = require("web3");
const web3 = new Web3(
new Web3.providers.HttpProvider(
"https://mainnet.infura.io/v3/2883d1b22e0e4d62b535592dd8075fee"
process.env.ETHEREUM_NODE_URL ||"https://mainnet.infura.io/v3/2883d1b22e0e4d62b535592dd8075fee"
)
);

Expand Down
12 changes: 12 additions & 0 deletions cmd/interlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ const { tokenkey, redis, allowedTokens, pricekey } = require("./utils");

let cache = redis();


/*
Env variables
BIFROST_PARACHAIN_NODE_URL
BIFROST_POLKADOT_NODE_URL
INTERLAY_NODE_URL
KITSUNGI_NODE_URL
ETHEREUM_NODE_URL
*/
cronstart();

cron.schedule("* * * * *", () => {
Expand Down
3 changes: 2 additions & 1 deletion cmd/interlay/rETHhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ const { createResponse, getPrice } = require("./utils");
const ethers = require("ethers");
const bignumber = ethers.BigNumber;


const web3 = new Web3(
new Web3.providers.HttpProvider(
"https://mainnet.infura.io/v3/2883d1b22e0e4d62b535592dd8075fee"
process.env.ETHEREUM_NODE_URL || "https://mainnet.infura.io/v3/2883d1b22e0e4d62b535592dd8075fee"
)
);
let abi = [
Expand Down
3 changes: 2 additions & 1 deletion cmd/interlay/stETHhelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ const Web3 = require("web3");

const {createResponse,getPrice} = require("./utils")


const web3 = new Web3(
new Web3.providers.HttpProvider(
"https://mainnet.infura.io/v3/2883d1b22e0e4d62b535592dd8075fee"
process.env.ETHEREUM_NODE_URL || "https://mainnet.infura.io/v3/2883d1b22e0e4d62b535592dd8075fee"
)
);
let abi = [
Expand Down

0 comments on commit ebb3f3a

Please sign in to comment.