šŸŽ‰ Welcome to PartyFinance documentation!
Protocol
Contracts
facets
LimitOrdersFacet

OneInchCallFailed

error OneInchCallFailed()

"Call to method failed"

Invalid1nchSource

error Invalid1nchSource()

"Invalid 1nch source"

InvalidLimitOrderFill

error InvalidLimitOrderFill()

"Invalid 1nch limit order filled maker"

LIMIT_ORDER_PROTOCOL_1NCH

address LIMIT_ORDER_PROTOCOL_1NCH

LimitOrdersFacet

Facet that interacts with 1nch Protocol to handle LimitOrders 1nch LimitOrder introduction (opens in a new tab)

LimitOrderFilled

event LimitOrderFilled(address taker, address makerAsset, address takerAsset, uint256 makingAmount, uint256 takingAmount)

Emitted when 1nch LimitOrderProtocol calls Party when a limit order is filled

Parameters

NameTypeDescription
takeraddressTaker address that filled the order
makerAssetaddressMaker asset address
takerAssetaddressTaker asset address
makingAmountuint256Making asset amount
takingAmountuint256Taking asset amount

LimitOrder

struct LimitOrder {
  uint256 salt;
  address makerAsset;
  address takerAsset;
  address maker;
  address receiver;
  address allowedSender;
  uint256 makingAmount;
  uint256 takingAmount;
  bytes makerAssetData;
  bytes takerAssetData;
  bytes getMakerAmount;
  bytes getTakerAmount;
  bytes predicate;
  bytes permit;
  bytes interaction;
}

approveLimitOrder

function approveLimitOrder(address sellToken, uint256 sellAmount) external

Approves 1nch LimitOrderProtocol to consume party assets

Parameters

NameTypeDescription
sellTokenaddressERC-20 sell token address
sellAmountuint256ERC-20 sell token amount

cancelLimitOrder

function cancelLimitOrder(struct LimitOrdersFacet.LimitOrder order) external

Cancels a limit order on 1nch

Parameters

NameTypeDescription
orderstruct LimitOrdersFacet.LimitOrderLimit Order

notifyFillOrder

function notifyFillOrder(address taker, address makerAsset, address takerAsset, uint256 makingAmount, uint256 takingAmount, bytes interactiveData) external

Interaction receiver function for 1nch LimitOrderProtocol when a party's limit order is filled

Parameters

NameTypeDescription
takeraddressTaker address that filled the order
makerAssetaddressMaker asset address
takerAssetaddressTaker asset address
makingAmountuint256Making asset amount
takingAmountuint256Taking asset amount
interactiveDatabytesInteractive call data

isValidSignature

function isValidSignature(bytes32 _hash, bytes _signature) external view returns (bytes4)

Standard Signature Validation Method for Contracts EIP-1271.

Verifies that the signer is a Party Manager of the signing contract.