# Finding GSN Relayer(s)

**URL:** <https://forum.openzeppelin.com/t/finding-gsn-relayer-s/1960>\
**Category:** Support\
**Created:** [December 19, 2019, 2:50pm UTC](https://forum.openzeppelin.com/t/finding-gsn-relayer-s/1960 "2019-12-19T14:50:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![grog](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/grog/32/1509_2.png) [@grog](https://forum.openzeppelin.com/u/grog)\
**Post date:** [December 19, 2019, 2:50pm UTC](https://forum.openzeppelin.com/t/finding-gsn-relayer-s/1960/1 "2019-12-19T14:50:44Z")

</div>

Hello there,

I'm learning GSN on openzeppelin and even if I think I got the whole idea, at some point the [documentation](https://docs.openzeppelin.com/openzeppelin/gsn/what-is-the-gsn) says

> One of RelayHub’s jobs is to act as a, well, hub for all relayers: they will advertise their services on this contract, and your **users will query it to find the relayer** that best suits their purposes.

How exactly do get a list of all relayer for a given `RelayHub` contract?  
I read somewhere that in fact to have an up to date list of relayers, one should listen `RelayHub`'s events and create the list himself from it.

If my statement is true, well, perhaps updating this part of the documentation would be great.  
Also, is there any analytics/monitoring website for this contract ? I only found [explore.duneanalytics](https://explore.duneanalytics.com/public/dashboards/9aUVYdNsXB8HmgpeALDOx0g42R8LD4Ns9ZoknrfD) but it feels wrong as latest points are always old from several days.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [December 20, 2019, 3:03am UTC](https://forum.openzeppelin.com/t/finding-gsn-relayer-s/1960/2 "2019-12-20T03:03:43Z")

</div>

Hi @grog,

> [@grog](#):
>
> How exactly do get a list of all relayer for a given `RelayHub` contract?

You can get the `RelayAdded` events and filter out `RelayRemoved` events.  
[https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/IRelayHub.sol#L45](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/GSN/IRelayHub.sol#L45)

Though you can just use [OpenZeppelin Network.js](https://github.com/OpenZeppelin/openzeppelin-network.js) to send relayed requests via the GSN.

Good places to start are [Building a GSN powered (d)app from scratch](https://docs.openzeppelin.com/sdk/2.6/gsn-dapp) and [GSN Starter Kit](https://docs.openzeppelin.com/starter-kits/2.3/gsnkit)

> [@grog](#):
>
> Also, is there any analytics/monitoring website for this contract ?

The network stats that I am aware of are what you found: [https://explore.duneanalytics.com/public/dashboards/9aUVYdNsXB8HmgpeALDOx0g42R8LD4Ns9ZoknrfD](https://explore.duneanalytics.com/public/dashboards/9aUVYdNsXB8HmgpeALDOx0g42R8LD4Ns9ZoknrfD)

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [December 23, 2019, 1:17am UTC](https://forum.openzeppelin.com/t/finding-gsn-relayer-s/1960/3 "2019-12-23T01:17:10Z")

</div>

Hi @grog,

Adding to the above:

You can manually list the relayers via the following website and setting the required network on your injected web3 provider (e.g. MetaMask)

> **[RelayHub 'undefined' - Relay Access - Gas Station Network](https://gsn.openzeppelin.com/relay-hubs/0xd216153c06e857cd7f72665e0af1d7d82172f494?listRelays=true)**
>
> The Gas Station Network is the ultimate onboarding solution for Ethereum applications enabling you to pay for transaction gas fees on behalf of your users.

Though the GSN Provider will find the relayer(s) automatically. The documentation for the GSN provider shows how to use if from OpenZeppelin Network.js: [https://github.com/OpenZeppelin/openzeppelin-gsn-provider/blob/master/docs/modules/ROOT/pages/getting-started.adoc#in-react-applications](https://github.com/OpenZeppelin/openzeppelin-gsn-provider/blob/master/docs/modules/ROOT/pages/getting-started.adoc#in-react-applications) (edited)

We can also use the `preferredRelayer` option from the GSN Provider: [https://github.com/OpenZeppelin/openzeppelin-gsn-provider/blob/master/docs/modules/ROOT/pages/api.adoc#advanced-options](https://github.com/OpenZeppelin/openzeppelin-gsn-provider/blob/master/docs/modules/ROOT/pages/api.adoc#advanced-options)

---

<div class="post-metadata">

**Author:** ![grog](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/grog/32/1509_2.png) [@grog](https://forum.openzeppelin.com/u/grog)\
**Post date:** [December 24, 2019, 2:49pm UTC](https://forum.openzeppelin.com/t/finding-gsn-relayer-s/1960/4 "2019-12-24T14:49:45Z")

</div>

Many thanks for this additionnal ressources 🙃
