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

Style/smart contract file #590

Merged
merged 3 commits into from
May 3, 2024

Conversation

Ben-Rey
Copy link
Collaborator

@Ben-Rey Ben-Rey commented May 3, 2024

No description provided.

@Ben-Rey Ben-Rey changed the base branch from main to 578-improve-code-review May 3, 2024 07:33
@Ben-Rey Ben-Rey force-pushed the style/smart-contract-file branch from d028274 to afb13e8 Compare May 3, 2024 07:39
Copy link

github-actions bot commented May 3, 2024

Coverage report for experimental massa-web3

Caution

Test run failed

St.
Category Percentage Covered / Total
🟢 Statements
94.74% (+0.19% 🔼)
54/57
🟢 Branches 100% 13/13
🟢 Functions 92.31% 12/13
🟢 Lines
94.55% (+0.21% 🔼)
52/55

Test suite run failed

Failed tests: 0/10. Failed suites: 4/7.
  ● Test suite failed to run

    src/web3/ClientFactory.ts:70:9 - error TS2322: Type 'null' is not assignable to type 'Web3Account'.

    70     let account: Web3Account = null
               ~~~~~~~
    src/web3/ClientFactory.ts:109:9 - error TS2322: Type 'null' is not assignable to type 'Web3Account'.

    109     let account: Web3Account = null
                ~~~~~~~


  ● Test suite failed to run

    src/utils/Xbqcrypto.ts:76:19 - error TS2322: Type 'number | undefined' is not assignable to type 'number'.
      Type 'undefined' is not assignable to type 'number'.

    76   return { value, bytes }
                         ~~~~~

      src/utils/Xbqcrypto.ts:72:3
        72   bytes: number
             ~~~~~
        The expected type comes from property 'bytes' which is declared here on type '{ value: number; bytes: number; }'


  ● Test suite failed to run

    src/experimental/crypto/cross-browser.ts:80:22 - error TS2769: No overload matches this call.
      The last overload gave the following error.
        Argument of type 'Promise<ArrayBuffer>' is not assignable to parameter of type 'WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string; }'.

    80   return Buffer.from(crypto.subtle.exportKey('raw', derivedKey))
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ../../node_modules/@types/node/buffer.d.ts:309:13
        309             from(
                        ~~~~~
        310                 str:
            ~~~~~~~~~~~~~~~~~~~~
        ... 
        315                 encoding?: BufferEncoding,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        316             ): Buffer;
            ~~~~~~~~~~~~~~~~~~~~~~
        The last overload is declared here.


  ● Test suite failed to run

    src/experimental/crypto/cross-browser.ts:80:22 - error TS2769: No overload matches this call.
      The last overload gave the following error.
        Argument of type 'Promise<ArrayBuffer>' is not assignable to parameter of type 'WithImplicitCoercion<string> | { [Symbol.toPrimitive](hint: "string"): string; }'.

    80   return Buffer.from(crypto.subtle.exportKey('raw', derivedKey))
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      ../../node_modules/@types/node/buffer.d.ts:309:13
        309             from(
                        ~~~~~
        310                 str:
            ~~~~~~~~~~~~~~~~~~~~
        ... 
        315                 encoding?: BufferEncoding,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        316             ): Buffer;
            ~~~~~~~~~~~~~~~~~~~~~~
        The last overload is declared here.

Report generated by 🧪jest coverage report action from b179bd7

@Ben-Rey Ben-Rey requested a review from gregLibert May 3, 2024 07:41
@Ben-Rey Ben-Rey marked this pull request as ready for review May 3, 2024 07:41
@Ben-Rey Ben-Rey force-pushed the style/smart-contract-file branch 2 times, most recently from 1b2f752 to ba3065f Compare May 3, 2024 08:46
@Ben-Rey Ben-Rey requested a review from gregLibert May 3, 2024 08:46
@Ben-Rey Ben-Rey force-pushed the style/smart-contract-file branch from ba3065f to 78bc73d Compare May 3, 2024 08:48
@Ben-Rey Ben-Rey force-pushed the style/smart-contract-file branch from 78bc73d to 370356e Compare May 3, 2024 08:53
Copy link
Contributor

Choose a reason for hiding this comment

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

This code is specific to the smart contract deployer. It should be moved there imho.

@Ben-Rey Ben-Rey force-pushed the style/smart-contract-file branch from 74f5d49 to b179bd7 Compare May 3, 2024 09:41
Copy link

sonarcloud bot commented May 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@Ben-Rey Ben-Rey merged commit 7e8eee4 into 578-improve-code-review May 3, 2024
3 of 6 checks passed
@Ben-Rey Ben-Rey deleted the style/smart-contract-file branch May 3, 2024 10:29
Ben-Rey added a commit that referenced this pull request May 3, 2024
* fix lint smart contract file

* argsKey and coinsKey for populate datastore

* Move datastore with Smartcontract generation file
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.

2 participants