Skip to content

Commit

Permalink
feat: support v3 transactions (#581)
Browse files Browse the repository at this point in the history
Backports `de633f4` to the last release that uses JSON-RPC v0.6.x. This
is a breaking change though, so it won't be released on crates.io. To
use v3 transactions on JSON-RPC v0.6.x, use Git dependency.
  • Loading branch information
xJonathanLEI committed Apr 29, 2024
1 parent 2d59636 commit bf49486
Show file tree
Hide file tree
Showing 17 changed files with 2,174 additions and 210 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/declare_cairo1_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async fn main() {
let flattened_class = contract_artifact.flatten().unwrap();

let result = account
.declare(Arc::new(flattened_class), compiled_class_hash)
.declare_v2(Arc::new(flattened_class), compiled_class_hash)
.send()
.await
.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion examples/deploy_argent_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn main() {
.await
.unwrap();

let deployment = factory.deploy(salt);
let deployment = factory.deploy_v1(salt);

let est_fee = deployment.estimate_fee().await.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples/deploy_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async fn main() {

let contract_factory = ContractFactory::new(class_hash, account);
contract_factory
.deploy(vec![felt!("123456")], felt!("1122"), false)
.deploy_v1(vec![felt!("123456")], felt!("1122"), false)
.send()
.await
.expect("Unable to deploy contract");
Expand Down
2 changes: 1 addition & 1 deletion examples/mint_tokens.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async fn main() {
account.set_block_id(BlockId::Tag(BlockTag::Pending));

let result = account
.execute(vec![Call {
.execute_v1(vec![Call {
to: tst_token_address,
selector: get_selector_from_name("mint").unwrap(),
calldata: vec![
Expand Down
1 change: 1 addition & 0 deletions starknet-accounts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ exclude = ["test-data/**"]

[dependencies]
starknet-core = { version = "0.10.0", path = "../starknet-core" }
starknet-crypto = { version = "0.6.2", path = "../starknet-crypto" }
starknet-providers = { version = "0.10.0", path = "../starknet-providers" }
starknet-signers = { version = "0.8.0", path = "../starknet-signers" }
async-trait = "0.1.68"
Expand Down
Loading

0 comments on commit bf49486

Please sign in to comment.