Created
July 20, 2018 06:55
-
-
Save tempofeng/264a147882f72c9523521268ddc3b536 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
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