You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -117,13 +117,18 @@ If using `async/await` you can `await` on the result
117
117
let txHash =tryawait client.eth_sendRawTransaction(transaction, withAccount: account)
118
118
```
119
119
120
+
## Generating ABI from a smart contract ABI file
121
+
Currently we don't support code generation as making it properly is a bigger project, and should possibly live outside of this repository.
122
+
123
+
You can try this project instead: [imanrep/swiftabigen](https://github.com/imanrep/swiftabigen)
124
+
120
125
### Data types
121
126
122
127
The library provides some types and helpers to make interacting with web3 and Ethereum easier.
123
128
124
129
-`EthereumAddress`: For representation of addresses, including checksum support.
125
130
-`BigInt` and `BigUInt`: Using [BigInt](https://github.com/attaswift/BigInt) library
126
-
-`EthereumBlock`: Represents the block, either number of RPC-specific defintions like 'Earliest' or 'Latest'
131
+
-`EthereumBlock`: Represents the block, either number of RPC-specific definitions like 'Earliest' or 'Latest'
127
132
-`EthereumTransaction`: Wraps a transaction. Encoders and decoders can work with it to generate proper `data` fields.
128
133
129
134
#### Conversion from and to Foundation types
@@ -159,7 +164,9 @@ We support querying ERC721 token data via the `ERC721` struct. Including:
159
164
160
165
### Running Tests
161
166
162
-
The tests will all pass when running against Goerli. You will need to provide a URL for the blockchain proxy (e.g. on Infura), and a key-pair in `TestConfig.swift`. Some of the account signing tests will fail, given the signature assertions are against a specific (unprovided) key.
167
+
Some of the tests require a private key, which is not stored in the repository. You can ignore these while testing locally, as CI will use the encrypted secret key from Github.
168
+
169
+
It's better to run only the tests you need, instead of the whole test suite while developing. If you ever need to set up the key locally, take a look at `TestConfig.swift` where you can manually set it up. Alternatively you can set it up by calling the script `setupKey.sh` and passing the value (adding 0x) so it's written to an ignored file.
163
170
164
171
## Dependencies
165
172
@@ -169,17 +176,14 @@ We built web3.swift to be as lightweight as possible. However, given the cryptog
169
176
-[Tiny AES](https://github.com/kokke/tiny-AES-c): A small and portable implementation of the AES ECB, CTR and CBC encryption algorithms.
We also use Apple's own CommonCrypto (via [this](https://github.com/sergejp/CommonCrypto) method) and [BigInt](https://github.com/attaswift/BigInt) via CocoaPod dependency.
173
-
174
-
## Todos
175
-
176
-
There are some features that have yet to be fully implemented! Not every RPC method is currently supported, and here's some other suggestions we would like to see in the future:
- Use a Hex struct for values to be more explicit in expected types
181
-
- Use [Truffle](https://github.com/trufflesuite/ganache-cli) for running tests
182
-
- Bloom Filter support
186
+
Also for Linux build, we can't se Apple crypto APIs, so we embedded a small subset of CryptoSwift (instead of importing the whole library). Credit to [Marcin Krzyżanowski](https://github.com/krzyzanowskim/CryptoSwift)
0 commit comments