Skip to content

Commit

Permalink
Merge branch 'main' into rocksdb-docs
Browse files Browse the repository at this point in the history
jbcaron authored Nov 25, 2024
2 parents 5c43d9a + 830e95e commit 0af80bd
Showing 4 changed files with 44 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
## Next release

- dev docs: add documentation to the rocksdb configuration
- fix(fgw): fetch class
- feat: possibility of starting madara & kakarot-rpc in docker
- feat(debug): service cancelling and profiling build
- feat(endpoint): added extra admin rpc endpoint for sensitive rpc calls
35 changes: 30 additions & 5 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -238,3 +238,5 @@ tracing-opentelemetry = "0.26.0"
[patch.crates-io]
# wait for PR https://github.com/starknet-io/types-rs/pull/76 to be merged
starknet-types-core = { git = "https://github.com/kasarlabs/types-rs.git", branch = "feat-deserialize-v0.1.7" }

starknet-core = { git = "https://github.com/kasarlabs/starknet-rs.git", branch = "fork" }
11 changes: 11 additions & 0 deletions crates/client/gateway/client/src/methods.rs
Original file line number Diff line number Diff line change
@@ -163,6 +163,8 @@ mod tests {

const CLASS_BLOCK_0: &str = "0x010455c752b86932ce552f2b0fe81a880746649b9aee7e0d842bf3f52378f9f8";

const CLASS_NO_ABI: &str = "0x371b5f7c5517d84205365a87f02dcef230efa7b4dd91a9e4ba7e04c5b69d69b";

const CLASS_ACCOUNT: &str = "0x07595b4f7d50010ceb00230d8b5656e3c3dd201b6df35d805d3f2988c69a1432";
const CLASS_ACCOUNT_BLOCK: u64 = 1342;

@@ -408,6 +410,15 @@ mod tests {
assert_eq!(class, class_compressed_reference.into());
}

#[rstest]
#[tokio::test]
async fn get_class_by_hash_legacy_without_abi(client_mainnet_fixture: GatewayProvider) {
let _ = client_mainnet_fixture
.get_class_by_hash(Felt::from_hex_unchecked(CLASS_NO_ABI), BlockId::Number(20734))
.await
.unwrap_or_else(|_| panic!("Getting class {CLASS_NO_ABI} at block number 0"));
}

#[rstest]
#[tokio::test]
async fn get_class_by_hash_account(client_mainnet_fixture: GatewayProvider) {

0 comments on commit 0af80bd

Please sign in to comment.