Skip to content
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

Common error messages module #266

Merged
merged 22 commits into from
Mar 7, 2025
Merged

Conversation

andreiblt1304
Copy link
Contributor

No description provided.

Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
@andreiblt1304 andreiblt1304 self-assigned this Mar 7, 2025
Copy link

github-actions bot commented Mar 7, 2025

Coverage Summary

Totals

Count Covered %
Lines 5150 3182 61.79
Regions 1048 434 41.41
Functions 598 219 36.62
Instantiations 1790 408 22.79

Files

Expand
File Lines Regions Functions Instantiations
/chain-config/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/chain-config/src/bridge.rs 0.00% 0.00% 0.00% 0.00%
/chain-config/src/lib.rs 73.68% 75.00% 100.00% 22.22%
/chain-config/src/validator_rules.rs 12.50% 12.50% 12.50% 7.55%
/chain-factory/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/chain-factory/src/factory.rs 0.00% 0.00% 0.00% 0.00%
/chain-factory/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/chain-factory/src/slash.rs 0.00% 0.00% 0.00% 0.00%
/common/bls-signature/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/common/cross-chain/src/deposit_common.rs 68.53% 68.57% 66.67% 42.86%
/common/cross-chain/src/events.rs 50.00% 50.00% 50.00% 16.67%
/common/cross-chain/src/execute_common.rs 70.73% 38.89% 44.44% 19.05%
/common/cross-chain/src/lib.rs 71.43% 33.33% 33.33% 27.27%
/common/cross-chain/src/storage.rs 50.00% 50.00% 50.00% 35.00%
/common/max-bridged-amount-module/src/lib.rs 71.43% 57.14% 60.00% 17.14%
/common/proxies/src/chain_config_proxy.rs 18.37% 10.53% 10.53% 8.70%
/common/proxies/src/chain_factory_proxy.rs 0.00% 0.00% 0.00% 0.00%
/common/proxies/src/fee_market_proxy.rs 38.59% 21.43% 21.43% 31.37%
/common/proxies/src/header_verifier_proxy.rs 78.02% 75.00% 75.00% 65.22%
/common/proxies/src/mvx_esdt_safe_proxy.rs 66.67% 61.54% 61.54% 40.91%
/common/proxies/src/sov_esdt_safe_proxy.rs 55.65% 54.55% 54.55% 38.89%
/common/proxies/src/testing_sc_proxy.rs 36.67% 50.00% 50.00% 50.00%
/common/setup-phase/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/common/structs/src/configs.rs 63.79% 17.39% 17.39% 17.39%
/common/structs/src/events.rs 0.00% 0.00% 0.00% 0.00%
/common/structs/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/common/structs/src/operation.rs 65.49% 34.04% 22.50% 20.62%
/common/transaction/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/common/transaction/src/transaction_status.rs 0.00% 0.00% 0.00% 0.00%
/common/tx-batch-module/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/common/utils/src/lib.rs 25.49% 16.67% 27.27% 16.98%
/fee-market/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/fee-market/src/fee_common.rs 83.33% 66.67% 66.67% 25.00%
/fee-market/src/fee_type.rs 68.57% 50.00% 26.67% 20.27%
/fee-market/src/lib.rs 69.23% 83.33% 75.00% 35.29%
/fee-market/src/price_aggregator.rs 0.00% 0.00% 0.00% 0.00%
/fee-market/src/subtract_fee.rs 42.24% 39.62% 37.50% 25.49%
/fee-market/tests/fee_market_blackbox_setup.rs 89.20% 82.05% 100.00% 50.00%
/fee-market/tests/fee_market_blackbox_test.rs 100.00% 100.00% 100.00% 100.00%
/header-verifier/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/header-verifier/src/lib.rs 85.71% 84.62% 75.00% 27.27%
/header-verifier/tests/header_verifier_blackbox_setup.rs 98.53% 90.48% 100.00% 50.00%
/header-verifier/tests/header_verifier_blackbox_test.rs 100.00% 100.00% 100.00% 100.00%
/interactor/src/config.rs 0.00% 0.00% 0.00% 0.00%
/interactor/src/interact.rs 0.00% 0.00% 0.00% 0.00%
/interactor/src/interactor_main.rs 0.00% 0.00% 0.00% 0.00%
/interactor/src/mvx_esdt_safe/mvx_esdt_safe_interactor_main.rs 0.00% 0.00% 0.00% 0.00%
/interactor/src/sov_esdt_safe/sov_esdt_safe_interactor_main.rs 0.00% 0.00% 0.00% 0.00%
/mvx-esdt-safe/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/mvx-esdt-safe/src/deposit.rs 77.14% 83.33% 66.67% 16.67%
/mvx-esdt-safe/src/execute.rs 36.06% 45.83% 63.64% 29.73%
/mvx-esdt-safe/src/lib.rs 100.00% 100.00% 100.00% 26.83%
/mvx-esdt-safe/src/register_token.rs 53.57% 45.45% 42.86% 20.69%
/mvx-esdt-safe/tests/mvx_esdt_safe_blackbox_setup.rs 97.54% 82.22% 100.00% 50.00%
/mvx-esdt-safe/tests/mvx_esdt_safe_blackbox_unit_tests.rs 100.00% 100.00% 100.00% 100.00%
/sov-esdt-safe/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/sov-esdt-safe/src/deposit.rs 88.64% 81.25% 66.67% 16.67%
/sov-esdt-safe/src/lib.rs 100.00% 100.00% 100.00% 30.23%
/sov-esdt-safe/tests/sov_esdt_safe_setup.rs 97.89% 84.85% 100.00% 50.00%
/sov-esdt-safe/tests/sov_esdt_safe_unit_tests.rs 100.00% 100.00% 100.00% 100.00%
/testing-sc/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/testing-sc/src/lib.rs 50.00% 66.67% 66.67% 23.26%

