Spritely Goblins is probably what you want to look at, or will after the
next release (v0.8) comes out:
https://docs.racket-lang.org/goblins/index.html
In the not too distant future, Spritely and Agoric's CapTP should
converge. Agoric's current work is all based around smart contracts:
https://agoric.com/
https://github.com/Agoric/agoric-sdk/issues/1827
There's a lot of confusion out there about what "smart contracts" mean;
most of the examples tend to assume it has to do with blockchains. In
fact, work on smart contracts precedes blockchains by several decades.
If you look at
http://www.erights.org/ on which many of the ideas in
Spritely Goblins is based, you'll notice that it has the word "smart
contracts" prominently, yet this was well over a decade before
blockchains even existed. What the heck?
Smart contracts as something implemented with distributed objects can be
best understood probably by reading Capability Based Financial Instruments:
http://erights.org/elib/capability/ode/index.html
The mint example from that paper is implemented in Goblins:
https://gitlab.com/spritely/goblins/-/blob/dev/goblins/actor-lib/simple-mint.rkt
That's right, in about 25 lines of Goblins code you can have a
functioning bank of sorts, which preserves financial integrity and even
permits networked accounts. No blockchain required.
Yet, you could add a blockchain, or even turn Goblins into a blockchain
if you wanted. (Since Goblins' actor state is transactional and
snapshottable, you can have a merkle tree of all inputs, and global
consensus on the set of messages accepted by the network, and all
participants can replay and simulate the same abstract machine. This is
fairly trivial to do in Goblins.)
But more interestingly, Agoric has already done the work of abstracting
even remote blockchains as abstract machines on the network. Since
we'll be implementing the same CapTP, when the time comes you'll be able
to access all that for free, even though Agoric programs are written in
Javascript and Goblins programs in Racket.
Anyway, the next release of Goblins, coming soon, should allow for
beginning to play with this kind of stuff on the network more easily
than in the present (v0.7) stuff, which currently takes a lot of work.
So maybe if you can wait a few weeks, it'll be easier to talk about.
But "smart contracts" is a use case, a broad problem domain. What kind
of smart contracts are you wanting to write?
- Chris