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

Feat/ibc app ics20 add timestamp ( develop ) #385

Merged
merged 92 commits into from
Sep 28, 2023
Merged

Conversation

phamphong9981
Copy link
Contributor

@phamphong9981 phamphong9981 commented Sep 26, 2023

@peara pull này em thêm timestamp cho ibc ics20
ref #340

phamphong9981 and others added 30 commits July 5, 2023 14:55
feat: add migration to add index time to block, tx
fix: update validator as UNRECOGNIZED when not found onchain
* feat: reindex cw20 service

* test: test cw20 reindexing

* fix: idiot

* refactor: code

* feat: api admin
* refactor: cw20 index and add relation

* refactor: code
* feat: move statistic feature from v1 to v2 (not tested yet)

* feat: change job params so it can aggregate data at a specific date

* fix: query fields from exact table

* fix: query exact fields

* feat: add logger when done

* feat: finish statistic jobs (not tested)

* feat: create a separate interval job that gets the current date and create statistics jobs with date

* feat: update logic using dayjs and lodash lib

* feat: update cron jobs logic, move api actions to its service folder

* fix: query event from db and group it based on event_id and tx_id

* fix: just use a single job to query all daily data

* fix: move all queries in daily_stats job into a single Promise all

* fix: move dayjs.extend to after import statements

* fix: remove _start

* fix: only count native token in account_stats job

* feat: add api to sync stats from prev dates

* fix: support case when user just pass startDate to api

* fix: fix whitelist graphql

* fix: update column in account_statistic table, update bignum top_tx_sent

* fix: remove drop index in modify account statistic table

---------

Co-authored-by: AnDQK <doquockhanhan@gmail.com>
Co-authored-by: Phan Anh Tuan <fibonacci998@gmail.com>
#322)

* refactor: migrate cw721 activity missing smart contract event

* feat: api

* test: test params

* test: test params

* test: test params

* test: test params

* test: test params

* test: test params

* refactor: code

* refactor: code

* refactor: code

* refactor: code

* refactor: code

* fix: ci
* fix: get use_feegrant_grantee if has, other get tx_fee_payer

* fix: remove code not used
phamphong9981 and others added 22 commits September 15, 2023 15:43
* fix: smart contract missing label

* fix: test

* fix: test

* fix: test

* fix: test
* fix: update msg_index by order in event and log

* feat: add test mapping event and log

* feat: add test mapping by authz tx

* feat: add test mapping by authz tx

* fix: refactor mapping event to log, update unit test

* fix: comment set index msg with order, use count attribute to compare

* feat: add checkMappingEventToLog after mapped event

* fix: check map event log by flatten array

* fix: update checking map event log

* fix: add null value handle in checkMappingEventToLog

* feat: init job re assign msg_index to event

* fix: use transaction when update event

* fix: use forEach loop in job

* fix: sort graph when query db

* feat: add unittest for generateListUpdateMsgIndex function

* fix: update msg_index in 1 query per tx for each value

* fix: fix null when compare value attribute value

* fix: fix if tx fail, then no need set msg index
* feat: health check job

* feat: validator

* refactor: code
* refactor: cw721 media info

* refactor: code

* refactor: code
* fix: fix lint and remove resilient, protobuf, upgrade graphql

* fix: add package-lock.json
ibcIcs20sKeyBy[msg.sequence_key].timestamp = msg.timestamp;
ibcIcs20sKeyBy[msg.sequence_key].status = type;
});
await IbcIcs20.query()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

await IbcIcs20.query().
  join('ibc_ics20', 'sequence_key...').
  whereIn('ibc_message.id', [_.map(msgs, 'id')]).
  update('ibc_ics20.timestamp', 'ibc_message.timestamp')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timestamp không phải một row của ibc_mesage. Trong câu query cũ timestamp của ibc message là em lấy từ join select ra

await knex.schema.alterTable('ibc_ics20', (table) => {
table.timestamp('start_time');
table.timestamp('finish_time');
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

còn sửa những cái cũ thì sao?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mới có trên dev nên em đang phân vân có sửa ko

@peara peara merged commit 218c5cd into develop Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants