This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new HelloWorld in { | |
contract HelloWorld(return) = { | |
return!("Hello, World!") | |
} | | |
new myChannel in { | |
HelloWorld!(*myChannel) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new HelloAgain in { | |
contract HelloAgain(_) = { | |
new chan in { | |
chan!("Hello again, world!") | | |
for (@text <- chan) { Nil } | |
} | |
} | HelloAgain!(Nil) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Token( message_sender, total_supply ) { | |
def transfer( message_sender, to, amount, rtn ) = { | |
for( balances <- balances_channel ) { | |
x!( *balances.get(message_sender) ) | |
| y!( *balances.get(to) ) | |
| for( balance_of_sender <- x ; balances_of_receiver <- y ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initializeBounty(address _controller, string _data) | |
fulfillBounty(address[] _fulfillers, uint[] _numerators, uint _denomenator, string _data) | |
acceptFulfillment(uint _fulfillmentId, StandardToken[] _payoutTokens, uint[] _tokenAmounts) | |
drainBounty(StandardToken[] _payoutTokens) | |
changeBounty(address _controller, string _data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import ReactDOM from "react-dom"; | |
import "./styles.css"; | |
class IndecisionApp extends React.Component { | |
constructor(props) { | |
super(props); | |
this.handleDeleteOptions = this.handleDeleteOptions.bind(this); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "carCollection", | |
"policy": "OR ('Org1MSP.member','Org2MSP.member')", | |
"requiredPeerCount": 0, | |
"maxPeerCount": 3, | |
"blockToLive":1000000 | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async createCar(stubHelper: StubHelper, args: string[]) { | |
const verifiedArgs = await Helpers.checkArgs<any>(args[0], Yup.object() | |
.shape({ | |
key: Yup.string().required(), | |
make: Yup.string().required(), | |
model: Yup.string().required(), | |
color: Yup.string().required(), | |
owner: Yup.string().required(), | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await stubHelper.putState(verifiedArgs.key, car, {privateCollection: 'carCollection'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async queryPrivateCar(stubHelper: StubHelper, args: string[]) { | |
const verifiedArgs = await Helpers.checkArgs<any>(args[0], Yup.object() | |
.shape({ | |
key: Yup.string().required(), | |
})); | |
const car = await stubHelper.getStateAsObject(verifiedArgs.key, {privateCollection: 'carCollection'}); | |
if (!car) { | |
throw new NotFoundError('Car does not exist'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am michielmulders on github. | |
* I am michielmulders (https://keybase.io/michielmulders) on keybase. | |
* I have a public key ASB9UR_k4yrvwvtGSf6dTRRvrRkO2yL1dXCUHUnM-VJkego | |
To claim this, I am signing this object: |