Truffle + OZ: factory for existing contract - transferOwnership after deployment

Hello guys,

Sorry if my question will look a bit lame but I stuck and can’t find a relevant information.

The general question is if it’s possible to create a factory contract for an existing ERC-721 (assuming I have the original contract & migration source, also having necessary wallet keys)? I believe it should be possible, but then there is a question how to deploy it. Of course I know the original contract chain address and according to what I’ve found just need to transferOwnership after factory contract is deployed:

const nftContract = new web3Instance.eth.Contract(
    { gasLimit: "1000000" }
await nftContract.methods.transferOwnership(factoryAddress);

But all the examples I’ve found this transfer happens on the deployment stage.

Can it be done later, as nowadays mainnet is too loaded and truffle’s 750 seconds limit is not enough.

Thank you and stay safe,

Hi, welcome! :wave:

Not really, you can ask everything you want to know!

I am not sure, I think you can use a Factory contract to generate many other contracts, but this process seems to be irreversible, I am not sure.

You can set timeoutBlocks in the truffle config, for more details, you can have a look at the truffle config: