Skip to content

FIles which are not part of the smart contract are not excluded #49

@michele-franchi

Description

@michele-franchi

Issue:
When the right smart contract files are uploaded with also some extra files (which are not included in any file of the contract), the smart contract is verified successfully.

Solution:
Files which are not included in the smart contract shouldn't be part of the final output. This can be achieved by parsing all the uploaded files and by keeping the entry file and all the files which are included in at least one file.
I see two possible ways to solve this:

  1. Delete the extra files before saving them in the database, could be done at this step:

  2. Keep the save process as it is, but check which files should not be included in the verification process. Could be done at this step:


    And if the verification is successful the database should be updated and the extra files should be deleted

For the second solution this existing utility could be used: https://github.com/aeternity/aepp-sdk-js/blob/develop/src/contract/compiler/getFileSystem.ts
Otherwise I guess it should be adapter for 1) to use strings instead of actual files.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions