<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://opentransactions.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Smart_contracts</id>
	<title>Smart contracts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://opentransactions.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Smart_contracts"/>
	<link rel="alternate" type="text/html" href="http://opentransactions.org/wiki/index.php?title=Smart_contracts&amp;action=history"/>
	<updated>2026-04-29T00:47:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.2</generator>
	<entry>
		<id>http://opentransactions.org/wiki/index.php?title=Smart_contracts&amp;diff=83&amp;oldid=prev</id>
		<title>Cryptoman: Created page with &quot;The concept of &amp;quot;smart contracts&amp;quot; originated with Nick Szabo: [http://szabo.best.vwh.net/contractlanguage.html Nick Szabo's smart contracts] Also: [http://www.erights...&quot;</title>
		<link rel="alternate" type="text/html" href="http://opentransactions.org/wiki/index.php?title=Smart_contracts&amp;diff=83&amp;oldid=prev"/>
		<updated>2013-06-11T17:16:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The concept of &amp;quot;smart contracts&amp;quot; originated with Nick Szabo: [http://szabo.best.vwh.net/contractlanguage.html Nick Szabo&amp;#039;s smart contracts] Also: [http://www.erights...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The concept of &amp;amp;quot;smart contracts&amp;amp;quot; originated with Nick Szabo: [http://szabo.best.vwh.net/contractlanguage.html Nick Szabo's smart contracts] Also: [http://www.erights.org/smart-contracts/index.html E-Rights] Also: [http://www.erights.org/elib/capability/ode/ode-capabilities.html#simple-money Money example in E language]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
That being said, OT has its own, entirely different implementation... In the Open-Transactions universe, a &amp;amp;quot;smart contract&amp;amp;quot; has these properties:&lt;br /&gt;
&lt;br /&gt;
* A smart contract can be activated, after which point it takes on a &amp;amp;quot;life of its own&amp;amp;quot;, in the sense that it will process regularly over time according to its own internal terms and logic, until it expires or is deactivated. In this sense, it is like any other recurring OT transaction such as market trades and payment plans.&lt;br /&gt;
* Smart contracts are most distinguished by the fact that they can have ''scriptable clauses''. (Normally on OT, a typical contract only contains data tags, and human-readable clauses. Only the smart contracts &amp;amp;quot;can come to life&amp;amp;quot; with their own custom-scripted clauses.)&lt;br /&gt;
* Smart contracts can have '''multiple parties''', each with their own agents and asset accounts.&lt;br /&gt;
* Only a select few functions are made available from within the script code of a smart contract, and all funds transfers go through this tightly-controlled interface, with notices and receipts sent to all relevant parties.&lt;br /&gt;
* The script code is unable to manipulate any assets excepting those explicitly declared beforehand on the smart contract, ''and'' verified as valid property of a legitimate party to the contract. And when funds are moved, it's to a contract-specific name, not an account ID. For example, you wouldn't transfer funds from account pckjsdf9872345kj34kjhsf, but rather, by ''that account's name as declared in the contract,'' such as &amp;lt;code&amp;gt;alice_petty_cash&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;bobs_acct&amp;lt;/code&amp;gt;. (This means that it's impossible to even reference any account other than ''those declared on the smart contract by name,'' since the functions provided can ''only'' operate based on those names.)&lt;br /&gt;
* Not only can the smart contract move_funds() between these declared accounts, as its script logic dictates, but it can also '''stash_funds() directly inside the contract itself!''' For example, during an escrow, funds might be stashed ''inside'' the smart contract for 14 or 30 days, and then transferred to one party or another.&lt;br /&gt;
* Scripted clauses can also be configured to trigger on certain ''events.'' For example, do you need a script to fire right when the smart contract first activates? No problem! Just attach it to the &amp;lt;code&amp;gt;OnActivate()&amp;lt;/code&amp;gt; hook. Do you have a script that needs to fire every single day for a month? No problem, just put your logic on the &amp;lt;code&amp;gt;OnProcess()&amp;lt;/code&amp;gt; hook! (And set a 1-day sleep between processing... ''and'' code your script to deactivate itself after 30 days.) You can even set multiple clauses to fire based on a single hook. For example, the main_bylaw might have a clause that's set to trigger on the onActivate() hook... yet the secondary_bylaws might ''also'' have a clause that triggers on that ''same hook.'' Both clauses will execute on that hook, based on their order inside the smart contract itself.&lt;br /&gt;
* You can also define variables in your smart contract, which persist through its entire lifetime. As the smart contract--including its internal state--continues to process over time, receipts will continue to drop into the relevant parties' inboxes, showing the change in state, in those variables, over time (using exactly the same inboxes and receipts that OT uses already for transfers, for, market trades and payment plans... using exactly the same ''destruction of account history'' based core system, with signed receipts, finalReceipts, etc.)&lt;br /&gt;
* A signed copy of the ''original'' smart contract shows it ''as it was,'' when the parties first signed and activated it. Additionally, a server-signed, ''updated version'' of the contract comes with each receipt, showing the latest state. The server keeps all of these receipts in each relevant user's inbox, as proof of the transactions and current state, until any given user signs off on the latest balance, which enables the server to then discard any old receipts out of his inbox. ''This is the exact same process as with all of the other financial instruments on OT.''&lt;br /&gt;
* Once the contract expires (or is deactivated) then a finalReceipt is dropped into all relevant inboxes, after which no other receipts are possible for that smart contract. (As with the other ''recurring'' instruments, such as market offers and payment plans, users must close all receipts related to that contract, in order to close the finalReceipt. And no new receipts can come in for that transaction, once the finalReceipt has dropped.)&lt;br /&gt;
* Smart contract variables can be defined as &amp;amp;quot;Constant&amp;amp;quot; (value cannot change), &amp;amp;quot;Persistent&amp;amp;quot; (value can change, and will persist between script runs), and &amp;amp;quot;Important&amp;amp;quot; (value is persistent, AND any changes in the value will result in server notices being sent to the parties.)&lt;br /&gt;
* Let's say a party needs to DIRECTLY trigger one of the clauses on the contract. (Instead of waiting around for it to trigger automatically based on some ''rule.)'' For example, perhaps an escrow user wishes to execute a clause in order to ''DISPUTE THE OUTCOME,'' or perhaps an arbitrator wishes to activate a clause in order to ''RENDER A JUDGMENT.'' OT's smart contracts can do precisely these sorts of things, limited only by your imagination (and my pre-alpha code.) See the new API call: &amp;lt;code&amp;gt;OT_API_triggerClause&amp;lt;/code&amp;gt; as well as the command-line option: opentxs trigger These sorts of actions are, of course, subject to the logic in the contract itself. Perhaps the contract disallows Alice from executing certain clauses, or disallows Bob from moving more than 100 grams of gold. YOU decide.&lt;br /&gt;
* Once voting groups are someday eventually added to OT, they will also be able to act as parties to agreements, and they will be able to take a vote in order to change their own bylaws! (Each smart contract already contains a list of bylaws, and each bylaw contains a list of scripted clauses and variables.) This will enable corporations. You can read about it more here: [https://github.com/FellowTraveler/Open-Transactions/wiki/Future-Direction Future Direction]&lt;br /&gt;
* You can also define ''CALLBACK SCRIPTS:'' These scripts fire automatically whenever OT needs an ''answer'' to some ''important question''. Such as:&lt;br /&gt;
** &amp;amp;quot;Is Alice allowed to cancel this agreement?&amp;amp;quot; (Your script returns true or false.)&lt;br /&gt;
** &amp;amp;quot;Is Bob allowed to trigger the DISPUTE clause?&amp;amp;quot; (Your script returns true or false.)&lt;br /&gt;
&lt;br /&gt;
As long as you provide the script, YOUR logic can be there 24 hours a day, making decisions for your best interests, while you're off sipping cocktails and getting arrested at Occupy Protests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
A SIMPLE EXAMPLE --- &amp;amp;quot;Two-way trade&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
Here's a sample &amp;amp;quot;OnActivate()&amp;amp;quot; clause from my very first (test) smartcontract, which implements a two-way-trade (where Bob doesn't get his clams unless Alice also gets her gold at the same time).&lt;br /&gt;
&lt;br /&gt;
Notice the entire functionality, while bare-bones, is implemented in this single OnActivate() clause, with deactivate_contract() being called at the bottom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// These are the amounts being paid by both parties.&lt;br /&gt;
// These amounts are for different currency types...&lt;br /&gt;
// ...Alice is trading 140 XYZs for Bob's 100 ABCs.&lt;br /&gt;
//&lt;br /&gt;
var alice_pays     = &amp;amp;quot;140&amp;amp;quot;&lt;br /&gt;
var bob_pays       = &amp;amp;quot;100&amp;amp;quot;&lt;br /&gt;
&lt;br /&gt;
// Stash is a function that only works inside smart contracts. It takes&lt;br /&gt;
// the funds from the denoted account and stashes them INSIDE the smart&lt;br /&gt;
// contract (in the below example, into &amp;amp;quot;first_stash&amp;amp;quot; and &amp;amp;quot;second_stash&amp;amp;quot;.)&lt;br /&gt;
//&lt;br /&gt;
// Only after BOTH stashes are successful, do we then unstash the funds&lt;br /&gt;
// to the OTHER user. i.e. Alice gets Bob's funds and Bob gets Alice's funds.&lt;br /&gt;
//&lt;br /&gt;
// NOTICE: You cannot use actual account IDs while inside a scripted clause.&lt;br /&gt;
// Instead, you can only refer to accounts by NAME (the name that was chosen&lt;br /&gt;
// for that account when the smart contract was written.) OT will resolve the&lt;br /&gt;
// name to the appropriate ID, based on the contents of the signed contract.&lt;br /&gt;
// This way, it would be useless to come up with some sneaky trick for slipping&lt;br /&gt;
// unexpected IDs into a running script's code or data, -- since it doesn't operate&lt;br /&gt;
// based on the IDs! (Of course, the normal client API operates based on IDs, but&lt;br /&gt;
// the smart contracts must operate from within their &amp;amp;quot;sandbox&amp;amp;quot; on the server.)&lt;br /&gt;
//&lt;br /&gt;
var bStAli  = stash_funds(alice_first_acct, &amp;amp;quot;first_stash&amp;amp;quot;,  alice_pays)&lt;br /&gt;
var bStBob  = stash_funds(bob_second_acct,  &amp;amp;quot;second_stash&amp;amp;quot;, bob_pays)&lt;br /&gt;
&lt;br /&gt;
if (!bStAli || !bStBob)  // FAILURE&lt;br /&gt;
{&lt;br /&gt;
// Somehow, one of the stashes failed (technically impossible,&lt;br /&gt;
// unless one or both of them didn't have the necessary funds...)&lt;br /&gt;
// Therefore, we give the parties their money back.&lt;br /&gt;
//&lt;br /&gt;
   // IF Alice's stash was successful, then unstash back to her.&lt;br /&gt;
   if (bStAli) &lt;br /&gt;
   {&lt;br /&gt;
     var b01 = unstash_funds(alice_first_acct,&amp;amp;quot;first_stash&amp;amp;quot;,alice_pays)&lt;br /&gt;
   }&lt;br /&gt;
   if (bStBob) // IF Bob's stash was successful, then unstash back to him.&lt;br /&gt;
   {&lt;br /&gt;
     var b02 = unstash_funds(bob_second_acct,&amp;amp;quot;second_stash&amp;amp;quot;,bob_pays)&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
else  // Success stashing funds from both parties! &lt;br /&gt;
{&lt;br /&gt;
   // Now let's unstash across, to the receiving parties...&lt;br /&gt;
&lt;br /&gt;
   var b11 = unstash_funds(bob_first_acct, &amp;amp;quot;first_stash&amp;amp;quot;, alice_pays)&lt;br /&gt;
   var b12 = unstash_funds(alice_second_acct,&amp;amp;quot;second_stash&amp;amp;quot;, bob_pays)&lt;br /&gt;
&lt;br /&gt;
   // bSuccess is a variable in the smart contract itself. That is, it's declared in the XML&lt;br /&gt;
   // of the contract, not inside this script proper--yet it's still accessible from in here.&lt;br /&gt;
&lt;br /&gt;
        bSuccess = true&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 // Our work is done, so let's shut down the contract.&lt;br /&gt;
 // Receipts were already sent to the parties' inboxes when&lt;br /&gt;
 // the money was moved. Now this deactivate will cause a finalReceipt&lt;br /&gt;
 // to go to all the parties.&lt;br /&gt;
//&lt;br /&gt;
 deactivate_contract()&amp;lt;/pre&amp;gt;&lt;br /&gt;
Of course, that isn't the entire smart contract, but just the onActivate() clause. Here's what the entire smart contract might look like:&lt;br /&gt;
&lt;br /&gt;
''(Subject to change, of course. This is very new code.)''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-----BEGIN SIGNED SMARTCONTRACT-----&lt;br /&gt;
Hash: SAMY&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;smartContract&lt;br /&gt;
 version=&amp;amp;quot;1.0&amp;amp;quot;&lt;br /&gt;
 serverID=&amp;amp;quot;tmHvLZxb13hW6OyH1oHKTmKd7fTMRsUfzqPE6KCwSjl&amp;amp;quot;&lt;br /&gt;
 activatorUserID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 activatorAcctID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 lastSenderUserID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 lastSenderAcctID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 lastRecipientUserID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 lastRecipientAcctID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 transactionNum=&amp;amp;quot;0&amp;amp;quot;&lt;br /&gt;
 creationDate=&amp;amp;quot;1323862266&amp;amp;quot;&lt;br /&gt;
 validFrom=&amp;amp;quot;1323862228&amp;amp;quot;&lt;br /&gt;
 validTo=&amp;amp;quot;0&amp;amp;quot;&lt;br /&gt;
 nextProcessDate=&amp;amp;quot;0&amp;amp;quot; &amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;scriptableContract&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;party name=&amp;amp;quot;party_alice&amp;amp;quot;&lt;br /&gt;
 ownerType=&amp;amp;quot;nym&amp;amp;quot;&lt;br /&gt;
 ownerID=&amp;amp;quot;T1Q3wZWgeTUoaUvn9m1lzIK5tn5wITlzxzrGNI8qtaV&amp;amp;quot;&lt;br /&gt;
 openingTransNo=&amp;amp;quot;37&amp;amp;quot;&lt;br /&gt;
 signedCopyProvided=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
 authorizingAgent=&amp;amp;quot;agent_alice&amp;amp;quot;&lt;br /&gt;
 numAgents=&amp;amp;quot;1&amp;amp;quot;&lt;br /&gt;
 numAccounts=&amp;amp;quot;2&amp;amp;quot; &amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;agent name=&amp;amp;quot;agent_alice&amp;amp;quot;&lt;br /&gt;
 doesAgentRepresentHimself=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
 isAgentAnIndividual=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
 nymID=&amp;amp;quot;T1Q3wZWgeTUoaUvn9m1lzIK5tn5wITlzxzrGNI8qtaV&amp;amp;quot;&lt;br /&gt;
 roleID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 groupName=&amp;amp;quot;&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;assetAccount name=&amp;amp;quot;alice_first_acct&amp;amp;quot;&lt;br /&gt;
 acctID=&amp;amp;quot;2K3LoD1UxsJLO0FAfng0fgqnxnXScO8rM2eO5tdDTOE&amp;amp;quot;&lt;br /&gt;
 assetTypeID=&amp;amp;quot;mNS1ODAXQoSXpWJfC5awE9zAXCm9aVfiE0WQGsIOw4B&amp;amp;quot;&lt;br /&gt;
 agentName=&amp;amp;quot;agent_alice&amp;amp;quot;&lt;br /&gt;
 closingTransNo=&amp;amp;quot;36&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;assetAccount name=&amp;amp;quot;alice_second_acct&amp;amp;quot;&lt;br /&gt;
 acctID=&amp;amp;quot;A6CcGwNiTtEPQnv7HLUcmf0QFaCGy862pb1SJ3zVqIU&amp;amp;quot;&lt;br /&gt;
 assetTypeID=&amp;amp;quot;SjSYAUzN1RLjGre0kqDJynFos1MRYzrxOOenHY0Lpjd&amp;amp;quot;&lt;br /&gt;
 agentName=&amp;amp;quot;agent_alice&amp;amp;quot;&lt;br /&gt;
 closingTransNo=&amp;amp;quot;35&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;mySignedCopy&amp;amp;gt;&lt;br /&gt;
eJytVsuyokgQ3fsDszXcGt2CbzvmdgQiKj4ABZ+bGyWUUAoUVvEQvmM+eArw9rV7&lt;br /&gt;
bvREd7Qb4VRm1snMU1RW/vnrU/4bShNZqeryRJFGVX0prA1RVYy1IBrFcmUKqPOl&lt;br /&gt;
qgvLQ6XyN/UACUXshwSYYaUaQ0IR9l9q/GeuVqlSSBgij15qoTeNF8f7iW85u66a&lt;br /&gt;
Tnk8nRve3OqdjeWabs7ZTZO6czHRLy7zY7FQDEJMNrR0f8YE0wwfmAtoqEPfgs+G&lt;br /&gt;
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ot;&lt;br /&gt;
 ownerType=&amp;amp;quot;nym&amp;amp;quot;&lt;br /&gt;
 ownerID=&amp;amp;quot;1mxwHcQvxSgqWqy2e28ZREeuVVfgs0kxE41FN10TnS3&amp;amp;quot;&lt;br /&gt;
 openingTransNo=&amp;amp;quot;67&amp;amp;quot;&lt;br /&gt;
 signedCopyProvided=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
 authorizingAgent=&amp;amp;quot;agent_bob&amp;amp;quot;&lt;br /&gt;
 numAgents=&amp;amp;quot;1&amp;amp;quot;&lt;br /&gt;
 numAccounts=&amp;amp;quot;2&amp;amp;quot; &amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;agent name=&amp;amp;quot;agent_bob&amp;amp;quot;&lt;br /&gt;
 doesAgentRepresentHimself=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
 isAgentAnIndividual=&amp;amp;quot;true&amp;amp;quot;&lt;br /&gt;
 nymID=&amp;amp;quot;1mxwHcQvxSgqWqy2e28ZREeuVVfgs0kxE41FN10TnS3&amp;amp;quot;&lt;br /&gt;
 roleID=&amp;amp;quot;&amp;amp;quot;&lt;br /&gt;
 groupName=&amp;amp;quot;&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;assetAccount name=&amp;amp;quot;bob_first_acct&amp;amp;quot;&lt;br /&gt;
 acctID=&amp;amp;quot;w06QIURsSDV7sdWWvyPSxRaiv4T2MUQbJyWmIKxSmuL&amp;amp;quot;&lt;br /&gt;
 assetTypeID=&amp;amp;quot;mNS1ODAXQoSXpWJfC5awE9zAXCm9aVfiE0WQGsIOw4B&amp;amp;quot;&lt;br /&gt;
 agentName=&amp;amp;quot;agent_bob&amp;amp;quot;&lt;br /&gt;
 closingTransNo=&amp;amp;quot;66&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;assetAccount name=&amp;amp;quot;bob_second_acct&amp;amp;quot;&lt;br /&gt;
 acctID=&amp;amp;quot;vuXpQt8h6CRGcz6G5zMOXqQeIRpsOq05VLuJ5IAFS5R&amp;amp;quot;&lt;br /&gt;
 assetTypeID=&amp;amp;quot;SjSYAUzN1RLjGre0kqDJynFos1MRYzrxOOenHY0Lpjd&amp;amp;quot;&lt;br /&gt;
 agentName=&amp;amp;quot;agent_bob&amp;amp;quot;&lt;br /&gt;
 closingTransNo=&amp;amp;quot;65&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;mySignedCopy&amp;amp;gt;&lt;br /&gt;
eJytWNmuo0i2fecrjvLpSqiLyQwudbYEZjY2MwZeUkwGbObR8DP3Vy8+PjlU3uxq&lt;br /&gt;
Vav8YtgRe7OHFRErNvC///OP54/hBOn8ZkrCmWPfzBNtWAf1bBn0wXofBsSgz35/&lt;br /&gt;
M+mTBwD/7MugGw51NXRBNABvU9L1eV19/oT8Bn8C3vqk2yQS+/nTUIqT4j9CBMsu&lt;br /&gt;
hLqISC0erfIYk1frZPT2dW01jjgeZvNWbHqbrXwKhrqz+5f6jzI6ioYPWRH0g5lU&lt;br /&gt;
cfLjxO/Cn2YaSZQ3eVINP03+Jv9h/hZP1T8/WVfnsfz86RlN1CXBU8AGQ7JFiKEY&lt;br /&gt;
RaAoQWxDU1DkMd/V5Xc5Sn2VW/VLv0oeg9bVUdL3LxPwp7d/PXMYdXkzBGGRfE3k&lt;br /&gt;
U9psiV3eqqDcJr4/f9lsRclmp56rpLOWZhuolvKr4Om4hejY7F/SxLLrwJ6qfYkU&lt;br /&gt;
q3TEhwqfJatYH2snnCWqHQLnqdYkVV6l1jPU8+YjRj5LlqdVEh/qZtlcnfI4ibfi&lt;br /&gt;
dePzu8E4ZHWXr5sOnW7p+vwpeP5986say3d5vyXh4zWK6vFdgL5CfVf4COqPynGd&lt;br /&gt;
9O/aRtJ0Sb89iHnZJ8X12+fz1zhdSVWcb56NQfFtbMvDX4+/q4vko9xpV4/N+d2t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p;amp;quot;&lt;br /&gt;
 numVariables=&amp;amp;quot;1&amp;amp;quot;&lt;br /&gt;
 numClauses=&amp;amp;quot;1&amp;amp;quot;&lt;br /&gt;
 numHooks=&amp;amp;quot;1&amp;amp;quot;&lt;br /&gt;
 numCallbacks=&amp;amp;quot;0&amp;amp;quot;&lt;br /&gt;
 language=&amp;amp;quot;chai&amp;amp;quot; &amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;variable name=&amp;amp;quot;bSuccess&amp;amp;quot;&lt;br /&gt;
 value=&amp;amp;quot;false&amp;amp;quot;&lt;br /&gt;
 type=&amp;amp;quot;bool&amp;amp;quot;&lt;br /&gt;
 access=&amp;amp;quot;persistent&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;clause name=&amp;amp;quot;activate_clause&amp;amp;quot;&amp;amp;gt;&lt;br /&gt;
eJx9kj1uwzAMhacuOgXjyQaC/BRdO6QH6JLuhizLCAHFDkQ6RdDkwL1FKclGXAeI&lt;br /&gt;
oIV61PceBanfl7P2oB0aW570hSCsd8i2b5tMBanqqruQpI1ISdvzzmE4JNZ0KJu+&lt;br /&gt;
rSlPsAY9camN4SVkqYhN2RImdsXI+eiqOSc4kzVdWw8YyIZyBI3ZCqWwgXwx5Lle&lt;br /&gt;
YZGQhfpREjqISStCGc8AovNmK659+zT///jT8EK5TQyi49zg9cFgPthsrPtUEX9T&lt;br /&gt;
1pFNg0Ti9jFyuPLkwWeRE+UxV2p7kmz64MJZr+HrgASydYCirpwFbIEPFuioPYPc&lt;br /&gt;
Zq8NryD/7Bhqa5z2tpYmwtoOEA4QMh5PEv1iWX4BOgeSwBJhYDa+O8I3SmMLyKtk&lt;br /&gt;
H1e172ObDMO+F+JNtNqKJZ4123IMkBfqDzdv81s=&lt;br /&gt;
&amp;amp;lt;/clause&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;hook name=&amp;amp;quot;cron_activate&amp;amp;quot;&lt;br /&gt;
 clause=&amp;amp;quot;activate_clause&amp;amp;quot; /&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/bylaw&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/scriptableContract&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;accountList type=&amp;amp;quot;stash&amp;amp;quot; count=&amp;amp;quot;0&amp;amp;quot; &amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/accountList&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;amp;lt;/smartContract&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
-----BEGIN SMARTCONTRACT SIGNATURE-----&lt;br /&gt;
Version: Open Transactions 0.75&lt;br /&gt;
Comment: http://github.com/FellowTraveler/Open-Transactions/wiki&lt;br /&gt;
&lt;br /&gt;
CoABiNsgHCRFOVBFgU80CqPUnMYpb+IMLmBWMroLSVEkHBuUojcIcAGXMBqKxy96&lt;br /&gt;
tjBD0GLb9TINu9ehVKGyyqcNKcxb5QlQQbKpkFiEELAB2mhtJsTQlsPZaa6e+KWg&lt;br /&gt;
0OhmgwbNVHohbKUwyJAgrPN8FHlguw2uW+dJ/3gX5huctLA=&lt;br /&gt;
-----END SMARTCONTRACT SIGNATURE-----&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Many have asked about my choice of script interpreter. FYI, I'm currently using [http://www.chaiscript.com/ ChaiScript], which was chosen for being cross-platform, clean, easy-to-use, and integrates well with C++.&lt;br /&gt;
&lt;br /&gt;
However, the design of OT is very modular, such that it is very easy to replace the script language. OT is coded to the abstract interface OTScript, and the actual Chai integration is done in a subclass called OTScriptChai. All you have to do, to replace the script language, is just make your own subclass of OTScript. To do that, copy the OTScriptChai class, and make your own version such as OTScriptLua or OTAngelScript or OTScriptE, or whatever floats your boat.&lt;br /&gt;
&lt;br /&gt;
In fact, each Bylaw stores the name of its script language, so you could technically have 3 or 4 completely different script interpreters running against the same smart contract! (I do NOT recommend this.)&lt;br /&gt;
&lt;br /&gt;
Bottom line: the point of OT is to be able to easily swap in/out different storage, different network transport, and yes, a different script interpreter. This way OT can best adjust to everyone's needs, and focus more purely on its financial crypto aspects, abstracting all else away for others to worry about. The best choice for a reference implementation such as OT is something simple, clean and cross-platform (like chaiscript.)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Here are those links again: [http://szabo.best.vwh.net/contractlanguage.html Nick Szabo's smart contracts] Also: [http://www.erights.org/smart-contracts/index.html E-Rights] Also: [http://www.erights.org/elib/capability/ode/ode-capabilities.html#simple-money Money example in E language]&lt;/div&gt;</summary>
		<author><name>Cryptoman</name></author>
		
	</entry>
</feed>