Created
March 30, 2018 11:30
-
-
Save ukstv/609a2594ca1fb86a3a57c419944e482a to your computer and use it in GitHub Desktop.
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
pragma solidity ^0.4.19; | |
import "./LibLineup.sol"; | |
import "./Multisig.sol"; | |
// Optimisation Idea: Use shared Lineup. | |
contract Lineup { | |
LibLineup.State public state; | |
event Trace(bytes32 a); | |
function Lineup(bytes32 _merkleRoot, uint256 _updatePeriod, address _multisig) public { | |
state.merkleRoot = _merkleRoot; | |
state.updatePeriod = _updatePeriod; | |
state.lastUpdate = block.number; | |
state.multisig = Multisig(_multisig); | |
} | |
function update(uint256 _nonce, bytes32 _merkleRoot, bytes _senderSig, bytes _receiverSig) external { | |
LibLineup.update(state, _nonce, _merkleRoot, _senderSig, _receiverSig); | |
} | |
function isContained(bytes proof, bytes32 hashlock) public view returns (bool) { | |
return LibLineup.isContained(state, proof, hashlock); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment