-
Notifications
You must be signed in to change notification settings - Fork 291
Conversation
In this commit i added a line in lib.rs, related to the transactions version, because it seems for me that we had to do that, and then i tried to run the |
Since cairo v0.10, transaction are splitted to two function validate and execute, this splitting allows for a protocol-level distinction between invalid and reverted transactions, so i think you should not run_non_revertible_transaction for v3 in |
Right now Im working in that, in creating a new |
did you check https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-8.md ? if you still need help on |
I dont know why in this code:
I'm getting this error:
The invoke function inside of the assert_ok! is throwing that error. The test is almost the same as this one:
|
Some of those tests that i just made. Are not working, there is a comment in the tests to know that. And if you see, the tests that are supposed to fail, are the ones that are working. And those tests that are supposed to passed, are failing because they return an error. So maybe im doing something wrong here :/ |
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.
It is not clear what I should review.
Can you cleanup now that other PRs you integrated have been merged?
Or start a new PR
pub struct LegacyProgramWrapper { | ||
pub legacy_program: LegacyProgram, | ||
} | ||
|
||
impl<'de> Deserialize<'de> for LegacyProgramWrapper { | ||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> | ||
where | ||
D: Deserializer<'de>, | ||
{ | ||
let value = serde_json::Value::deserialize(deserializer)?; | ||
|
||
// Ensure the required fields are present in the JSON data | ||
let mut json_obj = value.as_object().ok_or_else(|| de::Error::custom("Expected JSON object"))?.clone(); | ||
|
||
// If 'main_scope' field is missing, set it to the default value | ||
if !json_obj.contains_key("main_scope") { | ||
json_obj.insert("main_scope".to_string(), serde_json::Value::String("__main__".to_string())); | ||
} | ||
|
||
// Deserialize the modified JSON data into LegacyProgram | ||
let legacy_program = serde_json::from_value(serde_json::Value::Object(json_obj)).map_err(de::Error::custom)?; | ||
|
||
Ok(LegacyProgramWrapper { legacy_program }) | ||
} | ||
} |
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.
This comes from another PR.
Can you rebase please. Right now I can't tell what are your changes and what comes form the branch you merged into yours
pub fn create_resource_bounds() -> starknet_api::transaction::ResourceBoundsMapping { | ||
let mut map = BTreeMap::new(); | ||
map.insert( | ||
starknet_api::transaction::Resource::L1Gas, | ||
starknet_api::transaction::ResourceBounds { max_amount: 10000, max_price_per_unit: 12000 }, | ||
); | ||
map.insert( | ||
starknet_api::transaction::Resource::L1Gas, | ||
starknet_api::transaction::ResourceBounds { max_amount: 50000, max_price_per_unit: 31000 }, | ||
); | ||
starknet_api::transaction::ResourceBoundsMapping(map) | ||
} | ||
|
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.
Same this comes from another PR.
Pull Request type
Draft
Please add the labels corresponding to the type of changes your PR introduces:
Testing
Resolves: #1574
What is the new behavior?