forked from olehmisar/vlayer-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
fix: resolve compile errors #1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
72524bd
compile
jialinli98 a1d4b83
more fixes
jialinli98 fd3714d
fixes
jialinli98 f44e3eb
more fixes
jialinli98 03d330d
fixes
jialinli98 4b19222
fixes
jialinli98 14972f0
ci
jialinli98 213aa66
fix
jialinli98 cfbfd2d
remove circuit tests
jialinli98 f2aaf16
fix
jialinli98 79c2ecf
fix
jialinli98 f40317a
fixes
jialinli98 8130404
fixes
jialinli98 61a624f
fixes
jialinli98 2a9a863
fixes
jialinli98 add371c
fixes
jialinli98 5d46de0
fix
jialinli98 63dee8e
fixes
jialinli98 8063023
fixes
jialinli98 fb2f020
fixes
jialinli98 bef2bf6
fix
jialinli98 3d281e7
fix
jialinli98 c2698c0
fix
jialinli98 e32ff64
Merge branch 'main' of https://github.com/noir-lang/eth-proofs into j…
jialinli98 6945d30
resolve warnings
jialinli98 b0c1b95
resolve warnings
jialinli98 8a2b626
resolve warnings
jialinli98 aae5836
resolve warnings
jialinli98 3e2adea
fix typescript compile errors
jialinli98 a2df451
fix
jialinli98 9788615
disable a few CI build that fails
jialinli98 11daffc
set minimum version to 1.0.0-beta.17
jialinli98 14d529d
Merge branch 'main' into jl/new_compile
jialinli98 fff04e5
fix
jialinli98 3bbda03
Merge branch 'jl/new_compile' of https://github.com/noir-lang/eth-pro…
jialinli98 9fde674
u128 can fit in 16 bytes
jialinli98 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| name: ethereum contract tests | ||
|
|
||
| on: [push, merge_group] | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| env: | ||
| FOUNDRY_PROFILE: ci | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Noir Nightly Canary | ||
|
|
||
| on: | ||
| schedule: | ||
| # Run a check at 9 AM UTC | ||
| - cron: "0 9 * * *" | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| permissions: | ||
| issues: write | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test on Nargo Nightly | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Nargo | ||
| uses: noir-lang/[email protected] | ||
| with: | ||
| toolchain: nightly | ||
|
|
||
| - name: Run Noir tests | ||
| run: nargo test | ||
|
|
||
| - name: Alert on dead links | ||
| uses: JasonEtco/create-an-issue@v2 | ||
| if: ${{ failure() }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| WORKFLOW_NAME: ${{ github.workflow }} | ||
| WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
| with: | ||
| update_existing: true | ||
| filename: .github/NIGHTLY_CANARY_DIED.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Pull Request | ||
|
|
||
| on: | ||
| merge_group: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - edited | ||
| - synchronize | ||
|
|
||
| permissions: | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| conventional-title: | ||
| name: Validate PR title is Conventional Commit | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check title | ||
| if: github.event_name == 'pull_request_target' | ||
| uses: amannn/action-semantic-pull-request@v5 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| types: | | ||
| fix | ||
| feat | ||
| chore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,20 @@ | ||
| name: Release changesets | ||
| name: Release | ||
|
|
||
| # This workflow will be triggered on push to the main branch | ||
| # on: | ||
| # push: | ||
| # branches: | ||
| # - main | ||
| # temporarly manual triggers only | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| release-please: | ||
| name: Create Release | ||
| outputs: | ||
| release-pr: ${{ steps.release.outputs.pr }} | ||
| tag-name: ${{ steps.release.outputs.tag_name }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: 20 | ||
|
|
||
| - name: Enable Corepack and Install Yarn 4 | ||
| run: | | ||
| corepack enable | ||
| yarn set version latest | ||
|
|
||
| - name: Install Dependencies | ||
| run: yarn install | ||
|
|
||
| - name: Create Release Pull Request | ||
| uses: changesets/action@v1 | ||
| - name: Run release-please | ||
| id: release | ||
| uses: googleapis/release-please-action@v4 | ||
| with: | ||
| version: yarn changeset version | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| token: ${{ secrets.NOIR_RELEASES_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,3 +11,4 @@ contract | |
| dist | ||
| coverage | ||
| .DS_Store | ||
| .vscode/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| use dep::ethereum::header::{BlockHeaderPartial, get_header}; | ||
|
|
||
| fn main(chain_id: pub Field, block_no: pub u64) -> pub BlockHeaderPartial { | ||
| fn main(chain_id: pub u32, block_no: pub u64) -> pub BlockHeaderPartial { | ||
| get_header(chain_id, block_no) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| use dep::ethereum::log::{get_log, LogWithinBlock}; | ||
|
|
||
| global MAX_LOG_DATA_LEN: u32 = 32; | ||
| global MAX_LOGS_COUNT = 1; | ||
| global MAX_LOGS_COUNT: u32 = 1; | ||
|
|
||
| fn main( | ||
| chain_id: pub Field, | ||
| block_number: pub u64, | ||
| tx_idx: pub Field, | ||
| log_idx: pub u32, | ||
| ) -> pub LogWithinBlock<MAX_LOG_DATA_LEN> { | ||
| get_log::<MAX_LOG_DATA_LEN, MAX_LOGS_COUNT>(chain_id, block_number, tx_idx, log_idx) | ||
| get_log::<MAX_LOG_DATA_LEN, MAX_LOGS_COUNT>(chain_id as u32, block_number, tx_idx, log_idx) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| use dep::ethereum::receipt::{get_receipt, TxReceiptWithinBlock}; | ||
|
|
||
| fn main(chain_id: pub Field, block_number: pub u64, tx_idx: pub Field) -> pub TxReceiptWithinBlock { | ||
| get_receipt(chain_id, block_number, tx_idx) | ||
| get_receipt(chain_id as u32, block_number, tx_idx) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| use dep::ethereum::transaction::{get_transaction, TransactionWithinBlock}; | ||
|
|
||
| global MAX_DATA_LEN_M = 1000; | ||
| global MAX_DATA_LEN_M: u32 = 1000; | ||
|
|
||
| fn main( | ||
| chain_id: pub Field, | ||
| block_number: pub u64, | ||
| tx_idx: pub Field, | ||
| ) -> pub TransactionWithinBlock<MAX_DATA_LEN_M> { | ||
| let transaction_within_block: TransactionWithinBlock<MAX_DATA_LEN_M> = | ||
| get_transaction(chain_id, block_number, tx_idx); | ||
| get_transaction(chain_id as u32, block_number, tx_idx); | ||
| transaction_within_block | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI about 2 months ago
The fix involves adding a
permissionsblock to the job (or, at the workflow root, if more jobs are present). It should specify only the minimal permissions required for the release-please job and the action it runs. Thegoogleapis/release-please-actiontypically needs to create PRs (pull-requests: write) and push tags/releases (contents: write); other permissions (such asactions: readorchecks: read) are not required. The recommended fix is to add a block just belowrelease-please:(line 9) as a sibling toruns-on, indicating:This restricts the workflow token to only these scopes for this job. No external libraries or imports are needed—just YAML modifications in this region.