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

Add integration test helper contract #273

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

cosmatudor
Copy link

No description provided.

Copy link

github-actions bot commented Jan 28, 2025

Coverage Summary

Totals

Count Covered %
Lines 12703 10786 84.91
Regions 1638 1217 74.30
Functions 919 653 71.06
Instantiations 4787 1598 33.38

Files

Expand
File Lines Regions Functions Instantiations
/home/runner/.cargo/git/checkouts/mx-sdk-rs-0761165799bf305a/5d1d915/contracts/examples/crowdfunding-esdt/src/crowdfunding_esdt.rs 53.12% 60.00% 88.89% 68.00%
/home/runner/.cargo/git/checkouts/mx-sdk-rs-0761165799bf305a/5d1d915/contracts/examples/crowdfunding-esdt/src/crowdfunding_esdt_proxy.rs 100.00% 100.00% 100.00% 100.00%
/bridge-proxy/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/bridge-proxy/src/bridge-proxy.rs 77.78% 80.00% 88.24% 24.09%
/bridge-proxy/src/config.rs 50.00% 50.00% 50.00% 20.27%
/bridge-proxy/src/events.rs 50.00% 50.00% 50.00% 5.88%
/bridge-proxy/tests/bridge_proxy_blackbox_test.rs 97.64% 93.75% 86.36% 86.36%
/bridged-tokens-wrapper/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/bridged-tokens-wrapper/src/dfp_big_uint.rs 50.00% 45.45% 100.00% 40.00%
/bridged-tokens-wrapper/src/events.rs 50.00% 50.00% 50.00% 9.68%
/bridged-tokens-wrapper/src/lib.rs 100.00% 100.00% 100.00% 23.68%
/bridged-tokens-wrapper/tests/bridged_tokens_wrapper_whitebox_test.rs 89.24% 90.32% 89.66% 89.66%
/bridged-tokens-wrapper/tests/scenario_go_test.rs 100.00% 100.00% 100.00% 100.00%
/common/eth-address/src/lib.rs 64.29% 37.50% 37.50% 19.05%
/common/fee-estimator-module/src/lib.rs 97.50% 92.86% 90.00% 32.95%
/common/fee-estimator-module/src/price_aggregator_proxy.rs 6.14% 6.67% 6.67% 13.89%
/common/max-bridged-amount-module/src/lib.rs 92.86% 85.71% 80.00% 30.99%
/common/mock-contracts/mock-bridge-proxy/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/common/mock-contracts/mock-bridge-proxy/src/mock_bridge_proxy.rs 50.00% 50.00% 50.00% 7.14%
/common/mock-contracts/mock-bridged-tokens-wrapper/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/common/mock-contracts/mock-bridged-tokens-wrapper/src/mock_bridged_tokens_wrapper.rs 50.00% 50.00% 50.00% 10.00%
/common/mock-contracts/mock-esdt-safe/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/common/mock-contracts/mock-esdt-safe/src/mock_esdt_safe.rs 25.00% 25.00% 25.00% 18.33%
/common/mock-contracts/mock-multi-transfer-esdt/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/common/mock-contracts/mock-multi-transfer-esdt/src/mock_multi_transfer_esdt.rs 100.00% 100.00% 100.00% 23.21%
/common/mock-contracts/mock-multisig/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/common/mock-contracts/mock-multisig/src/mock_multisig.rs 100.00% 100.00% 100.00% 37.50%
/common/mock-contracts/mock-price-aggregator/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/common/mock-contracts/mock-price-aggregator/src/mock_price_aggregator.rs 50.00% 50.00% 50.00% 25.00%
/common/mock-proxies/src/mock_multisig_proxy.rs 72.41% 62.50% 62.50% 55.56%
/common/sc-proxies/src/bridge_proxy_contract_proxy.rs 73.72% 73.33% 73.33% 56.25%
/common/sc-proxies/src/bridged_tokens_wrapper_proxy.rs 48.04% 47.37% 47.37% 37.74%
/common/sc-proxies/src/crowdfunding_esdt_proxy.rs 0.00% 0.00% 0.00% 0.00%
/common/sc-proxies/src/esdt_safe_proxy.rs 83.56% 72.22% 72.22% 50.27%
/common/sc-proxies/src/multi_transfer_esdt_proxy.rs 77.64% 75.00% 75.00% 50.00%
/common/sc-proxies/src/multisig_proxy.rs 71.52% 61.45% 61.45% 41.13%
/common/storage-module/src/lib.rs 90.91% 75.00% 75.00% 36.99%
/common/token-module/src/lib.rs 88.21% 81.18% 76.19% 33.42%
/common/transaction/src/lib.rs 68.00% 23.81% 23.81% 13.95%
/common/transaction/src/transaction_status.rs 20.00% 20.00% 20.00% 4.55%
/common/tx-batch-module/src/batch_status.rs 0.00% 0.00% 0.00% 0.00%
/common/tx-batch-module/src/lib.rs 96.55% 90.54% 94.12% 33.78%
/common/tx-batch-module/src/tx_batch_mapper.rs 97.14% 93.10% 100.00% 56.25%
/esdt-safe/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/esdt-safe/src/lib.rs 82.61% 68.18% 74.36% 29.06%
/esdt-safe/tests/esdt_safe_blackbox_test.rs 99.06% 80.60% 100.00% 100.00%
/esdt-safe/tests/esdt_safe_scenario_rs_test.rs 100.00% 100.00% 100.00% 100.00%
/esdt-safe/tests/scenario_go_test.rs 100.00% 100.00% 100.00% 100.00%
/helper-contract/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/helper-contract/src/helper_contract.rs 0.00% 0.00% 0.00% 0.00%
/multi-transfer-esdt/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/multi-transfer-esdt/src/lib.rs 85.36% 81.03% 87.50% 27.60%
/multi-transfer-esdt/tests/multi_transfer_blackbox_test.rs 92.44% 74.51% 82.86% 82.86%
/multi-transfer-esdt/tests/multi_transfer_esdt_scenario_rs_test.rs 57.14% 30.00% 30.00% 30.00%
/multi-transfer-esdt/tests/scenario_go_test.rs 30.00% 30.00% 30.00% 30.00%
/multisig/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/multisig/src/action.rs 0.00% 0.00% 0.00% 0.00%
/multisig/src/events.rs 50.00% 50.00% 50.00% 22.58%
/multisig/src/lib.rs 89.36% 80.95% 95.45% 37.82%
/multisig/src/multisig_general.rs 96.08% 80.00% 88.89% 48.48%
/multisig/src/queries.rs 65.22% 64.52% 55.00% 15.07%
/multisig/src/setup.rs 98.75% 92.16% 96.43% 31.22%
/multisig/src/storage.rs 50.00% 50.00% 50.00% 32.47%
/multisig/src/user_role.rs 60.00% 66.67% 33.33% 16.67%
/multisig/src/util.rs 92.73% 83.87% 77.78% 46.43%
/multisig/tests/multisig_blackbox_test.rs 90.37% 94.05% 95.08% 95.08%
/multisig/tests/multisig_scenario_rs_test.rs 82.69% 72.73% 72.73% 72.73%
/multisig/tests/scenario_go_test.rs 70.00% 70.00% 70.00% 70.00%
/test-caller/meta/src/main.rs 0.00% 0.00% 0.00% 0.00%
/test-caller/src/test-caller.rs 0.00% 0.00% 0.00% 0.00%

