Skip to main content
improve error message format
Source Link

I am getting following error message with require statement:

Error: Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata. require(msg.sender.call.value(address(this).balance)()); ^--------------------------------------------^ :

        require(msg.sender.call.value(address(this).balance)());
                ^--------------------------------------------^ : 

Error: No matching declaration found after argument-dependent lookup. require(msg.sender.call.value(address(this).balance)()); ^-----^

        require(msg.sender.call.value(address(this).balance)());
        ^-----^

The require statement is:

require(msg.sender.call.value(address(this).balance)());

Somebody please guide me.

Zulfi.

I am getting following error message with require statement:

Error: Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata. require(msg.sender.call.value(address(this).balance)()); ^--------------------------------------------^ : Error: No matching declaration found after argument-dependent lookup. require(msg.sender.call.value(address(this).balance)()); ^-----^

The require statement is:

require(msg.sender.call.value(address(this).balance)());

Somebody please guide me.

Zulfi.

I am getting following error message with require statement:

Error: Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata.

        require(msg.sender.call.value(address(this).balance)());
                ^--------------------------------------------^ : 

Error: No matching declaration found after argument-dependent lookup.

        require(msg.sender.call.value(address(this).balance)());
        ^-----^

The require statement is:

require(msg.sender.call.value(address(this).balance)());

Somebody please guide me.

Zulfi.

Source Link
zak100
  • 1.4k
  • 1
  • 15
  • 40

Correct syntax for require required

I am getting following error message with require statement:

Error: Wrong argument count for function call: 0 arguments given but expected 1. This function requires a single bytes argument. Use "" as argument to provide empty calldata. require(msg.sender.call.value(address(this).balance)()); ^--------------------------------------------^ : Error: No matching declaration found after argument-dependent lookup. require(msg.sender.call.value(address(this).balance)()); ^-----^

The require statement is:

require(msg.sender.call.value(address(this).balance)());

Somebody please guide me.

Zulfi.