From c111bcbc4d39f683f8abdd9246b44133381f2670 Mon Sep 17 00:00:00 2001 From: xermicus Date: Thu, 5 Sep 2024 20:02:33 +0200 Subject: [PATCH] common: remove unused constants Signed-off-by: xermicus --- .../.github/ISSUE_TEMPLATE/bug_report.md | 39 ------ .../.github/ISSUE_TEMPLATE/feature_request.md | 21 ---- .../common/.github/pull_request_template.md | 20 ---- .../.github/workflows/cargo-license.yaml | 9 -- crates/common/.github/workflows/ci.yaml | 23 ---- .../.github/workflows/secrets_scanner.yaml | 17 --- crates/common/src/exit_code.rs | 4 +- crates/common/src/lib.rs | 2 - crates/common/src/polkavm/address.rs | 112 ------------------ crates/common/src/polkavm/mod.rs | 5 - 10 files changed, 1 insertion(+), 251 deletions(-) delete mode 100644 crates/common/.github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 crates/common/.github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 crates/common/.github/pull_request_template.md delete mode 100644 crates/common/.github/workflows/cargo-license.yaml delete mode 100644 crates/common/.github/workflows/ci.yaml delete mode 100644 crates/common/.github/workflows/secrets_scanner.yaml delete mode 100644 crates/common/src/polkavm/address.rs delete mode 100644 crates/common/src/polkavm/mod.rs diff --git a/crates/common/.github/ISSUE_TEMPLATE/bug_report.md b/crates/common/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 2d3e38a..0000000 --- a/crates/common/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Bug report -about: Use this template for reporting issues -title: '' -labels: bug -assignees: '' ---- - -### 🐛 Bug Report - -#### 📝 Description - -Provide a clear and concise description of the bug. - -#### 🔄 Reproduction Steps - -Steps to reproduce the behaviour - -#### 🤔 Expected Behavior - -Describe what you expected to happen. - -#### 😯 Current Behavior - -Describe what actually happened. - -#### 🖥️ Environment - -Any relevant environment details. - -#### 📋 Additional Context - -Add any other context about the problem here. If applicable, add screenshots to help explain. - -#### 📎 Log Output - -``` -Paste any relevant log output here. -``` diff --git a/crates/common/.github/ISSUE_TEMPLATE/feature_request.md b/crates/common/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index d921e06..0000000 --- a/crates/common/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Feature request -about: Use this template for requesting features -title: '' -labels: feat -assignees: '' ---- - -### 🌟 Feature Request - -#### 📝 Description - -Provide a clear and concise description of the feature you'd like to see. - -#### 🤔 Rationale - -Explain why this feature is important and how it benefits the project. - -#### 📋 Additional Context - -Add any other context or information about the feature request here. diff --git a/crates/common/.github/pull_request_template.md b/crates/common/.github/pull_request_template.md deleted file mode 100644 index 022f67f..0000000 --- a/crates/common/.github/pull_request_template.md +++ /dev/null @@ -1,20 +0,0 @@ -# What ❔ - - - - - -## Why ❔ - - - - -## Checklist - - - - -- [ ] PR title corresponds to the body of PR. -- [ ] Tests for the changes have been added / updated. -- [ ] Documentation comments have been added / updated. -- [ ] Code has been formatted via `cargo fmt` and checked with `cargo clippy`. diff --git a/crates/common/.github/workflows/cargo-license.yaml b/crates/common/.github/workflows/cargo-license.yaml deleted file mode 100644 index e44f940..0000000 --- a/crates/common/.github/workflows/cargo-license.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: Cargo license check -on: pull_request - -jobs: - cargo-deny: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: EmbarkStudios/cargo-deny-action@v1 diff --git a/crates/common/.github/workflows/ci.yaml b/crates/common/.github/workflows/ci.yaml deleted file mode 100644 index fd0bd3b..0000000 --- a/crates/common/.github/workflows/ci.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: "Rust CI" -on: - pull_request: - -jobs: - build: - name: cargo build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - - run: cargo build --verbose - - formatting: - name: cargo fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: rustfmt - - name: Rustfmt Check - uses: actions-rust-lang/rustfmt@v1 diff --git a/crates/common/.github/workflows/secrets_scanner.yaml b/crates/common/.github/workflows/secrets_scanner.yaml deleted file mode 100644 index 54054cf..0000000 --- a/crates/common/.github/workflows/secrets_scanner.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Leaked Secrets Scan -on: [pull_request] -jobs: - TruffleHog: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - with: - fetch-depth: 0 - - name: TruffleHog OSS - uses: trufflesecurity/trufflehog@0c66d30c1f4075cee1aada2e1ab46dabb1b0071a - with: - path: ./ - base: ${{ github.event.repository.default_branch }} - head: HEAD - extra_args: --debug --only-verified diff --git a/crates/common/src/exit_code.rs b/crates/common/src/exit_code.rs index be72aec..a7678d0 100644 --- a/crates/common/src/exit_code.rs +++ b/crates/common/src/exit_code.rs @@ -1,6 +1,4 @@ -//! -//! The exit code constants. -//! +//! The revive exit code constants. /// The common application success exit code. pub const EXIT_CODE_SUCCESS: i32 = 0; diff --git a/crates/common/src/lib.rs b/crates/common/src/lib.rs index 350dde6..b9fd621 100644 --- a/crates/common/src/lib.rs +++ b/crates/common/src/lib.rs @@ -6,7 +6,6 @@ pub(crate) mod byte_length; pub(crate) mod evm_version; pub(crate) mod exit_code; pub(crate) mod extension; -pub(crate) mod polkavm; pub(crate) mod utils; pub use self::base::*; @@ -15,5 +14,4 @@ pub use self::byte_length::*; pub use self::evm_version::EVMVersion; pub use self::exit_code::*; pub use self::extension::*; -pub use self::polkavm::address::*; pub use self::utils::*; diff --git a/crates/common/src/polkavm/address.rs b/crates/common/src/polkavm/address.rs deleted file mode 100644 index 8c5e668..0000000 --- a/crates/common/src/polkavm/address.rs +++ /dev/null @@ -1,112 +0,0 @@ -//! The PolkaVM address constants. - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_TO_L1: u16 = 0xFFFF; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_PRECOMPILE: u16 = 0xFFFD; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_META: u16 = 0xFFFC; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_MIMIC_CALL: u16 = 0xFFFB; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_SYSTEM_MIMIC_CALL: u16 = 0xFFFA; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_MIMIC_CALL_BYREF: u16 = 0xFFF9; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_SYSTEM_MIMIC_CALL_BYREF: u16 = 0xFFF8; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_RAW_FAR_CALL: u16 = 0xFFF7; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_RAW_FAR_CALL_BYREF: u16 = 0xFFF6; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_SYSTEM_CALL: u16 = 0xFFF5; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_SYSTEM_CALL_BYREF: u16 = 0xFFF4; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_SET_CONTEXT_VALUE_CALL: u16 = 0xFFF3; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_SET_PUBDATA_PRICE: u16 = 0xFFF2; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_INCREMENT_TX_COUNTER: u16 = 0xFFF1; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_GET_GLOBAL_PTR_CALLDATA: u16 = 0xFFF0; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_GET_GLOBAL_CALL_FLAGS: u16 = 0xFFEF; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_GET_GLOBAL_PTR_RETURN_DATA: u16 = 0xFFEE; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_EVENT_INITIALIZE: u16 = 0xFFED; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_EVENT_WRITE: u16 = 0xFFEC; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_LOAD_CALLDATA: u16 = 0xFFEB; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_LOAD_RETURN_DATA: u16 = 0xFFEA; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_ADD: u16 = 0xFFE9; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_SHRINK: u16 = 0xFFE8; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_PACK: u16 = 0xFFE7; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_MULTIPLICATION_HIGH_REGISTER: u16 = 0xFFE6; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_DATA_LOAD: u16 = 0xFFE4; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_DATA_COPY: u16 = 0xFFE3; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_DATA_SIZE: u16 = 0xFFE2; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_CONST_ARRAY_DECLARE: u16 = 0xFFE1; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_CONST_ARRAY_SET: u16 = 0xFFE0; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_CONST_ARRAY_FINALIZE: u16 = 0xFFDF; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_CONST_ARRAY_GET: u16 = 0xFFDE; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_DECOMMIT: u16 = 0xFFDD; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_LOAD_DECOMMIT: u16 = 0xFFDC; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_RETURN_FORWARD: u16 = 0xFFDB; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_REVERT_FORWARD: u16 = 0xFFDA; - -/// The corresponding simulation predefined address. -pub const POLKAVM_ADDRESS_ACTIVE_PTR_SWAP: u16 = 0xFFD9; diff --git a/crates/common/src/polkavm/mod.rs b/crates/common/src/polkavm/mod.rs deleted file mode 100644 index 093d451..0000000 --- a/crates/common/src/polkavm/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -//! -//! The PolkaVM constants. -//! - -pub mod address;