doc: clarify evm.initNewContract() comment

This commit is contained in:
Arran Schlosberg 2024-08-12 17:38:28 +01:00
parent 344a35d4e5
commit 1424fdce66
No known key found for this signature in database
GPG key ID: 8A30F7E4344B4EF3

View file

@ -537,8 +537,8 @@ func (evm *EVM) create(caller ContractRef, codeAndHash *codeAndHash, gas uint64,
return ret, address, contract.Gas, err return ret, address, contract.Gas, err
} }
// initNewContract perform initialization checks and actions on code for a newly // initNewContract runs a new contract's creation code, performs checks on the
// create()d contract. // resulting code that is to be deployed, and consumes necessary gas.
func (evm *EVM) initNewContract(contract *Contract, address common.Address) ([]byte, error) { func (evm *EVM) initNewContract(contract *Contract, address common.Address) ([]byte, error) {
ret, err := evm.interpreter.Run(contract, nil, false) ret, err := evm.interpreter.Run(contract, nil, false)
if err != nil { if err != nil {