跳到主要内容

IJBGenericBuybackDelegate

Git Source

Inherits: IJBPayDelegate3_1_1, IJBFundingCycleDataSource3_1_1, IUniswapV3SwapCallback

Functions

SLIPPAGE_DENOMINATOR

function SLIPPAGE_DENOMINATOR() external view returns (uint256);

MIN_TWAP_DELTA

function MIN_TWAP_DELTA() external view returns (uint256);

MAX_TWAP_DELTA

function MAX_TWAP_DELTA() external view returns (uint256);

MIN_SECONDS_AGO

function MIN_SECONDS_AGO() external view returns (uint256);

MAX_SECONDS_AGO

function MAX_SECONDS_AGO() external view returns (uint256);

UNISWAP_V3_FACTORY

function UNISWAP_V3_FACTORY() external view returns (address);

DIRECTORY

function DIRECTORY() external view returns (IJBDirectory);

CONTROLLER

function CONTROLLER() external view returns (IJBController3_1);

PROJECTS

function PROJECTS() external view returns (IJBProjects);

WETH

function WETH() external view returns (IWETH9);

delegateId

function delegateId() external view returns (bytes4);

poolOf

function poolOf(uint256 _projectId, address _terminalToken) external view returns (IUniswapV3Pool _pool);

secondsAgoOf

function secondsAgoOf(uint256 _projectId) external view returns (uint32 _seconds);

twapDeltaOf

function twapDeltaOf(uint256 _projectId) external view returns (uint256 _delta);

projectTokenOf

function projectTokenOf(uint256 _projectId) external view returns (address projectTokenOf);

sweepBalanceOf

function sweepBalanceOf(address _beneficiary, address _token) external view returns (uint256 _balance);

totalSweepBalance

function totalSweepBalance(address _token) external view returns (uint256 _contractBalance);

setPoolFor

function setPoolFor(uint256 _projectId, uint24 _fee, uint32 _secondsAgo, uint256 _twapDelta, address _terminalToken)
external
returns (IUniswapV3Pool _newPool);

changeSecondsAgo

function changeSecondsAgo(uint256 _projectId, uint32 _newSecondsAgo) external;

setTwapDelta

function setTwapDelta(uint256 _projectId, uint256 _newDelta) external;

sweep

function sweep(address _beneficiary, address _token) external;

Events

BuybackDelegate_Swap

event BuybackDelegate_Swap(uint256 indexed projectId, uint256 amountEth, uint256 amountOut);

BuybackDelegate_Mint

event BuybackDelegate_Mint(uint256 indexed projectId);

BuybackDelegate_SecondsAgoChanged

event BuybackDelegate_SecondsAgoChanged(uint256 indexed projectId, uint256 oldSecondsAgo, uint256 newSecondsAgo);

BuybackDelegate_TwapDeltaChanged

event BuybackDelegate_TwapDeltaChanged(uint256 indexed projectId, uint256 oldTwapDelta, uint256 newTwapDelta);

BuybackDelegate_PendingSweep

event BuybackDelegate_PendingSweep(address indexed beneficiary, address indexed token, uint256 amount);

BuybackDelegate_PoolAdded

event BuybackDelegate_PoolAdded(uint256 indexed projectId, address indexed terminalToken, address newPool);

Errors

JuiceBuyback_MaximumSlippage

error JuiceBuyback_MaximumSlippage();

JuiceBuyback_NewSecondsAgoTooLow

error JuiceBuyback_NewSecondsAgoTooLow();

JuiceBuyback_NoProjectToken

error JuiceBuyback_NoProjectToken();

JuiceBuyback_PoolAlreadySet

error JuiceBuyback_PoolAlreadySet();

JuiceBuyback_TransferFailed

error JuiceBuyback_TransferFailed();

JuiceBuyback_InvalidTwapDelta

error JuiceBuyback_InvalidTwapDelta();

JuiceBuyback_InvalidTwapPeriod

error JuiceBuyback_InvalidTwapPeriod();

JuiceBuyback_Unauthorized

error JuiceBuyback_Unauthorized();