Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
add web3 contract
Browse files Browse the repository at this point in the history
  • Loading branch information
akerbabber committed Oct 3, 2023
1 parent da34ec8 commit 44b0a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h2>Deposit to Contract</h2>

const contractAddress = "0x7506C12a824d73D9b08564d5Afc22c949434755e"; // replace with your contract address

const contract = new window.ethereum.eth.Contract(contractABI, contractAddress);
const contract = new web3.eth.Contract(contractABI, contractAddress);
contract.methods.depositToken(sponsor, token, amount).send({ from: ethereum.selectedAddress });
} else {
alert("MetaMask is not detected!");
Expand Down

0 comments on commit 44b0a77

Please sign in to comment.