diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d4a48fed2..36a65b28b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Next release +- refacto: move starknet runtime api in it's own crate - chore: update README.md and getting-started.md - chore: remove crates that have been copy-pasted from plkdtSDK - feat(rpc): return deployed contract address and actual fee in transaction diff --git a/crates/pallets/starknet/runtime_api/src/lib.rs b/crates/pallets/starknet/runtime_api/src/lib.rs index 409442feaf..81137fad02 100644 --- a/crates/pallets/starknet/runtime_api/src/lib.rs +++ b/crates/pallets/starknet/runtime_api/src/lib.rs @@ -9,7 +9,7 @@ use alloc::sync::Arc; use blockifier::execution::contract_class::ContractClass; use mp_felt::Felt252Wrapper; -use mp_transactions::{Transaction, TxType, UserTransaction}; +use mp_transactions::{Transaction, UserTransaction}; use sp_api::BlockT; pub extern crate alloc; use alloc::string::String; @@ -56,7 +56,9 @@ sp_api::decl_runtime_apis! { /// the runtime itself, accomplished through the extrinsic_filter method. This enables the /// client to operate seamlessly while abstracting the extrinsic complexity. fn extrinsic_filter(xts: Vec<::Extrinsic>) -> Vec; - fn get_events_for_tx_hash(xts: Vec<::Extrinsic>, chain_id: Felt252Wrapper, tx_hash: Felt252Wrapper) -> Option<(TxType, Vec)>; + fn get_index_and_tx_for_tx_hash(xts: Vec<::Extrinsic>, chain_id: Felt252Wrapper, tx_hash: Felt252Wrapper) -> Option<(u32, Transaction)>; + /// Returns events, call with index from get_index_and_tx_for_tx_hash method + fn get_events_for_tx_by_index(tx_index: u32) -> Option>; /// Return the list of StarknetEvent evmitted during this block, along with the hash of the starknet transaction they bellong to /// @@ -66,6 +68,8 @@ sp_api::decl_runtime_apis! { fn get_tx_execution_outcome(tx_hash: TransactionHash) -> Option>; /// Return the block context fn get_block_context() -> BlockContext; + /// Return is fee disabled in state + fn is_transaction_fee_disabled() -> bool; } pub trait ConvertTransactionRuntimeApi { @@ -132,4 +136,4 @@ impl From for BlockContext { max_recursion_depth: value.max_recursion_depth, } } -} \ No newline at end of file +}