To access any variable or any method that is a part of a JavaScript object, we use "this" keyword.
For example,
function Dog(name) {
if (name) { this.name = name; }
| # Project Setup | |
| Create a directory and run the following command. | |
| ```sh | |
| npm init | |
| ``` | |
| For this tutorial, I will be adding an index.js file to the `src` folder, and this will be our entry point. | |
| Our file directory should look like this. |
| /** | |
| * Usage: | |
| * 1. Paste this into a main.js file in some empty directory. | |
| * 2. Run: `yarn add web3 ethers abi-decoder`. | |
| * 3. Go to contract's page | |
| * https://etherscan.io/address/0x25ed58c027921E14D86380eA2646E3a1B5C55A8b | |
| * and then to code and then copy "Contract ABI" and save it in the same dir | |
| * as abi.json. | |
| * 4. Create empty file backup.txt. | |
| * 5. Download CSV data with transactions from etherscan page and save as |
| # 🤔 Prerequisites | |
| Lerna | |
| `npm install --global lerna` | |
| ts-node | |
| `npm install --global ts-node` | |
| node-js | |
| `https://nodejs.org/en/download/current/` |
Here's a quick walkthrough on how to use Cloudflare Workers to make a Solana Devnet Faucet.
Get started by setting up your workspace with a few commands
cargo install wrangler # or npm install -g @cloudflare/wrangler
wrangler generate sol-devnet-faucet https://github.com/cloudflare/rustwasm-worker-template/
cd sol-devnet-faucet