Balancer V1
Search…
Events

This page has been deprecated. V1 documentation is partially maintained here​

Events

Events

LOG_CALL is an anonymous event which uses the function signature as the event signature. It is fired by all stateful functions. The following applies to Balancer Core pools. Smart Pools have similar events and modifiers.
1
event LOG_CALL(
2
bytes4 indexed sig,
3
address indexed caller,
4
bytes data
5
) anonymous;
Copied!
LOG_SWAP is fired (along with LOG_CALL) for all swap variants.
1
event LOG_SWAP(
2
address indexed caller,
3
address indexed tokenIn,
4
address indexed tokenOut,
5
uint256 tokenAmountIn,
6
uint256 tokenAmountOut
7
);
Copied!
LOG_JOIN and LOG_EXIT are fired for each individual token join / exit
1
event LOG_JOIN(
2
address indexed caller,
3
address indexed tokenIn,
4
uint256 tokenAmountIn
5
);
6
​
7
event LOG_EXIT(
8
address indexed caller,
9
address indexed tokenOut,
10
uint256 tokenAmountOut
11
);
Copied!

Mutex

All stateful functions use either a lock or viewlock function modifier. A mutex places a lock on contract state and prevents any sort of re-entrancy.
1
modifier _lock_() {
2
require(!_mutex, "ERR_REENTRY");
3
_mutex = true;
4
_;
5
_mutex = false;
6
}
7
​
8
modifier _viewlock_() {
9
require(!_mutex, "ERR_REENTRY");
10
_;
11
}
Copied!
Last modified 3mo ago