Hi. Once I upload my contract code (it's not an upgradeable contract).... Is there *any way that as the owner of the contract I can overwrite the contract code ?

Sep 30, 2020, 7:30 PM
What do you mean exactly by "overwriting"? You can change the values of variables IF there is a function that you implemented to do so - but once deployed you can not alter the source code/bytecode of your contract.

Even if it is "upgradeable" (one contract pointing to another and someone can update that pointer) you are effectively deploying a new smart contract to a new address. You are not altering the old one
Sep 30, 2020, 7:34 PM
noted. thanks.
How can I ensure that once my mint() function is called once, it is never called again?
Sep 30, 2020, 7:48 PM
Add a boolean state variable (for example "isMinted"), require that the value is false in the function and then set the value to true and mint
Sep 30, 2020, 7:50 PM
Well that's the whole point of creating a smart contract. To make it non overwrittable😅
Sep 30, 2020, 9:03 PM
Ya, just needed a sanity check.
Sep 30, 2020, 9:06 PM

© 2024 Draquery.com All rights reserved.