Created
January 16, 2025 16:28
-
-
Save ngunyimacharia/098fb4be7719226b7d4d18de010fb638 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!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