Skip to content

Commit

Permalink
docs: added BaseProvider (ethers-io#2625).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 3, 2022
1 parent 1d419b5 commit e175448
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs.wrm/api/providers/api-providers.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ To mitigate these issues, it is recommended you use a
[Default Provider](providers-getDefaultProvider).


_subsection: EtherscanProvider @<EtherscanProvider> @inherit<[[Provider]]> @src<providers:class.EtherscanProvider>
_subsection: EtherscanProvider @<EtherscanProvider> @inherit<[[BaseProvider]]> @src<providers:class.EtherscanProvider>

The **EtherscanProvider** is backed by a combination of the various
[Etherscan APIs](link-etherscan-api).
Expand Down
2 changes: 1 addition & 1 deletion docs.wrm/api/providers/jsonrpc-provider.wrm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_section: JsonRpcProvider @<JsonRpcProvider> @INHERIT<[[Provider]]> @SRC<providers:class.JsonRpcProvider>
_section: JsonRpcProvider @<JsonRpcProvider> @INHERIT<[[BaseProvider]]> @SRC<providers:class.JsonRpcProvider>

The [JSON-RPC API](link-jsonrpc) is a popular method for interacting
with Ethereum and is available in all major Ethereum node implementations
Expand Down
2 changes: 1 addition & 1 deletion docs.wrm/api/providers/other.wrm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
_section: Other Providers

_subsection: FallbackProvider @<FallbackProvider> @INHERIT<[[Provider]]> @SRC<providers/fallback-provider:class.FallbackProvider>
_subsection: FallbackProvider @<FallbackProvider> @INHERIT<[[BaseProvider]]> @SRC<providers/fallback-provider:class.FallbackProvider>

The **FallbackProvider** is the most advanced [[Provider]] available in
ethers.
Expand Down
14 changes: 14 additions & 0 deletions docs.wrm/api/providers/provider.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -550,3 +550,17 @@ _subsection: Inspection Methods @<Provider--inspection-methods>
_property: Provider.isProvider(object) => boolean @<Provider-isProvider> @SRC<abstract-provider>
Returns true if and only if //object// is a Provider.


_subsection: BaseProvider @<BaseProvider> @INHERIT<[[Provider]]> @SRC<providers:class.BaseProvider>

Most Providers available in ethers are sub-classes of BaseProvider, which
simplifies sub-classes, as it handles much of the event operations, such as
polling and formatting.

_property: provider.polling => boolean
Indicates if the Provider is currently polling. If there are no events to
poll for or polling has been explicitly disabled, this will be false.

_property: provider.pollingInterval => number
The frequency at which the provider polls.

0 comments on commit e175448

Please sign in to comment.