Skip to content

Commit f83b5e7

Browse files
Merge branch 'develop-upstream' into feat/siwe-eip4361
2 parents 55c43af + 08daa88 commit f83b5e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+168
-155
lines changed

Sources/Core/Structure/Event+Protocol.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public protocol EventParserProtocol {
4747

4848
/// Enum for the most-used Ethereum networks. Network ID is crucial for EIP155 support
4949
public enum Networks {
50+
case Goerli
5051
case Rinkeby
5152
case Mainnet
5253
case Ropsten
@@ -55,6 +56,7 @@ public enum Networks {
5556

5657
public var name: String {
5758
switch self {
59+
case .Goerli: return "goerli"
5860
case .Rinkeby: return "rinkeby"
5961
case .Ropsten: return "ropsten"
6062
case .Mainnet: return "mainnet"
@@ -69,6 +71,7 @@ public enum Networks {
6971
case .Mainnet: return BigUInt(1)
7072
case .Ropsten: return BigUInt(3)
7173
case .Rinkeby: return BigUInt(4)
74+
case .Goerli: return BigUInt(5)
7275
case .Kovan: return BigUInt(42)
7376
}
7477
}
@@ -83,6 +86,8 @@ public enum Networks {
8386
return Networks.Ropsten
8487
case 4:
8588
return Networks.Rinkeby
89+
case 5:
90+
return Networks.Goerli
8691
case 42:
8792
return Networks.Kovan
8893
default:

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+Call.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
import Core
88

99

10-
extension web3.Eth {
10+
extension Web3.Eth {
1111
public func callTransaction(_ transaction: CodableTransaction) async throws -> Data {
1212
let request: APIRequest = .call(transaction, transaction.callOnBlock ?? .latest)
1313
let response: APIResponse<Data> = try await APIRequest.sendRequest(with: self.provider, for: request)

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+EstimateGas.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import BigInt
88
import Core
99

1010

11-
extension web3.Eth {
11+
extension Web3.Eth {
1212
public func estimateGas(for transaction: CodableTransaction, onBlock: BlockNumber = .latest) async throws -> BigUInt {
1313
let request: APIRequest = .estimateGas(transaction, onBlock)
1414
let response: APIResponse<BigUInt> = try await APIRequest.sendRequest(with: provider, for: request)

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+FeeHistory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
import BigInt
88
import Core
99

10-
extension web3.Eth {
10+
extension Web3.Eth {
1111
func feeHistory(blockCount: BigUInt, block: BlockNumber, percentiles:[Double]) async throws -> Oracle.FeeHistory {
1212
let requestCall: APIRequest = .feeHistory(blockCount, block, percentiles)
1313
let response: APIResponse<Oracle.FeeHistory> = try await APIRequest.sendRequest(with: web3.provider, for: requestCall)

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetAccounts.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
import BigInt
88
import Core
99

10-
extension web3.Eth {
10+
extension Web3.Eth {
1111
public func ownedAccounts() async throws -> [EthereumAddress] {
1212
guard self.web3.provider.attachedKeystoreManager == nil else {
1313
return try self.web3.wallet.getAccounts()

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBalance.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
import Core
88
import BigInt
99

10-
extension web3.Eth {
10+
extension Web3.Eth {
1111
public func getBalance(for address: EthereumAddress, onBlock: BlockNumber = .latest) async throws -> BigUInt {
1212
let requestCall: APIRequest = .getBalance(address.address, onBlock)
1313
let response: APIResponse<BigUInt> = try await APIRequest.sendRequest(with: web3.provider, for: requestCall)

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBlockByHash.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import BigInt
88
import Core
99

1010

11-
extension web3.Eth {
11+
extension Web3.Eth {
1212
public func block(by hash: Data, fullTransactions: Bool = false) async throws -> Block {
1313
guard let hexString = String(data: hash, encoding: .utf8)?.addHexPrefix() else { throw Web3Error.dataError }
1414
let requestCall: APIRequest = .getBlockByHash(hash.toHexString().addHexPrefix(), fullTransactions)

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBlockByNumber.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import BigInt
88
import Core
99

1010

11-
extension web3.Eth {
11+
extension Web3.Eth {
1212
public func block(by hash: Hash, fullTransactions: Bool = false) async throws -> Block {
1313
let requestCall: APIRequest = .getBlockByHash(hash, fullTransactions)
1414
let response: APIResponse<Block> = try await APIRequest.sendRequest(with: self.provider, for: requestCall)

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetBlockNumber.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import BigInt
88
import Core
99

1010

11-
extension web3.Eth {
11+
extension Web3.Eth {
1212
public func blockNumber() async throws -> BigUInt {
1313
let response: APIResponse<BigUInt> = try await APIRequest.sendRequest(with: web3.provider, for: .blockNumber)
1414
return response.result

Sources/web3swift/EthereumAPICalls/Ethereum/Eth+GetCode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Foundation
77
import Core
88
import BigInt
99

10-
extension web3.Eth {
10+
extension Web3.Eth {
1111
public func code(for address: EthereumAddress, onBlock: BlockNumber = .latest) async throws -> Hash {
1212
let requestCall: APIRequest = .getCode(address.address, onBlock)
1313
let response: APIResponse<Hash> = try await APIRequest.sendRequest(with: self.provider, for: requestCall)

0 commit comments

Comments
 (0)