feat(adapters): Add new bytes parameter to swap

that allows arbitrary data to be passed
This commit is contained in:
PierreMkt
2024-08-02 11:55:00 -04:00
parent 75e8bdf96f
commit 034d5ac8c2
13 changed files with 85 additions and 34 deletions

View File

@@ -56,7 +56,8 @@ contract AngleAdapter is ISwapAdapter {
address sellToken,
address buyToken,
OrderSide side,
uint256 specifiedAmount
uint256 specifiedAmount,
bytes32
) external returns (Trade memory trade) {
if (specifiedAmount == 0) {
return trade;
@@ -223,7 +224,7 @@ contract AngleAdapter is ISwapAdapter {
interface IAgToken is IERC20 {
/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
MINTER ROLE ONLY FUNCTIONS
MINTER ROLE ONLY FUNCTIONS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/// @notice Lets a whitelisted contract mint agTokens
@@ -254,7 +255,7 @@ interface IAgToken is IERC20 {
function burnSelf(uint256 amount, address burner) external;
/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TREASURY ONLY FUNCTIONS
TREASURY ONLY FUNCTIONS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/// @notice Adds a minter in the contract
@@ -274,7 +275,7 @@ interface IAgToken is IERC20 {
function setTreasury(address _treasury) external;
/*//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
EXTERNAL FUNCTIONS
EXTERNAL FUNCTIONS
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/
/// @notice Checks whether an address has the right to mint agTokens