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: erc20 contract no action #908

Merged
merged 2 commits into from
Sep 24, 2024
Merged

feat: erc20 contract no action #908

merged 2 commits into from
Sep 24, 2024

Conversation

phamphong9981
Copy link
Collaborator

Add no_action column to erc20_contract table
image

table.jsonb('no_action').defaultTo('{}');
});
await knex.raw(`set statement_timeout to 0`);
const [totalTransfer, totalApproval, totalDeposit, totalWithdrawal] =
Copy link
Collaborator Author

@phamphong9981 phamphong9981 Sep 24, 2024

Choose a reason for hiding this comment

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

@peara Đoạn này đáng ra em nên group by theo cả action thì chỉ cần 1 query, em vừa để ý :)) nhưng mà đoạn sau xử lý trong code cũng phức tạp, mà migration cũng chạy 1 lần em thấy story chạy đc rồi ạ

@@ -27,6 +27,8 @@ export class Erc20Contract extends BaseModel {

last_updated_height!: number;

no_action!: any;
Copy link
Member

Choose a reason for hiding this comment

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

cho thành total_actions đi, no_action nghe như ko hay lắm

@@ -86,6 +86,12 @@ export class Erc20Handler {
) {
this.handlerErc20Transfer(erc20Activity);
}
this.erc20Contracts[erc20Activity.erc20_contract_address].no_action[
erc20Activity.action
Copy link
Member

Choose a reason for hiding this comment

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

sao lại có cái action này ở trong nhỉ? ko phải là đếm tổng à?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

@peara
Copy link
Member

peara commented Sep 24, 2024

A total of 75,277 transfers found

ở trên aurascan ghi là transfers, đếm tất có đúng ko?

@peara peara merged commit 9553e92 into evm Sep 24, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants