Skip to content

Commit

Permalink
Migrate to the fresh NeonEVM devnet (#20)
Browse files Browse the repository at this point in the history
* Switch to the new address of NeonEVM devnet

* Migrate to the recommended usage of `HDWalletProvider`
  • Loading branch information
sponomarev authored Mar 10, 2023
1 parent 4533b0f commit c4c0c21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion playground.js
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
9 changes: 5 additions & 4 deletions truffle-config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
const HDWalletProvider = require("@truffle/hdwallet-provider");
const fs = require("fs");

const cwd = process.cwd();

module.exports = {
networks: {
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",
},
Expand Down

0 comments on commit c4c0c21

Please sign in to comment.