@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.js CHANGED
@@ -2254,7 +2254,7 @@ function serializeEntryToJsonRpc(entry, signature) {
2254
2254
  import { getAddress as getAddress9 } from "viem";
2255
2255
  import {
2256
2256
  POINT_TOKEN_V2_ABI as POINT_TOKEN_V2_ABI3,
2257
- issuerRegistryAbi,
2257
+ issuerRegistryGetIssuerFlatAbi,
2258
2258
  getContractAddresses as getContractAddresses2
2259
2259
  } from "@pafi-dev/core";
2260
2260
 
@@ -2394,10 +2394,10 @@ var IssuerStateValidator = class _IssuerStateValidator {
2394
2394
  }
2395
2395
  async fetchIssuerState(tokenAddr) {
2396
2396
  const issuerAddr = await this.getIssuerAddressForPointToken(tokenAddr);
2397
- const [issuerStruct, totalSupply] = await Promise.all([
2397
+ const [issuerTuple, totalSupply] = await Promise.all([
2398
2398
  this.provider.readContract({
2399
2399
  address: this.registryAddress,
2400
- abi: issuerRegistryAbi,
2400
+ abi: issuerRegistryGetIssuerFlatAbi,
2401
2401
  functionName: "getIssuer",
2402
2402
  args: [issuerAddr]
2403
2403
  }),
@@ -2407,7 +2407,17 @@ var IssuerStateValidator = class _IssuerStateValidator {
2407
2407
  functionName: "totalSupply"
2408
2408
  })
2409
2409
  ]);
2410
- const issuer = issuerStruct;
2410
+ const issuer = {
2411
+ issuerAddress: issuerTuple[0],
2412
+ signerAddress: issuerTuple[1],
2413
+ name: issuerTuple[2],
2414
+ symbol: issuerTuple[3],
2415
+ declaredTotalSupply: issuerTuple[4],
2416
+ capBasisPoints: issuerTuple[5],
2417
+ active: issuerTuple[6],
2418
+ pointToken: issuerTuple[7],
2419
+ mintingOracle: issuerTuple[8]
2420
+ };
2411
2421
  const hardCap = issuer.declaredTotalSupply * BigInt(issuer.capBasisPoints) / 10000n;
2412
2422
  const remaining = hardCap > totalSupply ? hardCap - totalSupply : 0n;
2413
2423
  return { issuer, totalSupply, hardCap, remaining };