This file contains hidden or 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
const predef = require("./tools/predef"); | |
const { min, max, du, px, op } = require('./tools/graphics') | |
class PriceAxisDelta { | |
init() { | |
this.byPrice = {} | |
this.openDate = new Date() | |
if(this.props.startsYesterday) this.openDate.setTime(Date.now() - 1000*60*60*24) | |
this.openDate.setHours(this.props.marketOpenHours, this.props.marketOpenMinutes) |
This file contains hidden or 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
const { Strategy, TdEvent } = require('../strategies/strategy') | |
class YourCustomStrategy extends Strategy { | |
constructor(params) { | |
super(params) | |
} | |
init(props) { | |
return { | |
//your initial state here! |
This file contains hidden or 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
{-# LANGUAGE OverloadedStrings #-} | |
module Example where | |
import Language.Marlowe.Extended | |
main :: IO () | |
main = print . pretty $ contract | |
{- Define a contract, Close is the simplest contract which just ends the contract straight away |
This file contains hidden or 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
//SPDX-License-Identifier: MIT | |
pragma solidity >=0.6.2; | |
/** | |
* @dev Utility library of inline functions on addresses. | |
* @notice Based on: | |
* https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol | |
* Requires EIP-1052. | |
*/ |
This file contains hidden or 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
function BTNode(op, L, R) { | |
this.op = op | |
this.left = L | |
this.right = R | |
} | |
function BinaryTree(head) { | |
this.head = head | |
} |