Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xVolosnikov committed Dec 18, 2024
1 parent 0290ccf commit c348f32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion core/lib/multivm/src/versions/vm_fast/evm_deploy_tracer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ impl EvmDeployTracer {
return;
}

match ethabi::decode(&[ethabi::ParamType::Bytes], data) {
match ethabi::decode(
&[ethabi::ParamType::Uint(256), ethabi::ParamType::Bytes],
data,
) {
Ok(decoded) => {
// `unwrap`s should be safe since the function signature is checked above.
let mut decoded_iter = decoded.into_iter();
Expand Down
6 changes: 3 additions & 3 deletions core/lib/test_contracts/contracts/mock-evm/mock-evm.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract MockKnownCodeStorage {
evmBytecodeHash = _bytecodeHash;
}

function publishEVMBytecode(bytes calldata _bytecode) external {
function publishEVMBytecode(uint256 _bytecodeLen, bytes calldata _bytecode) external {
bytes32 hash = evmBytecodeHash;
require(hash != bytes32(0), "EVM bytecode hash not set");

Expand Down Expand Up @@ -85,7 +85,7 @@ contract MockContractDeployer {
bytes calldata _input
) external payable returns (address) {
KNOWN_CODE_STORAGE_CONTRACT.setEVMBytecodeHash(_salt);
KNOWN_CODE_STORAGE_CONTRACT.publishEVMBytecode(_input);
KNOWN_CODE_STORAGE_CONTRACT.publishEVMBytecode(_input.length, _input);
address newAddress = address(uint160(msg.sender) + 1);
ACCOUNT_CODE_STORAGE_CONTRACT.storeAccountConstructedCodeHash(newAddress, _salt);
return newAddress;
Expand All @@ -101,7 +101,7 @@ contract MockContractDeployer {
bytes calldata _input
) external payable returns (address newAddress) {
KNOWN_CODE_STORAGE_CONTRACT.setEVMBytecodeHash(_bytecodeHash);
KNOWN_CODE_STORAGE_CONTRACT.publishEVMBytecode(_input);
KNOWN_CODE_STORAGE_CONTRACT.publishEVMBytecode(_input.length, _input);

bytes32 hash = keccak256(
bytes.concat(CREATE2_PREFIX, bytes32(uint256(uint160(msg.sender))), _salt, _bytecodeHash)
Expand Down

0 comments on commit c348f32

Please sign in to comment.