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

Default value for blockTag argument in provider methods #87

Merged
merged 6 commits into from Sep 26, 2022

Conversation

bartekryba
Copy link
Contributor

@bartekryba bartekryba commented Aug 25, 2022

Added default values to blockTag params in provider methods, so these methods can be called without specifying blockId.

Swapped order of arguments in getClassAt method, to align it with other Provider methods (potential breaking change)

Copy link
Member

@cptartur cptartur left a comment

Choose a reason for hiding this comment

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

I like this addition. How default parameters behave in java code and documentation?

@@ -43,14 +43,25 @@ interface Provider {
*/
fun callContract(call: Call, blockNumber: Int): Request<List<Felt>>

/**
* Calls a contract deployed on StarkNet.
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps these overloaded method should have a info in their docs that they use default block tag LATEST.

@codecov-commenter
Copy link

codecov-commenter commented Sep 26, 2022

Codecov Report

Base: 62.50% // Head: 62.40% // Decreases project coverage by -0.09% ⚠️

Coverage data is based on head (d684c3f) compared to base (f282b4a).
Patch coverage: 40.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   62.50%   62.40%   -0.10%     
==========================================
  Files          45       46       +1     
  Lines        1176     1181       +5     
  Branches       68       68              
==========================================
+ Hits          735      737       +2     
- Misses        422      425       +3     
  Partials       19       19              
Impacted Files Coverage Δ
...kotlin/com/swmansion/starknet/provider/Provider.kt 25.00% <25.00%> (ø)
...swmansion/starknet/provider/rpc/JsonRpcProvider.kt 78.90% <100.00%> (+0.16%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bartekryba bartekryba merged commit 1f349cd into main Sep 26, 2022
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.

None yet

3 participants