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

Host functions for the FxDAO test #27

Merged
merged 8 commits into from
Aug 18, 2024
Merged

Host functions for the FxDAO test #27

merged 8 commits into from
Aug 18, 2024

Conversation

bbyalcinkaya
Copy link
Member

@bbyalcinkaya bbyalcinkaya commented Aug 15, 2024

This PR implements a set of host functions required to run the FxDAO contract test. The following functions have been added:

  1. bytes_new_from_linear_memory
  2. bytes_len
  3. get_current_contract_address
  4. require_auth: Implemented as a no-op function that immediately returns Void, as the authentication system is too complex to be included within the current scope.
  5. create_contract: Required for deploying an FxDAO/vaults contract instance from the test contract. Since creating a contract address involves a Sha256 hash function, I've decided to implement this as a cheatcode named kasmer_create_contract, which accepts the new contract's address as a parameter. Once we enable the blockchain plugin for this semantics, we can add create_contract and remove this cheatcode.
  6. call: Enables the test contract to call FxDAO/vaults.

@bbyalcinkaya bbyalcinkaya marked this pull request as ready for review August 16, 2024 08:54
@rv-jenkins rv-jenkins merged commit b44523a into master Aug 18, 2024
3 checks passed
@rv-jenkins rv-jenkins deleted the FxDAO-test-hostfuns branch August 18, 2024 16:26
This was referenced Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants