1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

fix create erc params

This commit is contained in:
paulo-ocean 2024-09-13 09:21:04 +01:00
parent 4bcb1d9348
commit fdc35ab800

View File

@ -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)