From 9a7dbc3fa1b4dce908cc0151c6dd111d996fe500 Mon Sep 17 00:00:00 2001 From: Drew Roberts Date: Mon, 10 May 2021 22:02:30 -0400 Subject: [PATCH 1/4] Update readme --- README.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 0338cf5..47fdfca 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,3 @@ -# ApeHaven Contract +# Base ERC-20 Contract -Link to white paper: [ApeHaven White Paper](https://apehaven.com/apehaven.pdf) - -Link to contract: [$APES Contract](https://github.com/apehaven/contract/blob/main/contract.sol) - -## Join the Ape Tribe - -- Telegram - https://t.me/apehaven -- Twitter - https://twitter.com/apehaven -- Reddit - https://reddit.com/r/apehaven +This contract is the next iteration of [Drew Roberts](https://github.com/drewroberts) tokenomics for [Tipoff](https://github.com/tipoff) releases. It builds on the success of the [ApeHaven](https://github.com/apehaven) project and adds additional flexibility with reduced gas fees. It is the new base structure for future projects led by [Drew Roberts](https://drewroberts.com) and the [Tipoff](https://tipoff.com) Team. From fff3675754d8fda16251f208a55dcb4b651abd52 Mon Sep 17 00:00:00 2001 From: Drew Roberts Date: Sun, 27 Jun 2021 23:11:47 -0400 Subject: [PATCH 2/4] Remove apehaven quotes --- contract.sol | 8 -------- 1 file changed, 8 deletions(-) diff --git a/contract.sol b/contract.sol index 4dae3f2..c50ea19 100644 --- a/contract.sol +++ b/contract.sol @@ -6,8 +6,6 @@ * * - "$APES to the moon" -Elon Musk - Contract features: 7% fee auto added to the liquidity pool and locked forever 2% fee auto distributed to all holders @@ -1316,10 +1314,4 @@ contract ApeHaven is Context, IERC20, Ownable { function AppendStr(string memory a, string memory b, string memory c, string memory d) internal pure returns (string memory) { return string(abi.encodePacked(a, b, c, d)); } - - // "Florida supports fintech sandbox." -Ron DeSantis - - // "For the People." -John Morgan - - // "As for me, I like the tokenomics." -DFV from WSB } From df991dd0519e714c1c15d8bbba2df55267befe72 Mon Sep 17 00:00:00 2001 From: drewroberts Date: Sun, 27 Jun 2021 23:20:50 -0400 Subject: [PATCH 3/4] Rename devFee to charityFee #3 --- contract.sol | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contract.sol b/contract.sol index c50ea19..74c9f4c 100644 --- a/contract.sol +++ b/contract.sol @@ -762,8 +762,8 @@ contract ApeHaven is Context, IERC20, Ownable { uint256 public _taxFee = 2; uint256 private _previousTaxFee = _taxFee; - uint256 public _devFee = 1; // 1% to charity wallet - uint256 private _previousDevFee = _devFee; + uint256 public _charityFee = 1; // 1% to charity wallet + uint256 private _previousDevFee = _charityFee; address public charityWallet = address(0x7c87DdAc05c5146876cc0f9e335ce125B15d6893); // Donated to the Center for Great Apes uint256 public _liquidityFee = 7; @@ -1073,7 +1073,7 @@ contract ApeHaven is Context, IERC20, Ownable { } function calculateDevFee(uint256 _amount) private view returns (uint256) { - return _amount.mul(_devFee).div( + return _amount.mul(_charityFee).div( 10 ** 2 ); } @@ -1089,17 +1089,17 @@ contract ApeHaven is Context, IERC20, Ownable { _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; - _previousDevFee = _devFee; + _previousDevFee = _charityFee; _taxFee = 0; _liquidityFee = 0; - _devFee = 0; + _charityFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; - _devFee = _previousDevFee; + _charityFee = _previousDevFee; } function isExcludedFromFee(address account) public view returns (bool) { From 562f86b7716e707c422090d8d196c53564d43bfd Mon Sep 17 00:00:00 2001 From: drewroberts Date: Thu, 1 Jul 2021 09:24:18 -0400 Subject: [PATCH 4/4] Rename DevFee to CharityFee #3 --- contract.sol | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/contract.sol b/contract.sol index 74c9f4c..4e60be1 100644 --- a/contract.sol +++ b/contract.sol @@ -763,7 +763,7 @@ contract ApeHaven is Context, IERC20, Ownable { uint256 private _previousTaxFee = _taxFee; uint256 public _charityFee = 1; // 1% to charity wallet - uint256 private _previousDevFee = _charityFee; + uint256 private _previousCharityFee = _charityFee; address public charityWallet = address(0x7c87DdAc05c5146876cc0f9e335ce125B15d6893); // Donated to the Center for Great Apes uint256 public _liquidityFee = 7; @@ -930,7 +930,7 @@ contract ApeHaven is Context, IERC20, Ownable { _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); - _takeDevFee(sender, tAmount); + _takeCharityFee(sender, tAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } @@ -990,26 +990,26 @@ contract ApeHaven is Context, IERC20, Ownable { _tFeeTotal = _tFeeTotal.add(tFee); } - function _takeDevFee(address sender, uint256 tAmount) private { - uint256 tDevFee = _getTDevFeeValues(tAmount); - uint256 rDevFee = _getRDevFeeValues(tDevFee, _getRate()); + function _takeCharityFee(address sender, uint256 tAmount) private { + uint256 tCharityFee = _getTCharityFeeValues(tAmount); + uint256 rCharityFee = _getRCharityFeeValues(tCharityFee, _getRate()); if (_isExcluded[charityWallet]) { - _tOwned[charityWallet] = _tOwned[charityWallet].add(tDevFee); - _rOwned[charityWallet] = _rOwned[charityWallet].add(rDevFee); + _tOwned[charityWallet] = _tOwned[charityWallet].add(tCharityFee); + _rOwned[charityWallet] = _rOwned[charityWallet].add(rCharityFee); } else { - _rOwned[charityWallet] = _rOwned[charityWallet].add(rDevFee); + _rOwned[charityWallet] = _rOwned[charityWallet].add(rCharityFee); } - emit Transfer(sender, charityWallet, tDevFee); + emit Transfer(sender, charityWallet, tCharityFee); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity); - uint256 tDevFee = _getTDevFeeValues(tAmount); - uint256 rDevFee = _getRDevFeeValues(tDevFee, _getRate()); - tTransferAmount = tTransferAmount.sub(tDevFee); - rTransferAmount = rTransferAmount.sub(rDevFee); + uint256 tCharityFee = _getTCharityFeeValues(tAmount); + uint256 rCharityFee = _getRCharityFeeValues(tCharityFee, _getRate()); + tTransferAmount = tTransferAmount.sub(tCharityFee); + rTransferAmount = rTransferAmount.sub(rCharityFee); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } @@ -1021,9 +1021,9 @@ contract ApeHaven is Context, IERC20, Ownable { return (tTransferAmount, tFee, tLiquidity); } - function _getTDevFeeValues(uint256 tAmount) private view returns (uint256) { - uint256 tDevFee = calculateDevFee(tAmount); - return tDevFee; + function _getTCharityFeeValues(uint256 tAmount) private view returns (uint256) { + uint256 tCharityFee = calculateCharityFee(tAmount); + return tCharityFee; } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity) private view returns (uint256, uint256, uint256) { @@ -1035,9 +1035,9 @@ contract ApeHaven is Context, IERC20, Ownable { return (rAmount, rTransferAmount, rFee); } - function _getRDevFeeValues(uint256 tDevFee, uint256 currentRate) private pure returns (uint256) { - uint256 rDevFee = tDevFee.mul(currentRate); - return rDevFee; + function _getRCharityFeeValues(uint256 tCharityFee, uint256 currentRate) private pure returns (uint256) { + uint256 rCharityFee = tCharityFee.mul(currentRate); + return rCharityFee; } function _getRate() private view returns (uint256) { @@ -1072,7 +1072,7 @@ contract ApeHaven is Context, IERC20, Ownable { ); } - function calculateDevFee(uint256 _amount) private view returns (uint256) { + function calculateCharityFee(uint256 _amount) private view returns (uint256) { return _amount.mul(_charityFee).div( 10 ** 2 ); @@ -1089,7 +1089,7 @@ contract ApeHaven is Context, IERC20, Ownable { _previousTaxFee = _taxFee; _previousLiquidityFee = _liquidityFee; - _previousDevFee = _charityFee; + _previousCharityFee = _charityFee; _taxFee = 0; _liquidityFee = 0; @@ -1099,7 +1099,7 @@ contract ApeHaven is Context, IERC20, Ownable { function restoreAllFee() private { _taxFee = _previousTaxFee; _liquidityFee = _previousLiquidityFee; - _charityFee = _previousDevFee; + _charityFee = _previousCharityFee; } function isExcludedFromFee(address account) public view returns (bool) { @@ -1248,7 +1248,7 @@ contract ApeHaven is Context, IERC20, Ownable { _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); - _takeDevFee(sender, tAmount); + _takeCharityFee(sender, tAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } @@ -1259,7 +1259,7 @@ contract ApeHaven is Context, IERC20, Ownable { _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); - _takeDevFee(sender, tAmount); + _takeCharityFee(sender, tAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } @@ -1270,7 +1270,7 @@ contract ApeHaven is Context, IERC20, Ownable { _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeLiquidity(tLiquidity); - _takeDevFee(sender, tAmount); + _takeCharityFee(sender, tAmount); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); }