web3swift
web3swift copied to clipboard
I wish I could have a more detailed demo, it's a little difficult for beginners to understand
I really hope to have a more detailed demo, a little difficult for beginners to understand, thank you
Since current one example, let's say, bellow our guidelines it's a good to have a new one App example that will provide some interactive playground for folks that are wishing to study how to work with our lib.
100% agree. Currently trying to interact with a custom smart contract and the smaller problems you encounter along the way are seriously difficult to get passed without some more detailed examples.
Currently stuck with "Failed to fetch gas estimate" with no further elaboration
100% agree. Currently trying to interact with a custom smart contract and the smaller problems you encounter along the way are seriously difficult to get passed without some more detailed examples.
Currently stuck with "Failed to fetch gas estimate" with no further elaboration
This usually means something is configured wrong in your parameters @adeneels. If you search for Failed to fetch gas estimate
in closed issues. You might get some ideas what specifically could be wrong.
Hi! I am curious about the scope of this task :)
I have opened myWeb3Wallet.xcworkspace
and it seems broken. ❌
Regarding scoping, what would be nice to have?
- showcases
- wallet
@yaroslavyaroslav @JeneaVranceanu are you interested in define a set of basic features to implement in the example? ie:
- show user balances
- add token
- list transactions
- send transaction
I am really interested in create a showcase for a wallet for example. What do you think?
This is something we must have definitely. Things from the top of my head that we must showcase in an example app and/or just have it in documentation with explanations and example code snippets (list needs to be expanded with more topics):
1. Signing
- What is a keystore? (Note: all of these points are not just theory but explanations/example we should have in the context of web3swift library);
- What types of keystores web3swift has?
- How to generate mnemonic phrase?
- How to create a keystore?
- How to get private key?
- How to get public key?
- How to sign a message with private key?
- How to sign a personal message? (That is the Ethereum standard)
- How to hash personal message?
- Marshalled and unmarshalled signatures. (SECP256K1.UnmarshaledSignature)
- What other signing methods we support? (e.g. EIP712)
2. Establishing a connection to blockchain
- What is
class Web3
and how to use? - What is
Web3Provider
and how to use?
3. Contracts & contract's ABI
- How to create a contract?
- What is EthereumAddress and how to create one? Also cover special contract deployment Ethereum address and how to use it:
EthereumAddress.contractDeploymentAddress()
; - What is ABI?
- How to specify the contract's ABI?
- How to encode a function call? (with input parameters and no parameters; how to encode read and write operations)
- How to manually encode/decode ABI, for example, transaction input and output? (Cover ABIEncoder and ABIDecoder)
4. Operations and transactions
- How to create and execute "read" operation? (An example of a read operation would be good enough with a follow-up that there are also write operations)
- How to get data back out of the "read" operation?
- How to create and execute write transactions?
- How to sign a transaction?
- How to get the transaction signature, how to get the public key out of the signature and how to get the sender's address?
- How to estimate gas?
- How to get gas price?
- How to get transaction details and receipt?
Additionally, we must keep up to date with all BIPs, EIPs/ERCs we support with links to standards and examples on how to use these standards in the web3swift library.
These topics I've mentioned are showing the capabilities of the library. But as @albertopeam mentioned we also must show how to add tokens and give examples of how would you use and communicate with ERC20, ERC777 etc. Basically, cover a separate topic on "How to do common stuff?" that everyone does. This is as well one of the keys to growing the library.