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

Issue 1841 pub flow - createAsset Fn #1843

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open

Conversation

paulo-ocean
Copy link
Contributor

@paulo-ocean paulo-ocean commented Sep 3, 2024

Fixes #1841 .

Changes proposed in this PR:

  • generic function (exported) to create an asset
  • update config, set confidential evm key
  • calculate template index (from id or address)
  • if confidential evm have filesObject on constructor (no need to provider encrypt)

src/utils/Assets.ts Outdated Show resolved Hide resolved
src/contracts/NFTFactory.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Show resolved Hide resolved
@paulo-ocean paulo-ocean marked this pull request as draft September 4, 2024 07:49
@paulo-ocean paulo-ocean marked this pull request as ready for review September 9, 2024 14:13
@paulo-ocean paulo-ocean self-assigned this Sep 10, 2024
src/config/Config.ts Outdated Show resolved Hide resolved
src/config/ConfigHelper.ts Outdated Show resolved Hide resolved
src/config/ConfigHelper.ts Outdated Show resolved Hide resolved
src/config/ConfigHelper.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Outdated Show resolved Hide resolved
src/utils/Assets.ts Outdated Show resolved Hide resolved
test/unit/AssetUtils.test.ts Outdated Show resolved Hide resolved
test/unit/AssetUtils.test.ts Outdated Show resolved Hide resolved
test/unit/AssetUtils.test.ts Outdated Show resolved Hide resolved
test/unit/AssetUtils.test.ts Outdated Show resolved Hide resolved
@paulo-ocean
Copy link
Contributor Author

btw, the service "files" cannot be null for confidential EVM, but empty string instead...
if its null the DDO does not passes against schema validation
schema:ServiceShape

....
sh:targetClass schema:Service ;
    sh:property [
        sh:path schema:id ;
        sh:datatype xsd:string ;
        sh:pattern "^(.*)$" ;
        sh:minCount 1;
        sh:maxCount 1;
    ] ;
...

@alexcos20
Copy link
Member

btw, the service "files" cannot be null for confidential EVM, but empty string instead... if its null the DDO does not passes against schema validation schema:ServiceShape

....
sh:targetClass schema:Service ;
    sh:property [
        sh:path schema:id ;
        sh:datatype xsd:string ;
        sh:pattern "^(.*)$" ;
        sh:minCount 1;
        sh:maxCount 1;
    ] ;
...

then let's go with empty string

Copy link

codeclimate bot commented Sep 18, 2024

Code Climate has analyzed commit 6ea2ea2 and detected 11 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 9
Duplication 2

The test coverage on the diff in this pull request is 58.5% (50% is the threshold).

This pull request will bring the total coverage in the repository to 74.4% (-1.2% change).

View more on Code Climate.

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.

Add publish flow
2 participants