BalancerVaultMock
Inherits: Ownable, IBalancerVault
Author: StakeWise
Defines the mock for the Balancer Vault contract
State Variables
_wad
uint256 private constant _wad = 1e18;
_outputToken
address private immutable _outputToken;
xdaiGnoRate
uint256 public xdaiGnoRate;
Functions
constructor
constructor(address outputToken, uint256 _xdaiGnoRate, address _initialOwner) Ownable(_initialOwner);
swap
function swap(SingleSwap calldata singleSwap, FundManagement calldata funds, uint256 limit, uint256 deadline)
external
payable
returns (uint256 amountOut);
setXdaiGnoRate
function setXdaiGnoRate(uint256 newRate) external onlyOwner;
drain
function drain() external onlyOwner;
Errors
SwapExpired
error SwapExpired();
InvalidSingleSwap
error InvalidSingleSwap();
InvalidFundManagement
error InvalidFundManagement();
LimitExceeded
error LimitExceeded();