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

Publish solutions to CTF challenegs #5492

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from

Conversation

salaheldinsoliman
Copy link
Contributor

@salaheldinsoliman salaheldinsoliman commented Feb 19, 2025

Description of change

Added solutions in the form of commented bash scripts

Links to any relevant issues

addresses:
#5163
#5217

Be sure to reference any related issues by adding fixes #(issue).

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Documentation Enhancement

How the change has been tested

Describe the tests that you ran to verify your changes.

Make sure to provide instructions for the maintainer as well as any relevant configurations.

Change checklist

Tick the boxes that are relevant to your changes, and delete any items that are not.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • [] I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Copy link

vercel bot commented Feb 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
apps-backend ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 0:47am
apps-ui-kit ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 0:47am
rebased-explorer ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 0:47am
wallet-dashboard ⬜️ Ignored (Inspect) Visit Preview Feb 26, 2025 0:47am

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Feb 19, 2025
@iota-ci iota-ci added the devx Issues related to the DevX team label Feb 19, 2025
Signed-off-by: salaheldinsoliman <[email protected]>
@vercel vercel bot temporarily deployed to Preview – apps-ui-kit February 20, 2025 12:30 Inactive
@vercel vercel bot temporarily deployed to Preview – rebased-explorer February 20, 2025 12:31 Inactive
@vercel vercel bot temporarily deployed to Preview – apps-backend February 20, 2025 12:31 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-dashboard February 20, 2025 12:32 Inactive
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Signed-off-by: salaheldinsoliman <[email protected]>
Copy link
Contributor

✅ Vercel Preview Deployment is ready!

View Preview

Comment on lines +3 to +6

iota client ptb --move-call 0xc6f00a2b5ec2d161442b305dcb307ba914e20c5268ec931bd14d7ea3454b262b::mintcoin::mint_coin @0x11d7aacb27eb65063dbb6ce0fa07f7807316c5e77763c6f2356d1bd3a34a2741 \
--move-call 0xc6f00a2b5ec2d161442b305dcb307ba914e20c5268ec931bd14d7ea3454b262b::mintcoin::mint_coin @0x11d7aacb27eb65063dbb6ce0fa07f7807316c5e77763c6f2356d1bd3a34a2741 \
--move-call 0xc6f00a2b5ec2d161442b305dcb307ba914e20c5268ec931bd14d7ea3454b262b::mintcoin::mint_coin @0x11d7aacb27eb65063dbb6ce0fa07f7807316c5e77763c6f2356d1bd3a34a2741
Copy link
Member

Choose a reason for hiding this comment

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

How about defining the package id and treasury cap as env variables and use them? Would improve the readability a lot. Same in the other examples

MINT_COIN_PACKAGE=0xc6f00a2b5ec2d161442b305dcb307ba914e20c5268ec931bd14d7ea3454b262b
TREASURY_CAP=0x11d7aacb27eb65063dbb6ce0fa07f7807316c5e77763c6f2356d1bd3a34a2741

iota client ptb --move-call $MINT_COIN_PACKAGE::mintcoin::mint_coin @$TREASURY_CAP \
    --move-call $MINT_COIN_PACKAGE::mintcoin::mint_coin @$TREASURY_CAP \
    --move-call $MINT_COIN_PACKAGE::mintcoin::mint_coin @$TREASURY_CAP

// Deserialize the bytes back into a Pizza struct.
let pizza: Pizza = bcs::from_bytes(&data).expect("Deserialization failed");

println!("Expected Pizza Struct: {:?}", pizza);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
println!("Expected Pizza Struct: {:?}", pizza);
println!("Expected Pizza Struct: {pizza:?}");

@@ -16,7 +16,7 @@ module ctf::vault{
user: address
}

public struct Receipt {
public struct Receipt {zero
Copy link
Member

Choose a reason for hiding this comment

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

Copy paste mistake?

Suggested change
public struct Receipt {zero
public struct Receipt {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devx Issues related to the DevX team documentation Improvements or additions to documentation
Projects
Status: Sprint Backlog
Development

Successfully merging this pull request may close these issues.

3 participants