I'm writing a contract for an ERC-20 token, and I've been trying to optimize for gas (since the fees are ridiculous at the moment).
I was wondering if instead of using a string, I could use a bytes32 for the token metadata, and if it would still be able to read the name on etherscan, and anywhere else my token might be registered.
I would be changing from this:
string public constant name = "....."; string public constant symbol = "..."; string public version = "1.0";
bytes32 public constant name = bytes32("....."); bytes32 public constant name = bytes32("..."); bytes32 public version = bytes32("1.0");
I've already tested the two versions, and the second one does save on a lot of gas. Just wondering if I'll run into issues later because of this.