Merge pull request #774 from 0xProject/style/contracts/abiEncodeAsmComments
Added some comments for ASM hashing
This commit is contained in:
@@ -60,6 +60,13 @@ contract MixinTransactions is
|
||||
{
|
||||
bytes32 schemaHash = EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH;
|
||||
bytes32 dataHash = keccak256(data);
|
||||
// Assembly for more efficiently computing:
|
||||
// keccak256(abi.encode(
|
||||
// EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH,
|
||||
// salt,
|
||||
// signerAddress,
|
||||
// keccak256(data)
|
||||
// ));
|
||||
assembly {
|
||||
let memPtr := mload(64)
|
||||
mstore(memPtr, schemaHash)
|
||||
|
@@ -98,6 +98,21 @@ contract LibOrder is
|
||||
bytes32 schemaHash = EIP712_ORDER_SCHEMA_HASH;
|
||||
bytes32 makerAssetDataHash = keccak256(order.makerAssetData);
|
||||
bytes32 takerAssetDataHash = keccak256(order.takerAssetData);
|
||||
// Assembly for more efficiently computing:
|
||||
// keccak256(abi.encode(
|
||||
// order.makerAddress,
|
||||
// order.takerAddress,
|
||||
// order.feeRecipientAddress,
|
||||
// order.senderAddress,
|
||||
// order.makerAssetAmount,
|
||||
// order.takerAssetAmount,
|
||||
// order.makerFee,
|
||||
// order.takerFee,
|
||||
// order.expirationTimeSeconds,
|
||||
// order.salt,
|
||||
// keccak256(order.makerAssetData),
|
||||
// keccak256(order.takerAssetData)
|
||||
// ));
|
||||
assembly {
|
||||
// Backup
|
||||
let temp1 := mload(sub(order, 32))
|
||||
|
Reference in New Issue
Block a user