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

Implemented TestHost functions: #563

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Implemented TestHost functions: #563

wants to merge 23 commits into from

Conversation

rasmus-kirk
Copy link
Contributor

Purpose

See the related issue (#558)

Also see the accompanying PR

Tested using this script, that compiles cargo concordium and runs the unit tests in concordium-std:

CONCORDIUM_STD_PATH="/path/to/concordium-std"
CARGO_CONCORDIUM_PATH="/path/to/cargo-concordium/Cargo.toml"

pushd "$CONCORDIUM_STD_PATH"
cargo run --manifest-path "$CARGO_CONCORDIUM_PATH" -- concordium test --only-unit-tests -- --features internal-wasm-test
popd

Changes

  • Implemented the following TestHost functions:
    • set_slot_time
    • get_slot_time
    • set_receive_self_address
    • get_receive_self_address
    • set_receive_self_balance
    • get_receive_self_balance

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

Copy link
Contributor

@limemloh limemloh left a comment

Choose a reason for hiding this comment

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

Looks good

smart-contracts/wasm-chain-integration/CHANGELOG.md Outdated Show resolved Hide resolved
smart-contracts/wasm-chain-integration/src/utils.rs Outdated Show resolved Hide resolved
smart-contracts/wasm-chain-integration/src/utils.rs Outdated Show resolved Hide resolved
smart-contracts/wasm-chain-integration/src/utils.rs Outdated Show resolved Hide resolved
smart-contracts/wasm-chain-integration/src/utils.rs Outdated Show resolved Hide resolved
smart-contracts/wasm-chain-integration/src/utils.rs Outdated Show resolved Hide resolved
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.

2 participants