2

I recommend you read OpenZeppelin's article on Access Control in Solidity. In your case, you would inherit from Ownable.sol and add the onlyOwnable modifier to the mint function. Here's an example for one of my contracts which does that: function setMinGasReserve(uint256 newMinGasReserve) external override onlyOwner { minGasReserve = newMinGasReserve; }


2

Looks like you have been following Twitter today. The user in question actually had their private keys compromised by a fake OpenSea email spam. However attack vectors can be launched on smart contracts, so that when you interact with them or approve them they are given access to your wallet. Not sure exactly how it happens but it is through malicious code. ...


1

The string size is limited only by the size of strings returnable from transactions. Because of the Yellow Paper, you will need to store those values in memory before returning, you are limited only by the memory-expansion function. If you want the strings to be meaningful, the limit is much less. The contract can change URLs. Other contracts can query ...


1

Answers: The size limit is only the transaction/block size limit. Based on calculations (https://ethereum.stackexchange.com/a/1110/31933) you can fit "780kB (about 3 million gas)" in a block. Nowadays gas limit is about 15 million, so 5 * 780kB = about 4 MB. So you can have a url of about 4 MB - that's a lot of characters. It can only be changed ...


Only top voted, non community-wiki answers of a minimum length are eligible