-
Notifications
You must be signed in to change notification settings - Fork 53
Conversation
Co-authored-by: Mario Rugiero <mrugiero@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #823 +/- ##
==========================================
+ Coverage 91.74% 91.82% +0.08%
==========================================
Files 54 54
Lines 12530 12728 +198
==========================================
+ Hits 11496 11688 +192
- Misses 1034 1040 +6
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsignificant nits
src/lib.rs
Outdated
@@ -836,7 +836,7 @@ mod test { | |||
tx_type: TransactionType::Declare, | |||
validate_entry_point_selector: VALIDATE_DECLARE_ENTRY_POINT_SELECTOR.clone(), | |||
version: 1.into(), | |||
max_fee: 2, | |||
max_fee: 100_000_000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
max_fee: 100_000_000, | |
max_fee: INITIAL_GAS_COST, |
src/lib.rs
Outdated
let declare_tx = Transaction::DeclareV2(Box::new(declare_v2)); | ||
|
||
let err = declare_tx | ||
.execute(&mut state, &block_context, 100_000_000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.execute(&mut state, &block_context, 100_000_000) | |
.execute(&mut state, &block_context, INITIAL_GAS_COST) |
Co-authored-by: Estéfano Bargas <estefano.bargas@fing.edu.uy>
Co-authored-by: Estéfano Bargas <estefano.bargas@fing.edu.uy>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @SantiagoPittella !
I think it would be good to add a test checking the DeclareV2.casm_class = None case.
If we already tested that case please correct me!
@@ -466,7 +485,7 @@ mod tests { | |||
use num_traits::{One, Zero}; | |||
|
|||
#[test] | |||
fn create_declare_v2_test() { | |||
fn create_declare_v2_without_casm_contract_class_test() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add a test with a none DeclareV2.casm_class to check that everything is working OK
Description
Adds the
CasmContractClass
as optional.If already exist, we do not compile de sierra to casm.
If not, we use the usual path and compile the sierra to casm.
In both cases we check the CASM class hashes.
closes #822
Made on top of #819
Checklist