Skip to content

Commit

Permalink
Merge pull request #73 from oxkhn/feat/features
Browse files Browse the repository at this point in the history
remove seller
  • Loading branch information
0xandee authored Jun 28, 2024
2 parents 98e6e5b + 13cd045 commit 86ab465
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/marketplace/marketplace.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,6 @@ mod MarketPlace {
assert!(!caller.is_zero(), "MarketPlace: invalid caller address {:?}", caller);
assert!(maker_ask.is_order_ask, "MarketPlace: maker ask is not an ask order");
assert!(!taker_bid.is_order_ask, "MarketPlace: taker bid is an ask order");
assert!(maker_ask.signer == maker_ask.seller, "MarketPlace: Invalid maker order");

self.validate_order(@maker_ask, maker_ask_signature, taker_bid.amount);

Expand Down Expand Up @@ -469,7 +468,6 @@ mod MarketPlace {
caller,
taker_ask.taker
);
assert!(caller == maker_bid.seller, "MaketPlace: caller is not the seller");

self.validate_order(@maker_bid, maker_bid_signature, taker_ask.amount);

Expand Down
5 changes: 2 additions & 3 deletions src/marketplace/signature_checker2.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const HASH_MESSAGE_SELECTOR: felt252 =

const STARKNET_MAKER_ORDER_TYPE_HASH: felt252 =
selector!(
"MakerOrder(is_order_ask:u8,signer:felt,collection:felt,price:u128,seller:felt,token_id:u256,amount:u128,strategy:felt,currency:felt,salt_nonce:u128,start_time:u64,end_time:u64,min_percentage_to_ask:u128,params:felt)u256(low:felt,high:felt)"
"MakerOrder(is_order_ask:u8,signer:felt,collection:felt,price:u128,token_id:u256,amount:u128,strategy:felt,currency:felt,salt_nonce:u128,start_time:u64,end_time:u64,min_percentage_to_ask:u128,params:felt)u256(low:felt,high:felt)"
);

const U256_TYPE_HASH: felt252 = selector!("u256(low:felt,high:felt)");
Expand Down Expand Up @@ -144,7 +144,6 @@ mod SignatureChecker2 {
state = state.update_with(contract_address_to_felt252(*self.signer));
state = state.update_with(contract_address_to_felt252(*self.collection));
state = state.update_with(*self.price);
state = state.update_with(contract_address_to_felt252(*self.seller));
state = state.update_with(self.token_id.hash_struct());
state = state.update_with(*self.amount);
state = state.update_with(contract_address_to_felt252(*self.strategy));
Expand All @@ -154,7 +153,7 @@ mod SignatureChecker2 {
state = state.update_with(*self.end_time);
state = state.update_with(*self.min_percentage_to_ask);
state = state.update_with(*self.params);
state = state.update_with(15);
state = state.update_with(14);
state.finalize()
}
}
Expand Down
1 change: 0 additions & 1 deletion src/marketplace/utils/order_types.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ struct MakerOrder {
signer: ContractAddress, // signer of the maker order
collection: ContractAddress, // collection address
price: u128,
seller: ContractAddress,
token_id: u256,
amount: u128, // amount of tokens to sell/purchase (must be 1 for ERC721, 1+ for ERC1155)
strategy: ContractAddress, // strategy address for trade execution (e.g. StandardSaleForFixedPrice)
Expand Down

0 comments on commit 86ab465

Please sign in to comment.