-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDataTypes.sol
More file actions
33 lines (32 loc) · 1.07 KB
/
DataTypes.sol
File metadata and controls
33 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
/**
* @title Library for custom structs for OptyFiZapper
* @author OptyFi
*/
library DataTypes {
/**
* @param vault address of the vault
* @param toAmount amount of toToken to receive
* @param callees array of addresses to call (DEX and token addresses)
* @param exchangeData calldata to execute on callees
* @param startIndexes the index of the beginning of each call in exchangeData
* @param values array of encoded values for each call in exchangeData
* @param permit ERC2612 permit
* @param deadline timestamp until which swap may be fulfilled
* @param accountsProof merkle proof for caller
* @param codesProof merkle proof for code hash if caller is smart contract
*/
struct ZapData {
address vault;
uint256 toAmount;
uint256 deadline;
bytes exchangeData;
bytes permit;
address[] callees;
uint256[] startIndexes;
uint256[] values;
bytes32[] accountsProof;
bytes32[] codesProof;
}
}