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

Sovereign-Forge endpoint fixed #224

Merged
merged 13 commits into from
Jan 29, 2025
Merged

Sovereign-Forge endpoint fixed #224

merged 13 commits into from
Jan 29, 2025

Conversation

andreiblt1304
Copy link
Contributor

No description provided.

Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Moved the logic of setting the address of the ESDT-Safe contract in
Header-Verifier into the Chain-Factory contract since at the moment the
Chain-Factory contract is the owner of Header-Verifier

Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Signed-off-by: Andrei Baltariu <[email protected]>
Copy link

github-actions bot commented Jan 28, 2025

Coverage Summary

Totals

Count Covered %
Lines 8279 4743 57.29
Regions 1865 783 41.98
Functions 886 408 46.05
Instantiations 3316 790 23.82

Files

Expand
File Lines Regions Functions Instantiations
/chain-config/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/chain-config/src/lib.rs 95.45% 85.71% 100.00% 41.67%
/chain-config/src/validator_rules.rs 56.25% 30.00% 30.00% 20.97%
/chain-config/tests/chain_config_unit_tests.rs 98.92% 89.47% 100.00% 100.00%
/chain-factory/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/chain-factory/src/complete_phases.rs 0.00% 0.00% 0.00% 0.00%
/chain-factory/src/factory.rs 79.57% 75.00% 75.00% 27.78%
/chain-factory/src/lib.rs 100.00% 100.00% 100.00% 43.90%
/chain-factory/tests/chain_factory_tests.rs 98.70% 83.33% 100.00% 100.00%
/common/interactor/src/interactor_config.rs 0.00% 0.00% 0.00% 0.00%
/common/interactor/src/interactor_state.rs 0.00% 0.00% 0.00% 0.00%
/common/max-bridged-amount-module/src/lib.rs 71.43% 57.14% 60.00% 13.64%
/common/operation/src/lib.rs 66.34% 31.71% 24.32% 11.80%
/common/proxies/src/chain_config_proxy.rs 36.84% 36.36% 36.36% 42.50%
/common/proxies/src/chain_factory_proxy.rs 57.78% 57.14% 57.14% 45.45%
/common/proxies/src/enshrine_esdt_safe_proxy.rs 49.12% 45.00% 45.00% 21.28%
/common/proxies/src/esdt_safe_proxy.rs 31.93% 33.33% 33.33% 26.42%
/common/proxies/src/fee_market_proxy.rs 47.97% 24.00% 24.00% 22.47%
/common/proxies/src/header_verifier_proxy.rs 86.09% 80.00% 80.00% 46.97%
/common/proxies/src/sovereign_forge_proxy.rs 67.35% 64.29% 64.29% 23.26%
/common/proxies/src/testing_sc_proxy.rs 0.00% 0.00% 0.00% 0.00%
/common/proxies/src/token_handler_proxy.rs 45.83% 44.44% 44.44% 50.00%
/common/setup-phase/src/lib.rs 90.91% 80.00% 80.00% 20.37%
/common/token-whitelist/src/lib.rs 26.09% 26.67% 42.86% 11.11%
/common/tx-batch-module/src/lib.rs 88.89% 80.00% 75.00% 21.43%
/common/utils/src/lib.rs 78.43% 63.33% 63.64% 16.25%
/enshrine-esdt-safe/interactor/src/enshrine_esdt_safe_interactor.rs 0.00% 0.00% 0.00% 0.00%
/enshrine-esdt-safe/interactor/src/enshrine_esdt_safe_interactor_main.rs 0.00% 0.00% 0.00% 0.00%
/enshrine-esdt-safe/interactor/tests/enshrine-esdt-safe_interactor_tests.rs 0.00% 0.00% 0.00% 0.00%
/enshrine-esdt-safe/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/enshrine-esdt-safe/src/common/storage.rs 50.00% 50.00% 50.00% 32.14%
/enshrine-esdt-safe/src/from_sovereign/events.rs 50.00% 50.00% 50.00% 8.33%
/enshrine-esdt-safe/src/from_sovereign/transfer_tokens.rs 89.39% 81.82% 76.92% 31.43%
/enshrine-esdt-safe/src/lib.rs 86.49% 73.33% 83.33% 22.22%
/enshrine-esdt-safe/src/to_sovereign/create_tx.rs 94.59% 93.18% 87.50% 31.82%
/enshrine-esdt-safe/src/to_sovereign/events.rs 50.00% 50.00% 50.00% 8.33%
/enshrine-esdt-safe/tests/enshrine_esdt_safe_blackbox_test.rs 99.88% 97.26% 100.00% 100.00%
/esdt-safe/interactor/src/esdt_safe_interactor.rs 0.00% 0.00% 0.00% 0.00%
/esdt-safe/interactor/src/esdt_safe_interactor_main.rs 0.00% 0.00% 0.00% 0.00%
/esdt-safe/interactor/tests/esdt_safe_interactor_tests.rs 0.00% 0.00% 0.00% 0.00%
/esdt-safe/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/esdt-safe/src/from_sovereign/events.rs 50.00% 50.00% 50.00% 6.25%
/esdt-safe/src/from_sovereign/token_mapping.rs 1.10% 3.85% 5.26% 4.71%
/esdt-safe/src/from_sovereign/transfer_tokens.rs 41.95% 49.09% 69.23% 22.95%
/esdt-safe/src/lib.rs 77.78% 71.43% 71.43% 27.27%
/esdt-safe/src/to_sovereign/create_tx.rs 45.24% 50.00% 55.56% 20.93%
/esdt-safe/src/to_sovereign/events.rs 50.00% 50.00% 50.00% 6.25%
/esdt-safe/tests/bridge_blackbox_tests.rs 86.00% 92.86% 91.67% 91.67%
/fee-market/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/fee-market/src/fee_common.rs 88.89% 66.67% 66.67% 20.69%
/fee-market/src/fee_type.rs 68.57% 50.00% 26.67% 15.73%
/fee-market/src/lib.rs 31.03% 50.00% 60.00% 39.34%
/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% 14.63%
/fee-market/tests/fee_market_blackbox_test.rs 93.33% 89.58% 100.00% 100.00%
/header-verifier/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/header-verifier/src/lib.rs 78.51% 80.00% 81.25% 42.71%
/header-verifier/tests/header_verifier_blackbox_test.rs 100.00% 100.00% 100.00% 100.00%
/sovereign-forge/interactor/src/config.rs 0.00% 0.00% 0.00% 0.00%
/sovereign-forge/interactor/src/interact.rs 0.00% 0.00% 0.00% 0.00%
/sovereign-forge/interactor/src/interactor_main.rs 0.00% 0.00% 0.00% 0.00%
/sovereign-forge/interactor/tests/interact_cs_tests.rs 0.00% 0.00% 0.00% 0.00%
/sovereign-forge/interactor/tests/interact_tests.rs 0.00% 0.00% 0.00% 0.00%
/sovereign-forge/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/sovereign-forge/src/common/sc_deploy.rs 93.33% 66.67% 66.67% 28.57%
/sovereign-forge/src/common/storage.rs 50.00% 50.00% 50.00% 25.58%
/sovereign-forge/src/common/utils.rs 85.23% 62.86% 50.00% 28.30%
/sovereign-forge/src/lib.rs 100.00% 100.00% 100.00% 25.64%
/sovereign-forge/src/phases.rs 98.18% 89.47% 85.71% 27.78%
/sovereign-forge/tests/sovereign_forge_unit_tests.rs 99.67% 95.96% 100.00% 100.00%
/testing-sc/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/testing-sc/src/lib.rs 0.00% 0.00% 0.00% 0.00%
/token-handler/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/token-handler/src/common_storage.rs 87.50% 66.67% 66.67% 21.05%
/token-handler/src/lib.rs 100.00% 100.00% 100.00% 38.10%
/token-handler/src/transfer_tokens.rs 50.00% 37.93% 57.14% 29.63%
/token-handler/tests/token_handler_blackbox_tests.rs 94.62% 95.65% 100.00% 100.00%

