From 9ca6cafcc9be4bebfe7fcc62eda68d5bdc430fe6 Mon Sep 17 00:00:00 2001 From: glihm Date: Tue, 5 Nov 2024 16:50:11 -0600 Subject: [PATCH 1/2] docs: fix typo --- crates/dojo/core/src/contract/components/upgradeable.cairo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/dojo/core/src/contract/components/upgradeable.cairo b/crates/dojo/core/src/contract/components/upgradeable.cairo index 2ae357a3b7..160d7fcc15 100644 --- a/crates/dojo/core/src/contract/components/upgradeable.cairo +++ b/crates/dojo/core/src/contract/components/upgradeable.cairo @@ -50,8 +50,9 @@ pub mod upgradeable_cpt { ); assert(new_class_hash.is_non_zero(), Errors::INVALID_CLASS); - // Seems like the match doesn't catch the error is the entrypoint is - // not found. + // Seems like the match doesn't catch the error if the entrypoint is + // not found. This is observed on public network like Sepolia. + // On the cairo runner, behavior seems to be as expected. match starknet::syscalls::library_call_syscall( new_class_hash, selector!("dojo_name"), [].span(), ) { From ef0f47ce50313b3d3c82ebc04be593242472f067 Mon Sep 17 00:00:00 2001 From: glihm Date: Tue, 5 Nov 2024 17:09:26 -0600 Subject: [PATCH 2/2] docs: clarify syscall behavior --- crates/dojo/core/src/contract/components/upgradeable.cairo | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/dojo/core/src/contract/components/upgradeable.cairo b/crates/dojo/core/src/contract/components/upgradeable.cairo index 160d7fcc15..e08a718d7f 100644 --- a/crates/dojo/core/src/contract/components/upgradeable.cairo +++ b/crates/dojo/core/src/contract/components/upgradeable.cairo @@ -50,9 +50,10 @@ pub mod upgradeable_cpt { ); assert(new_class_hash.is_non_zero(), Errors::INVALID_CLASS); - // Seems like the match doesn't catch the error if the entrypoint is - // not found. This is observed on public network like Sepolia. - // On the cairo runner, behavior seems to be as expected. + // Currently - any syscall that fails on starknet - fails the transaction, and it won't + // be included in any block. + // The test runner does not simulate this, but instead simulates the future behavior + // when errors can be recovered from. match starknet::syscalls::library_call_syscall( new_class_hash, selector!("dojo_name"), [].span(), ) {