Skip to content

Commit

Permalink
Merge pull request #132 from Boilertalk/chore/logo
Browse files Browse the repository at this point in the history
chore: add new web3.swift logo
  • Loading branch information
koraykoska authored Oct 10, 2022
2 parents f76a23b + b96a000 commit 9ee8eca
Show file tree
Hide file tree
Showing 64 changed files with 41 additions and 102 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<a href="https://github.com/Boilertalk/Web3.swift">
<img src="https://crypto-bot-main.fra1.digitaloceanspaces.com/old/BoilertalkLogo.svg" width="100%" height="256">
</a>
<p align="center">
<a href="https://github.com/Boilertalk/Web3.swift">
<img src="https://crypto-bot-main.fra1.digitaloceanspaces.com/old/web3-swift-logo.png" width="256" height="256">
</a>
</p>

<p align="center">
<a href="https://github.com/Boilertalk/Web3.swift/actions/workflows/build-and-test.yml">
Expand All @@ -14,7 +16,7 @@
</a>
</p>

# :alembic: Web3
# :chains: Web3

Web3.swift is a Swift library for signing transactions and interacting with Smart Contracts in the Ethereum Network.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// BigInt
//
// Created by Koray Koska on 23.06.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

#if canImport(PromiseKit)
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumBlockObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumCall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 11.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 11.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumLogObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 31.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumQuantity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 10.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumQuantityTag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 10.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumSyncStatusObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumTransactionObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Alamofire
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumTransactionReceiptObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 31.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumValue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/EthereumValueConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 10.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
3 changes: 1 addition & 2 deletions Sources/Core/Json/RPCRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand All @@ -21,7 +20,7 @@ public struct RPCRequest<Params: Codable>: Codable {

/// The jsonrpc parameters
public let params: Params

public init(id: Int, jsonrpc: String, method: String, params: Params) {
self.id = id
self.jsonrpc = jsonrpc
Expand Down
3 changes: 1 addition & 2 deletions Sources/Core/Json/RPCResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand All @@ -29,7 +28,7 @@ public struct RPCResponse<Result: Codable>: Codable {

/// The error message
public let message: String

/// Description
public var localizedDescription: String {
return "RPC Error (\(code)) \(message)"
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Json/Types+EthereumValueConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 11.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
25 changes: 12 additions & 13 deletions Sources/Core/Providers/Web3Provider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 30.12.17.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand All @@ -16,41 +15,41 @@ public protocol Web3Provider {
}

public struct Web3Response<Result: Codable> {

public enum Error: Swift.Error {
case emptyResponse
case requestFailed(Swift.Error?)
case connectionFailed(Swift.Error?)
case serverError(Swift.Error?)
case decodingError(Swift.Error?)
}

public enum Status<Result> {
case success(Result)
case failure(Swift.Error)
}

public let status: Status<Result>

public var result: Result? {
return status.result
}

public var error: Swift.Error? {
return status.error
}

// MARK: - Initialization

public init(status: Status<Result>) {
self.status = status
}

/// Initialize with any Error object
public init(error: Swift.Error) {
self.status = .failure(error)
}

/// Initialize with a response
public init(rpcResponse: RPCResponse<Result>) {
if let result = rpcResponse.result {
Expand All @@ -61,7 +60,7 @@ public struct Web3Response<Result: Codable> {
self.status = .failure(Error.emptyResponse)
}
}

/// For convenience, initialize with one of the common errors
public init(error: Error) {
self.status = .failure(error)
Expand All @@ -78,11 +77,11 @@ extension Web3Response.Status {
return false
}
}

public var isFailure: Bool {
return !isSuccess
}

public var result: Result? {
switch self {
case .success(let value):
Expand All @@ -91,7 +90,7 @@ extension Web3Response.Status {
return nil
}
}

public var error: Error? {
switch self {
case .failure(let error):
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/RLP/RLPDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 03.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/RLP/RLPEncoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 31.01.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/RLP/RLPItem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 01.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/RLP/RLPItemConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 06.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/RLP/Types+RLPItemConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 06.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/BigUInt+BytesConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 06.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Bytes+HexString.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 10.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Bytes+SecureRandom.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Alamofire
//
// Created by Koray Koska on 18.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Bytes+TrimLeadingZeros.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 02.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Bytes+UInt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 03.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/BytesConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 06.04.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/CharacterSet+Hex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 05.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Exports+Web3.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 12.06.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

@_exported import BigInt
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Int+ETH.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 09.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/Secp256k1+CTXCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 21.02.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
1 change: 0 additions & 1 deletion Sources/Core/Toolbox/String+BytesConvertible.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Web3
//
// Created by Koray Koska on 06.04.18.
// Copyright © 2018 Boilertalk. All rights reserved.
//

import Foundation
Expand Down
Loading

0 comments on commit 9ee8eca

Please sign in to comment.