Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cairo 2.1.1 #138

Merged
merged 12 commits into from
Sep 11, 2023
Merged

Cairo 2.1.1 #138

merged 12 commits into from
Sep 11, 2023

Conversation

shramee
Copy link
Owner

@shramee shramee commented Aug 20, 2023

resolves #136

Thanks @codeWhizperer for updating the contract exercises!

codeWhizperer and others added 5 commits August 20, 2023 11:33
* ft: update contract to new_syntax

* chore: format starknet exercise and update readme

* Update README.md

* fix: correct starknet-exercise-one
@shramee shramee requested a review from enitrat August 20, 2023 11:29
@shramee
Copy link
Owner Author

shramee commented Aug 20, 2023

Continued from #137

runner.find_function("::main")?,
&[],
args.available_gas,
StarknetState::default(),
)
.with_context(|| "Failed to run the function.")?;
match result.value {
cairo_lang_runner::RunResultValue::Success(values) => ret_string
.push_str(format!("Run completed successfully, returning {values:?}").as_str()),
cairo_lang_runner::RunResultValue::Success(values) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you verified that this works correctly? I think using the ret_string variable was required here to get the output of the run

I tried an my previous solution for enum2.cairo is not compiling anymore - but the error message doesn't appear

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, I tested with some arbitrary cairo and it seemed to compile/show error. Lemme check enum example.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reverted to old signatures but it was still happening,

This seemed to fix the issue.

image

@shramee
Copy link
Owner Author

shramee commented Aug 21, 2023

@codeWhizperer few fixes on exercises,

  • starknet1 was solved
  • starknet4 had some parts solved
  • starknet5 don't use generate_trait when interface is defined.

@enitrat Lemme know if things looks good.

@barretodavid
Copy link
Contributor

I'm planning to use Starklings for Basecamp tomorrow. Any chance we can get this PR merged?

@shramee shramee merged commit b0449e9 into main Sep 11, 2023
1 check passed
@shramee shramee deleted the cairo-2.1.1 branch September 23, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update contract syntax to Cairo v2.1.0
4 participants