Market Maker Pool
Direct swap with Market Maker
Contract info
Example of Swapping
EIP 712 Signature
const domain = {
name: "PCS MM Pool",
version: "1",
chainId: // 1 or 56,
verifyingContract: // please refer to the address above,
};
const quoteType = {
Quote: [
{ name: "nonce", type: "uint256" },
{ name: "user", type: "address" },
{ name: "baseToken", type: "address" },
{ name: "quoteToken", type: "address" },
{ name: "baseTokenAmount", type: "uint256" },
{ name: "quoteTokenAmount", type: "uint256" },
{ name: "expiryTimestamp", type: "uint256" },
],
};
const quoteValue = {
nonce,
user,
baseToken,
quoteToken,
baseTokenAmount,
quoteTokenAmount,
expiryTimestamp,
};
// EIP 712 Signature
const signature = await mm._signTypedData(domain, quoteType, quoteValue);Name
Type
Description
swap
Name
Type
Description
Last updated
Was this helpful?