Solutions can be deployed multiple times and have the same id (same creationcode with params && same salt && same deploy address) while the runtimecode can be changed. See create2 for more details especially the Warning part.
Therefore, we'd better prevent someone from submitting twice. A simple record for submitting before deployment should be ok.
|
function submit_code(bytes memory code) external { |
|
Create2Upgradeable.deploy(0, 0, code); |
|
} |
Solutions can be deployed multiple times and have the same id (same creationcode with params && same salt && same deploy address) while the runtimecode can be changed. See create2 for more details especially the Warning part.
Therefore, we'd better prevent someone from submitting twice. A simple record for submitting before deployment should be ok.
contracts/contracts/EulerDAO.sol
Lines 42 to 44 in 911357e