Coder Social home page Coder Social logo

assignment's Introduction

API

  1. The emails used for signing up to Infura: [email protected]
  2. A screenshot of the "Stats" dashboard of your project showing the graphs of network traffic stats

How to set it up[LocalHost]

Prerequisites

Ensure you have Nodejs & NPM installed on your machine. Use Chrome or Firefox as your browser...

  1. Node.js (v10+): Install or update Node.js from official page.
$ node -v
$ npm -v
$ npm install -g update-node

OR

Yarn (v1+): Install Yarn from official Page.

$ yarn --version

Setup the Environment

$ mkdir repo && cd repo
$ git clone https://github.com/sanchaymittal/Assignment
$ cd Assignment
$ yarn 
or
$ node install

ps: If permission is denied, please use sudo as a prefix to any command provided. And if you are intrested in making permenant changes to avoid future issues use chmod

Host Server

$ node server.js 

Run

http://localhost:3000/getTransaction?address=0x002002812b42601ae5026344f0395e68527bb0f8

Update the address, To use the API to find the transactions emitted by the user address.

Optional...

  1. Update the Firebase Hosting
  • Create a Cloud Firestore database
  • Generate KeyPair from firebase cloud test hosting project.
  • Save the KeyPair file and update serviceAccount and databaseURL.
  1. Connect to Ethereum node(hosted by Infura) & Catch the Latest blocks on Kovan Network
$ node main.js

Docker

Prerequisites

  1. Docker (v18.+): Install Docker from official Page.
$ Docker --version

Setup the Environment

$ mkdir repo && cd repo
$ git clone https://github.com/sanchaymittal/Assignment
$ cd Assignment

Run

$ docker build -t <imageName> .
$ docker run -p 49160:3000 <imageName>

Assignment

  • Connect to an Ethereum node (hosted by Infura) using web3js on the Kovan testnet. Reference.
  • You can use this blockchain testnet API endpoint on Infura: kovan.infura.io/v3/6c6f87a10e12438f8fbb7fc7c762b37c
  • Index the data in a database of your choice that will serve as the datastore for the API requests. Most important fields in a transaction for the purpose of this assignment will be from, to, blockNumber and transactionHash.
  • We would like you to index at least 10,000 recent blocks.
  • Construct an API to retrieve the user transactions, given the user address.
  • Push all the code you write in a github repository and share it with us.
  • Please include the instructions to run the server in the README.
  • Cookie points for a clean commit history that reflects your progress.
  • (Optional) Bonus points for including a docker file to spin up everything together.

assignment's People

Contributors

sanchaymittal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.