Migrating contract optimising gas

Hi!

I'm working on a simple ERC-20 token. It's basically based on ERC20.

I've successfully deployed to Ropsten.

The gas used is: 953,876.

I've enabled optimisation and re-built (delete build directory and run compile) and then run another migration test but that seems to have no effect on the gas used?

Does that sound like the right level of gas for a simple token?

What steps can I take to get the gas down?

Here are my current truffle settings:

  // Configure your compilers
  compilers: {
    solc: {
      version: "0.8.9",     // Fetch exact version from solc-bin (default: truffle's version)
      // docker: true,      // Use "0.5.1" you've installed locally with docker (default: false)
      settings: {          // See the solidity docs for advice about optimization and evmVersion
        optimizer: {
          enabled: true,
          runs: 1500
        },
        evmVersion: "byzantium"
      }
    }
  },

Thanks in advance for any advice!

Optimizations definitely should improve deployment cost.

If you want to optimize for code size (i.e. deployment cost) you can try runs: 1. This will not have a huge effect though.