diff --git a/androiddemo/build.gradle.kts b/androiddemo/build.gradle.kts index 7326bfd86..f6ff11299 100644 --- a/androiddemo/build.gradle.kts +++ b/androiddemo/build.gradle.kts @@ -49,7 +49,7 @@ dependencies { implementation("com.google.android.material:material:1.9.0") implementation("androidx.constraintlayout:constraintlayout:2.1.4") // Make sure you are using the AAR and not a JAR and include transitive dependencies - implementation("com.swmansion.starknet:starknet:0.12.1@aar"){ + implementation("com.swmansion.starknet:starknet:0.13.0@aar"){ isTransitive = true } implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") diff --git a/androiddemo/src/main/java/com/example/androiddemo/MainActivity.kt b/androiddemo/src/main/java/com/example/androiddemo/MainActivity.kt index 8468c4bbb..049832fd9 100644 --- a/androiddemo/src/main/java/com/example/androiddemo/MainActivity.kt +++ b/androiddemo/src/main/java/com/example/androiddemo/MainActivity.kt @@ -97,7 +97,6 @@ class MainActivity : AppCompatActivity() { signer = signer, provider = provider, chainId = chainId, - cairoVersion = Felt.ONE, ) // Details of the transfer transaction diff --git a/javademo/build.gradle.kts b/javademo/build.gradle.kts index 3d5820d7c..daa29c05d 100644 --- a/javademo/build.gradle.kts +++ b/javademo/build.gradle.kts @@ -3,7 +3,7 @@ plugins { } dependencies { - implementation("com.swmansion.starknet:starknet:0.12.1") + implementation("com.swmansion.starknet:starknet:0.13.0") testImplementation("org.junit.jupiter:junit-jupiter-params:5.10.0") testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.0") } diff --git a/javademo/src/main/java/com/example/javademo/Main.java b/javademo/src/main/java/com/example/javademo/Main.java index eb90d40d1..115a3240f 100644 --- a/javademo/src/main/java/com/example/javademo/Main.java +++ b/javademo/src/main/java/com/example/javademo/Main.java @@ -45,7 +45,7 @@ public static void main(String[] args) throws Exception { Felt privateKey = Felt.fromHex(DemoConfig.accountPrivateKey); // Make sure to check Cairo version of account contract StarknetChainId chainId = provider.getChainId().send(); - Account account = new StandardAccount(address, privateKey, provider, chainId, Felt.ONE); + Account account = new StandardAccount(address, privateKey, provider, chainId); // Invoke a contract (Transfer ETH) Felt recipientAccountAddress = Felt.fromHex("0x987654321"); @@ -177,7 +177,7 @@ private static DeclareResponse declareCairo1Contract(Account account, Provider p Felt nonce = account.getNonce().send(); // Estimate fee for declaring a contract - DeclareTransactionV3Payload declareTransactionPayloadForFeeEstimate = account.signDeclareV3(contractDefinition, casmContractDefinition, new DeclareParamsV3(nonce, ResourceBounds.ZERO), true); + DeclareTransactionV3 declareTransactionPayloadForFeeEstimate = account.signDeclareV3(contractDefinition, casmContractDefinition, new DeclareParamsV3(nonce, ResourceBounds.ZERO), true); Request feeEstimateRequest = provider.getEstimateFee(List.of(declareTransactionPayloadForFeeEstimate)); EstimateFeeResponse feeEstimate = feeEstimateRequest.send().getValues().get(0); // Make sure to prefund the account with enough funds to cover the fee for declare transaction @@ -185,7 +185,7 @@ private static DeclareResponse declareCairo1Contract(Account account, Provider p // Declare a contract ResourceBounds l1ResourceBounds = feeEstimate.toResourceBounds(1.5, 1.5).getL1Gas(); DeclareParamsV3 params = new DeclareParamsV3(nonce, l1ResourceBounds); - DeclareTransactionV3Payload declareTransactionPayload = account.signDeclareV3(contractDefinition, casmContractDefinition, params, false); + DeclareTransactionV3 declareTransactionPayload = account.signDeclareV3(contractDefinition, casmContractDefinition, params, false); Request request = provider.declareContract(declareTransactionPayload);