Open varanauskas opened 3 years ago
Ah yeah looks like you've stumbled upon why I didn't do this in the first place; it makes the getContract
call async, and I didn't want to break the API. I like what you've done here with getContractAddress
though, perhaps we should simply add that method, and allow people to make it async if they want by doing:
const address = await getContractAddress(provider);
const contract = getContract(provider, address);
As I understand getContract is not exposed (exported) thus changes to it’s signature should not break any usage?
Depends on #18
This is a draft and has not been tested, but while deploying #18 I was thinking there should be a way to automatically detect the address
This would make using this extension easier