EG
Size: a a a
EG
I
A
Error HH604: Error running JSON-RPC server: ERROR processing /home/user/dev-core/deploy/PoolV2.js:
Error: Transaction reverted without a reason string
at <UnrecognizedContract>.constructor (unknown)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at runNextTicks (internal/process/task_queues.js:64:3)
at listOnTimeout (internal/timers.js:526:9)
at processTimers (internal/timers.js:500:7)
I
I
А
function withdraw() public payable{
require (msg.sender == owner, "Sender not owner");
msg.sender.transfer(address(this).balance);
}I
А
TypeError: "send" and "transfer" are only available for objects of type "address payable", not "address".я не пойму почему не работает, вроде копировал с туториала
но
EG
А
EG
I
EG
А
function withdraw() public {
// get the amount of Ether stored in this contract
uint amount = address(this).balance;
// send all Ether to owner
// Owner can receive Ether since the address of owner is payable
(bool success, ) = owner.call{value: amount}("");
require(success, "Failed to send Ether");
}EG
H