set.js icon indicating copy to clipboard operation
set.js copied to clipboard

Enable read operations without providing a signer.

Open Phips0812 opened this issue 3 years ago • 0 comments

Pure read operations like NavIssuanceAPI.getExpectedSetTokenIssueQuantity() should be able to be called with a default provider.

Currently it's required to set a provider gathered from a signer due to the following logic (ContractWrapper.ts:201):

const signer = (this.provider as JsonRpcProvider).getSigner(callerAddress);
const cacheKey = `NavIssuanceModule_${navIssuanceModuleAddress}_${await signer.getAddress()}`;

signer.getAddress() is not supported for a default provider.

Phips0812 avatar Jun 22 '22 07:06 Phips0812