Skip to content

Commit 84e5dd1

Browse files
authored
Update dependencies for Swift 6.2 compatibility (#241)
- Update CryptoSwift from 1.5.1 to 1.9.0 The CryptoSwift 1.9.0 update includes the bytes -> byteArray property rename to avoid conflicts with Swift 6.2's new bytes: RawSpan property (SE-0456).
1 parent 62fc773 commit 84e5dd1

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Package.resolved

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ let package = Package(
2020
// Dependencies declare other packages that this package depends on.
2121
// .package(url: /* package url */, from: "1.0.0"),
2222
.package(url: "https://github.com/attaswift/BigInt.git", from: "5.3.0"),
23-
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", exact: "1.5.1"),
23+
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.9.0"),
2424
],
2525
targets: [
2626
// Targets are the basic building blocks of a package. A target can define a module or a test suite.

Sources/Starknet/Data/ContractAddressCalculator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class StarknetContractAddressCalculator {
2222
let hex = address.toHex().dropFirst(2)
2323
let stringAddress = String(String(hex.reversed()).padding(toLength: 64, withPad: "0", startingAt: 0).reversed())
2424
var chars = Array(stringAddress)
25-
let hashed = keccak(on: BigUInt(hex, radix: 16)!.serialize().bytes)
25+
let hashed = keccak(on: BigUInt(hex, radix: 16)!.serialize().byteArray)
2626

2727
for i in 0 ... chars.count - 1 {
2828
let bit = BigUInt(2).power(256 - 4 * i - 1)

0 commit comments

Comments
 (0)