Cloning a Smart Contract

Hello everyone,

I'm an artist trying to publish his own contract. I don't have solidarity knowledge, but I can read/understand codes in general. So I found this collection minted yesterday: Their pricing model is what I'm exactly looking for. They set the first nft free per wallet, then it's 0.003 eth.

So I clone the contract from etherscan, deployed it with following this tutorial: This is my clone contract can be found etherscan rinkeby (I can't post more than 2 links because I'm a new user): 0x7a72d7c674107ca51941f2fe8cff7985148f5ee3 It worked perfect. I tested it with minting, admin functions, and interacting with another wallet, etc.

Obviously I'll change ipfs, metadata, artwork, price, etc. But I wonder if this method is safe? Can original contract owner access to my contract? I would appreciate your help. I can't afford web3 developer. I need to do this my own.



I would not advice just copying a contract, but to answer you question the onlyOwner modifier is what will keep you as the owner of the newly deployed contract and the person who should withdraw the funds from the contract.

By default, the owner of an Ownable contract, which MyNFT is, is the account that deployed it. If you want to default to a different thing you must modify the constructor.

So, No the original creator of that contract will not have access to yours.

1 Like

Thanks for your answer. Why do you think I shouldn't copy a contract. Is it because of licensing terms? Is there way to know if a contract is open-source or can I attribute to original owner?

I should have been more explicit there, sorry about that, what I meant is you shouldnt copy a contract without checking it yourself before hand to make sure it completely aligns with what you are trying to do.

To answer the last question if it is on a public github and have a CONTRIBUTING file in the repo, is an open source library, and if it is open source depending on the contributing rules you can always add value to the original repo.

1 Like

I understand. I think you're right about understanding your contract. I'll dig deeper, see if I can read it better. Thank you very much!