Skip to content

Commit

Permalink
Account delegation (#325)
Browse files Browse the repository at this point in the history
* start adding delegation

* fmt

* update queries

* fix clippy

* fix fmt

* made annoying comment

* fix newline

* fix events which were not implemented

* fix issues

* fmt

* fix migration

* finish account delegation

* update src

* add todo comment

* added index

* added index

* updated sql to uppercase

* introduce nooperatin

* fmt

* updated version
  • Loading branch information
lassemand authored Dec 17, 2024
1 parent 516a1c3 commit e183bd9
Show file tree
Hide file tree
Showing 13 changed files with 371 additions and 90 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

2 changes: 1 addition & 1 deletion backend-rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "concordium-scan"
version = "0.1.6"
version = "0.1.7"
edition = "2021"
description = "CCDScan: Indexer and API for the Concordium blockchain"
authors = ["Concordium <[email protected]>"]
Expand Down
12 changes: 9 additions & 3 deletions backend-rust/migrations/0001_initialize.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ CREATE TABLE accounts(
BIGINT
REFERENCES transactions,
-- The total balance of this account in micro CCD.
-- TODO: Actually populate this in the indexer.
amount
BIGINT
NOT NULL
Expand All @@ -206,11 +205,18 @@ CREATE TABLE accounts(
-- Starting at 1 to count the transaction that made the account.
DEFAULT 1,
-- The total delegated stake of this account in micro CCD.
-- TODO: Actually populate this in the indexer.
delegated_stake
BIGINT
NOT NULL
DEFAULT 0
DEFAULT 0,
-- Whether we are re-staking earnings. Null means we are not using delegation.
delegated_restake_earnings
BOOLEAN
NULL,
-- Target id of the baker When this is null it means that we are using passive delegation.
delegated_target_baker_id
BIGINT
NULL
);

-- These are important for the sorting options on the accounts query.
Expand Down
Loading

0 comments on commit e183bd9

Please sign in to comment.