Skip to content

Instantly share code, notes, and snippets.

@ngunyimacharia
Created January 16, 2025 16:28
Show Gist options
  • Select an option

  • Save ngunyimacharia/098fb4be7719226b7d4d18de010fb638 to your computer and use it in GitHub Desktop.

Select an option

Save ngunyimacharia/098fb4be7719226b7d4d18de010fb638 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Generate Test Data</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/ethers.umd.min.js"></script>
</head>
<body>
<h1>Generate Test Data</h1>
<script>
const { ethers } = window.ethers;
async function generateTestData() {
// Create a random wallet
const wallet = ethers.Wallet.createRandom();
// Message to sign
const message = "Test message for wallet verification";
// Sign the message
const signature = await wallet.signMessage(message);
console.log('Test Data:');
console.log('Address:', wallet.address);
console.log('Message:', message);
console.log('Signature:', signature);
}
generateTestData();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment