Skip to content

Commit

Permalink
First Comit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmTalal committed Mar 21, 2023
0 parents commit 843ee38
Show file tree
Hide file tree
Showing 4 changed files with 181 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
21 changes: 21 additions & 0 deletions createBidderEvent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const { ethers } = require("ethers");

const INFURA_ID = "5d19e896f00c4840bb5be686f31d8e0c";
const provider = new ethers.JsonRpcProvider(
`https://mainnet.infura.io/v3/${INFURA_ID}`
);

const address = "0xa01a4aD6aEF50C6Bd91e28e04bE92dBe9F80a27a";
const contractAbi = ["event CreateBidder(address b)"];
const contract = new ethers.Contract(address, contractAbi, provider);

const main = async () => {
const addresses = await contract.queryFilter("CreateBidder");

for (let i = 0; i < addresses.length; i++) {
let buyer = addresses[i].address;
console.log(buyer);
}
};

main();
145 changes: 145 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "interview",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"ethers": "^6.2.0"
}
}

0 comments on commit 843ee38

Please sign in to comment.