mirror of
https://github.com/grassrootseconomics/erc20-pool.git
synced 2024-11-23 04:26:46 +01:00
feat: add Swap event
This commit is contained in:
parent
561c4b3a71
commit
6d82807ffe
@ -36,6 +36,16 @@ contract SwapPool {
|
||||
// EIP173
|
||||
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // EIP173
|
||||
|
||||
// Swap
|
||||
event Swap(
|
||||
address indexed initiator,
|
||||
address indexed tokenIn,
|
||||
address tokenOut,
|
||||
uint256 amountIn,
|
||||
uint256 amountOut,
|
||||
uint256 fee
|
||||
);
|
||||
|
||||
constructor(string memory _name, string memory _symbol, uint8 _decimals, address _tokenRegistry, address _tokenLimiter) {
|
||||
name = _name;
|
||||
symbol = _symbol;
|
||||
@ -164,6 +174,8 @@ contract SwapPool {
|
||||
if (feeAddress != address(0)) {
|
||||
fees[_outToken] += fee;
|
||||
}
|
||||
|
||||
emit Swap(msg.sender, _inToken, _outToken, _value, outValue, fee);
|
||||
}
|
||||
|
||||
// Withdraw token to fee address
|
||||
|
Loading…
Reference in New Issue
Block a user