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

niv/CERT 7810 part1: Soroban Example #148

Open
wants to merge 3 commits into
base: cli-beta
Choose a base branch
from

Conversation

nivcertora
Copy link
Contributor

Summary of Changes

This PR introduces the Soroban Hello World Contract Example to demonstrate the use of Certora's Prover with Soroban smart contracts. Key changes include:

  1. New Project Files:

    • Rust Smart Contract: Added lib.rs and test.rs to define and test a basic hello function.
    • WASM Binary: Generated the soroban_hello_world_contract.wasm file.
    • Configuration Files:
      • hello_world_old_format.conf (manual .wasm file specification).
      • hello_world_new_fromat.conf (dynamic build using certora_build.py).
    • Build Script: certora_build.py for compiling the project dynamically.
  2. Justfile:

    • Added justfile with commands for building, converting, and cleaning the project.
  3. Cargo Files:

    • Cargo.toml and Cargo.lock to manage dependencies and project settings.
  4. README.md:

    • Detailed instructions for running Certora Prover with both old and new configuration formats.
    • Highlighted differences between the two formats and provided example commands with expected outputs.
  5. .gitignore:

    • Updated to exclude **/target/ directory.

@nivcertora nivcertora requested a review from a team December 22, 2024 10:37
@nivcertora nivcertora self-assigned this Dec 22, 2024
```

**Key Difference:**
- **Old Format:** Requires manual specification of the `.wasm` file.
Copy link
Contributor

Choose a reason for hiding this comment

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

Manual compilation as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Comment on lines +95 to +103
## Building the Project

The `certora_build.py` script compiles the contract and prepares it for verification:
```bash
python3 certora_build.py
```

This ensures the `soroban_hello_world_contract.wasm` file is up-to-date and properly configured.
And must be used when running the old format configuration but is not required for the new format.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add more details regarding the contract established in the build script.
Its inputs, outputs and requirements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the contract? i am not familiar with it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The inputs and outputs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@yoav-el-certora yoav-el-certora left a comment

Choose a reason for hiding this comment

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

Lets make this PR as draft until we get final decision regarding rust projects examples.

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.

2 participants