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

Support signed declare transaction #149

Merged
merged 20 commits into from Nov 22, 2022
Merged

Support signed declare transaction #149

merged 20 commits into from Nov 22, 2022

Conversation

cptartur
Copy link
Member

@cptartur cptartur commented Oct 5, 2022

Describe your changes

This PR adds support for signing declare transactions and sending them.

Linked issues

Closes #145

Breaking changes

  • This issue contains breaking changes

@cptartur
Copy link
Member Author

cptartur commented Oct 5, 2022

Thing to consider: with current supported version of the RPC spec, it's impossible to send signed declare transactions. Starknet-jvm will first have to be updated to support RPC 0.2.0 for these to be able to work.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2022

Codecov Report

Base: 66.42% // Head: 68.22% // Increases project coverage by +1.80% 🎉

Coverage data is based on head (1c39d01) compared to base (5b56293).
Patch coverage: 92.45% of modified lines in pull request are covered.

❗ Current head 1c39d01 differs from pull request most recent head 0a3c1a2. Consider uploading reports for the commit 0a3c1a2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
+ Coverage   66.42%   68.22%   +1.80%     
==========================================
  Files          52       52              
  Lines        1382     1432      +50     
  Branches       83       85       +2     
==========================================
+ Hits          918      977      +59     
+ Misses        440      430      -10     
- Partials       24       25       +1     
Impacted Files Coverage Δ
...n/kotlin/com/swmansion/starknet/account/Account.kt 100.00% <ø> (ø)
...swmansion/starknet/provider/rpc/JsonRpcProvider.kt 77.69% <0.00%> (-1.22%) ⬇️
...on/starknet/data/types/transactions/Transaction.kt 73.62% <92.85%> (+11.69%) ⬆️
.../com/swmansion/starknet/account/StandardAccount.kt 100.00% <100.00%> (ø)
...mansion/starknet/data/TransactionHashCalculator.kt 100.00% <100.00%> (ø)
...lin/com/swmansion/starknet/data/types/Contracts.kt 42.39% <100.00%> (+0.63%) ⬆️
...knet/data/types/transactions/TransactionPayload.kt 100.00% <100.00%> (ø)
...nsion/starknet/provider/gateway/GatewayProvider.kt 89.86% <100.00%> (ø)
...tlin/com/swmansion/starknet/crypto/NativeLoader.kt 29.03% <0.00%> (ø)
...knet/data/types/transactions/TransactionReceipt.kt 16.81% <0.00%> (ø)
... and 1 more

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.

@cptartur
Copy link
Member Author

Note that the Rpc provider doesn't support sending signed Declare txs. I've added an error for that so it doesn't fail silently/is ignored. This will have to be addressed once rpc 0.2.1 is supported, shouldn't require any changes to the Account itself however.

@cptartur cptartur removed the blocked label Nov 17, 2022
Copy link
Member

@THenry14 THenry14 left a comment

Choose a reason for hiding this comment

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

lgtm!

@cptartur cptartur merged commit c5b5230 into main Nov 22, 2022
@cptartur cptartur deleted the feat/account-declare branch November 22, 2022 14:03
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.

Support signing and preparing declare transactions through Account
4 participants