Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewards- threshold lib updates #307

Open
wants to merge 10 commits into
base: staking-threshold-lib
Choose a base branch
from

Commits on Nov 14, 2022

  1. Move some date utils to the threshold ts lib

    These utils functions/variables will be useful in the threshold ts lib
    eg for calculating staking bonus rewards.
    r-czajkowski committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    fad0ea1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cfe1044 View commit details
    Browse the repository at this point in the history
  3. Create a wrapper for merkle drop contract

    In the future we should create a contract wrapper for each contract the
    threshold lib integrates to keep the same interface. In some cases
    multiple services need the same contract data like deployment block or
    address. So to avoid duplicating the creation of each contract in each
    service can create one contract instance and pass to the service in
    constructor.
    r-czajkowski committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    7fede35 View commit details
    Browse the repository at this point in the history
  4. Add staking bonus service to the thrershold ts lib

    Move fetching the staking bonus rewards to the threshold lib. Also add a
    function to the staking and pre service to fetch necessary events to
    calculate rewards.
    r-czajkowski committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    b7f49e9 View commit details
    Browse the repository at this point in the history
  5. Add interim staking rewards to threshold ts lib

    Move fetching the interim staking rewards to the threshold ts lib and
    update hooks to use the services from threshold lib.
    r-czajkowski committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    a018db7 View commit details
    Browse the repository at this point in the history
  6. Add rewards to the threshold ts lib

    Rewards is a wrapper for all type of rewards in the threshold network.
    Currently there are 2 types of rewards: staking bonus and interim
    staking rewards. We should keep in mind that calculated reward from
    interim rewards service may include the staking bonus reward.
    r-czajkowski committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    6295153 View commit details
    Browse the repository at this point in the history
  7. Remove unnecessary files

    We keep the abi for `ComulativeMerkleDrop` contract in the threshold ts
    lib.
    r-czajkowski committed Nov 14, 2022
    Configuration menu
    Copy the full SHA
    a8d8ff8 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. Configuration menu
    Copy the full SHA
    1458fbc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    58cc3c5 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2022

  1. Configuration menu
    Copy the full SHA
    de000cd View commit details
    Browse the repository at this point in the history