mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-11 20:41:02 +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;
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,7 @@ test_spec!(transfer, "Transfer", "Transfer.sol");
|
||||
test_spec!(send, "Send", "Send.sol");
|
||||
test_spec!(function_pointer, "FunctionPointer", "FunctionPointer.sol");
|
||||
test_spec!(mload, "MLoad", "MLoad.sol");
|
||||
test_spec!(delegate_no_contract, "DelegateCaller", "DelegateCaller.sol");
|
||||
test_spec!(function_type, "FunctionType", "FunctionType.sol");
|
||||
|
||||
fn instantiate(path: &str, contract: &str) -> Vec<SpecsAction> {
|
||||
|
||||
Reference in New Issue
Block a user