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

getTransactionEvents 函数支持的block range大一些 #38

Closed
allenzsh opened this issue Jan 14, 2022 · 1 comment
Closed

getTransactionEvents 函数支持的block range大一些 #38

allenzsh opened this issue Jan 14, 2022 · 1 comment

Comments

@allenzsh
Copy link

前端获取事件的函数:provider.getTransactionEvents,使用中有两个问题:

1)参数中有个event_key,是否可以支持直接用event_name

2)还有现在会提示block range只允许32个,这样很难获取过去一段较长时间的事件

@jolestar
Copy link
Member

  1. 这个需要按交易去获取。现在交易可以按一个全局递增 id 的顺序遍历 chain.get_transaction_infos
 /// Get transaction info list
    /// `start_global_index` is the transaction global index
    #[rpc(name = "chain.get_transaction_infos")]
    fn get_transaction_infos(
        &self,
        start_global_index: u64,
        reverse: bool,
        max_size: u64,
    ) -> FutureResult<Vec<TransactionInfoView>>;

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

No branches or pull requests

2 participants