3

I'm a PHP developer and I'm new to Ethereum.

Looking different documentation and different Solidity contracts, I can not find a single example of how money can be managed on a contract (apart from kill()).

For example I need to create a contract where:

  1. User send money to my contract
  2. Money will be used for goods so asap should be converted into USD Dollars and send to a personal account.

Does it makes sense or is it completely wrong and should I look at something different from the contracts?

4

You won't be able to interact with smart contracts with USD. All money transactions on the Ethereum network needs to be done using ether. (They can be done with tokens as well but let's ignore that for now).

If you're talking about actual, physical goods, I would say this is not a good use case for Ethereum, because although you can pay with ether, you can't have conflicting information enter the blockchain. In other words, if the shipper and receiver give conflicting information ("I sent it, but you didn't get it??"), this creates problems.

I think that this is a good starting point on understanding how money works in the Ethereum network. https://blockgeeks.com/guides/ethereum-token/

For more information on exactly how to interact with money through smart contracts, see the official documentation, under "sending ether":

http://ethdocs.org/en/latest/ether.html

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.