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?
1
  • 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 Commented Jun 2, 2016 at 18:08

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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