mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 18:28:01 +00:00
06aa289d9b
Implement constructor logic and support create/create2 in the mock runtime Signed-off-by: xermicus <cyrill@parity.io>
22 lines
339 B
Solidity
22 lines
339 B
Solidity
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.24;
|
|
|
|
contract CreateA {
|
|
address creator;
|
|
|
|
constructor() payable {
|
|
creator = msg.sender;
|
|
}
|
|
}
|
|
|
|
contract CreateB {
|
|
receive() external payable {
|
|
new CreateA{value: msg.value}();
|
|
}
|
|
|
|
fallback() external {
|
|
new CreateA{salt: hex"01"}();
|
|
}
|
|
}
|