Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Expose URL of underlying provider #36

Open
frangio opened this issue Feb 12, 2020 · 0 comments
Open

Expose URL of underlying provider #36

frangio opened this issue Feb 12, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@frangio
Copy link
Contributor

frangio commented Feb 12, 2020

It can sometimes be useful to get the URL of the underlying provider of a Test Environment instance.

I decided to write an integration test in JavaScript using Test Environment to handle the provider lifetime, and I had to access the internals to get this information.

openzeppelin-sdk@0597939

const { provider } = require('@openzeppelin/test-environment');
// ...
  await provider.queue.onIdle();
  const url = provider.wrappedProvider.host;

For this specific use case it would be fine to provide an async function or getter returning the URL.

get url(): Promise<string>
@frangio frangio changed the title Expose connection string underlying provider Expose URL of underlying provider Feb 12, 2020
@abcoathup abcoathup added the enhancement New feature or request label Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants