This PR makes to changes to improve clarity on how starting a contract execution is charged. They are independent an in one commit each:
Rename InstantiateContractCosts -> SetupContractCost. The term "instantiate" has two different meanings in our stack: (a) the contract instance identified by a blockchain address (b) the Wasmer instance created before calling an entry point. Here "InstantiateContract" was referring to the later, which is more an implementation detail. To avoid confusion we can use a different term that was in the codebase already: "setup".
Remove NewContractInstanceCosts. This was just an alias that was used for one entry point (MsgInstantiateContract/MsgInstantiateContract2). However, we do not maintain entry-point specific gas values for all other cases. So having this extra is confusing. If we want entrypoint specific functions here, we should create them for all entry points.
Also in general we should migrate "costs" -> "cost" when we get the chance since this the the price for a single operation.
This PR makes to changes to improve clarity on how starting a contract execution is charged. They are independent an in one commit each:
Also in general we should migrate "costs" -> "cost" when we get the chance since this the the price for a single operation.