Skip to content

Commit bcc2dea

Browse files
Adding notes into code
1 parent 3be8f7e commit bcc2dea

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

Sources/web3swift/Web3/Web3+Contract.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ extension web3 {
8484
return writeTX
8585
}
8686

87+
// FIXME: Actually this is not rading contract or smth, this is about composing appropriate binary data to iterate with it later.
8788
/// Creates and object responsible for calling a particular function of the contract. If method name is not found in ABI - returns nil.
8889
/// If extraData is supplied it is appended to encoded function parameters. Can be usefull if one wants to call
8990
/// the function not listed in ABI. "Parameters" should be an array corresponding to the list of parameters of the function.

Sources/web3swift/Web3/Web3+ReadingTransaction.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ public class ReadTransaction {
3131
}
3232
}
3333

34+
// FIXME: This is wrong naming, because this method doesn't decode,
35+
// it's merging Transactions Oprions sending request (Transaction with appropriate binary data) to contract, get's Data response
36+
// and only then it decodes it.
37+
// It should be splitted in this way up to three (merge, send, decode)
3438
public func decodedData(with transactionOptions: TransactionOptions? = nil) async throws -> [String: Any] {
3539
var assembledTransaction: EthereumTransaction = self.transaction
3640
let mergedOptions = self.transactionOptions.merge(transactionOptions)
@@ -83,6 +87,7 @@ public class ReadTransaction {
8387

8488
}
8589

90+
// FIXME: Duplicating and pointing to another?!
8691
public func estimateGas(transactionOptions: TransactionOptions? = nil) async throws -> BigUInt {
8792
return try await self.estimateGas(with: transactionOptions)
8893
}

Tests/web3swiftTests/localTests/ERC20Tests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class ERC20Tests: LocalTestCase {
3636
print(String(bal))
3737
}
3838

39+
// FIXME: Make me work
3940
// func testERC20TokenSend() async throws {
4041
// let web3 = Web3.
4142
// let value: String = "1.0" // In Tokens

0 commit comments

Comments
 (0)