Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/test_contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,19 @@ jobs:

- name: Check formatting
run: |
scarb fmt --check
scarb fmt --check

- name: Check formatting in cloakpay
run: |
cd cloakpay
scarb fmt --check

- name: Build contracts in cloakpay
run: |
cd cloakpay
scarb build

- name: Run tests in cloakpay
run: |
cd cloakpay
snforge test
5 changes: 5 additions & 0 deletions cloakpay/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
target
.snfoundry_cache/
snfoundry_trace/
coverage/
profile/
Empty file added cloakpay/.tool-versions
Empty file.
33 changes: 33 additions & 0 deletions cloakpay/CONTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to CloakPay

Thank you for your interest in contributing to this project!

## Getting Started

1. **Fork the repository** and clone it to your local machine.
2. **Install dependencies** as required by the project.

## Development Workflow

- **Format code:**
Run `scarb fmt` to format the codebase.

- **Build the project:**
Run `scarb build` to build the project.

- **Run tests:**
Run `snforge test` to execute the test suite.

## Pull Requests

- Ensure your code is well-formatted and passes all tests.
- Provide clear commit messages and describe your changes in the pull request.
- Reference related issues if applicable.

## Code of Conduct

Please be respectful and considerate in all interactions.

---

Happy coding!
24 changes: 24 additions & 0 deletions cloakpay/Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "cloakpay"
version = "0.1.0"
dependencies = [
"snforge_std",
]

[[package]]
name = "snforge_scarb_plugin"
version = "0.40.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:7c3b21f6cdab14fc63e19f9e6789b6a3d44f5618ebcf02d03b397375304e1891"

[[package]]
name = "snforge_std"
version = "0.40.0"
source = "registry+https://scarbs.xyz/"
checksum = "sha256:0221bbe959eec72eb2e30be68df66c4ff5dcd924ec491f285c974e49671fabc0"
dependencies = [
"snforge_scarb_plugin",
]
52 changes: 52 additions & 0 deletions cloakpay/Scarb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[package]
name = "cloakpay"
version = "0.1.0"
edition = "2024_07"

# See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html

[dependencies]
starknet = "2.11.2"

[dev-dependencies]
snforge_std = "0.40.0"
assert_macros = "2.11.2"

[[target.starknet-contract]]
sierra = true

[scripts]
test = "snforge test"

[tool.scarb]
allow-prebuilt-plugins = ["snforge_std"]

# Visit https://foundry-rs.github.io/starknet-foundry/appendix/scarb-toml.html for more information

# [tool.snforge] # Define `snforge` tool section
# exit_first = true # Stop tests execution immediately upon the first failure
# fuzzer_runs = 1234 # Number of runs of the random fuzzer
# fuzzer_seed = 1111 # Seed for the random fuzzer

# [[tool.snforge.fork]] # Used for fork testing
# name = "SOME_NAME" # Fork name
# url = "http://your.rpc.url" # Url of the RPC provider
# block_id.tag = "latest" # Block to fork from (block tag)

# [[tool.snforge.fork]]
# name = "SOME_SECOND_NAME"
# url = "http://your.second.rpc.url"
# block_id.number = "123" # Block to fork from (block number)

# [[tool.snforge.fork]]
# name = "SOME_THIRD_NAME"
# url = "http://your.third.rpc.url"
# block_id.hash = "0x123" # Block to fork from (block hash)

# [profile.dev.cairo] # Configure Cairo compiler
# unstable-add-statements-code-locations-debug-info = true # Should be used if you want to use coverage
# unstable-add-statements-functions-debug-info = true # Should be used if you want to use coverage/profiler
# inlining-strategy = "avoid" # Should be used if you want to use coverage

# [features] # Used for conditional compilation
# enable_for_tests = [] # Feature name and list of other features that should be enabled with it
Empty file added cloakpay/deployment.md
Empty file.
Empty file added cloakpay/makefile
Empty file.
11 changes: 11 additions & 0 deletions cloakpay/snfoundry.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Visit https://foundry-rs.github.io/starknet-foundry/appendix/snfoundry-toml.html
# and https://foundry-rs.github.io/starknet-foundry/projects/configuration.html for more information

# [sncast.default] # Define a profile name
# url = "https://free-rpc.nethermind.io/sepolia-juno/v0_8" # Url of the RPC provider
# accounts-file = "../account-file" # Path to the file with the account data
# account = "mainuser" # Account from `accounts_file` or default account file that will be used for the transactions
# keystore = "~/keystore" # Path to the keystore file
# wait-params = { timeout = 300, retry-interval = 10 } # Wait for submitted transaction parameters
# block-explorer = "StarkScan" # Block explorer service used to display links to transaction details
# show-explorer-links = true # Print links pointing to pages with transaction details in the chosen block explorer
1 change: 1 addition & 0 deletions cloakpay/src/base/errors.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod Errors {}
1 change: 1 addition & 0 deletions cloakpay/src/base/events.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod Events {}
3 changes: 3 additions & 0 deletions cloakpay/src/base/security.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pub trait SecurityTrait<TContractState> {}

pub impl Security<TContractState> of SecurityTrait<TContractState> {}
3 changes: 3 additions & 0 deletions cloakpay/src/base/types.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// Common types used across the contract.


21 changes: 21 additions & 0 deletions cloakpay/src/cloakpay.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#[starknet::contract]
pub mod cloakpay {
use crate::interfaces::ICloakpay::ICloakPay;
use super::*;
#[storage]
struct Storage {}

#[event]
#[derive(Drop, starknet::Event)]
pub enum Event {}

#[constructor]
fn constructor(ref self: ContractState) {}


#[abi(embed_v0)]
impl CloakPayImpl of ICloakPay<ContractState> {}

#[generate_trait]
impl Internal of InternalTrait {}
}
2 changes: 2 additions & 0 deletions cloakpay/src/interfaces/ICloakpay.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#[starknet::interface]
pub trait ICloakPay<TContractState> {}
14 changes: 14 additions & 0 deletions cloakpay/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub mod base {
pub mod errors;
pub mod events;
pub mod security;
pub mod types;
}

pub mod interfaces {
pub mod ICloakpay;
}


pub mod cloakpay;
pub mod utils;
1 change: 1 addition & 0 deletions cloakpay/src/utils.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions cloakpay/tests/integration_test.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions cloakpay/tests/test_contract.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions cloakpay/tests/test_utils.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

Loading