Skip to content

Conversation

@zajck
Copy link
Member

@zajck zajck commented Oct 27, 2023

Closes #815

Currently, when a buyer is committing to an offer via metaTransaction, the only displayed value is offerId.

With this PR, the message to sigh is changed to contain other offer parameters:

  • exchange token
  • price
  • seller deposit
  • buyer cancellation penalty
  • the start of the redemption period (in the format yyyy/mm/dd hh:mm:ss)
  • dispute period duration (in days)
  • resolution period duration (in days)

Note: changes apply only to metatransaction. Committing to the offer directly still requires only the offerId.

Comment on lines +129 to +132
(address buyer, uint256 offerId, uint256 tokenId) = abi.decode(_offerDetails, (address, uint256, uint256));
return keccak256(abi.encode(CONDITIONAL_OFFER_DETAILS_TYPEHASH, buyer, offerId, tokenId));
return keccak256(abi.encode(CONDITIONAL_OFFER_DETAILS_TYPEHASH, buyer, hashOfferParameters(offerId), tokenId));
}

Check warning

Code scanning / Slither

Dead-code

MetaTransactionsHandlerFacet.hashConditionalOfferDetails(bytes) (contracts/protocol/facets/MetaTransactionsHandlerFacet.sol#129-132) is never used and should be removed
@coveralls
Copy link

Coverage Status

coverage: 99.56% (+0.001%) from 99.559% when pulling fa2c48d on meta-tx-enhance-commit-to-offer-nicer into 9cc931b on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protocol - MetaTx Changes to Legibility

3 participants