How do I fix this? TypeError: No matching declaration found after argument-dependent lookup. require(instance.execfunct(address(this),2100,gaslimit,hex"00")); ^-----^ Candidate: function require(bool) Candidate: function require(bool, string memory)

pragma solidity ^0.6.0;

abstract contract AionClient {

constructor(address addraion) public{
   address AionAddress = addraion;

function execfunct(address to, uint256 value, uint256 gaslimit, bytes 
calldata data) external 
payable returns(bool, bytes memory) {
    require(msg.sender == address(0));
    return to.call.value(value).gas(gaslimit)(data);
function executeCall(uint256 blocknumber, address from, address to, 
uint256 value, uint256 gaslimit, uint256 gasprice,
uint256 fee, bytes calldata data, uint256 aionId, 
bool schedType) external {

    if(schedType) require(blocknumber <= block.timestamp);
    if(!schedType) require(blocknumber <= block.number);
    ==keccak256(abi.e ncodePacked(blocknumber,from, to, value, gaslimit, 
    gasprice, fee, data, schedType)));
    AionClient instance = AionClient(clientAccount[from]);

  • "require(instance.execfunct(address(this),2100,gaslimit,hex "00"));" is another contract
    – garm
    Jun 16, 2021 at 8:01
  • All commands have to be inside functions. So your require should be somewhere ina function and you need to create the instance reference Jun 16, 2021 at 8:14

1 Answer 1


Looks like you may have had some formatting issues when posting your question. Regardless of that the Error you're seeing is because the first argument in your call to require needs to evaluate to a boolean.

I can't tell what's happening because of the formatting issues, but perhaps you could try declaring a variable as a boolean or casting whatever it is to a boolean?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.