File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Tests/web3swiftTests/remoteTests Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // TransactionPollingTaskRemoteTest.swift
3
+ //
4
+ //
5
+ // Created by Jann Driessen on 13.03.23.
6
+ //
7
+
8
+ import XCTest
9
+
10
+ @testable import web3swift
11
+ @testable import Web3Core
12
+
13
+ final class TransactionPollingTaskRemoteTest : XCTestCase {
14
+
15
+ func testTransactionPolling( ) async throws {
16
+ let web3 = try await Web3 . InfuraMainnetWeb3 ( accessToken: Constants . infuraToken)
17
+ let txHash = Data . fromHex ( " 0xb37cab767de85e734821f4b7b46f5093126658322a3f1b10bfef82b8009c8b82 " ) !
18
+ let transactionReceipt = try await TransactionPollingTask ( transactionHash: txHash, web3Instance: web3) . wait ( )
19
+ XCTAssertEqual ( transactionReceipt. status, . ok)
20
+ XCTAssertEqual ( transactionReceipt. blockHash, Data . fromHex ( " 0xdac48e6612d3c5b21c0e4b8edd9d25687a97137c636ff57a8df9f1f01bdfd25d " ) )
21
+ XCTAssertEqual ( transactionReceipt. blockNumber, 16818367 )
22
+ XCTAssertEqual ( transactionReceipt. gasUsed, " 21000 " )
23
+ }
24
+
25
+ }
You can’t perform that action at this time.
0 commit comments