From 48d3015a30d6550c6ad5af1fa4b536a3ebf35283 Mon Sep 17 00:00:00 2001 From: Luisfc68 Date: Thu, 25 Apr 2024 10:33:35 +0200 Subject: [PATCH] chore: move rpc urls to env --- example.env | 4 +++- truffle-config.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/example.env b/example.env index 3c233cf..7017ed1 100644 --- a/example.env +++ b/example.env @@ -1 +1,3 @@ -ALPHANET_RPC_URL=http://127.0.0.1:4444 \ No newline at end of file +ALPHANET_RPC_URL=http://127.0.0.1:4444 +MAINNET_RPC_URL=https://public-node.rsk.co +TESTNET_RPC_URL=https://public-node.testnet.rsk.co \ No newline at end of file diff --git a/truffle-config.js b/truffle-config.js index c76efac..d2721f4 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -40,7 +40,7 @@ module.exports = { rskDevelopment: { provider: () => new HDWalletProvider({ mnemonic, - providerOrUrl: `https://public-node.testnet.rsk.co`, + providerOrUrl: process.env.TESTNET_RPC_URL, derivationPath: "m/44'/60'/0'/0/", pollingInterval: 30000, }), @@ -50,7 +50,7 @@ module.exports = { rskTestnet: { provider: () => new HDWalletProvider({ mnemonic, - providerOrUrl: `https://public-node.testnet.rsk.co`, + providerOrUrl: process.env.TESTNET_RPC_URL, derivationPath: "m/44'/37310'/0'/0/", pollingInterval: 30000, }), @@ -60,7 +60,7 @@ module.exports = { rskMainnet: { provider: () => new HDWalletProvider({ mnemonic, - providerOrUrl: `https://public-node.rsk.co`, + providerOrUrl: process.env.MAINNET_RPC_URL, derivationPath: "m/44'/137'/0'/0/", pollingInterval: 30000, }),