Skip to content

Commit

Permalink
Add trunk and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementWalter committed Sep 25, 2023
1 parent ef8180d commit 05d04d3
Show file tree
Hide file tree
Showing 23 changed files with 360 additions and 137 deletions.
13 changes: 8 additions & 5 deletions .github/ISSUE_TEMPLATE/01_BUG_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: "bug"
assignees: ""
---

# Bug Report
## Bug Report

**Kakarot version:**

Expand All @@ -22,16 +22,19 @@ assignees: ""

**Steps to reproduce:**

<!-- Explain the steps required to duplicate the issue, especially if you are able to provide a sample application. -->
<!-- Explain the steps required to duplicate the issue, especially
if you are able to provide a sample application. -->

**Related code:**

<!-- If you are able to illustrate the bug or feature request with an example, please provide it here. -->
<!-- If you are able to illustrate the bug or feature request with an example,
please provide it here. -->

```
```bash
insert short code snippets here
```

**Other information:**

<!-- List any other information that is relevant to your issue. Related issues, suggestions on how to fix, Stack Overflow links, forum links, etc. -->
<!-- List any other information that is relevant to your issue. Related issues,
suggestions on how to fix, Stack Overflow links, forum links, etc. -->
16 changes: 8 additions & 8 deletions .github/ISSUE_TEMPLATE/02_FEATURE_REQUEST.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
name: Feature Request
about: Suggest an idea for this project
title: 'feat: '
labels: 'enhancement'
assignees: ''
title: "feat: "
labels: "enhancement"
assignees: ""
---

# Feature Request
## Feature Request

**Describe the Feature Request**
### Describe the Feature Request

**Describe Preferred Solution**
### Describe Preferred Solution

**Related Code**
### Related Code

**Additional Context**
### Additional Context

**If the feature request is approved, would you be willing to submit a PR?**
_(Help can be provided if you need assistance submitting a PR)_
Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/03_CODEBASE_IMPROVEMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
name: Codebase improvement
about: Provide your feedback for the existing codebase. Suggest a better solution for algorithms, development tools, etc.
about:
Provide your feedback for the existing codebase. Suggest a better solution for
algorithms, development tools, etc.
title: "dev: "
labels: "enhancement"
assignees: ""
Expand Down
9 changes: 6 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Pull Request type

<!-- Please try to limit your pull request to one type; submit multiple pull requests if needed. -->
<!-- Please try to limit your pull request to one type; submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:

Expand All @@ -16,7 +17,8 @@ Please check the type of change your PR introduces:

## What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->
<!-- Please describe the current behavior that you are modifying,
or link to a relevant issue. -->

Resolves: #

Expand All @@ -33,4 +35,5 @@ Resolves: #
- [ ] Yes
- [ ] No

<!-- If this does introduce a breaking change, please describe the impact and migration path for existing applications below. -->
<!-- If this does introduce a breaking change, please describe the impact and
migration path for existing applications below. -->
8 changes: 6 additions & 2 deletions .github/workflows/gas_reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Compare Snapshot

on: pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
pull-requests: write

Expand All @@ -17,12 +21,12 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9" # Specify the Python version required
python-version: 3.9

- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "0.7.0"
scarb-version: 0.7.0

- name: Run compare_snapshot script
id: run-script
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/gas_snapshot.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Generate and Upload Gas Snapshot

permissions: read-all

on:
push:
branches:
Expand All @@ -20,7 +22,7 @@ jobs:
- name: Set up Scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "0.7.0"
scarb-version: 0.7.0

- name: Generate gas snapshot
run: python scripts/gen_snapshot.py
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: CI

permissions: read-all

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: software-mansion/setup-scarb@v1
with:
scarb-version: "0.7.0"
scarb-version: 0.7.0
- run: scarb fmt --check
- run: scarb build
- run: scarb test
24 changes: 24 additions & 0 deletions .github/workflows/trunk-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Trunk

on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: read-all

jobs:
trunk_check:
name: Trunk Check Runner
runs-on: ubuntu-latest
permissions:
checks: write # For trunk to post annotations
contents: read # For repo checkout

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Trunk Check
uses: trunk-io/trunk-action@v1
28 changes: 2 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
#Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

# Visual Studio Code
.vscode/
# JetBrains
.idea/

# Environment files
.DS_Store
.env

build

# Gas snapshots generated with scripts
gas_snapshot.json
target
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"starkware.cairo1",
"trunk.io",
"streetsidesoftware.code-spell-checker"
]
}
150 changes: 150 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
{
"cSpell.words": [
"nightlies",
"scarb",
"stop",
"add",
"mul",
"sub",
"div",
"sdiv",
"mod",
"smod",
"addmod",
"mulmod",
"exp",
"signextend",
"lt",
"gt",
"slt",
"sgt",
"eq",
"iszero",
"and",
"or",
"xor",
"not",
"byte",
"shl",
"shr",
"sar",
"sha3",
"address",
"balance",
"origin",
"caller",
"callvalue",
"calldataload",
"calldatasize",
"calldatacopy",
"codesize",
"codecopy",
"gasprice",
"extcodesize",
"extcodecopy",
"returndatasize",
"returndatacopy",
"extcodehash",
"blockhash",
"coinbase",
"timestamp",
"number",
"difficulty",
"gaslimit",
"chainid",
"selfbalance",
"basefee",
"pop",
"mload",
"mstore",
"mstore8",
"sload",
"sstore",
"jump",
"jumpi",
"pc",
"msize",
"gas",
"jumpdest",
"push0",
"push1",
"push2",
"push3",
"push4",
"push5",
"push6",
"push7",
"push8",
"push9",
"push10",
"push11",
"push12",
"push13",
"push14",
"push15",
"push16",
"push17",
"push18",
"push19",
"push20",
"push21",
"push22",
"push23",
"push24",
"push25",
"push26",
"push27",
"push28",
"push29",
"push30",
"push31",
"push32",
"dup1",
"dup2",
"dup3",
"dup4",
"dup5",
"dup6",
"dup7",
"dup8",
"dup9",
"dup10",
"dup11",
"dup12",
"dup13",
"dup14",
"dup15",
"dup16",
"swap1",
"swap2",
"swap3",
"swap4",
"swap5",
"swap6",
"swap7",
"swap8",
"swap9",
"swap10",
"swap11",
"swap12",
"swap13",
"swap14",
"swap15",
"swap16",
"log_0",
"log_1",
"log_2",
"log_3",
"log_4",
"create",
"call",
"callcode",
"return",
"delegatecall",
"create2",
"staticcall",
"revert",
"invalid",
"selfdestruct"
]
}
Loading

0 comments on commit 05d04d3

Please sign in to comment.