SetProtocol/set.js

Enable read operations without providing a signer.

Opened this issue · 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.