diff --git a/src/contracts/NFTFactory.ts b/src/contracts/NFTFactory.ts index 731f4008..036b8c1c 100644 --- a/src/contracts/NFTFactory.ts +++ b/src/contracts/NFTFactory.ts @@ -570,19 +570,32 @@ export class NftFactory extends SmartContractWithAddress { } } + // common stuff for other templates + const addresses = [ + dtParams.minter, + dtParams.paymentCollector, + dtParams.mpFeeAddress, + dtParams.feeToken + ] + + if (dtParams.filesObject) { + // template 4 only, ignored for others + if (dtParams.accessListFactory) { + addresses.push(dtParams.accessListFactory) + } + if (dtParams.allowAccessList) { + addresses.push(dtParams.allowAccessList) + } + + if (dtParams.denyAccessList) { + addresses.push(dtParams.denyAccessList) + } + } + return { templateIndex: dtParams.templateIndex, strings: [dtParams.name || name, dtParams.symbol || symbol], - addresses: [ - dtParams.minter, - dtParams.paymentCollector, - dtParams.mpFeeAddress, - dtParams.feeToken, - // template 4 only, ignored for others - dtParams.accessListFactory, - dtParams.allowAccessList, - dtParams.denyAccessList - ], + addresses, uints: [ await this.amountToUnits(null, dtParams.cap, 18), await this.amountToUnits(null, dtParams.feeAmount, feeTokenDecimals)