Giter Site home page Giter Site logo

relayarchiveapi's Introduction

RelayArchiveApi

This is asp.net6 api built using entity framework core for archiving relay infos relayed by specialize relayer for zebec bridge contract

Available Routes:

Routes Methods Descriptions
/ GET For Health Check
/api/v1/relayinfos?chain={string}&emitterAddressHex={string}&sequence={number}&limit={number:1-100}&offset={number} GET Gets all relay infos
/api/v1/relayinfos/{chain}/{emitterAddressHex}/{sequence} GET Gets relay info based on chain, emitterAddressHex and sequence in param
/api/v1/relayinfos POST Saves relay info
/api/v1/relayinfos/{chain}/{emitterAddressHex}/{sequence} DELETE Deletes relay info

Usage

Using docker:

Clone the repository and change directory to relayarchive where docker-compose.yml file is present.

Run:

docker-compose up

Open http://localhost:5546 in your browser. It will open pgadmin. Login with username and password specified in docker-compose.yml file.

Add new server connection with same database server configuration specified in docker-compose.yml file

Run scripts in RelayArchive.sql file using query tool. It will create required tables in the schema.

Without docker

Make sure you have dotnet sdk v6 and postgres installed in your machine.

Go to RelayArchive.Api directory and open terminal in that directory.

Run:

dotnet restore

Make changes in value of key DefaultConnection in appsettings.json file for database connection according to your postgres server configuration in your machine.

Install dotnet-ef tool by running this command:

dotnet tool install --global dotnet-ef

After installation, run:

dotnet ef database update

It will update your database using migrations files.

Then to run the api application, run:

dotnet run

relayarchiveapi's People

Contributors

aacsspkt avatar

Watchers

 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.