-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
table.jsonb('no_action').defaultTo('{}'); | ||
}); | ||
await knex.raw(`set statement_timeout to 0`); | ||
const [totalTransfer, totalApproval, totalDeposit, totalWithdrawal] = |
There was a problem hiding this comment.
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 ạ
src/models/erc20_contract.ts
Outdated
@@ -27,6 +27,8 @@ export class Erc20Contract extends BaseModel { | |||
|
|||
last_updated_height!: number; | |||
|
|||
no_action!: any; |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 à?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ở trên aurascan ghi là |
Add no_action column to erc20_contract table