Copy link

github-actions bot commented Mar 7, 2025

Contract comparison - from 33700c5 to a081bc6

Path                                                                                             size                  has-allocator                     has-format
fee-marker-full.wasm 13098 ➡️ 13104 🔴 (+6) false without message
multisig-view.wasm 626 false None
fee-market.wasm 13098 ➡️ 13104 🔴 (+6) false without message
chain-factory.wasm 5828 false None
multisig-view.wasm 626 false None
header-verifier-full.wasm 5037 ➡️ 5027 🟢 (-10) false without message
header-verifier.wasm 5037 ➡️ 5027 🟢 (-10) false without message
chain-config.wasm 5838 false without message
mvx-esdt-safe.wasm 22950 ➡️ 22926 🟢 (-24) false without message
mvx-esdt-safe-view.wasm 626 false None
mvx-esdt-safe-full.wasm 22950 ➡️ 22927 🟢 (-23) false without message
sov-esdt-safe-view.wasm 626 false None
sov-esdt-safe-full.wasm 11888 ➡️ 11891 🔴 (+3) false without message
sov-esdt-safe.wasm 11888 ➡️ 11891 🔴 (+3) false without message
testing-sc-full.wasm 461 false None
testing-sc.wasm 461 false None
testing-view.wasm 626 false None

@@ -0,0 +1,45 @@
#![no_std]

pub const CANNOT_CREATE_TX_WHILE_PAUSE: &str = "Cannot create transaction while paused";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub const CANNOT_CREATE_TX_WHILE_PAUSE: &str = "Cannot create transaction while paused";
pub const CANNOT_CREATE_TX_WHILE_PAUSED: &str = "Cannot create transaction while paused";


pub const CANNOT_CREATE_TX_WHILE_PAUSE: &str = "Cannot create transaction while paused";
pub const BRIDGE_ALREADY_DEPLOYED: &str = "Bridge already deployed";
pub const INVALID_MIN_MAX_VALIDATOR_NUMBER: &str = "Invalid min/max validator numbers";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub const INVALID_MIN_MAX_VALIDATOR_NUMBER: &str = "Invalid min/max validator numbers";
pub const INVALID_MIN_MAX_VALIDATOR_NUMBERS: &str = "Invalid min/max validator numbers";

pub const DEPOSIT_OVER_MAX_AMOUNT: &str = "Deposit over max amount";
pub const INVALID_CALLER: &str = "Invalid caller";
pub const SETUP_PHASE_NOT_COMPLETED: &str = "The setup is not completed";
pub const ONLY_ESDT_SAFE_CALLER: &str = "Only ESDT Safe call this endpoint";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pub const ONLY_ESDT_SAFE_CALLER: &str = "Only ESDT Safe call this endpoint";
pub const ONLY_ESDT_SAFE_CALLER: &str = "Only ESDT Safe can call this endpoint";

Signed-off-by: Andrei Baltariu <[email protected]>
@andreiblt1304 andreiblt1304 merged commit d07134d into feat/pre-beta Mar 7, 2025
8 checks passed
@andreiblt1304 andreiblt1304 deleted the common-error-messages branch March 7, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants