mirror of
https://github.com/grassrootseconomics/erc20-pool.git
synced 2025-07-29 08:32:49 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
5caa4be03e | |||
5189aec53a |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,5 +1,5 @@
|
||||
SOLC = /usr/local/bin/solc
|
||||
EVM_VERSION = byzantium
|
||||
SOLC = solc
|
||||
EVM_VERSION = istanbul
|
||||
|
||||
all:
|
||||
$(SOLC) --bin SwapPool.sol --evm-version $(EVM_VERSION)| awk 'NR>3' > SwapPool.bin
|
||||
|
@ -60,6 +60,8 @@ contract SwapPool {
|
||||
uint256 amountOut
|
||||
);
|
||||
|
||||
event QuoterUpdated(address indexed newQuoter);
|
||||
|
||||
constructor(string memory _name, string memory _symbol, uint8 _decimals, address _tokenRegistry, address _tokenLimiter) {
|
||||
name = _name;
|
||||
symbol = _symbol;
|
||||
@ -105,6 +107,7 @@ contract SwapPool {
|
||||
require(!isSealed(QUOTER_STATE), "ERR_SEAL");
|
||||
require(msg.sender == owner, "ERR_AXX");
|
||||
quoter = _quoter;
|
||||
emit QuoterUpdated(_quoter);
|
||||
}
|
||||
|
||||
// Implements EIP173
|
||||
@ -251,8 +254,10 @@ contract SwapPool {
|
||||
bool r;
|
||||
bytes memory v;
|
||||
|
||||
// This is a GE specific feature. However, it can be removed to allow anyone to push fees into a common feeAddress (profit-sharing)
|
||||
require(msg.sender == owner, "ERR_OWNER");
|
||||
require(feeAddress != address(0), "ERR_AXX");
|
||||
require(_value <= fees[_outToken], "ERR_BALANCE");
|
||||
|
||||
(r, v) = _outToken.call(abi.encodeWithSignature('transfer(address,uint256)', feeAddress, _value));
|
||||
require(r, "ERR_TOKEN");
|
||||
|
Loading…
Reference in New Issue
Block a user