Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WITHDRAW #5

Open
javiergarcif opened this issue Feb 13, 2022 · 0 comments
Open

WITHDRAW #5

javiergarcif opened this issue Feb 13, 2022 · 0 comments

Comments

@javiergarcif
Copy link

I would like to know, how can I add a withdraw wallet, because after depolying the contract, and adding some funds, when I click the withdraw box, inside remix.org, it automaticly errase all the funds in the contract I think that is somethign related to this, but I don´t know what I have to change:

function withdraw() public payable onlyOwner {
(bool success, ) = payable(msg.sender).call{
value: address(this).balance
}("");
require(success);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant