Skip to content

aphd/smart-corpus-api

Repository files navigation

Smac Corpus API - A RESTful API with Node.js

Prerequisites

  • Node.js
  • Git

Getting started

Follow these steps at the command line:

1. Clone and Install

git clone https://github.com/aphd/smac-corpus-api.git
cd smac-corpus-api
npm install

2. Set the environment variables

echo "DB_URL=mongodb+srv://<user>:<password>@cluster0-euwvg.mongodb.net" > .env
echo "PORT=<__HTTP_PORT__>" >> .env

3. Run the service

npm run start

4. Load smart contracts into mongoDB

node --experimental-modules src/services/client.mjs

How to Compress/Extract contracts files

To compress the smart contracts' data

yarn compress

To extract the smart contracts' data

yarn extract

References

  1. Watch the companion video at: https://www.youtube.com/watch?v=fy6-LSE_zjI
  2. https://etherscan.io/apis#contracts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published