KOSASIH / pi-nexus-autonomous-banking-network

Found the usage of undeclared variables JS-0125
Bug risk
Critical
8 occurrences in this check
'YOUR_PRIVATE_KEY' is not defined
33  };
34
35  web3.eth.accounts
36    .signTransaction(tx, YOUR_PRIVATE_KEY)37    .then((signedTx) => web3.eth.sendSignedTransaction(signedTx.rawTransaction))
38    .on('transactionHash', (hash) => console.log(`Transaction hash: ${hash}`))
39    .on('confirmation', (confirmationNumber, receipt) => {
'LendingContract' is not defined
24  const txCount = await web3.eth.getTransactionCount(YOUR_ACCOUNT_ADDRESS);
25  const tx = {
26    from: YOUR_ACCOUNT_ADDRESS,
27    to: LendingContract.address,28    value: '0',
29    gas: '200000',
30    gasPrice: '20',
'YOUR_ACCOUNT_ADDRESS' is not defined
23  );
24  const txCount = await web3.eth.getTransactionCount(YOUR_ACCOUNT_ADDRESS);
25  const tx = {
26    from: YOUR_ACCOUNT_ADDRESS,27    to: LendingContract.address,
28    value: '0',
29    gas: '200000',
'YOUR_ACCOUNT_ADDRESS' is not defined
21    LendingContract.abi,
22    LendingContract.address,
23  );
24  const txCount = await web3.eth.getTransactionCount(YOUR_ACCOUNT_ADDRESS);25  const tx = {
26    from: YOUR_ACCOUNT_ADDRESS,
27    to: LendingContract.address,
'LendingContract' is not defined
19  );
20  const contract = new web3.eth.Contract(
21    LendingContract.abi,
22    LendingContract.address,23  );
24  const txCount = await web3.eth.getTransactionCount(YOUR_ACCOUNT_ADDRESS);
25  const tx = {
'LendingContract' is not defined
18    ),
19  );
20  const contract = new web3.eth.Contract(
21    LendingContract.abi,22    LendingContract.address,
23  );
24  const txCount = await web3.eth.getTransactionCount(YOUR_ACCOUNT_ADDRESS);
13
14  // Call the smart contract's repayLoan function
15  const web3 = new Web3(
16    new Web3.providers.HttpProvider(17      'https://mainnet.infura.io/v3/YOUR_PROJECT_ID',
18    ),
19  );
12  const repaymentAmount = document.getElementById('repayment-amount').value;
13
14  // Call the smart contract's repayLoan function
15  const web3 = new Web3(16    new Web3.providers.HttpProvider(
17      'https://mainnet.infura.io/v3/YOUR_PROJECT_ID',
18    ),