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

Update Evolving Assets Logic to Use Contract Address #173

Merged
merged 44 commits into from
Nov 15, 2023

Conversation

magecnion
Copy link
Contributor

@magecnion magecnion commented Nov 14, 2023

PR Type:

Enhancement


PR Description:

This PR includes several changes to the evolving assets logic, primarily shifting to use contract addresses. Key changes include:

  • Updating the tests in ownership-chain/precompile/laos-evolution/src/tests.rs to reflect the new logic.
  • Updating the function selectors in ownership-chain/precompile/laos-evolution/src/lib.rs to match the new contract interface.
  • Modifying the e2e tests in ownership-chain/e2e-tests/tests/test-create-collection.ts and ownership-chain/e2e-tests/tests/test-evolution.ts to use the new logic.
  • Adding a createCollection utility function in ownership-chain/e2e-tests/tests/util.ts for creating a new collection in the e2e tests.
  • Updating the LaosEvolution contract in ownership-chain/precompile/laos-evolution/contracts/LaosEvolution.sol to match the new interface.

PR Main Files Walkthrough:

files:
  • ownership-chain/precompile/laos-evolution/src/tests.rs: Refactored the tests to use the new logic of using contract addresses instead of collection IDs. This includes modifying the input parameters and expected results of several tests.
  • ownership-chain/precompile/laos-evolution/src/lib.rs: Updated the function selectors to match the new contract interface. Also, modified the logic in several functions to use contract addresses instead of collection IDs.
  • ownership-chain/e2e-tests/tests/test-create-collection.ts: Refactored the tests to use the new createCollection utility function, which creates a new collection using the new logic.
  • ownership-chain/e2e-tests/tests/util.ts: Added a createCollection utility function for creating a new collection in the e2e tests.
  • ownership-chain/precompile/laos-evolution/contracts/LaosEvolution.sol: Updated the LaosEvolution contract to match the new interface that uses contract addresses instead of collection IDs.

@magecnion magecnion marked this pull request as ready for review November 14, 2023 12:27
@magecnion
Copy link
Contributor Author

/describe

@magecnion magecnion linked an issue Nov 14, 2023 that may be closed by this pull request
@github-actions github-actions bot changed the title Feature/evolving assets logic use contract address Refactor Evolving Assets Logic to Use Contract Address Nov 14, 2023
@magecnion magecnion changed the title Refactor Evolving Assets Logic to Use Contract Address Update Evolving Assets Logic to Use Contract Address Nov 14, 2023
@magecnion magecnion requested review from asiniscalchi and a user November 14, 2023 17:15
@ghost ghost assigned magecnion Nov 15, 2023
ghost
ghost previously approved these changes Nov 15, 2023
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

lgtm

ownership-chain/e2e-tests/tests/util.ts Outdated Show resolved Hide resolved
@magecnion magecnion requested a review from a user November 15, 2023 10:38
ghost
ghost previously approved these changes Nov 15, 2023
@magecnion magecnion merged commit 361843d into main Nov 15, 2023
7 checks passed
@magecnion magecnion deleted the feature/evolving_assets_logic_use_contract_address branch November 15, 2023 11:26
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.

Evochain Collections by contractAddress instead of collectionId
2 participants