EIP-5478: CREATE2COPY Opcode


eip: 5478
title: CREATE2COPY Opcode
description: Reducing the gas cost of contract creation with existing code
author: Qi Zhou (@qizhou)
discussions-to: EIP-5478: CREATE2COPY Opcode
status: Draft
type: Standards Track
category: Core
created: 2022-08-17
requires: 1014, 2929

that’s a great idea. but instead of introducing a new opcode, did you try to implement this by creating a constructor that accepts an address (and parameters) and uses extcodecopy (instead of calldata)? you will still pay for memory expansion but I think it might be cheaper still. also this works around introducing a new opcode.