Documentation about `deposit` and `approve`
- Dominant language
- JavaScript
- Stars
- 64
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
In #109 from @srameshr came the following question:
> Also what does the following do?
>
> ```js
> [gnosis.etherToken.constructor, await gnosis.etherToken.deposit.sendTransaction({ value: depositValue })],
> [gnosis.etherToken.constructor, await gnosis.etherToken.approve.sendTransaction(event.address, depositValue)],
> [event.constructor, await event.buyAllOutcomes.sendTransaction(depositValue)],
> ```
>
> What is deposit, approve doing here? Assume intention of the user here is just to buy some tokens and nothing else.
Information answering that question should be included in the docs.
Contributor guide
No contributing guide indexed for this repository
Research direction
Use the quoted JavaScript sequence as the entry point and locate the documentation area covering token purchases. Explain what `deposit` and `approve` do in this sequence, including why they are used when the user only wants to buy tokens. Done means the docs answer the quoted question clearly and accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100