0

i want to create a smart-contract, where it is allowed for users to deposit their ether/tokens in.

As far i researched i found this function to get it happen.

address owner; // this is where you want the money to go

function getPayment() payable external{
    require(msg.value=='put here your minimal payment');
    owner.transfer(msg.value);
}

My plan is to create also a function, where the contract withdraws ether, when a special amount is reached du different option. How to withdraw ether to the users, which depositet their tokens to this contract?

Kind regards

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.