fix: fee overwithdraw, bump compiler settings

* use istanbul hardfork
This commit is contained in:
Mohamed Sohail 2024-10-29 16:06:09 +03:00
parent 47a1ea0ffd
commit 5189aec53a
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
4 changed files with 6 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
SOLC = /usr/local/bin/solc SOLC = solc
EVM_VERSION = byzantium EVM_VERSION = istanbul
all: all:
$(SOLC) --bin SwapPool.sol --evm-version $(EVM_VERSION)| awk 'NR>3' > SwapPool.bin $(SOLC) --bin SwapPool.sol --evm-version $(EVM_VERSION)| awk 'NR>3' > SwapPool.bin

View File

@ -251,8 +251,10 @@ contract SwapPool {
bool r; bool r;
bytes memory v; 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(msg.sender == owner, "ERR_OWNER");
require(feeAddress != address(0), "ERR_AXX"); require(feeAddress != address(0), "ERR_AXX");
require(_value <= fees[_outToken], "ERR_BALANCE");
(r, v) = _outToken.call(abi.encodeWithSignature('transfer(address,uint256)', feeAddress, _value)); (r, v) = _outToken.call(abi.encodeWithSignature('transfer(address,uint256)', feeAddress, _value));
require(r, "ERR_TOKEN"); require(r, "ERR_TOKEN");