diff --git a/contracts/product/PricingService.sol b/contracts/product/PricingService.sol index 136cae919..abcb1d839 100644 --- a/contracts/product/PricingService.sol +++ b/contracts/product/PricingService.sol @@ -2,6 +2,7 @@ pragma solidity ^0.8.20; import {Amount, AmountLib} from "../type/Amount.sol"; +import {ContractLib} from "../shared/ContractLib.sol"; import {Seconds} from "../type/Seconds.sol"; import {UFixed, UFixedLib} from "../type/UFixed.sol"; import {ObjectType} from "../type/ObjectType.sol"; @@ -21,14 +22,14 @@ import {IPolicy} from "../instance/module/IPolicy.sol"; import {IBundle} from "../instance/module/IBundle.sol"; import {IDistribution} from "../instance/module/IDistribution.sol"; -import {ComponentVerifyingService} from "../shared/ComponentVerifyingService.sol"; +import {Service} from "../shared/Service.sol"; import {IPricingService} from "./IPricingService.sol"; import {IDistributionService} from "../distribution/IDistributionService.sol"; contract PricingService is - ComponentVerifyingService, + Service, IPricingService { IDistributionService internal _distributionService; @@ -81,11 +82,11 @@ contract PricingService is // verify product ( IRegistry.ObjectInfo memory registryInfo, - IInstance instance - ) = _getAndVerifyComponentInfo(productNftId, PRODUCT(), false); + address instanceAddress + ) = ContractLib.getInfoAndInstance(getRegistry(), productNftId, false); // get instance reader from local instance variable - reader = instance.getInstanceReader(); + reader = IInstance(instanceAddress).getInstanceReader(); NftId riskProductNftId = reader.getRiskInfo(riskId).productNftId; if (productNftId != riskProductNftId) { diff --git a/scripts/libs/services.ts b/scripts/libs/services.ts index a93220fe5..f9c183b42 100644 --- a/scripts/libs/services.ts +++ b/scripts/libs/services.ts @@ -1,13 +1,12 @@ -import { getImplementationAddress } from '@openzeppelin/upgrades-core'; import { AddressLike, BytesLike, Signer, id } from "ethers"; -import { ethers as hhEthers } from "hardhat"; import { AccountingService, AccountingServiceManager, AccountingService__factory, ApplicationService, ApplicationServiceManager, ApplicationService__factory, BundleService, BundleServiceManager, BundleService__factory, ClaimService, ClaimServiceManager, ClaimService__factory, - ComponentService, ComponentServiceManager, ComponentService__factory, + ComponentService, + ComponentService__factory, DistributionService, DistributionServiceManager, DistributionService__factory, IRegistry__factory, InstanceService, InstanceServiceManager, InstanceService__factory, @@ -17,19 +16,17 @@ import { PricingService, PricingServiceManager, PricingService__factory, ProxyManager, RegistryService, - RegistryServiceManager, RegistryService__factory, ReleaseRegistry, RiskService, RiskServiceManager, RiskService__factory, StakingService, StakingServiceManager, StakingService__factory } from "../../typechain-types"; import { logger } from "../logger"; -import { deployContract, deployProxyManagerContract } from "./deployment"; +import { deployProxyManagerContract } from "./deployment"; import { LibraryAddresses } from "./libraries"; import { RegistryAddresses } from "./registry"; import { createRelease } from "./release"; import { executeTx, getFieldFromTxRcptLogs, getTxOpts } from "./transaction"; -import { prepareVerificationData } from './verification'; export type ServiceAddresses = {