Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
bc88cd0
fix: unnessesary documents
quantumshiro Jul 24, 2025
d4edb49
fix: remove src crate
quantumshiro Jul 24, 2025
2aec16f
fix: remove docker files
quantumshiro Jul 24, 2025
161dd1f
fix: clean project
quantumshiro Jul 24, 2025
d4aac04
fix: remove example environment files and clean up code
quantumshiro Jul 24, 2025
08445d7
fix: simplify logging messages by using interpolation
quantumshiro Jul 24, 2025
450ce54
fix: format transfer function parameters for better readability
quantumshiro Jul 24, 2025
292b78f
Implement eUTXO Execution Layer and Demo
quantumshiro Jul 24, 2025
f161e1f
Implement eUTXO Consensus and Execution Layers
quantumshiro Jul 24, 2025
7fbd001
fix: remove main binary configuration and update genesis UTXO initial…
quantumshiro Jul 24, 2025
3bc70c8
feat: enhance data availability layer with comprehensive features and…
quantumshiro Jul 24, 2025
557be42
docs: add implementation issues and improvement proposals for PolyTor…
quantumshiro Jul 24, 2025
e5cc5d7
feat: implement Wallet crate for address management and key pair hand…
quantumshiro Jul 24, 2025
e6a091d
Implement wallet functionality with address encoding, error handling,…
quantumshiro Jul 24, 2025
9e4c664
add: wasm script
quantumshiro Jul 27, 2025
70a8cb3
fix: remove unused package
quantumshiro Jul 27, 2025
56dc720
add: smart contract examples
quantumshiro Jul 28, 2025
4160295
fix: actions
quantumshiro Jul 28, 2025
b024e11
fix: cargo format
quantumshiro Jul 28, 2025
fb7b729
fix: actions
quantumshiro Jul 28, 2025
5b6f1aa
fix: resolve type mismatches and use contract name parameter
quantumshiro Jul 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
37 changes: 0 additions & 37 deletions .env.example

This file was deleted.

21 changes: 0 additions & 21 deletions .env.secrets.example

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build

on:
push:
branches: [ main ]
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}

- name: Build release
run: cargo build --release --target x86_64-unknown-linux-gnu

- name: Package binary
run: |
cd target/x86_64-unknown-linux-gnu/release
tar czf ../../../polytorus-linux-amd64.tar.gz polytorus

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: polytorus-linux-amd64
path: polytorus-linux-amd64.tar.gz
Comment on lines +13 to +47

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 months ago

To fix the problem, explicitly set the permissions key in the workflow file to restrict the GITHUB_TOKEN to the minimum required privileges. Since this workflow only checks out code, builds, and uploads artifacts (and does not push code, create releases, or interact with issues or pull requests), it only needs read access to repository contents. The best way to fix this is to add permissions: contents: read at the top level of the workflow (just after the name: line and before on:), so it applies to all jobs in the workflow. No other changes are needed.


Suggested changeset 1
.github/workflows/build.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,2 +1,4 @@
 name: Build
+permissions:
+  contents: read
 
EOF
@@ -1,2 +1,4 @@
name: Build
permissions:
contents: read

Copilot is powered by AI and may make mistakes. Always verify output.

81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

env:
CARGO_TERM_COLOR: always

jobs:
format:
name: Auto Format
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.head_ref }}

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Run cargo fmt
run: cargo fmt

- name: Commit changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add -A
if git diff --staged --quiet; then
echo "No formatting changes needed"
else
git commit -m "Auto-format code with cargo fmt"
git push
fi

test:
Comment on lines +14 to +43

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 months ago

To fix the problem, we should explicitly set the permissions key in the workflow. The best approach is to set the default permissions at the workflow level to the most restrictive (contents: read), and then override them at the job level where more permissions are needed. In this case, the format job needs to push changes, so it requires contents: write, while the test and lint jobs only need contents: read.

Steps:

  1. Add a permissions: contents: read block at the top level of the workflow (after name: and before on:).
  2. Add a permissions: contents: write block to the format job.
  3. No changes are needed for the test and lint jobs, as they will inherit the default contents: read permission.

Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,2 +1,4 @@
 name: CI
+permissions:
+  contents: read
 
@@ -16,2 +18,4 @@
     if: github.event_name == 'pull_request'
+    permissions:
+      contents: write
     steps:
EOF
@@ -1,2 +1,4 @@
name: CI
permissions:
contents: read

@@ -16,2 +18,4 @@
if: github.event_name == 'pull_request'
permissions:
contents: write
steps:
Copilot is powered by AI and may make mistakes. Always verify output.
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Run clippy
run: cargo clippy
Comment on lines +70 to +81

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 months ago

To fix the issue, we need to add a permissions block to the lint job to explicitly limit the permissions of the GITHUB_TOKEN. Since the lint job only runs cargo clippy and does not require write access, the permissions can be set to contents: read. This ensures that the job has the minimum required permissions and adheres to security best practices.

Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -71,2 +71,4 @@
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
     steps:
EOF
@@ -71,2 +71,4 @@
runs-on: ubuntu-latest
permissions:
contents: read
steps:
Copilot is powered by AI and may make mistakes. Always verify output.
Loading
Loading