Peer to peer swap middleman for ERC20, ERC721 and ERC1155 assets
Usage and implementation is at users own risk, no tests have been done or security has been audited
- All assets much have their respective allowances made for the P2PTrade contact to transfer them
- walletB must have provided a signature of the trade
fromA
: Assetsmsg.sender
will send towalletB
fromB
: AssetswalletB
will send tomsg.sender
deadline
: UNIX timestamp that the trade must be executed before (seconds)walletB
: Party trading with themsg.sender
aNonce
: Trade nonce ofmsg.sender
, must be the next integer after the last used nonce for addressbNonce
: Trade nonce ofwalletB
, must be the next integer after the last used nonce for addressv
,r
,s
: Signature of the hashed swap parameters signed bywalletB
P2PTrade.swap(Items[] calldata fromA, Items[] calldata fromB, uint256 deadline, address walletB, uint256 aNonce, uint256 bNonce, uint8 v, bytes32 r, bytes32 s)