Skip to content

Instantly share code, notes, and snippets.

@tempofeng
Created July 20, 2018 06:55
Show Gist options
  • Save tempofeng/264a147882f72c9523521268ddc3b536 to your computer and use it in GitHub Desktop.
Save tempofeng/264a147882f72c9523521268ddc3b536 to your computer and use it in GitHub Desktop.
contract Joyso is Ownable, JoysoDataDecoder {
/**
* @notice match token orders with admins involved, only admin
* @param inputs Array of input orders, each order have 6 elements. Inputs must contain at least 2 orders.
* @dev inputs encoding please reference github wiki
*/
function matchTokenOrderByAdmin_k44j(uint256[] inputs) external onlyAdmin {
...
bytes32 orderHash = keccak256(
this,
inputs[0],
inputs[1],
inputs[2],
data & MATCH_SIGN_MASK | (isBuy ? ORDER_ISBUY : 0) | uint256(token)
);
require(
verify(
orderHash,
user,
uint8(data & V_MASK == 0 ? 27 : 28),
bytes32(inputs[4]),
bytes32(inputs[5])
)
);
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment