Commit Graph

56 Commits

Author SHA1 Message Date
Mohamed Sohail b59c0ba3fc
feat: transaction history (including by voucher) (#24)
* sql: add transaction transaction record queries

- get full tx history
- get latest txs for a specific token

* sql: (fix) add id column to select

* sql: (fix) change column name to identifier

* fix: pagination queries

- refactor keyset pagination query to correctly fecth previous page
- remove pagination from token list
- add fetch latest transactions by token

* tidy: remove dev logs

* feat: (db) add index for desc for pagination
2022-06-16 12:27:18 +03:00
Mohamed Sohail f196af0e63
Merge pull request #23 from grassrootseconomics/dependabot/go_modules/github.com/rs/zerolog-1.27.0
build(deps): bump github.com/rs/zerolog from 1.26.1 to 1.27.0
2022-06-16 12:26:51 +03:00
dependabot[bot] da7b0f2473
build(deps): bump github.com/rs/zerolog from 1.26.1 to 1.27.0
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.26.1 to 1.27.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](https://github.com/rs/zerolog/compare/v1.26.1...v1.27.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 09:26:42 +00:00
Mohamed Sohail 3697a07357
Merge pull request #25 from grassrootseconomics/dependabot/go_modules/github.com/ethereum/go-ethereum-1.10.19
build(deps): bump github.com/ethereum/go-ethereum from 1.10.18 to 1.10.19
2022-06-16 12:25:47 +03:00
dependabot[bot] e83a103a35
build(deps): bump github.com/ethereum/go-ethereum
Bumps [github.com/ethereum/go-ethereum](https://github.com/ethereum/go-ethereum) from 1.10.18 to 1.10.19.
- [Release notes](https://github.com/ethereum/go-ethereum/releases)
- [Commits](https://github.com/ethereum/go-ethereum/compare/v1.10.18...v1.10.19)

---
updated-dependencies:
- dependency-name: github.com/ethereum/go-ethereum
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-16 05:40:14 +00:00
Mohamed Sohail 0fe78049f5
fix: (patch) meta endpoint config loader 2022-06-04 13:27:41 +03:00
Mohamed Sohail 5319359e88
patch: enable secure cookie 2022-06-02 11:51:19 +03:00
Mohamed Sohail e19ba9d50c
deps: upgraded github.com/georgysavva/scany
v0.3.0 => v1.0.0
2022-06-02 11:31:31 +03:00
Mohamed Sohail a016e295ef
Merge pull request #18 from grassrootseconomics/dependabot/go_modules/github.com/golang-module/carbon/v2-2.1.8
build(deps): bump github.com/golang-module/carbon/v2 from 2.1.6 to 2.1.8
2022-06-02 11:27:35 +03:00
dependabot[bot] d58923f63c
build(deps): bump github.com/golang-module/carbon/v2 from 2.1.6 to 2.1.8
Bumps [github.com/golang-module/carbon/v2](https://github.com/golang-module/carbon) from 2.1.6 to 2.1.8.
- [Release notes](https://github.com/golang-module/carbon/releases)
- [Commits](https://github.com/golang-module/carbon/compare/v2.1.6...v2.1.8)

---
updated-dependencies:
- dependency-name: github.com/golang-module/carbon/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-02 08:26:57 +00:00
Mohamed Sohail 657645f92c
Merge pull request #20 from grassrootseconomics/dependabot/go_modules/github.com/lmittmann/w3-0.8.0
build(deps): bump github.com/lmittmann/w3 from 0.7.0 to 0.8.0
2022-06-02 11:25:41 +03:00
Mohamed Sohail 77f127e14a
feat: add admin/auth api (#22)
* feat: add admin/auth api

- jwt cookie based auth
- /auth
- admin/*

* add: meta proxy

* fix: remove ussd account status from syncer

* add: cookie defaults and nuxt init check route

* add: pin and address handlers
2022-06-02 11:24:58 +03:00
Mohamed Sohail 861af1761d
Sohail/latest token transactions (#21)
* add: latest-token-transactions table

* fix: remove token symbol from query

* fix: move latest tx to dashboard domain
2022-05-26 09:35:39 +03:00
dependabot[bot] 8ed87e7244
build(deps): bump github.com/lmittmann/w3 from 0.7.0 to 0.8.0
Bumps [github.com/lmittmann/w3](https://github.com/lmittmann/w3) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/lmittmann/w3/releases)
- [Commits](https://github.com/lmittmann/w3/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: github.com/lmittmann/w3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 05:40:51 +00:00
Mohamed Sohail 3f24894700
Merge pull request #17 from grassrootseconomics/sohail/tokens-api-stats
add: (feat) individual token stats
2022-05-23 15:45:03 +03:00
Mohamed Sohail 7bda44c169
add: (feat) individual token stats
- volume chart
- token holders
- token tx count

* minor refactors
2022-05-23 15:41:24 +03:00
Mohamed Sohail f00e97cc94
fix: (sql) exclude system accounts from metrics 2022-05-21 11:03:23 +03:00
Mohamed Sohail 642ccdddaa
docs: add pagination api 2022-05-19 16:34:24 +03:00
Mohamed Sohail ef60e1b035
Merge pull request #15 from grassrootseconomics/sohail/tokens-api
add (feat) pagination helpers and token endpoint
2022-05-19 16:25:00 +03:00
Mohamed Sohail 37538c68ff
add (feat) pagination helpers and token endpoint
- see docs for pagination api usage
- added control for syncer/api goroutines
2022-05-19 16:24:26 +03:00
Mohamed Sohail 2548e68c36
Merge pull request #9 from grassrootseconomics/sohail/public-api
add: (feat) balances query API
2022-05-19 10:28:41 +03:00
Mohamed Sohail eb05761a51
fix: error messages 2022-05-19 10:27:51 +03:00
Mohamed Sohail f0690d62be
add: (feat) balances query api
- add address utils
- return uint64 for balances instead of float
2022-05-19 09:52:34 +03:00
Mohamed Sohail 7d431f1c8f
add: (wip) balances query API 2022-05-14 11:15:45 +03:00
Mohamed Sohail 352b89332f
docs: fix badges 2022-05-14 11:08:26 +03:00
Mohamed Sohail 18eafe9694
docs: add description and README 2022-05-14 11:06:42 +03:00
Mohamed Sohail 8288880c79
Merge branch 'sohail/dashboard-api' 2022-05-12 12:33:04 +03:00
Mohamed Sohail d4506e6303
update: (dashboard-api) cors and sql limits
- add cors for core websites and dev env
- update sql query limit to 2 years
- enabled future cors for auth
2022-05-12 12:32:33 +03:00
Mohamed Sohail bba6e330df
docker: fix dir copy 2022-05-11 18:42:02 +03:00
Mohamed Sohail 801d6d71c9
ci: fix goreleaser 2022-05-11 17:05:11 +03:00
Mohamed Sohail 9b66f4b2d6
Merge pull request #6 from grassrootseconomics/sohail/dashboard-api
server: init api server
2022-05-11 16:59:22 +03:00
Mohamed Sohail 128b15407a
server: init api server
- echo (https://echo.labstack.com/) as web framework
- carbon for auto date-range parsing
- add dashboard sql queries
2022-05-11 16:57:56 +03:00
Mohamed Sohail f5642c0e05
docker: fix new queries path 2022-05-11 12:36:59 +03:00
Mohamed Sohail 6b71657e5b
sohail/update deps structure (#5)
* refactor: syncer structure

- move syncer jobs to internal dir

* refactor: queries struct and pkg updates

- update cic-go to latest
- separate sql queries by logic

* ci: add dependabot
2022-05-11 12:32:11 +03:00
Mohamed Sohail 9882a9ddc6
refactor: move pkg's out
- to cic_go
2022-05-06 16:53:57 +03:00
Mohamed Sohail b4a7668ca4
fix: (redis) parse redis dsn 2022-05-05 19:58:27 +03:00
Mohamed Sohail 6902033586
project: remove changelog
- tracked by go releaser
2022-05-05 19:40:12 +03:00
Mohamed Sohail a68ae5a9eb
fix: (redis) bootstrap connection struct properly 2022-05-05 19:39:25 +03:00
Mohamed Sohail da66f70bf9
ci: remove uncessary deps build 2022-05-05 16:39:25 +03:00
Mohamed Sohail 16add59db5
ci: fix yml 2022-05-05 16:37:23 +03:00
Mohamed Sohail ab7a6ebad8
ci: fix docker login 2022-05-05 16:35:23 +03:00
Mohamed Sohail 037d709e0e
release: v0.1.1 2022-05-05 16:31:01 +03:00
Mohamed Sohail 342bb98d1b
ci: add build 2022-05-05 16:29:29 +03:00
Mohamed Sohail 2457ee7483
add: license 2022-05-05 15:10:27 +03:00
Mohamed Sohail 072e5600a0
release: v0.1.0 2022-05-05 15:06:23 +03:00
Mohamed Sohail 9c6310440c
refactor: syncer structure and async bootstrapping
- asynq bootstrap handlers
- graceful shutdown of goroutines
- remove unnecessary global App struct
- unmarhsal toml/env to koanf struct
2022-05-05 15:01:34 +03:00
Mohamed Sohail 4f868d8d94
fix: (pkg) revert to untrimmed address, panic on failed dial
- TODO: cicnet should be initialized at job handler level
2022-05-05 14:58:47 +03:00
Mohamed Sohail 659007e563
fix: (sql) lower case addresses for easier joins
- add schema docs
2022-05-05 14:56:22 +03:00
Mohamed Sohail 1c65a11460
add: ussd and cache syncer tasks
- no repeat on failure, picked up on next schedule
- enforce uniq on users and tx table to prevent duplicates
2022-05-03 21:37:48 +03:00
Mohamed Sohail 05ab865c63
add: token syncer
core:
- add koanf for runtime config loading
- cicnet connection must dial else panic
- add db connection init
- add goyesql for convenient querying
- add async tasker processor (scheduler, processor)

dev:
- add redis server to dev docker-compose
- update volume to prune-able local
2022-05-03 18:54:51 +03:00