Skip to content

Commit 3bbd006

Browse files
committed
[CHANGE] Pin BigInt to 5.3.0, update BatchedCollection to fix warnings
1 parent 41ed84d commit 3bbd006

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

Package.resolved

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"kind" : "remoteSourceControl",
66
"location" : "https://github.com/attaswift/BigInt",
77
"state" : {
8-
"revision" : "793a7fac0bfc318e85994bf6900652e827aef33e",
9-
"version" : "5.4.1"
8+
"revision" : "0ed110f7555c34ff468e72e1686e59721f2b0da6",
9+
"version" : "5.3.0"
1010
}
1111
},
1212
{

Package.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ let package = Package(
1313
.library(name: "web3-zksync.swift", targets: ["web3-zksync"])
1414
],
1515
dependencies: [
16-
.package(url: "https://github.com/attaswift/BigInt", .upToNextMajor(from: "5.3.0")),
17-
.package(url: "https://github.com/iwill/generic-json-swift", .upToNextMajor(from: "2.0.0")),
18-
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", .upToNextMajor(from: "0.6.0")),
19-
.package(url: "https://github.com/vapor/websocket-kit.git", .upToNextMajor(from: "2.0.0")),
20-
.package(url: "https://github.com/apple/swift-log.git", .upToNextMajor(from: "1.0.0"))
16+
.package(url: "https://github.com/attaswift/BigInt", exact: "5.3.0"),
17+
.package(url: "https://github.com/iwill/generic-json-swift", from: "2.0.0"),
18+
.package(url: "https://github.com/GigaBitcoin/secp256k1.swift.git", from: "0.6.0"),
19+
.package(url: "https://github.com/vapor/websocket-kit.git", from: "2.0.0"),
20+
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
2121
],
2222
targets: [
2323
.target(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extension TestConfig {
2+
static let privateKey = "asdfgy"
3+
static let publicKey = "0xE78e5ecb061fE3DD1672dDDA7b5116213B23B99A"
4+
}

libs/CryptoSwift/BatchedCollection.swift

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// CryptoSwift
33
//
4-
// Copyright (C) 2014-2021 Marcin Krzyżanowski <[email protected]>
4+
// Copyright (C) 2014-2022 Marcin Krzyżanowski <[email protected]>
55
// This software is provided 'as-is', without any express or implied warranty.
66
//
77
// In no event will the authors be held liable for any damages arising from the use of this software.
@@ -19,12 +19,12 @@ struct BatchedCollectionIndex<Base: Collection> {
1919

2020
extension BatchedCollectionIndex: Comparable {
2121
@usableFromInline
22-
static func == <Base>(lhs: BatchedCollectionIndex<Base>, rhs: BatchedCollectionIndex<Base>) -> Bool {
22+
static func == <BaseCollection>(lhs: BatchedCollectionIndex<BaseCollection>, rhs: BatchedCollectionIndex<BaseCollection>) -> Bool {
2323
lhs.range.lowerBound == rhs.range.lowerBound
2424
}
2525

2626
@usableFromInline
27-
static func < <Base>(lhs: BatchedCollectionIndex<Base>, rhs: BatchedCollectionIndex<Base>) -> Bool {
27+
static func < <BaseCollection>(lhs: BatchedCollectionIndex<BaseCollection>, rhs: BatchedCollectionIndex<BaseCollection>) -> Bool {
2828
lhs.range.lowerBound < rhs.range.lowerBound
2929
}
3030
}
@@ -48,27 +48,27 @@ struct BatchedCollection<Base: Collection>: Collection {
4848
typealias Index = BatchedCollectionIndex<Base>
4949

5050
private func nextBreak(after idx: Base.Index) -> Base.Index {
51-
base.index(idx, offsetBy: size, limitedBy: base.endIndex) ?? base.endIndex
51+
self.base.index(idx, offsetBy: self.size, limitedBy: self.base.endIndex) ?? self.base.endIndex
5252
}
5353

5454
@usableFromInline
5555
var startIndex: Index {
56-
Index(range: base.startIndex..<nextBreak(after: base.startIndex))
56+
Index(range: self.base.startIndex..<self.nextBreak(after: self.base.startIndex))
5757
}
5858

5959
@usableFromInline
6060
var endIndex: Index {
61-
Index(range: base.endIndex..<base.endIndex)
61+
Index(range: self.base.endIndex..<self.base.endIndex)
6262
}
6363

6464
@usableFromInline
6565
func index(after idx: Index) -> Index {
66-
Index(range: idx.range.upperBound..<nextBreak(after: idx.range.upperBound))
66+
Index(range: idx.range.upperBound..<self.nextBreak(after: idx.range.upperBound))
6767
}
6868

6969
@usableFromInline
7070
subscript(idx: Index) -> Base.SubSequence {
71-
base[idx.range]
71+
self.base[idx.range]
7272
}
7373
}
7474

0 commit comments

Comments
 (0)