diff --git a/examples/1_accounts.js b/examples/1_accounts.js index 225a6cd..9be59e8 100644 --- a/examples/1_accounts.js +++ b/examples/1_accounts.js @@ -1,14 +1,21 @@ const { ethers } = require("ethers"); -const INFURA_ID = '' -const provider = new ethers.providers.JsonRpcProvider(`https://mainnet.infura.io/v3/${INFURA_ID}`) +// const INFURA_ID = "3eaee57df35f4e3e9f41c609cf6d774b"; -const address = '0x73BCEb1Cd57C711feaC4224D062b0F6ff338501e' +const provider = new ethers.providers.JsonRpcProvider( + 'https://mainnet.infura.io/v3/3eaee57df35f4e3e9f41c609cf6d774b' +); + +const address = "0x73BCEb1Cd57C711feaC4224D062b0F6ff338501e"; const main = async () => { - const balance = await provider.getBalance(address) - console.log(`\nETH Balance of ${address} --> ${ethers.utils.formatEther(balance)} ETH\n`) -} + const balance = await provider.getBalance(address); -main() + console.log( + `\n ETH Balance of ${address} --> ${ethers.utils.formatEther( + balance + )} ETH\n` + ); +}; +main(); diff --git a/examples/2_read_smart_contract.js b/examples/2_read_smart_contract.js deleted file mode 100644 index a23d4d8..0000000 --- a/examples/2_read_smart_contract.js +++ /dev/null @@ -1,32 +0,0 @@ -const { ethers } = require("ethers"); - -const INFURA_ID = '' -const provider = new ethers.providers.JsonRpcProvider(`https://mainnet.infura.io/v3/${INFURA_ID}`) - -const ERC20_ABI = [ - "function name() view returns (string)", - "function symbol() view returns (string)", - "function totalSupply() view returns (uint256)", - "function balanceOf(address) view returns (uint)", -]; - -const address = '0x6B175474E89094C44Da98b954EedeAC495271d0F' // DAI Contract -const contract = new ethers.Contract(address, ERC20_ABI, provider) - -const main = async () => { - const name = await contract.name() - const symbol = await contract.symbol() - const totalSupply = await contract.totalSupply() - - console.log(`\nReading from ${address}\n`) - console.log(`Name: ${name}`) - console.log(`Symbol: ${symbol}`) - console.log(`Total Supply: ${totalSupply}\n`) - - const balance = await contract.balanceOf('0x6c6Bc977E13Df9b0de53b251522280BB72383700') - - console.log(`Balance Returned: ${balance}`) - console.log(`Balance Formatted: ${ethers.utils.formatEther(balance)}\n`) -} - -main() \ No newline at end of file diff --git a/examples/2_read_smart_contracts.js b/examples/2_read_smart_contracts.js new file mode 100644 index 0000000..f4f485e --- /dev/null +++ b/examples/2_read_smart_contracts.js @@ -0,0 +1,37 @@ +const ethers = require("ethers"); + +const provider = new ethers.providers.JsonRpcProvider( + "https://mainnet.infura.io/v3/3eaee57df35f4e3e9f41c609cf6d774b" +); + +const ERC20_ABI = [ + "function name() view returns (string)", + "function symbol() view returns (string)", + "function totalSupply() view returns (uint256)", + "function balanceOf(address) view returns (uint)", +]; + +const address = "0x6B175474E89094C44Da98b954EedeAC495271d0F"; // DAI Contract + +//creating an instance of the contract + +const contract = new ethers.Contract(address, ERC20_ABI, provider); + +const main = async () => { + const name = contract.name(); + const symbol = contract.symbol(); + const totalSupply = contract.totalSupply(); + + console.log(`\n Reading from ${address}\n`); + console.log(`Name : ${name}`); + console.log(`Symbol : ${symbol}`); + console.log(`TotalSupply : ${totalSupply}`); + + const balance = await contract.balanceOf( + "0x6c6Bc977E13Df9b0de53b251522280BB72383700" + ); + + console.log(`Balance returned: ${balance}`); + console.log(`Balance Formatted: ${ethers.utils.formatEther(balance)}`); // converting DAI to Ethers format +}; + diff --git a/examples/3_send_signed_transaction.js b/examples/3_send_signed_transaction.js index 65bb58e..352ae89 100644 --- a/examples/3_send_signed_transaction.js +++ b/examples/3_send_signed_transaction.js @@ -1,34 +1,53 @@ -const { ethers } = require("ethers"); +const ethers = require("ethers"); -const INFURA_ID = '' -const provider = new ethers.providers.JsonRpcProvider(`https://kovan.infura.io/v3/${INFURA_ID}`) +const provider = new ethers.providers.JsonRpcProvider( + "https://sepolia.infura.io/v3/3eaee57df35f4e3e9f41c609cf6d774b" +); -const account1 = '' // Your account address 1 -const account2 = '' // Your account address 2 +const account1 = "0xecCb2450889B3f68C0cd234FE05420Ef87b0a027"; //sender +const account2 = "0xD43cA3765c530D697fa2ECe322d2d43d993d0651"; //recepient +const privateKey1 = + "25202a70c90a9d9b1f20d20066b6b67ec95ce231b09f11ef109406a839fc9794"; //sender private key -const privateKey1 = '' // Private key of account 1 -const wallet = new ethers.Wallet(privateKey1, provider) +//creating a wallet of account 1 +const wallet = new ethers.Wallet(privateKey1, provider); const main = async () => { - const senderBalanceBefore = await provider.getBalance(account1) - const recieverBalanceBefore = await provider.getBalance(account2) - - console.log(`\nSender balance before: ${ethers.utils.formatEther(senderBalanceBefore)}`) - console.log(`reciever balance before: ${ethers.utils.formatEther(recieverBalanceBefore)}\n`) - - const tx = await wallet.sendTransaction({ - to: account2, - value: ethers.utils.parseEther("0.025") - }) - - await tx.wait() - console.log(tx) - - const senderBalanceAfter = await provider.getBalance(account1) - const recieverBalanceAfter = await provider.getBalance(account2) - - console.log(`\nSender balance after: ${ethers.utils.formatEther(senderBalanceAfter)}`) - console.log(`reciever balance after: ${ethers.utils.formatEther(recieverBalanceAfter)}\n`) -} - -main() \ No newline at end of file + const senderBalanceBefore = await provider.getBalance(account1); + const receiverBalanceBefore = await provider.getBalance(account2); + // Logging the balances before the transaction in a user-friendly format. + console.log( + `\n Sender Balance Before: ${ethers.utils.formatEther(senderBalanceBefore)}` + ); + console.log( + `\n Receiver Balance Before: ${ethers.utils.formatEther( + receiverBalanceBefore + )}` + ); + + //send ether + const tx = await wallet.sendTransaction({ + to: account2, + value: ethers.utils.parseEther("0.025"), //0.025 ether to WEI + }); + + //Wait for transaction to be mined + await tx.wait(); + console.log(tx); + + // Getting the balances of the sender and receiver accounts after the transaction. + const senderBalanceAfter = await provider.getBalance(account1); + const receiverBalanceAfter = await provider.getBalance(account2); + + // Logging the balances after the transaction in a user-friendly format + console.log( + `\n Sender Balance After: ${ethers.utils.formatEther(senderBalanceAfter)}` + ); + console.log( + `\n Receiver Balance After: ${ethers.utils.formatEther( + receiverBalanceAfter + )}` + ); +}; + +main(); diff --git a/examples/4_write_contract.js b/examples/4_write_contract.js index ca3f1a3..3d3ee99 100644 --- a/examples/4_write_contract.js +++ b/examples/4_write_contract.js @@ -1,40 +1,46 @@ -const { ethers } = require("ethers"); +const { ethers, Wallet } = require("ethers"); -const INFURA_ID = '' -const provider = new ethers.providers.JsonRpcProvider(`https://kovan.infura.io/v3/${INFURA_ID}`) +const rpovider = new ethers.JsonRpcProvider(""); -const account1 = '' // Your account address 1 -const account2 = '' // Your account address 2 +// Defining two Ethereum accounts and their private keys. +const account1 = ''; // Your account address 1 +const account2 = ''; // Your account address 2 -const privateKey1 = '' // Private key of account 1 -const wallet = new ethers.Wallet(privateKey1, provider) +const privateKey1 = ""; // Private key of account 1 +// Creating a wallet using the private key and the previously defined provider. +const wallet = new ethers.Wallet(privateKey1, provider); + +// Defining an ERC20 token's ABI (Application Binary Interface), specifying functions the contract supports. const ERC20_ABI = [ - "function balanceOf(address) view returns (uint)", - "function transfer(address to, uint amount) returns (bool)", + "function balanceOf(address) view returns (uint)", + "function transfer(address to, uint amount) returns (bool)", ]; -const address = '' -const contract = new ethers.Contract(address, ERC20_ABI, provider) +//fining the address of the ERC20 token contract. +const address = ''; + +// Creating an instance of the ERC20 token contract using the ABI, address, and provider. +const contract = new ethers.Contract(address, ERC20_ABI, provider); const main = async () => { - const balance = await contract.balanceOf(account1) + const balance = await contract.balanceOf(account1); - console.log(`\nReading from ${address}\n`) - console.log(`Balance of sender: ${balance}\n`) + console.log(`\n Reading from ${address}\n`); + console.log(`Balance of sender: ${balance}`); - const contractWithWallet = contract.connect(wallet) + const contractWithWallet = await contract.connect(Wallet); - const tx = await contractWithWallet.transfer(account2, balance) - await tx.wait() + const tx = await contractWithWallet.transfer(account2, balance); + await tx.wait(); //contract mining - console.log(tx) + console.log(tx); - const balanceOfSender = await contract.balanceOf(account1) - const balanceOfReciever = await contract.balanceOf(account2) + const balanceOfSender = await contract.balanceOf(account1); + const balanceOfReceiver = await contract.balanceOf(account2); - console.log(`\nBalance of sender: ${balanceOfSender}`) - console.log(`Balance of reciever: ${balanceOfReciever}\n`) -} + console.log(`\nBalance of sender: ${balanceOfSender}`); + console.log(`Balance of receiver: ${balanceOfReceiver}\n`); +}; -main() \ No newline at end of file +main(); diff --git a/examples/5_contract_event_stream.js b/examples/5_contract_event_stream.js index 77b595d..20bd175 100644 --- a/examples/5_contract_event_stream.js +++ b/examples/5_contract_event_stream.js @@ -22,4 +22,4 @@ const main = async () => { console.log(transferEvents) } -main() \ No newline at end of file +main(); \ No newline at end of file diff --git a/examples/6_inspecting_blocks.js b/examples/6_isnpecting_blocks.js similarity index 100% rename from examples/6_inspecting_blocks.js rename to examples/6_isnpecting_blocks.js diff --git a/package-lock.json b/package-lock.json index c4e17c0..b907243 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,32 @@ { "name": "ethers_examples", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@ethersproject/abi": { + "packages": { + "": { + "name": "ethers_examples", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "ethers": "^5.5.4" + } + }, + "node_modules/@ethersproject/abi": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.5.0.tgz", "integrity": "sha512-loW7I4AohP5KycATvc0MgujU6JyCHPqHdeoo9z3Nr9xEiNioxa65ccdm1+fsoJhkuhdRtfcL8cfyGamz2AxZ5w==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", @@ -20,11 +38,21 @@ "@ethersproject/strings": "^5.5.0" } }, - "@ethersproject/abstract-provider": { + "node_modules/@ethersproject/abstract-provider": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/@ethersproject/abstract-provider/-/abstract-provider-5.5.1.tgz", "integrity": "sha512-m+MA/ful6eKbxpr99xUYeRvLkfnlqzrF8SZ46d/xFB1A7ZVknYc/sXJG0RcufF52Qn2jeFj1hhcoQ7IXjNKUqg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0", @@ -34,11 +62,21 @@ "@ethersproject/web": "^5.5.0" } }, - "@ethersproject/abstract-signer": { + "node_modules/@ethersproject/abstract-signer": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/abstract-signer/-/abstract-signer-5.5.0.tgz", "integrity": "sha512-lj//7r250MXVLKI7sVarXAbZXbv9P50lgmJQGr2/is82EwEb8r7HrxsmMqAjTsztMYy7ohrIhGMIml+Gx4D3mA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abstract-provider": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", @@ -46,11 +84,21 @@ "@ethersproject/properties": "^5.5.0" } }, - "@ethersproject/address": { + "node_modules/@ethersproject/address": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/address/-/address-5.5.0.tgz", "integrity": "sha512-l4Nj0eWlTUh6ro5IbPTgbpT4wRbdH5l8CQf7icF7sb/SI3Nhd9Y9HzhonTSTi6CefI0necIw7LJqQPopPLZyWw==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", "@ethersproject/keccak256": "^5.5.0", @@ -58,54 +106,114 @@ "@ethersproject/rlp": "^5.5.0" } }, - "@ethersproject/base64": { + "node_modules/@ethersproject/base64": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/base64/-/base64-5.5.0.tgz", "integrity": "sha512-tdayUKhU1ljrlHzEWbStXazDpsx4eg1dBXUSI6+mHlYklOXoXF6lZvw8tnD6oVaWfnMxAgRSKROg3cVKtCcppA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0" } }, - "@ethersproject/basex": { + "node_modules/@ethersproject/basex": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/basex/-/basex-5.5.0.tgz", "integrity": "sha512-ZIodwhHpVJ0Y3hUCfUucmxKsWQA5TMnavp5j/UOuDdzZWzJlRmuOjcTMIGgHCYuZmHt36BfiSyQPSRskPxbfaQ==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/properties": "^5.5.0" } }, - "@ethersproject/bignumber": { + "node_modules/@ethersproject/bignumber": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/bignumber/-/bignumber-5.5.0.tgz", "integrity": "sha512-6Xytlwvy6Rn3U3gKEc1vP7nR92frHkv6wtVr95LFR3jREXiCPzdWxKQ1cx4JGQBXxcguAwjA8murlYN2TSiEbg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0", "bn.js": "^4.11.9" } }, - "@ethersproject/bytes": { + "node_modules/@ethersproject/bytes": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.5.0.tgz", "integrity": "sha512-ABvc7BHWhZU9PNM/tANm/Qx4ostPGadAuQzWTr3doklZOhDlmcBqclrQe/ZXUIj3K8wC28oYeuRa+A37tX9kog==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/constants": { + "node_modules/@ethersproject/constants": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/constants/-/constants-5.5.0.tgz", "integrity": "sha512-2MsRRVChkvMWR+GyMGY4N1sAX9Mt3J9KykCsgUFd/1mwS0UH1qw+Bv9k1UJb3X3YJYFco9H20pjSlOIfCG5HYQ==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bignumber": "^5.5.0" } }, - "@ethersproject/contracts": { + "node_modules/@ethersproject/contracts": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/contracts/-/contracts-5.5.0.tgz", "integrity": "sha512-2viY7NzyvJkh+Ug17v7g3/IJC8HqZBDcOjYARZLdzRxrfGlRgmYgl6xPRKVbEzy1dWKw/iv7chDcS83pg6cLxg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abi": "^5.5.0", "@ethersproject/abstract-provider": "^5.5.0", "@ethersproject/abstract-signer": "^5.5.0", @@ -118,11 +226,21 @@ "@ethersproject/transactions": "^5.5.0" } }, - "@ethersproject/hash": { + "node_modules/@ethersproject/hash": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/hash/-/hash-5.5.0.tgz", "integrity": "sha512-dnGVpK1WtBjmnp3mUT0PlU2MpapnwWI0PibldQEq1408tQBAbZpPidkWoVVuNMOl/lISO3+4hXZWCL3YV7qzfg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abstract-signer": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -133,11 +251,21 @@ "@ethersproject/strings": "^5.5.0" } }, - "@ethersproject/hdnode": { + "node_modules/@ethersproject/hdnode": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/hdnode/-/hdnode-5.5.0.tgz", "integrity": "sha512-mcSOo9zeUg1L0CoJH7zmxwUG5ggQHU1UrRf8jyTYy6HxdZV+r0PBoL1bxr+JHIPXRzS6u/UW4mEn43y0tmyF8Q==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abstract-signer": "^5.5.0", "@ethersproject/basex": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", @@ -152,11 +280,21 @@ "@ethersproject/wordlists": "^5.5.0" } }, - "@ethersproject/json-wallets": { + "node_modules/@ethersproject/json-wallets": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/json-wallets/-/json-wallets-5.5.0.tgz", "integrity": "sha512-9lA21XQnCdcS72xlBn1jfQdj2A1VUxZzOzi9UkNdnokNKke/9Ya2xA9aIK1SC3PQyBDLt4C+dfps7ULpkvKikQ==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abstract-signer": "^5.5.0", "@ethersproject/address": "^5.5.0", "@ethersproject/bytes": "^5.5.0", @@ -172,50 +310,110 @@ "scrypt-js": "3.0.1" } }, - "@ethersproject/keccak256": { + "node_modules/@ethersproject/keccak256": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/keccak256/-/keccak256-5.5.0.tgz", "integrity": "sha512-5VoFCTjo2rYbBe1l2f4mccaRFN/4VQEYFwwn04aJV2h7qf4ZvI2wFxUE1XOX+snbwCLRzIeikOqtAoPwMza9kg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "js-sha3": "0.8.0" } }, - "@ethersproject/logger": { + "node_modules/@ethersproject/logger": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.5.0.tgz", - "integrity": "sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg==" - }, - "@ethersproject/networks": { + "integrity": "sha512-rIY/6WPm7T8n3qS2vuHTUBPdXHl+rGxWxW5okDfo9J4Z0+gRRZT0msvUdIJkE4/HS29GUMziwGaaKO2bWONBrg==", + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ] + }, + "node_modules/@ethersproject/networks": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.5.2.tgz", "integrity": "sha512-NEqPxbGBfy6O3x4ZTISb90SjEDkWYDUbEeIFhJly0F7sZjoQMnj5KYzMSkMkLKZ+1fGpx00EDpHQCy6PrDupkQ==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/pbkdf2": { + "node_modules/@ethersproject/pbkdf2": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/pbkdf2/-/pbkdf2-5.5.0.tgz", "integrity": "sha512-SaDvQFvXPnz1QGpzr6/HToLifftSXGoXrbpZ6BvoZhmx4bNLHrxDe8MZisuecyOziP1aVEwzC2Hasj+86TgWVg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/sha2": "^5.5.0" } }, - "@ethersproject/properties": { + "node_modules/@ethersproject/properties": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/properties/-/properties-5.5.0.tgz", "integrity": "sha512-l3zRQg3JkD8EL3CPjNK5g7kMx4qSwiR60/uk5IVjd3oq1MZR5qUg40CNOoEJoX5wc3DyY5bt9EbMk86C7x0DNA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/providers": { + "node_modules/@ethersproject/providers": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/@ethersproject/providers/-/providers-5.5.3.tgz", "integrity": "sha512-ZHXxXXXWHuwCQKrgdpIkbzMNJMvs+9YWemanwp1fA7XZEv7QlilseysPvQe0D7Q7DlkJX/w/bGA1MdgK2TbGvA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abstract-provider": "^5.5.0", "@ethersproject/abstract-signer": "^5.5.0", "@ethersproject/address": "^5.5.0", @@ -237,39 +435,79 @@ "ws": "7.4.6" } }, - "@ethersproject/random": { + "node_modules/@ethersproject/random": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/@ethersproject/random/-/random-5.5.1.tgz", "integrity": "sha512-YaU2dQ7DuhL5Au7KbcQLHxcRHfgyNgvFV4sQOo0HrtW3Zkrc9ctWNz8wXQ4uCSfSDsqX2vcjhroxU5RQRV0nqA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/rlp": { + "node_modules/@ethersproject/rlp": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/rlp/-/rlp-5.5.0.tgz", "integrity": "sha512-hLv8XaQ8PTI9g2RHoQGf/WSxBfTB/NudRacbzdxmst5VHAqd1sMibWG7SENzT5Dj3yZ3kJYx+WiRYEcQTAkcYA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/sha2": { + "node_modules/@ethersproject/sha2": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/sha2/-/sha2-5.5.0.tgz", "integrity": "sha512-B5UBoglbCiHamRVPLA110J+2uqsifpZaTmid2/7W5rbtYVz6gus6/hSDieIU/6gaKIDcOj12WnOdiymEUHIAOA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0", "hash.js": "1.1.7" } }, - "@ethersproject/signing-key": { + "node_modules/@ethersproject/signing-key": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/signing-key/-/signing-key-5.5.0.tgz", "integrity": "sha512-5VmseH7qjtNmDdZBswavhotYbWB0bOwKIlOTSlX14rKn5c11QmJwGt4GHeo7NrL/Ycl7uo9AHvEqs5xZgFBTng==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0", "@ethersproject/properties": "^5.5.0", @@ -278,11 +516,21 @@ "hash.js": "1.1.7" } }, - "@ethersproject/solidity": { + "node_modules/@ethersproject/solidity": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.5.0.tgz", "integrity": "sha512-9NgZs9LhGMj6aCtHXhtmFQ4AN4sth5HuFXVvAQtzmm0jpSCNOTGtrHZJAeYTh7MBjRR8brylWZxBZR9zDStXbw==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", "@ethersproject/keccak256": "^5.5.0", @@ -291,21 +539,41 @@ "@ethersproject/strings": "^5.5.0" } }, - "@ethersproject/strings": { + "node_modules/@ethersproject/strings": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.5.0.tgz", "integrity": "sha512-9fy3TtF5LrX/wTrBaT8FGE6TDJyVjOvXynXJz5MT5azq+E6D92zuKNx7i29sWW2FjVOaWjAsiZ1ZWznuduTIIQ==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/constants": "^5.5.0", "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/transactions": { + "node_modules/@ethersproject/transactions": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/transactions/-/transactions-5.5.0.tgz", "integrity": "sha512-9RZYSKX26KfzEd/1eqvv8pLauCKzDTub0Ko4LfIgaERvRuwyaNV78mJs7cpIgZaDl6RJui4o49lHwwCM0526zA==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/address": "^5.5.0", "@ethersproject/bignumber": "^5.5.0", "@ethersproject/bytes": "^5.5.0", @@ -317,21 +585,41 @@ "@ethersproject/signing-key": "^5.5.0" } }, - "@ethersproject/units": { + "node_modules/@ethersproject/units": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.5.0.tgz", "integrity": "sha512-7+DpjiZk4v6wrikj+TCyWWa9dXLNU73tSTa7n0TSJDxkYbV3Yf1eRh9ToMLlZtuctNYu9RDNNy2USq3AdqSbag==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bignumber": "^5.5.0", "@ethersproject/constants": "^5.5.0", "@ethersproject/logger": "^5.5.0" } }, - "@ethersproject/wallet": { + "node_modules/@ethersproject/wallet": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.5.0.tgz", "integrity": "sha512-Mlu13hIctSYaZmUOo7r2PhNSd8eaMPVXe1wxrz4w4FCE4tDYBywDH+bAR1Xz2ADyXGwqYMwstzTrtUVIsKDO0Q==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abstract-provider": "^5.5.0", "@ethersproject/abstract-signer": "^5.5.0", "@ethersproject/address": "^5.5.0", @@ -349,11 +637,21 @@ "@ethersproject/wordlists": "^5.5.0" } }, - "@ethersproject/web": { + "node_modules/@ethersproject/web": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/@ethersproject/web/-/web-5.5.1.tgz", "integrity": "sha512-olvLvc1CB12sREc1ROPSHTdFCdvMh0J5GSJYiQg2D0hdD4QmJDy8QYDb1CvoqD/bF1c++aeKv2sR5uduuG9dQg==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/base64": "^5.5.0", "@ethersproject/bytes": "^5.5.0", "@ethersproject/logger": "^5.5.0", @@ -361,11 +659,21 @@ "@ethersproject/strings": "^5.5.0" } }, - "@ethersproject/wordlists": { + "node_modules/@ethersproject/wordlists": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@ethersproject/wordlists/-/wordlists-5.5.0.tgz", "integrity": "sha512-bL0UTReWDiaQJJYOC9sh/XcRu/9i2jMrzf8VLRmPKx58ckSlOJiohODkECCO50dtLZHcGU6MLXQ4OOrgBwP77Q==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/bytes": "^5.5.0", "@ethersproject/hash": "^5.5.0", "@ethersproject/logger": "^5.5.0", @@ -373,31 +681,31 @@ "@ethersproject/strings": "^5.5.0" } }, - "aes-js": { + "node_modules/aes-js": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz", "integrity": "sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0=" }, - "bech32": { + "node_modules/bech32": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" }, - "bn.js": { + "node_modules/bn.js": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" }, - "brorand": { + "node_modules/brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, - "elliptic": { + "node_modules/elliptic": { "version": "6.5.4", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "requires": { + "dependencies": { "bn.js": "^4.11.9", "brorand": "^1.1.0", "hash.js": "^1.0.0", @@ -407,11 +715,21 @@ "minimalistic-crypto-utils": "^1.0.1" } }, - "ethers": { + "node_modules/ethers": { "version": "5.5.4", "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.5.4.tgz", "integrity": "sha512-N9IAXsF8iKhgHIC6pquzRgPBJEzc9auw3JoRkaKe+y4Wl/LFBtDDunNe7YmdomontECAcC5APaAgWZBiu1kirw==", - "requires": { + "funding": [ + { + "type": "individual", + "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" + }, + { + "type": "individual", + "url": "https://www.buymeacoffee.com/ricmoo" + } + ], + "dependencies": { "@ethersproject/abi": "5.5.0", "@ethersproject/abstract-provider": "5.5.1", "@ethersproject/abstract-signer": "5.5.0", @@ -444,54 +762,69 @@ "@ethersproject/wordlists": "5.5.0" } }, - "hash.js": { + "node_modules/hash.js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "requires": { + "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, - "hmac-drbg": { + "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { + "dependencies": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "js-sha3": { + "node_modules/js-sha3": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" }, - "minimalistic-assert": { + "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, - "minimalistic-crypto-utils": { + "node_modules/minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, - "scrypt-js": { + "node_modules/scrypt-js": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz", "integrity": "sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==" }, - "ws": { + "node_modules/ws": { "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } } } }