Skip to content
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ jobs:

runs-on: ubuntu-latest

container:
image: swift:5.9-jammy
container: swift:5.10

env:
TESTS_PRIVATEKEY: ${{ secrets.TESTS_PRIVATEKEY }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ fastlane/screenshots
fastlane/test_output

scripts/bin/*
TestConfig_private.swift
TestConfigPrivate.swift
195 changes: 128 additions & 67 deletions Package.resolved

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

49 changes: 24 additions & 25 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.6
import PackageDescription

let package = Package(
Expand All @@ -13,58 +13,57 @@ let package = Package(
.library(name: "web3-zksync.swift", targets: ["web3-zksync"])
],
dependencies: [
.package(name: "BigInt", url: "https://github.com/attaswift/BigInt", from: "5.3.0"),
.package(name: "GenericJSON", url: "https://github.com/iwill/generic-json-swift", .upToNextMajor(from: "2.0.0")),
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", .upToNextMajor(from: "0.6.0")),
.package(url: "https://github.com/attaswift/BigInt", exact: "5.3.0"),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

XCTAssertEqual(BigInt(hex: "")!, 0)

when updating to latest BigInt that assert fails

.package(url: "https://github.com/iwill/generic-json-swift", from: "2.0.0"),
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", from: "0.6.0"),
.package(url: "https://github.com/vapor/websocket-kit.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
],
targets: [
.target(
name: "web3",
dependencies:
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
"BigInt",
"GenericJSON",
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "WebSocketKit", package: "websocket-kit"),
.product(name: "Logging", package: "swift-log")
],
path: "web3swift/src",
exclude: ["ZKSync"]
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
.product(name: "BigInt", package: "BigInt"),
.product(name: "GenericJSON", package: "generic-json-swift"),
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "WebSocketKit", package: "websocket-kit"),
.product(name: "Logging", package: "swift-log")
],
path: "Sources/Web3Swift"
),
.target(
.target(
name: "web3-zksync",
dependencies:
[
.target(name: "web3")
],
path: "web3swift/src/ZKSync"
[
.target(name: "web3")
],
path: "Sources/Web3ZKSync"
),
.target(
name: "keccaktiny",
dependencies: [],
path: "web3swift/lib/keccak-tiny",
path: "libs/keccak-tiny",
exclude: ["module.map"]
),
.target(
name: "aes",
dependencies: [],
path: "web3swift/lib/aes",
path: "libs/aes",
exclude: ["module.map"]
),
.target(
name: "Internal_CryptoSwift_PBDKF2",
dependencies: [],
path: "web3swift/lib/CryptoSwift"
path: "libs/CryptoSwift"
),
.testTarget(
name: "web3swiftTests",
dependencies: ["web3", "web3-zksync"],
path: "web3sTests",
path: "Tests/Web3SwiftTests",
resources: [
.copy("Resources/rlptests.json"),
.copy("Account/cryptofights_712.json"),
Expand Down
89 changes: 89 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// swift-tools-version:5.10
import PackageDescription

let package = Package(
name: "web3.swift",
platforms: [
.iOS(SupportedPlatform.IOSVersion.v13),
.macOS(SupportedPlatform.MacOSVersion.v11),
.watchOS(.v7)
],
products: [
.library(name: "web3.swift", targets: ["web3"]),
.library(name: "web3-zksync.swift", targets: ["web3-zksync"])
],
dependencies: [
.package(url: "https://github.com/attaswift/BigInt", exact: "5.3.0"),
.package(url: "https://github.com/iwill/generic-json-swift", from: "2.0.0"),
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", from: "0.6.0"),
.package(url: "https://github.com/vapor/websocket-kit.git", from: "2.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
],
targets: [
.target(
name: "web3",
dependencies:
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
.product(name: "BigInt", package: "BigInt"),
.product(name: "GenericJSON", package: "generic-json-swift"),
.product(name: "secp256k1", package: "secp256k1.swift"),
.product(name: "WebSocketKit", package: "websocket-kit"),
.product(name: "Logging", package: "swift-log")
],
path: "Sources/Web3Swift",
swiftSettings: [
// .concurrencyChecking
]
),
.target(
name: "web3-zksync",
dependencies:
[
.target(name: "web3")
],
path: "Sources/Web3ZKSync",
swiftSettings: [
// .concurrencyChecking
]
),
.target(
name: "keccaktiny",
dependencies: [],
path: "libs/keccak-tiny",
exclude: ["module.map"]
),
.target(
name: "aes",
dependencies: [],
path: "libs/aes",
exclude: ["module.map"]
),
.target(
name: "Internal_CryptoSwift_PBDKF2",
dependencies: [],
path: "libs/CryptoSwift"
),
.testTarget(
name: "web3swiftTests",
dependencies: ["web3", "web3-zksync"],
path: "Tests/Web3SwiftTests",
resources: [
.copy("Resources/rlptests.json"),
.copy("Account/cryptofights_712.json"),
.copy("Account/ethermail_signTypedDataV4.json"),
.copy("Account/real_word_opensea_signTypedDataV4.json"),
]
)
]
)

extension SwiftSetting {
/// Enable complete concurrency checking for a target in a Swift package using Swift 5.9 or Swift 5.10
/// [Swift Concurrency Documentation](https://www.swift.org/documentation/concurrency/)
static var concurrencyChecking: SwiftSetting {
.enableExperimentalFeature("StrictConcurrency=complete")
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// web3.swift
// EthereumAccount+SignTransaction.swift
// Copyright © 2022 Argent Labs Limited. All rights reserved.
//

Expand Down
Loading
Loading