@cosmatudor cosmatudor self-assigned this Jan 28, 2025
Copy link

github-actions bot commented Jan 28, 2025

Contract comparison - from fde7172 to 2766212

Path                                                                                             size                  has-allocator                     has-format
test-caller.wasm 4519 false without message
esdt-safe.wasm 28473 false without message
mock-bridged-tokens-wrapper.wasm 1148 false None
mock-multi-transfer-esdt.wasm 521 false None
mock-price-aggregator.wasm 1146 false None
mock-esdt-safe.wasm 2117 false without message
mock-multisig.wasm 2183 false None
mock-bridge-proxy.wasm 241 false None
bridge-proxy.wasm 15511 false without message
multisig.wasm 31242 false without message
bridged-tokens-wrapper.wasm 10297 false None
multi-transfer-esdt.wasm 20164 false without message


#[view(getCalleeAddress)]
#[storage_mapper("callee_address")]
fn callee_address(&self) -> SingleValueMapper<ManagedAddress>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should actually be bridge proxy contract. Rename it accordingly

Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be committed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Add .DS_Store to .gitignore

#[upgrade]
fn upgrade(&self) {}

#[view(getCalleeAddress)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Storage mapper usually go last.
Start with init, upgrade, endpoints and end with storages.

fn upgrade(&self) {}

#[view(getCalleeAddress)]
#[storage_mapper("callee_address")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Name of storage mappers should be camelCase. In this case calleeAddress

CostinCarabas
CostinCarabas previously approved these changes Jan 30, 2025
@cosmatudor cosmatudor merged commit 0f77c4a into feat/v3.1 Jan 31, 2025
6 checks passed
@cosmatudor cosmatudor deleted the add-integration-test-helper-contract branch January 31, 2025 10:29
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.

5 participants