This should be really easy but I can't seem to find the way to do it, thanks to the great documentation. I'm thinking I'm missing something big.
I have a function that buys ownership of something. I want to remove amount
ether to msg.sender
(user a) and give them to owner
(user b) (minus fees).
Can I do it directly? Do I have to first let a send ether to the contract and then send b the same amount, or is there a function to transfer directly?
I assume owner.transfer(amount)
(or .send(amount)
) sends ether from the contract to the owner, but then how do I get ether from a?
I'm using Solidity by Example as a model, but in the Blind Auction example I can't seem to find what function actually sends ether from the bidder to the contract.