3

A few things that I can't seem to clarify about writing solidity contracts:

Is it possible to write a contract that embodies a human readable contract like:

  • Two people agree to X under Y condition
  • How would I verify that condition, which could be an "answer" from another contract. And would that be asynchronous in any way?

(In the case of a time-based condition I would assume you'd have to query this regularly with a third party service, unless there is some way to emit an event from the blockchain?)

If contracts are encapsulated, and cannot access data from other contracts, how would I best write a contract that uses another contract as a condition?

  • Do I have to "send" data from one contract to the other as arguments?
  • If yes, then how would I go about that within a contract? How can I call another contract?
Cubedj
  • 363
  • 1
  • 2
  • 8
  • 1
    Maybe you should split the question next time, it makes it easier for others who have the same questions to find it and it makes it easier to answer thoroughly – Roland Kofler Jun 02 '16 at 18:08

1 Answers1

1

How would I verify that condition [...]?

Oracles for external data, calling Contracts for internal stuff

would that be asynchronous in any way?

Not sure, asking here

In the case of a time-based condition I would assume you'd have to query

You can use the alarmclock contract

Roland Kofler
  • 11,638
  • 3
  • 44
  • 83