Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions nexus_banking_networks/nexus_web/src/nexus_blockchain_connector.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
const Web3 = require('web3');
const Web3 = require("web3");

class NexusBlockchainConnector {
constructor() {
this.web3 = new Web3(new Web3.providers.HttpProvider('https://mainnet.infura.io/v3/YOUR_PROJECT_ID'));
}
constructor() {
this.web3 = new Web3(
new Web3.providers.HttpProvider(
"https://mainnet.infura.io/v3/YOUR_PROJECT_ID",
),
);
}

async getBalance(address) {
return this.web3.eth.getBalance(address);
}
async getBalance(address) {
return this.web3.eth.getBalance(address);
}

async transferFunds(from, to, amount) {
// Implement transfer logic using Web3
}
async transferFunds(from, to, amount) {
// Implement transfer logic using Web3
}
}

module.exports = NexusBlockchainConnector;