-
Notifications
You must be signed in to change notification settings - Fork 121
/
Copy pathrequestDemo.sol
27 lines (23 loc) · 924 Bytes
/
requestDemo.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract RequestDemo{
/*
// signature work
function receivedRequest(address _contractAddress , bytes4 callBackFunctionSignature ) public {
////////
console.log("RequestDemo :: receivedRequest Started");
(bool success, bytes memory data) = _contractAddress.call(abi.encodeWithSelector(callBackFunctionSignature,45));
console.log("RequestDemo :: receivedRequest after success", success);
}
*/
// function (uint256) external view returns(uint256) myCall;
function receivedFunctionRequest(function (uint256) external view returns(uint256) demoCall) public view {
// myCall = demoCall;
uint256 valueAfter = demoCall(23);
console.log("receivedFunctionRequest", valueAfter);
}
// function hello() public{
// myCall(12);
// }
}