My first attempt at programming. Where did I go wrong?

Hopefully by looking at the image, you'll be able to understand my intent for the application.

My question, it what do I have to change to make it operational, and how?



  • BluefinBluefin Member Posts: 47

    First, timestamp, you need to go here to convert:

    Time stamp is number of seconds after 31st. December 1969 (UTC time), i.e., time starts at 12midnight 12/31/1969.

    Secondly, MitchAddress and Jackaddress will have to be real wallet or contract addresses.

    Third, BTC = won't work. You need to be specific with a number.
  • nippleheadnipplehead Member Posts: 3
    Thanks for this, especially the timestamp.
    Also how do I format the wallet address, will it need to be an ether address? I havn't even got one yet as the client doesn't work on my windows.

    Any suggestions on how to source a specific price for btc?
  • BluefinBluefin Member Posts: 47
    @nipplehead‌, You do not format an address per se. Each wallet has its own set of private/public keys that one can generate. Jack and Mitch may have one wallet each and each of them can generate their own sets of addresses in their wallets.

    You can pick one address from each one of them and use that as an address. Or, if Mitchaddress and Jackaddress are some contracts, they will have an address each as well.

    An address can be from a wallet address or from a contract address. A contract address gets its address when you send your contract into the ethereum block chain.

    Do note that the variable BTC you defined is only a variable name not the actual BTC itself. Ethereum does not transact any cryptos outside its domain other than ethers.

    Regarding a source for the price of btc, this may still be a long way away. Read here to get a better feel of what this is all about:

  • mode80mode80 Member Posts: 64 ✭✭
    You can find a tweaked version with comments as "Mitch Jack Bet" under the Samples menu at
  • BluefinBluefin Member Posts: 47
    And if you want to kill the contract after that, you can do a "self-destruct" to "Mitch" or "Jack" instead of "spend" to any one of them.
Sign In or Register to comment.