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

build(plugin-satp-hermes): fix solidty test compilation remix-ide libs #3585

Open
petermetz opened this issue Oct 11, 2024 · 0 comments
Open
Assignees
Labels
dependencies Pull requests that update a dependency file IETF-SATP-Hermes Related to the Secure Asset Transfer Protocol as defined by the Internet Engineering Task Force. Tests Anything related to tests be that automatic or manual, integration or unit, etc.

Comments

@petermetz
Copy link
Contributor

petermetz commented Oct 11, 2024

Description

Right now there are 3 different compilation methods used by Hermes to compile solidity code and neither of them actually work:

  1. The hardhat one doesn't seem to be configured properly.
  2. Forge doesn't work because of the undeclared dependencies pointing to remix test libs
  3. Remix compilation doesn't work because it's not configured either so you have to manually open the remix ide and compile there instead of running a command on the terminal on your localhost.

The objective is to have a single one that actually works.

More Context

examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-erc20-test.sol
examples/cactus-example-cbdc-bridging-backend/src/solidity/test/satp-wrapper-test.sol

packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-erc20-test.sol
packages/cactus-plugin-satp-hermes/src/test/solidity/contracts/test/satp-wrapper-test.sol

import "remix_tests.sol";
import "remix_accounts.sol";

image

image

https://www.google.com/search?client=firefox-b-1-d&q=import+remix_tests.sol+
https://remix-ide.readthedocs.io/en/latest/unittesting.html
https://remix-ide.readthedocs.io/en/latest/assert_library.html
https://www.npmjs.com/package/@remix-project/remix-tests?activeTab=code
https://github.com/ethereum/remix-ide/blob/master/docs/unittesting_examples.md

Acceptance Criteria

  1. The build works, tests are passing
  2. Neither build nor test uses dependencies that are undeclared (the Remix Testing library) - either declare the dependency so that package managers can import it or stop using it altogether if it's proprietary and/or not open source

cc: @RafaelAPB

@petermetz petermetz added dependencies Pull requests that update a dependency file Tests Anything related to tests be that automatic or manual, integration or unit, etc. IETF-SATP-Hermes Related to the Secure Asset Transfer Protocol as defined by the Internet Engineering Task Force. labels Oct 11, 2024
@petermetz petermetz self-assigned this Oct 11, 2024
petermetz added a commit that referenced this issue Oct 11, 2024
Import paths were invalid possibly because the files were moved around
within the directory tree and the imports never got updated.

There are still imports which are invalid because of issues with the remix
IDE test library being used but not declared as a dependency. I've opened
a separate issue about fixing those problems here:
#3585

Signed-off-by: Peter Somogyvari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file IETF-SATP-Hermes Related to the Secure Asset Transfer Protocol as defined by the Internet Engineering Task Force. Tests Anything related to tests be that automatic or manual, integration or unit, etc.
Projects
None yet
Development

No branches or pull requests

1 participant