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

dapp-refactor: reorganized shared items (#420) #422

Merged
merged 11 commits into from
Sep 23, 2023

Conversation

quiet-node
Copy link
Member

@quiet-node quiet-node commented Sep 23, 2023

Description: This PR reorganized shared items within the DApp. More specifically:

  • moved /hooks folder from /src/components/contract-interactions/hts to /src

  • moved handleRetrievingTransactionResultsFromLocalStorage and handleSanitizeFormInputs custom hooks to main common shared method folder

  • added the method component files in /src/components/contract-interactions/hts/token-create-custom into their own folders

  • rework the copyContentToClipboard() where needed

  • renamed handleRemoveRecord() to handleRemoveMapRecord()

  • renamed leftSideBar to navSideBar

  • renamed interfaces and types (interface variables will have capital "I" at the beginning of the variable name and type variables will have capital "T" )

  • moved ITransactionResult && ISmartContractExecutionResult from /hts to /shared folder as it is used in other contracts rather than HTS'es

  • replaced IExchangeRateContractResult & IPRNGContractResult with ISmartContractExecutionResult

Related issue(s): #420

Fixes #420

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

…ge and handleSanitizeFormInputs to main common shared method folder

Signed-off-by: Logan Nguyen <[email protected]>
…able() to its main shared folder

Signed-off-by: Logan Nguyen <[email protected]>
…ult to a shared type folder

Signed-off-by: Logan Nguyen <[email protected]>
…lt with ISmartContractExecutionResult

Signed-off-by: Logan Nguyen <[email protected]>
@quiet-node quiet-node added enhancement New feature or request P2 Tooling tooling labels Sep 23, 2023
@quiet-node quiet-node added this to the 0.6.0 milestone Sep 23, 2023
@quiet-node quiet-node self-assigned this Sep 23, 2023
@quiet-node quiet-node requested a review from a team as a code owner September 23, 2023 00:45
@github-actions
Copy link

github-actions bot commented Sep 23, 2023

Test Results

  22 files  +  10  132 suites  +95   15m 36s ⏱️ + 11m 9s
198 tests +  87  187 ✔️ +  85  6 💤 ±0    5 +2 
342 runs  +212  325 ✔️ +204  6 💤 ±0  11 +8 

For more details on these failures, see this check.

Results for commit 11fac9e. ± Comparison against base commit 7968621.

This pull request removes 2 and adds 89 tests. Note that renamed tests count towards both.
"before all" hook for "should be able to delete token" ‑ TokenManagmentContract Test Suite "before all" hook for "should be able to delete token"
"before all" hook for "should be able to execute burnToken" ‑ TokenCreateContract Test Suite "before all" hook for "should be able to execute burnToken"
should NOT be able call tokenByIndex ‑ ERC721Contract Test Suite Unsupported operations should NOT be able call tokenByIndex
should NOT be able call tokenOfOwnerByIndex ‑ ERC721Contract Test Suite Unsupported operations should NOT be able call tokenOfOwnerByIndex
should NOT be able execute safeTransferFrom ‑ ERC721Contract Test Suite Unsupported operations should NOT be able execute safeTransferFrom
should NOT be able execute safeTransferFromWithData ‑ ERC721Contract Test Suite Unsupported operations should NOT be able execute safeTransferFromWithData
should NOT be able to execute approve ‑ ERC721Contract Test Suite Unsupported operations should NOT be able to execute approve
should NOT be able to execute delegateSetApprovalForAll and isApprovedForAll ‑ ERC721Contract Test Suite should NOT be able to execute delegateSetApprovalForAll and isApprovedForAll
should NOT be able to execute transferFrom ‑ ERC721Contract Test Suite Unsupported operations should NOT be able to execute transferFrom
should be able to burn token ‑ TokenManagmentContract Test Suite should be able to burn token
should be able to change ADMIN key to ECDSA_secp256k and perform admin action with same contract ‑ TokenManagmentContract Test Suite Extended update token info and keys test suite Admin key set to contractId Positive should be able to change ADMIN key to ECDSA_secp256k and perform admin action with same contract
should be able to change ADMIN key to contractId and perform admin action with same contract ‑ TokenManagmentContract Test Suite Extended update token info and keys test suite Admin key set to ECDSA_secp256k Positive should be able to change ADMIN key to contractId and perform admin action with same contract
…

♻️ This comment has been updated with latest results.

@quiet-node quiet-node merged commit 44658fc into main Sep 23, 2023
@quiet-node quiet-node deleted the 420-refactor-shared-components branch September 23, 2023 04:54
mshakeg pushed a commit to mshakeg/hedera-smart-contracts that referenced this pull request Oct 14, 2023
* dapp-refactor: moved /hooks folder to /src folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved handleRetrievingTransactionResultsFromLocalStorage and handleSanitizeFormInputs to main common shared method folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved erc/hooks to main hooks folder and erc/methods to main methods folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved prepareInfoValuesToShow() and TransactionResultTable() to its main shared folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: reorganized token-create-custom

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: reused copyContentToClipboard where needed

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: renamed handleRemoveRecord to handleRemoveMapRecord

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: renamed navsidebar

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: renamed interfaces and types

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved ITransactionResult && ISmartContractExecutionResult to a shared type folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: replaced IExchangeRateContractResult & IPRNGContractResult with ISmartContractExecutionResult

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: Mo Shaikjee <[email protected]>
ebadiere pushed a commit that referenced this pull request Oct 16, 2023
* dapp-refactor: moved /hooks folder to /src folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved handleRetrievingTransactionResultsFromLocalStorage and handleSanitizeFormInputs to main common shared method folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved erc/hooks to main hooks folder and erc/methods to main methods folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved prepareInfoValuesToShow() and TransactionResultTable() to its main shared folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: reorganized token-create-custom

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: reused copyContentToClipboard where needed

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: renamed handleRemoveRecord to handleRemoveMapRecord

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: renamed navsidebar

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: renamed interfaces and types

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-refactor: moved ITransactionResult && ISmartContractExecutionResult to a shared type folder

Signed-off-by: Logan Nguyen <[email protected]>

* dapp-update: replaced IExchangeRateContractResult & IPRNGContractResult with ISmartContractExecutionResult

Signed-off-by: Logan Nguyen <[email protected]>

---------

Signed-off-by: Logan Nguyen <[email protected]>
Signed-off-by: ebadiere <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 Tooling tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[System Contract DApp] reorganize DApp Playground folder
2 participants