13
13
14
14
This small Ruby [gem](https://rubygems.org/gems/erc20)
15
15
makes manipulations with [Ethereum] [ERC20] tokens
16
- as simple as they can be, if you have a provider of
17
- [JSON-RPC] and [WebSockets] Ethereum APIs, for example
16
+ as simple as possible, when you have a provider of
17
+ [JSON-RPC] and [WebSockets] Ethereum APIs, such as
18
18
[Infura], [GetBlock], or [Alchemy]:
19
19
20
20
```ruby
@@ -44,10 +44,10 @@ w.accept(addresses) do |event|
44
44
end
45
45
```
46
46
47
- It's also possible to check ETH balance and send ETH transaction :
47
+ You can also check ETH balance and send ETH transactions :
48
48
49
49
```ruby
50
- # Check how many ETHs are there on the given address:
50
+ # Check how many ETHs are on the given address:
51
51
eth = w.eth_balance(address)
52
52
53
53
# Send a few ETHs to someone and get transaction hash:
@@ -110,13 +110,13 @@ Then, run it:
110
110
erc20 --help
111
111
```
112
112
113
- It should be obvious how to use it . If not , please, submit an issue.
113
+ Usage should be straightforward . If you have questions , please submit an issue.
114
114
115
115
## How to use in tests
116
116
117
- You can use `ERC20::FakeWallet` class that behaves exactly like
117
+ You can use the `ERC20::FakeWallet` class that behaves exactly like
118
118
`ERC20::Wallet`, but doesn't make any network connections to the provider.
119
- Also , it remembers all requests that were sent to it:
119
+ Additionally , it records all requests sent to it:
120
120
121
121
```ruby
122
122
require 'erc20'
@@ -129,7 +129,7 @@ assert w.history.include?({ method: :pay, priv:, address:, amount: 42_000 })
129
129
130
130
Read
131
131
[these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
132
- Make sure you build is green before you contribute
132
+ Make sure your build is green before you contribute
133
133
your pull request. You will need to have
134
134
[Ruby](https://www.ruby-lang.org/en/) 3.2+ and
135
135
[Bundler](https://bundler.io/) installed. Then:
0 commit comments