How to get data from one contract and pass it to the function of another later deployed contract?

I am developing a Dapp where First I want to distribute the NFTs randomly and after some time I want to launch my marketplace and sell those NFTs on the marketplace.
My workflow is that Once Dropsite(NFTs Distribution Contract) is deployed, it will be live and people can mint the NFTs randomly in Dropsite Contract. After some time the marketplace contract will also be deployed and it will be live. Now at the time of marketplace deployment the NFTs minted in Dropsite contract should be sellable on marketplace with specified royalties and shares to the platform owners and minters.
In technical words, I want to get the NFT data to be transferred from Dropsite contract but using the functions defined in marketplace contracts(the functions include Royalties and shares to platform owner and initial minter etc). I suppose I have to use the proxy smart contract for this but I am not able to figure out how that will be implemented. Or is there any other way to do this?
I shall be thankful to anyone who helps me in my problem. I need a proper, authentic and secure way to achieving this task.


If your goal is to upgrade the functions in your contract to use different logic later on, then upgradable proxies are a way to do that. You should write the different versions of your contract and write tests to ensure it works the way that you expect after an upgrade. The upgrades plugins can help with deploying and testing upgrades.

My goal is not to upgrade the functions in the contract.... The goal is to use the NFTs minted in Dropsite and perform the functions from Marketplace contract on them... Once all the NFTs have been used by the Marketplace contract, There should be no use of Dropsite contract.

In other words, I want the distributed NFTs to be transferred, Sold, Auctioned using the functions defined in marketplace contract. But the NFTs are minted in Dropsite contract. Is there any way for that???

If you want to use your tokens (ERC721 in this case) in your marketplace contract just initialize an instance of the ERC721 contract in your marketplace contract and start use its functions (

My marketplace contract has both ERC721 an ERC1155 contracts. Dropsite is of ERC1155 type. But is there vice versa possible??? Dropsite will be deployed in a couple of days and maybe marketplace after a few months... So How can I be able to use Dropsite Contract in Marketplace???

Can you please explain the architecture of your project once again? I can't understand it so I'm not able to help you any further without more informations

Here is the detailed Architecture and description of the problem:
NFT-ES Architecture

@abcoathup Sir can you please help me in this regard??? I have been waiting for so long!

So you have NFTs, a way to mint them, and then another contract that interacts with them. You don't necessarily have to use proxy/upgrades in this case.

I think either you can include the dropsite logic in the NFT contract, or have your separate dropsite contract and make that the owner so only that contract has permission to mint. Then later change the owner to the marketplace contract. But you would need to design/test this out to see if that's what you really need.

@ericglau I have to deploy dropsite contract first. The marketplace contract is under development yet... It will be deployed after some time... The dropsite will be working and random NFTs will being distributed among the users.
After marketplace development we will integrate and allow the users to buy/sell the randomly distributed NFTs on the marketplace.
That is why we cannot integrate the Marketplace with dropsite functionality at this point.

Minting will be done by the user who is getting the random NFTs because the contract will not bear the gas fees. The user will bear it. So we cannot make the contract owner at this point!

It doesn't have to be owner, but you can use modifiers or roles to control who can call specific functions.

The problem is actually calling and bearing the gas fees... Also it is a very basic contract with minimal functionality. We want that once all dropsite NFTs are available on marketplace, Dropsite will be of no use anymore.