-
Notifications
You must be signed in to change notification settings - Fork 85
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
feat(starknet_client): support v3 transactions in starknet_client #1380
feat(starknet_client): support v3 transactions in starknet_client #1380
Conversation
3a40d98
to
21cf42a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 22 of 22 files at r1.
Reviewable status: all files reviewed (commit messages unreviewed), 7 unresolved discussions (waiting on @OmriEshhar1 and @Yael-Starkware)
crates/starknet_client/resources/reader/declare_v3.json
line 26 at r1 (raw file):
"max_fee": "0x0", "type": "DECLARE" }
Add newline and indent this entire file with one less indent
crates/starknet_client/resources/reader/deploy_account_v3.json
line 36 at r1 (raw file):
"version": "0x3", "type": "DEPLOY_ACCOUNT" }
Same here
crates/starknet_client/resources/reader/invoke_v3.json
line 35 at r1 (raw file):
"version": "0x3", "type": "INVOKE_FUNCTION" }
Add newline
crates/starknet_client/resources/writer/deploy_account_v3.json
line 37 at r1 (raw file):
"fee_data_availability_mode": 0, "paymaster_data": [] }
Same here
crates/starknet_client/resources/writer/invoke_v3.json
line 37 at r1 (raw file):
"paymaster_data": [], "account_deployment_data": [] }
Same here
crates/starknet_client/src/reader/objects/transaction.rs
line 330 at r1 (raw file):
pub fee_data_availability_mode: Option<ReservedDataAvailabilityMode>, pub paymaster_data: Option<PaymasterData>, #[serde(alias = "sender_address")]
Comment why is this so
crates/starknet_client/src/writer/objects/transaction.rs
line 108 at r1 (raw file):
pub nonce: Nonce, pub signature: TransactionSignature, pub nonce_data_availability_mode: ReservedDataAvailabilityMode,
This means that the writer client will fail until starknet is upgraded. @dan-starkware what should we do here? Should we have some form of versioning for the writer client? maybe we can query starknet on what is the starknet version and according to that decide if to fill the field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @OmriEshhar1 and @Yael-Starkware)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 8 unresolved discussions (waiting on @OmriEshhar1 and @Yael-Starkware)
crates/starknet_client/src/reader/objects/transaction.rs
line 173 at r2 (raw file):
pub compiled_class_hash: Option<CompiledClassHash>, pub sender_address: ContractAddress, pub nonce_data_availability_mode: Option<ReservedDataAvailabilityMode>,
Change to ReservedDataAvailabilityMode
, and add #[serde(default)]
Same for the rest
Codecov Report
@@ Coverage Diff @@
## main #1380 +/- ##
==========================================
+ Coverage 73.67% 75.04% +1.37%
==========================================
Files 84 84
Lines 9027 9082 +55
Branches 9027 9082 +55
==========================================
+ Hits 6651 6816 +165
+ Misses 1284 1134 -150
- Partials 1092 1132 +40
... and 2 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
21cf42a
to
8edaaaa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 14 of 30 files reviewed, 3 unresolved discussions (waiting on @OmriEshhar1 and @ShahakShama)
crates/starknet_client/resources/reader/declare_v3.json
line 26 at r2 (raw file):
"max_fee": "0x0", "type": "DECLARE" }
done
crates/starknet_client/resources/reader/deploy_account_v3.json
line 36 at r1 (raw file):
Previously, ShahakShama wrote…
Same here
done
crates/starknet_client/resources/reader/invoke_v3.json
line 35 at r1 (raw file):
Previously, ShahakShama wrote…
Add newline
done
crates/starknet_client/resources/writer/deploy_account_v3.json
line 37 at r1 (raw file):
Previously, ShahakShama wrote…
Same here
done
crates/starknet_client/resources/writer/invoke_v3.json
line 37 at r1 (raw file):
Previously, ShahakShama wrote…
Same here
done
crates/starknet_client/src/reader/objects/transaction.rs
line 330 at r1 (raw file):
Previously, ShahakShama wrote…
Comment why is this so
I'm still checking with Elin is the name has changed actually or they gave me a wrong example json. lets push this and I'll handle in the next commit.
crates/starknet_client/src/reader/objects/transaction.rs
line 173 at r2 (raw file):
Previously, ShahakShama wrote…
Change to
ReservedDataAvailabilityMode
, and add#[serde(default)]
Same for the rest
will add skip if none in a separate commit
8edaaaa
to
19ee127
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 13 of 30 files reviewed, 3 unresolved discussions (waiting on @OmriEshhar1 and @ShahakShama)
crates/starknet_client/src/reader/objects/transaction.rs
line 330 at r1 (raw file):
Previously, Yael-Starkware (yael-starkware) wrote…
I'm still checking with Elin is the name has changed actually or they gave me a wrong example json. lets push this and I'll handle in the next commit.
ok I checked and indeed they changed the name, added a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 15 of 16 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @OmriEshhar1 and @Yael-Starkware)
crates/starknet_client/src/reader/objects/transaction.rs
line 330 at r1 (raw file):
Previously, Yael-Starkware (yael-starkware) wrote…
ok I checked and indeed they changed the name, added a comment.
In that case, change it so that the sender_address is the name of the field and the alias is contract_address (Add a TODO to change it if this causes a big change)
19ee127
to
985b3a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @OmriEshhar1 and @ShahakShama)
crates/starknet_client/src/reader/objects/transaction.rs
line 330 at r1 (raw file):
Previously, ShahakShama wrote…
In that case, change it so that the sender_address is the name of the field and the alias is contract_address (Add a TODO to change it if this causes a big change)
Done.
985b3a7
to
cdac3c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @OmriEshhar1)
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information
This change is