Expand description
Module containing a contract’s types and functions.
interface IVault {
function getAuthorizer() external view returns (address);
function setAuthorizer(address newAuthorizer) external;
event AuthorizerChanged(address indexed newAuthorizer);
function hasApprovedRelayer(address user, address relayer) external view returns (bool);
function setRelayerApproval(address sender, address relayer, bool approved) external;
event RelayerApprovalChanged(address indexed relayer, address indexed sender, bool approved);
function getInternalBalance(address user, address[] memory tokens) external view returns (uint256[] memory);
function manageUserBalance(UserBalanceOp[] memory ops) external payable;
struct UserBalanceOp { UserBalanceOpKind kind; address asset; uint256 amount; address sender; address recipient; }
enum UserBalanceOpKind { DEPOSIT_INTERNAL, WITHDRAW_INTERNAL, TRANSFER_INTERNAL, TRANSFER_EXTERNAL }
event InternalBalanceChanged(address indexed user, address indexed token, int256 delta);
event ExternalBalanceTransfer(address indexed token, address indexed sender, address recipient, uint256 amount);
enum PoolSpecialization { GENERAL, MINIMAL_SWAP_INFO, TWO_TOKEN }
function registerPool(PoolSpecialization specialization) external returns (bytes32);
event PoolRegistered(bytes32 indexed poolId, address indexed poolAddress, PoolSpecialization specialization);
function getPool(bytes32 poolId) external view returns (address, PoolSpecialization);
function registerTokens(bytes32 poolId, address[] memory tokens, address[] memory assetManagers) external;
event TokensRegistered(bytes32 indexed poolId, address[] tokens, address[] assetManagers);
function deregisterTokens(bytes32 poolId, address[] memory tokens) external;
event TokensDeregistered(bytes32 indexed poolId, address[] tokens);
function getPoolTokenInfo(bytes32 poolId, address token) external view returns (uint256 cash, uint256 managed, uint256 lastChangeBlock, address assetManager);
function getPoolTokens(bytes32 poolId) external view returns (address[] memory tokens, uint256[] memory balances, uint256 lastChangeBlock);
function joinPool(bytes32 poolId, address sender, address recipient, JoinPoolRequest memory request) external payable;
struct JoinPoolRequest { address[] assets; uint256[] maxAmountsIn; bytes userData; bool fromInternalBalance; }
function exitPool(bytes32 poolId, address sender, address recipient, ExitPoolRequest memory request) external;
struct ExitPoolRequest { address[] assets; uint256[] minAmountsOut; bytes userData; bool toInternalBalance; }
event PoolBalanceChanged(bytes32 indexed poolId, address indexed liquidityProvider, address[] tokens, int256[] deltas, uint256[] protocolFeeAmounts);
enum PoolBalanceChangeKind { JOIN, EXIT }
enum SwapKind { GIVEN_IN, GIVEN_OUT }
function swap(SingleSwap memory singleSwap, FundManagement memory funds, uint256 limit, uint256 deadline) external payable returns (uint256);
struct SingleSwap { bytes32 poolId; SwapKind kind; address assetIn; address assetOut; uint256 amount; bytes userData; }
function batchSwap(SwapKind kind, BatchSwapStep[] memory swaps, address[] memory assets, FundManagement memory funds, int256[] memory limits, uint256 deadline) external payable returns (int256[] memory);
struct BatchSwapStep { bytes32 poolId; uint256 assetInIndex; uint256 assetOutIndex; uint256 amount; bytes userData; }
event Swap(bytes32 indexed poolId, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut);
struct FundManagement { address sender; bool fromInternalBalance; address recipient; bool toInternalBalance; }
function queryBatchSwap(SwapKind kind, BatchSwapStep[] memory swaps, address[] memory assets, FundManagement memory funds) external returns (int256[] memory assetDeltas);
function flashLoan(address recipient, address[] memory tokens, uint256[] memory amounts, bytes memory userData) external;
event FlashLoan(address indexed recipient, address indexed token, uint256 amount, uint256 feeAmount);
function managePoolBalance(PoolBalanceOp[] memory ops) external;
struct PoolBalanceOp { PoolBalanceOpKind kind; bytes32 poolId; address token; uint256 amount; }
enum PoolBalanceOpKind { WITHDRAW, DEPOSIT, UPDATE }
event PoolBalanceManaged(bytes32 indexed poolId, address indexed assetManager, address indexed token, int256 cashDelta, int256 managedDelta);
function getProtocolFeesCollector() external view returns (address);
function setPaused(bool paused) external;
function WETH() external view returns (address);
}
Structs§
- Event with signature
AuthorizerChanged(address)
and selector0x94b979b6831a51293e2641426f97747feed46f17779fed9cd18d1ecefcfe92ef
. - Event with signature
ExternalBalanceTransfer(address,address,address,uint256)
and selector0x540a1a3f28340caec336c81d8d7b3df139ee5cdc1839a4f283d7ebb7eaae2d5c
. - Event with signature
FlashLoan(address,address,uint256,uint256)
and selector0x0d7d75e01ab95780d3cd1c8ec0dd6c2ce19e3a20427eec8bf53283b6fb8e95f0
. - Event with signature
InternalBalanceChanged(address,address,int256)
and selector0x18e1ea4139e68413d7d08aa752e71568e36b2c5bf940893314c2c5b01eaa0c42
. - Event with signature
PoolBalanceChanged(bytes32,address,address[],int256[],uint256[])
and selector0xe5ce249087ce04f05a957192435400fd97868dba0e6a4b4c049abf8af80dae78
. - Event with signature
PoolBalanceManaged(bytes32,address,address,int256,int256)
and selector0x6edcaf6241105b4c94c2efdbf3a6b12458eb3d07be3a0e81d24b13c44045fe7a
. - Event with signature
PoolRegistered(bytes32,address,uint8)
and selector0x3c13bc30b8e878c53fd2a36b679409c073afd75950be43d8858768e956fbc20e
. - Event with signature
RelayerApprovalChanged(address,address,bool)
and selector0x46961fdb4502b646d5095fba7600486a8ac05041d55cdf0f16ed677180b5cad8
. - Event with signature
Swap(bytes32,address,address,uint256,uint256)
and selector0x2170c741c41531aec20e7c107c24eecfdd15e69c9bb0a8dd37b1840b9e0b207b
. - Event with signature
TokensDeregistered(bytes32,address[])
and selector0x7dcdc6d02ef40c7c1a7046a011b058bd7f988fa14e20a66344f9d4e60657d610
. - Event with signature
TokensRegistered(bytes32,address[],address[])
and selector0xf5847d3f2197b16cdcd2098ec95d0905cd1abdaf415f07bb7cef2bba8ac5dec4
. - Function with signature
WETH()
and selector0xad5c4648
. - Container type for the return parameters of the
WETH()
function. - Function with signature
batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)
and selector0x945bcec9
. - Container type for the return parameters of the
batchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool),int256[],uint256)
function. - Function with signature
deregisterTokens(bytes32,address[])
and selector0x7d3aeb96
. - Container type for the return parameters of the
deregisterTokens(bytes32,address[])
function. - Function with signature
exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))
and selector0x8bdb3913
. - Container type for the return parameters of the
exitPool(bytes32,address,address,(address[],uint256[],bytes,bool))
function. - Function with signature
flashLoan(address,address[],uint256[],bytes)
and selector0x5c38449e
. - Container type for the return parameters of the
flashLoan(address,address[],uint256[],bytes)
function. - Function with signature
getAuthorizer()
and selector0xaaabadc5
. - Container type for the return parameters of the
getAuthorizer()
function. - Function with signature
getInternalBalance(address,address[])
and selector0x0f5a6efa
. - Container type for the return parameters of the
getInternalBalance(address,address[])
function. - Function with signature
getPool(bytes32)
and selector0xf6c00927
. - Container type for the return parameters of the
getPool(bytes32)
function. - Function with signature
getPoolTokenInfo(bytes32,address)
and selector0xb05f8e48
. - Container type for the return parameters of the
getPoolTokenInfo(bytes32,address)
function. - Function with signature
getPoolTokens(bytes32)
and selector0xf94d4668
. - Container type for the return parameters of the
getPoolTokens(bytes32)
function. - Function with signature
getProtocolFeesCollector()
and selector0xd2946c2b
. - Container type for the return parameters of the
getProtocolFeesCollector()
function. - Function with signature
hasApprovedRelayer(address,address)
and selector0xfec90d72
. - Container type for the return parameters of the
hasApprovedRelayer(address,address)
function. - Function with signature
joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))
and selector0xb95cac28
. - Container type for the return parameters of the
joinPool(bytes32,address,address,(address[],uint256[],bytes,bool))
function. - Function with signature
managePoolBalance((uint8,bytes32,address,uint256)[])
and selector0xe6c46092
. - Container type for the return parameters of the
managePoolBalance((uint8,bytes32,address,uint256)[])
function. - Function with signature
manageUserBalance((uint8,address,uint256,address,address)[])
and selector0x0e8e3e84
. - Container type for the return parameters of the
manageUserBalance((uint8,address,uint256,address,address)[])
function. - Function with signature
queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))
and selector0xf84d066e
. - Container type for the return parameters of the
queryBatchSwap(uint8,(bytes32,uint256,uint256,uint256,bytes)[],address[],(address,bool,address,bool))
function. - Function with signature
registerPool(uint8)
and selector0x09b2760f
. - Container type for the return parameters of the
registerPool(uint8)
function. - Function with signature
registerTokens(bytes32,address[],address[])
and selector0x66a9c7d2
. - Container type for the return parameters of the
registerTokens(bytes32,address[],address[])
function. - Function with signature
setAuthorizer(address)
and selector0x058a628f
. - Container type for the return parameters of the
setAuthorizer(address)
function. - Function with signature
setPaused(bool)
and selector0x16c38b3c
. - Container type for the return parameters of the
setPaused(bool)
function. - Function with signature
setRelayerApproval(address,address,bool)
and selector0xfa6e671d
. - Container type for the return parameters of the
setRelayerApproval(address,address,bool)
function. - Function with signature
swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)
and selector0x52bbbe29
. - Container type for the return parameters of the
swap((bytes32,uint8,address,address,uint256,bytes),(address,bool,address,bool),uint256,uint256)
function.