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

Creating a working example for contract calls #6630

Conversation

Neurone
Copy link
Contributor

@Neurone Neurone commented Aug 10, 2023

Description:
In the Swagger UI, the current example payload for the endpoint /api/v1/contracts/call contains some errors:

  • the amount of gas provided is too much (120M)
  • the contract does not exist anymore due to recent testnet reset

This PR modifies the example payload, so the user can test the API without customizing the payload.

Related issue(s):

N/A

Notes for reviewer:

N/A

Checklist

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

@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01% ⚠️

Comparison is base (8c83e61) 92.70% compared to head (8b4289b) 92.69%.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #6630      +/-   ##
============================================
- Coverage     92.70%   92.69%   -0.01%     
+ Complexity     6392     6391       -1     
============================================
  Files           823      823              
  Lines         27079    27079              
  Branches       3104     3104              
============================================
- Hits          25104    25102       -2     
- Misses         1270     1271       +1     
- Partials        705      706       +1     

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -2446,7 +2446,7 @@ components:
type: integer
to:
description: The 20-byte hexadecimal EVM address the transaction is directed to.
example: "0x00000000000000000000000000000000000003f4"
example: "0xD9d0c5C0Ff85758BdF05A7636F8036d4D065F5B6"
Copy link
Member

Choose a reason for hiding this comment

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

nit: prefer lowercase hex like the other examples

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.
I agree in general lowercase is good for any other value, but for addresses I usually prefer the checksum version.

@steven-sheehy steven-sheehy added this to the 0.87.0 milestone Aug 10, 2023
@steven-sheehy steven-sheehy added the documentation Type: Improvements or additions to documentation label Aug 10, 2023
@steven-sheehy steven-sheehy requested a review from a team August 10, 2023 22:01
xin-hedera
xin-hedera previously approved these changes Aug 10, 2023
Copy link
Collaborator

@xin-hedera xin-hedera left a comment

Choose a reason for hiding this comment

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

LGTM

@Neurone Neurone force-pushed the fix-contract-call-example-payload branch from bec76bd to f79e17b Compare August 10, 2023 22:20
Signed-off-by: Giuseppe Bertone <giuseppe.bertone@swirldslabs.com>
Copy link
Member

@steven-sheehy steven-sheehy left a comment

Choose a reason for hiding this comment

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

LGTM

@steven-sheehy steven-sheehy merged commit 475b655 into hashgraph:main Aug 10, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Type: Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants