Constructors and contract creation (#11)

Implement constructor logic and support create/create2 in the mock runtime

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
Cyrill Leutwiler
2024-05-22 21:35:32 +02:00
committed by GitHub
parent 42697edc67
commit 06aa289d9b
26 changed files with 692 additions and 720 deletions
@@ -875,16 +875,9 @@ impl FunctionCall {
}
Name::DataCopy => {
let arguments = self.pop_arguments_llvm::<D, 3>(context)?;
let offset = context.builder().build_int_add(
arguments[0].into_int_value(),
context.word_const(
(revive_common::BYTE_LENGTH_X32 + revive_common::BYTE_LENGTH_WORD) as u64,
),
"datacopy_contract_hash_offset",
)?;
revive_llvm_context::polkavm_evm_memory::store(
context,
offset,
arguments[0].into_int_value(),
arguments[1].into_int_value(),
)
.map(|_| None)