I would like to understand the gas incurred in contract creation and in sending the transaction to the contract.
Is there an easy way to debug this?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityThere is this document: https://docs.google.com/spreadsheets/d/1m89CVujrQe5LAFJ8-YAUCcNK950dUzMQPMJBxRtGCqs/edit#gid=0
which you could use to try estimating which part of your smart contract is the most expensive. You could try calculating total cost yourself per operation and byte of data stored.
Also here are the gas costs used in cost calculation by go-ethereum: https://github.com/ethereum/go-ethereum/blob/develop/params/protocol_params.go#L14
and the same for cpp-ethereum: https://github.com/ethereum/solidity/blob/054bc2a6ac4857f3aa9d7b5f0ec23ec5a3ee109b/libevmasm/GasMeter.h