Skip to content

Commit 25359e7

Browse files
fix: TransactionReceipt test update
1 parent 659ed21 commit 25359e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/web3swiftTests/localTests/TransactionReceiptTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ class TransactionReceiptTests: XCTestCase {
2121
let cumulativeGasUsed: BigUInt = 789456132
2222
let gasUsed: BigUInt = 8857745
2323
let effectiveGasPrice: BigUInt = 123456
24+
/// This is not an EventLog decoding test so the array is empty
2425
let logs: [EventLog] = []
2526
let status = TransactionReceipt.TXStatus.ok
26-
let logsBloom = EthereumBloomFilter(0)!
27+
let logsBloom = EthereumBloomFilter(12348880)!
2728

2829
let transactionJson = "{\"transactionHash\":\"\(transactionHash.toHexString().addHexPrefix())\",\"transactionIndex\":\"\(transactionIndex.hexString)\",\"blockNumber\":\"\(blockNumber.hexString)\",\"blockHash\":\"\(blockHash.toHexString().addHexPrefix())\",\"from\":\"0xdf85ee41abbf15cdf1dbf89fb7af9a9557c5dd7e\",\"to\":\"0xe22b8979739d724343bd002f9f432f5990879901\",\"cumulativeGasUsed\":\"\(cumulativeGasUsed.hexString)\",\"gasUsed\":\"\(gasUsed.hexString)\",\"contractAddress\":\"\(contractAddress.address)\",\"logs\":[],\"logsBloom\":\"\(logsBloom.bytes.toHexString().addHexPrefix())\",\"status\":\"0x1\",\"effectiveGasPrice\":\"\(effectiveGasPrice.hexString)\",\"type\":\"0x2\"}"
2930
let transactionReceipt = try JSONDecoder().decode(TransactionReceipt.self, from: transactionJson.data(using: .utf8)!)

0 commit comments

Comments
 (0)