From c4c0c218d92f93cd9a1ea79d1d7dec793c08d855 Mon Sep 17 00:00:00 2001 From: Sergey Ponomarev Date: Fri, 10 Mar 2023 15:26:19 +0300 Subject: [PATCH] Migrate to the fresh NeonEVM devnet (#20) * Switch to the new address of NeonEVM devnet * Migrate to the recommended usage of `HDWalletProvider` --- playground.js | 2 +- truffle-config.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/playground.js b/playground.js index e70405b..5ee4dc0 100644 --- a/playground.js +++ b/playground.js @@ -1,7 +1,7 @@ const Web3 = require("web3"); const fs = require("fs"); -const web3 = new Web3(new Web3.providers.HttpProvider("https://proxy.devnet.neonlabs.org/solana")); +const web3 = new Web3(new Web3.providers.HttpProvider("https://devnet.neonevm.org/")); const aggregatorV3InterfaceABI = JSON.parse(fs.readFileSync("./AggregatorV3Interface.json")); const contract = new web3.eth.Contract(aggregatorV3InterfaceABI, process.env.ORACLE_ADDRESS) diff --git a/truffle-config.js b/truffle-config.js index 9c69a8b..e6114bd 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -1,5 +1,6 @@ const HDWalletProvider = require("@truffle/hdwallet-provider"); const fs = require("fs"); + const cwd = process.cwd(); module.exports = { @@ -7,10 +8,10 @@ module.exports = { devnet: { provider: () => { const mnemonic = fs.readFileSync(cwd + "/.secret").toString().trim(); - return new HDWalletProvider( - mnemonic, - "https://proxy.devnet.neonlabs.org/solana", - ); + return new HDWalletProvider({ + mnemonic, + providerOrUrl: "https://devnet.neonevm.org", + }); }, network_id: "245022926", },