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

[relayer] query at specific block on starknet #188

Open
Tracked by #123
rnbguy opened this issue Jan 13, 2025 · 0 comments
Open
Tracked by #123

[relayer] query at specific block on starknet #188

rnbguy opened this issue Jan 13, 2025 · 0 comments

Comments

@rnbguy
Copy link
Member

rnbguy commented Jan 13, 2025

Currently, we use a Pending block id to query the latest state.

async fn call_contract(
chain: &Chain,
contract_address: &Felt,
entry_point_selector: &Felt,
calldata: &Vec<Felt>,
) -> Result<Vec<Felt>, Chain::Error> {
let block_id = BlockId::Tag(BlockTag::Pending);
let res = chain
.provider()
.call(
FunctionCall {
contract_address: *contract_address,
entry_point_selector: *entry_point_selector,
calldata: calldata.clone(),
},
block_id,
)

Ideally, we should have

  • call_contract_with_latest_height - takes no block id and possibly uses BlockTag::Pending
  • call_contract - takes a block id or u64.

Note: this is different than #182 which also discusses querying a proof at a specific block.

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

3 participants