mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-22 04:27:58 +00:00
integration: add delegate call corner case test (#243)
Closes #235 --------- Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
This is a development pre-release.
|
||||
|
||||
Supported `polkadot-sdk` rev:`c29e72a8628835e34deb6aa7db9a78a2e4eabcee`
|
||||
|
||||
## v0.1.0-dev.12
|
||||
|
||||
This is a development pre-release.
|
||||
|
||||
Generated
+371
-370
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -72,7 +72,7 @@ assert_fs = "1.1"
|
||||
# polkadot-sdk and friends
|
||||
codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" }
|
||||
scale-info = { version = "2.11.6", default-features = false }
|
||||
polkadot-sdk = { git = "https://github.com/paritytech/polkadot-sdk", rev = "21f6f0705e53c15aa2b8a5706b208200447774a9" }
|
||||
polkadot-sdk = { git = "https://github.com/paritytech/polkadot-sdk", rev = "c29e72a8628835e34deb6aa7db9a78a2e4eabcee" }
|
||||
|
||||
# llvm
|
||||
[workspace.dependencies.inkwell]
|
||||
|
||||
@@ -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