Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

feat(rpc): Added starknet_getTransactionStatus and removed starknet_pendingTransactions #1299

Merged
merged 23 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bb75f1b
added documentation for rpc lib function based on v0.6.0-rc5
antiyro Dec 4, 2023
48a2baf
runned cleans for CI
antiyro Dec 4, 2023
3f32221
cleaned for CI + remove unrelevent settings
antiyro Dec 4, 2023
61b0ee6
Merge branch 'main' into main
tdelabro Dec 4, 2023
c569866
feat(rpc): add starknet_specVersion rpc implemented in v0.5.1
antiyro Dec 4, 2023
fc55d7e
updated CHANGELOG.md
antiyro Dec 4, 2023
90cd639
Merge branch 'main' of https://github.com/antiyro/madara
antiyro Dec 4, 2023
b52c0e4
removed unrelevent test
antiyro Dec 4, 2023
285d8e7
added ignore to future impl of spec version test
antiyro Dec 4, 2023
30dce1e
commented future impl of spec version test
antiyro Dec 4, 2023
587fc38
removed starknet_pendingTransactions method + tests
antiyro Dec 5, 2023
a51c3ea
implemented starknet_getTransactionStatus - missing formated result
antiyro Dec 5, 2023
2fdfa2c
implemented starknet_getTransactionStatus
antiyro Dec 6, 2023
8072744
implemented starknet_getTransactionStatus - cleaned
antiyro Dec 6, 2023
350c086
implemented starknet_getTransactionStatus - merged madara
antiyro Dec 6, 2023
c9d78c0
updated changelog.md
antiyro Dec 6, 2023
7dbcfa1
runned prettier
antiyro Dec 6, 2023
f4a1950
added starknet_ before starknet data for concencus + corrected review
antiyro Dec 6, 2023
a91289a
added starknet_ before starknet data for concencus + corrected review
antiyro Dec 6, 2023
09227cf
chained substrate_block_hash and substrate_block_hash_from_db
antiyro Dec 6, 2023
1c51faa
Merge branch 'main' into feat/starknet_getTransactionStatus
antiyro Dec 6, 2023
a50b3c1
cleaned prettier
antiyro Dec 6, 2023
96b8333
removed unecessary serde = [mp-transactions/serde]
antiyro Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Next release

- refacto: substrate/starknet names in rpc library
- feat(rpc): Added starknet_getTransactionStatus and removed
starknet_pendingTransactions
- feat(rpc): add starknet_specVersion rpc + added test for future support
- docs: Added v0.6.0-rc5 documentation above the rpc method functions
- dev(deps): bump starknet rs, use Eq for EmmitedEvents comparaison
Expand Down
51 changes: 26 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/client/rpc-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jsonrpsee = { workspace = true, features = [
], default-features = true }
mp-block = { workspace = true }
mp-digest-log = { workspace = true }
mp-transactions = { workspace = true, features = ["serde"] }
tdelabro marked this conversation as resolved.
Show resolved Hide resolved
num-bigint = { workspace = true }
serde = { workspace = true, default-features = true }
serde_json = { workspace = true }
Expand Down
9 changes: 5 additions & 4 deletions crates/client/rpc-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use serde_with::serde_as;

pub mod utils;

use mp_transactions::TransactionStatus;
use starknet_core::serde::unsigned_field_element::UfeHex;
use starknet_core::types::{
BlockHashAndNumber, BlockId, BroadcastedDeclareTransaction, BroadcastedDeployAccountTransaction,
Expand Down Expand Up @@ -71,6 +72,10 @@ pub trait StarknetReadRpcApi {
#[method(name = "getBlockTransactionCount")]
fn get_block_transaction_count(&self, block_id: BlockId) -> RpcResult<u128>;

/// Gets the Transaction Status, Including Mempool Status and Execution Details
#[method(name = "getTransactionStatus")]
fn get_transaction_status(&self, transaction_hash: FieldElement) -> RpcResult<TransactionStatus>;

/// Get the value of the storage at the given address and key, at the given block id
#[method(name = "getStorageAt")]
fn get_storage_at(&self, contract_address: FieldElement, key: FieldElement, block_id: BlockId) -> RpcResult<Felt>;
Expand Down Expand Up @@ -128,10 +133,6 @@ pub trait StarknetReadRpcApi {
#[method(name = "getStateUpdate")]
fn get_state_update(&self, block_id: BlockId) -> RpcResult<StateUpdate>;

/// Returns the transactions in the transaction pool, recognized by this sequencer
#[method(name = "pendingTransactions")]
async fn pending_transactions(&self) -> RpcResult<Vec<Transaction>>;

/// Returns all events matching the given filter
#[method(name = "getEvents")]
async fn get_events(&self, filter: EventFilterWithPage) -> RpcResult<EventsPage>;
Expand Down
Loading