Skip to content

Instantly share code, notes, and snippets.

@ukstv
Created March 30, 2018 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ukstv/609a2594ca1fb86a3a57c419944e482a to your computer and use it in GitHub Desktop.
Save ukstv/609a2594ca1fb86a3a57c419944e482a to your computer and use it in GitHub Desktop.
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