You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forwarding ether to another contract in a payable method seems to incorrectly trigger the locking warning despite the fact that all ether is forwarded rather than stored. As with #112, feel free to close if this is not the right forum or this error is working as intended. See the following example that triggers the error:
/*
Test
*/
pragma solidity >=0.4.24;
contract OtherContract {
address public owner;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
constructor(address ownerAddress) public payable {
owner = ownerAddress;
}
function withdraw() external onlyOwner {
msg.sender.transfer(address(this).balance);
}
}
contract TestContract {
function createOtherContract() external payable returns (address newContract) {
OtherContract otherContract = (new OtherContract).value(msg.value)(msg.sender);
return address(otherContract);
}
}
The text was updated successfully, but these errors were encountered:
Forwarding ether to another contract in a payable method seems to incorrectly trigger the locking warning despite the fact that all ether is forwarded rather than stored. As with #112, feel free to close if this is not the right forum or this error is working as intended. See the following example that triggers the error:
The text was updated successfully, but these errors were encountered: