Skip to content

Commit

Permalink
fix: updated LibOrder in asset
Browse files Browse the repository at this point in the history
  • Loading branch information
capedcrusader21 committed Aug 28, 2024
1 parent 1c77688 commit aee0eae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/asset/contracts/libraries/LibOrder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {LibMath} from "./LibMath.sol";
library LibOrder {
bytes32 internal constant ORDER_TYPEHASH =
keccak256(
"Order(address maker,Asset makeAsset,address taker,Asset takeAsset,uint256 salt,uint256 start,uint256 end)Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)"
"Order(address maker,Asset makeAsset,address taker,Asset takeAsset,address makeRecipient,uint256 salt,uint256 start,uint256 end)Asset(AssetType assetType,uint256 value)AssetType(uint256 assetClass,bytes data)"
);

/// @dev Represents the structure of an order.
Expand All @@ -20,6 +20,7 @@ library LibOrder {
LibAsset.Asset makeAsset; // Asset the maker is providing.
address taker; // Address of the taker.
LibAsset.Asset takeAsset; // Asset the taker is providing.
address makeRecipient; // recipient address for maker.
uint256 salt; // Random number to ensure unique order hash.
uint256 start; // Timestamp when the order becomes valid.
uint256 end; // Timestamp when the order expires.
Expand All @@ -39,6 +40,7 @@ library LibOrder {
keccak256(
abi.encode(
order.maker,
order.makeRecipient,
LibAsset.hash(order.makeAsset.assetType),
LibAsset.hash(order.takeAsset.assetType),
order.salt
Expand All @@ -59,6 +61,7 @@ library LibOrder {
LibAsset.hash(order.makeAsset),
order.taker,
LibAsset.hash(order.takeAsset),
order.makeRecipient,
order.salt,
order.start,
order.end
Expand Down

0 comments on commit aee0eae

Please sign in to comment.