-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
good first issueGood for newcomersGood for newcomershacktoberfesthacktoberfest-acceptedhelp wantedExtra attention is neededExtra attention is neededtesting
Description
The template is currently functional but not tested for robust functionality. There might be some errors which are yet to be handled. We'll check by transaction from one wallet to another for polygon network (mumbai testnet)
Note: Please create your own wallets for testing purposes.
Steps to test Ethersjs
- Clone and install using yarn (npm not suggested).
- Navigate to
./check/ethereum.ts
and remove the code. - Paste the following code
import ethers from "ethers";
const rpcEndpoint =
"RPC_MATICVIGIL_ENDPOINT";
const privateKey =
"SENDER_PRIVATE_KEY";
const recipientAddress = "RECEIVER_ADDRESS";
const provider = new ethers.providers.JsonRpcProvider(rpcEndpoint);
const wallet = new ethers.Wallet(privateKey, provider);
const amount = ethers.utils.parseEther("0.0001"); // Example: 0.1 MATIC
export async function sendMatic() {
try {
const tx = await wallet.sendTransaction({
to: recipientAddress,
value: amount,
});
console.log("Transaction sent:", tx.hash);
} catch (error) {
console.error("Error sending transaction:", error);
}
}
- Now in App.tsx call the
sendMatic()
function to check if any errors. Please report if any errors found related to ethers or bitcoinjs
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershacktoberfesthacktoberfest-acceptedhelp wantedExtra attention is neededExtra attention is neededtesting