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
Name | Type | Description |
---|---|---|
taker | address | Taker address that filled the order |
makerAsset | address | Maker asset address |
takerAsset | address | Taker asset address |
makingAmount | uint256 | Making asset amount |
takingAmount | uint256 | Taking 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
Name | Type | Description |
---|---|---|
sellToken | address | ERC-20 sell token address |
sellAmount | uint256 | ERC-20 sell token amount |
cancelLimitOrder
function cancelLimitOrder(struct LimitOrdersFacet.LimitOrder order) external
Cancels a limit order on 1nch
Parameters
Name | Type | Description |
---|---|---|
order | struct LimitOrdersFacet.LimitOrder | Limit 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
Name | Type | Description |
---|---|---|
taker | address | Taker address that filled the order |
makerAsset | address | Maker asset address |
takerAsset | address | Taker asset address |
makingAmount | uint256 | Making asset amount |
takingAmount | uint256 | Taking asset amount |
interactiveData | bytes | Interactive 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.