@pafi-dev/issuer 0.5.18 → 0.5.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2431,10 +2431,10 @@ var IssuerStateValidator = class _IssuerStateValidator {
2431
2431
  }
2432
2432
  async fetchIssuerState(tokenAddr) {
2433
2433
  const issuerAddr = await this.getIssuerAddressForPointToken(tokenAddr);
2434
- const [issuerStruct, totalSupply] = await Promise.all([
2434
+ const [issuerTuple, totalSupply] = await Promise.all([
2435
2435
  this.provider.readContract({
2436
2436
  address: this.registryAddress,
2437
- abi: import_core10.issuerRegistryAbi,
2437
+ abi: import_core10.issuerRegistryGetIssuerFlatAbi,
2438
2438
  functionName: "getIssuer",
2439
2439
  args: [issuerAddr]
2440
2440
  }),
@@ -2444,7 +2444,17 @@ var IssuerStateValidator = class _IssuerStateValidator {
2444
2444
  functionName: "totalSupply"
2445
2445
  })
2446
2446
  ]);
2447
- const issuer = issuerStruct;
2447
+ const issuer = {
2448
+ issuerAddress: issuerTuple[0],
2449
+ signerAddress: issuerTuple[1],
2450
+ name: issuerTuple[2],
2451
+ symbol: issuerTuple[3],
2452
+ declaredTotalSupply: issuerTuple[4],
2453
+ capBasisPoints: issuerTuple[5],
2454
+ active: issuerTuple[6],
2455
+ pointToken: issuerTuple[7],
2456
+ mintingOracle: issuerTuple[8]
2457
+ };
2448
2458
  const hardCap = issuer.declaredTotalSupply * BigInt(issuer.capBasisPoints) / 10000n;
2449
2459
  const remaining = hardCap > totalSupply ? hardCap - totalSupply : 0n;
2450
2460
  return { issuer, totalSupply, hardCap, remaining };