mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 10:31:04 +00:00
integration: add delegate call corner case test (#243)
Closes #235 --------- Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.8.28;
|
||||
|
||||
/* runner.json
|
||||
{
|
||||
"differential": true,
|
||||
"actions": [
|
||||
{
|
||||
"Instantiate": {
|
||||
"code": {
|
||||
"Solidity": {
|
||||
"contract": "DelegateCaller"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"Call": {
|
||||
"dest": {
|
||||
"Instantiated": 0
|
||||
},
|
||||
"data": "e466c6c9"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
*/
|
||||
|
||||
contract DelegateCaller {
|
||||
function delegateNoContract() external returns (bool) {
|
||||
address testAddress = 0x0000000000000000000000000000000000000000;
|
||||
(bool success, ) = testAddress.delegatecall(
|
||||
abi.encodeWithSignature("test()")
|
||||
);
|
||||
return success;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user