Copy link

github-actions bot commented Jan 28, 2025

Contract comparison - from 474bdf4 to a5c05d7

Path                                                                                             size                  has-allocator                     has-format
esdt-safe-view.wasm 626 false None
esdt-safe.wasm 24908 false without message
esdt-safe-full.wasm 24909 false without message
token-handler.wasm 11360 false without message
token-handler-view.wasm 626 false None
token-handler-full.wasm 11360 false without message
chain-factory-view.wasm 626 false None
chain-factory.wasm 9019 ➡️ 9200 🔴 (+181) false without message
chain-factory-full.wasm 9019 ➡️ 9200 🔴 (+181) false without message
testing-view.wasm 626 false None
testing-sc.wasm 461 false None
testing-sc-full.wasm 461 false None
chain-config-view.wasm 626 false None
chain-config-full.wasm 7046 false without message
chain-config.wasm 7046 false without message
header-verifier-full.wasm 8762 false without message
multisig-view.wasm 626 false None
header-verifier.wasm 8762 false without message
enshrine-esdt-safe-full.wasm 24777 false without message
enshrine-esdt-safe-view.wasm 626 false None
enshrine-esdt-safe.wasm 24776 false without message
sovereign-forge-full.wasm 10574 ➡️ 11092 🔴 (+518) false without message
soveriegn-forge-view.wasm 626 false None
sovereign-forge.wasm 10574 ➡️ 11092 🔴 (+518) false without message
fee-market.wasm 12678 false without message
fee-market-view.wasm 626 false None

Comment on lines 42 to 46
let blockchain_api = self.blockchain();
let caller = blockchain_api.get_caller();
let caller_shard_id = blockchain_api.get_shard_of_address(&caller);

let chain_factory_address = self.chain_factories(caller_shard_id).get();

Choose a reason for hiding this comment

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

You can put all this in a function and use it here everywhere

@andreiblt1304 andreiblt1304 merged commit 4421a0b into feat/beta Jan 29, 2025
8 checks passed
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.

3 participants