Skip to content

Commit

Permalink
WIP: need to fix or remove calls to cairo1 helper
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 15, 2024
1 parent 3b80394 commit 7c7e626
Show file tree
Hide file tree
Showing 137 changed files with 24,003 additions and 3,665 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HYPOTHESIS_PROFILE=dev
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ target/

# Ignore database files
**/*.db

# Cairo project files
*.pyc
*.pb.gz
.env
build
coverage
.hypothesis
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10.13
49 changes: 44 additions & 5 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.22.3
version: 1.22.5
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
Expand All @@ -12,32 +12,71 @@ plugins:
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- go@1.21.0
- node@18.12.1
- python@3.10.8
definitions:
- type: rust
system_version: allowed
# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
files:
- name: cairo
extensions:
- cairo
- name: solidity
extensions:
- sol
definitions:
- name: clippy
commands:
- name: lint
run:
cargo clippy --message-format json --locked --all-targets
--all-features -- --cap-lints=warn --no-deps
- name: cairo
files: [cairo]
commands:
- output: rewrite
success_codes: [0]
formatter: true
run: cairo-format ${target}
read_output_from: stdout
run_linter_from: workspace
- name: solidity
files: [solidity]
commands:
- output: rewrite
success_codes: [0, 1]
formatter: true
run: forge fmt ${target} --check -r
read_output_from: stdout
run_linter_from: workspace
enabled:
- dotenv-linter@3.3.0
- actionlint@1.7.1
- checkov@3.2.238
- black@24.8.0
- cairo@SYSTEM
- checkov@3.2.253
- clippy@SYSTEM
- rustfmt@SYSTEM
- codespell@2.3.0
- git-diff-check
- hadolint@2.12.0
- isort@5.13.2
- markdownlint@0.41.0
- osv-scanner@1.8.4
- osv-scanner@1.8.5
- oxipng@9.1.2
- prettier@3.3.3
- ruff@0.6.4
- rustfmt@SYSTEM
- shellcheck@0.10.0
- shfmt@3.6.0
- solidity@SYSTEM
- taplo@0.9.3
- trufflehog@3.81.9
- trivy@0.55.1
- trufflehog@3.82.1
- yamllint@1.35.1

actions:
disabled:
- trunk-announce
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"ommers",
"recv",
"Risc"
]
],
"python.testing.pytestArgs": ["cairo"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}
1 change: 1 addition & 0 deletions cairo/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
Empty file added cairo/README.md
Empty file.
24 changes: 24 additions & 0 deletions cairo/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[project]
name = "cairo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.10"

dependencies = ["cairo-lang>=0.13.2", "ethereum", "python-dotenv>=1.0.1"]

[tool.uv]
dev-dependencies = [
"eth-abi>=5.1.0",
"eth-account>=0.13.3",
"eth-keys>=0.5.1",
"eth-utils>=5.0.0",
"hypothesis>=6.112.1",
"ipykernel>=6.29.5",
"protobuf>=5.28.1",
"pytest-xdist>=3.6.1",
"pytest>=8.3.3",
]

[tool.uv.sources]
ethereum = { git = "https://github.com/ethereum/execution-specs.git" }
Empty file added cairo/src/__init__.py
Empty file.
Loading

0 comments on commit 7c7e626

Please sign in to comment.