-
Notifications
You must be signed in to change notification settings - Fork 1
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
FxDAO test #23
Merged
Merged
FxDAO test #23
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bbyalcinkaya
force-pushed
the
fxdao-test
branch
from
August 19, 2024 13:06
3591638
to
26f4871
Compare
For now, child contracts need to be precompiled. Maybe in a future PR, I can add a compilation step for child contracts. |
gtrepta
approved these changes
Sep 3, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the merge conflicts, looks good.
bbyalcinkaya
force-pushed
the
fxdao-test
branch
from
September 4, 2024 09:38
2d24fba
to
ecf32f3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a simple FxDAO test contract and updates the test runner to support its execution.
Test Contract
The test contract has the following endpoints:
init
: Takes ahash: Bytes
as an argument, deploys a new FxDAO/vaults contract using this hash, and calls itsinit
function. The FxDAO contract Wasm module must already be registered with this hash.test_deposit_ratio
: Calls the FxDAO contract that was deployed during theinit
function.test_get_core_state
: Calls the FxDAO contract’sget_core_state
endpoint to retrieve and verify the contract state.Test Runner Updates
The test runner has been updated to support
init
functions and the deployment of child contracts, such as FxDAO.If the test involves a child contract, a
kasmer.json
config file should be present in the root directory of the test contract. This config file lists the paths to the Wasm files for the child contracts. Upon deploying the test contract, the child contract Wasm modules are automatically registered usinguploadWasm
.If the test contract has an
init
function, it will be called with the hashes of the uploaded Wasm modules as arguments.With these updates, the FxDAO test runs in the following steps:
uploadWasm
.init
function with the hash used in step 2.test_deposit_ratio
with random or symbolic input.