Giter Club home page Giter Club logo

basilisk-crowdloan-query's Introduction

Sample Hydra Project

This is a sample project generated by hydra-cli scaffold. Experiment by modifying schema.graphql and the mappings in the mappings folder.

Prerequisites

  • Node v14x
  • Docker

Bootstrap

npm ci

# Start postgres instance
docker-compose up db # add optional -d flag to detach from terminal

# Apply pending migrations
npm run db:migrate

# Apply migrations related to processor's state keeping tables
npm run processor:migrate

# Now you can start processing chain data
npm run processor:start

# The above command will block
# Open separate terminal and launch graphql server to query the processed data
npm run query-node:start

If you want start from scratch

# Delete database migrations and other generated files
rm -r db generated types

# Write down your schema.graphql

# Analyze schema.graphql and generate model/server files
npm run codegen

# Analyze database state and create migration to match generated models
npm run db:create-migration

# Review typegen section of manifest.yml

# Generate type definitions for substrate events and extrinsics
npm run typegen

Configuration

Project's configuration is driven by environment variables, defined in .env, and manifest.yml. For more details see https://docs.subsquid.io.

Self-hosted indexer

It is recommeded to use already set up indexer if available, as new indexer typically requires some time to catch up with interesting events.

Have a look at ./indexer/docker-compose.yml for example of how you can set up a self-hosted version.

basilisk-crowdloan-query's People

Contributors

eldargab avatar maht0rz avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

basilisk-crowdloan-query's Issues

Implement target reward mechanism for lead percentage rate

For the upcoming Hydra crowdloan, we want to revive the target mechanism we had in the very first Basilisk auction. This means that our rewards (bonus), will be calculated towards a target as usual. BUT this target won't always be the current auction winner, but instead a supposed winner of the target auction.

Right now the lead percentage rate is calculated between us & winner of the current auction, with the target mechanism enabled, it should compare our amount raised with the winner of the auction we're targeting.

Example:

  • Current auction id: 1
  • Target auction id: 2

Money raised:

  • Para1: 100, Para2: 200, us: 50

Sibling/target in this case would be para1, since para2 is the supposed winner of the current auction (1), but we're targeting auction 2 which will be won by para1, so that our competitor.

This should be mostly implemented by changing how the lead percentage rate is calculated in the processor

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.