Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump web-lib for more control over RPC #5

Merged
merged 2 commits into from Jun 19, 2022
Merged

feat: bump web-lib for more control over RPC #5

merged 2 commits into from Jun 19, 2022

Conversation

Majorfi
Copy link
Contributor

@Majorfi Majorfi commented Jun 17, 2022

Upgrade the web-lib to V0.9.x, which enable more RPC settings.

For the supported networks, the logic is now this one:

is a webSocketURL env set ?
	then use it
is a jsonRPCURL env set ?
	then use it
is an Alchemy key set ?
	then use it
if an Infura set ?
	then use it
Otherwise, use the default RPC

Default RPC are https://rpc.flashbots.net for Ethereum Mainnet and https://rpc.ftm.tools for Fantom Network. Exact implementation is available in the web-lib here.

In order to customise the env variable, you can create a .env file with the following informations:

WS_URL_MAINNET=wss://xxxxxxx
WS_URL_FANTOM=wss://xxxxxxx
RPC_URL_MAINNET=https://xxxxxxx
RPC_URL_FANTOM=https://xxxxxxx
ALCHEMY_KEY=xxxxxxx

@Majorfi Majorfi added the enhancement New feature or request label Jun 17, 2022
@Majorfi Majorfi requested a review from saltyfacu June 17, 2022 12:51
@Majorfi Majorfi self-assigned this Jun 17, 2022
@vercel
Copy link

vercel bot commented Jun 17, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
macarena-finance ✅ Ready (Inspect) Visit Preview Jun 18, 2022 at 9:58AM (UTC)

Copy link
Contributor

@saltyfacu saltyfacu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants