Description:
Multi-signature wallet contract requiring multiple confirmations for transaction execution.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"src/MulticallSlim.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
☞ https://ethos.vision
???? https://x.com/Ethereum_OS
✌︎ https://t.me/ethosportal
Welcome to the Ethereum Operating System — the first-of-its-kind revenue generating DeFi pumpware
built as a social DeFi sandbox that is filled with composable elements so you can create, trade,
communicate, and participate—all in one place.
@
@@:
@@@::
==@@@::::
===@@@:::::
===+@@+::::::
====@@@::::::::
=====@@@:::::::::
======@@@::::::::::
=======@@@:::::::::::
=======*@@+::::::::::::
========@@@::::::::::::::
==========@@@::::::::::::::::
===========@@@:::::::::::::::::
============@@@::::::::::::::::::
============*@@=:::::::::::::::::::
=============@@@:::::::::::::::::::::
=====@@@======@@@::::::::@@@:::::::::::
======@@@======@@@::::::::@@@::::::::::::
=======@@@======@@@::::::::@@@:::::::::::::
=================@@=:::::::::::::::::::::::::
==================%@@::::::::::::::::::::::::::::
===================@@@:::::::::::::::::::::::::::::
====================@@@::::::::::::::::::::::::::::::
=====================@@@:::::::::::::::::::::::::::::::
=====================+@@-::::::::::::::::::::::::::::::::
======================@@@@@@@@@@@@@@*::::::::::::::::::::::
=======================@@@@@@@@@@@@@@::::::::::::::::::::::::
===================================@@@:::::::::::::::::::::::::
=================================@@@:::::::::::::::::::::::
=========@@@@===================@@@::::::::@@@*::::::::::
=========@@@@@@@==============*@@:::::%@@@@@:::::::::::
===========@@@@@@@@@@@#*+=+*@@@@@@@@@@@-:::::::::::
==============+@@@@@@@@@@@@@@@@@@@:::::::::::::::
==========================@@@::::::::::::::::::
========================@@@::::::::::::::::
======================@@@::::::::::::::::
=====================@@@:::::::::::::::
===================@@@:::::::::::::
==================@@@::::::::::::
================*@@=:::::::::::
==============@@@::::::::::
=============@@@:::::::::
============@@@::::::::
==========@@#::::::
========@@@::::::
=======@@@:::::
=====@@@:::
====@@@::
==*@@-:
=@@@:
@
@@@
@@@@@@@@@@@@@@@@@@@ @@@@@@@ ======= ========
@@@@@@@@@@@@@@@@@@ @@@@@ ==== ===== ===== =====
@@@@@ @@ @@@@ ===== ==== ==== ===
@@@@@ @ @@@@ ==== ===== ==== ===
@@@@@ @@@@ ==== ===== ==== ==
@@@@@ @@ @@@@ ===== ===== =====
@@@@@ @ @@@@ @@@@ @ ===== ===== =======
@@@@@ @@ @@@@@@@@@@@@ @@@@ @@@@@@@@ ===== ===== =========
@@@@@@@@@@@@@ @@@@ @@@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@ @@@@ ===== ===== ========
@@@@@ @@@@ @@@@ @@@@ ====== ===== ======
@@@@@ @@@@ @@@@ @@@@ ===== ===== =====
@@@@@ @@@@ @@@@ @@@@ ===== ===== == =====
@@@@@ @@ @@@@ @@@@ @@@@ ==== ===== === =====
@@@@@ @@@ @@@@@ @@@@ @@@@ ===== ==== ==== ====
@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@ @@@@@@ ===== ==== ===== =====
@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@ @@@@@@@@@ ========== =========
*/
import "interfaces/IEOS20.sol";
import "interfaces/IUniswapV2Router02.sol";
import "interfaces/IUniswapV2Pair.sol";
import "src/Booster.sol";
import "src/InfoService.sol";
import "src/Lock.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract MulticallSlim is Ownable {
// Set up
Booster public booster;
InfoService public infoService;
Lock public lock;
function setLock(address _lock) public onlyOwner {
lock = Lock(payable(_lock));
}
function setBooster(address _booster) public onlyOwner {
booster = Booster(payable(_booster));
}
function setInfoService(address _infoService) public onlyOwner {
infoService = InfoService(payable(_infoService));
}
// Return
struct TokenInfoSlim {
// Info
string name;
string symbol;
string description;
string website;
string socials;
string image;
string chat;
uint256 timeCreated;
// Specs
uint256 reflectionsPercent;
uint256 maxDailyPumpRate;
uint256 liquidityPercent;
uint256 winAmountPercent;
uint256 deathTime;
uint256 burnPercentageBuy;
uint256 burnPercentageSell;
uint256 apy;
uint256 devFeePercent;
// Metrics
uint256 totalSupply;
uint112 reserve0;
uint112 reserve1;
uint256 price;
// Status
uint256 userBalance;
uint256 devDeadline;
uint256 settingLockTime;
uint256 boostAmount;
bool isFunded;
bool isLpLocked;
bool isSettingsLocked;
}
function multicallSlim(address tokenAddress, address user) public view returns (TokenInfoSlim memory) {
IEOS20 token = IEOS20(tokenAddress);
(uint112 reserve0, uint112 reserve1) = token.getReserves();
return TokenInfoSlim({
name: token.name(),
symbol: token.symbol(),
description: infoService.Description(tokenAddress),
website: infoService.Website(tokenAddress),
socials: infoService.Socials(tokenAddress),
image: infoService.Image(tokenAddress),
chat: infoService.Chat(tokenAddress),
timeCreated: token.timeCreated(),
reflectionsPercent: token.reflectionsPercent(),
maxDailyPumpRate: token.maxDailyPumpRate(),
liquidityPercent: token.liquidityPercent(),
winAmountPercent: token.winAmountPercent(),
deathTime: token.deathTime(),
burnPercentageBuy: token.burnPercentageBuy(),
burnPercentageSell: token.burnPercentageSell(),
apy: token.apy(),
devFeePercent: token.devFeePercent(),
totalSupply: token.totalSupply(),
reserve0: reserve0,
reserve1: reserve1,
price: IUniswapV2Router02(token.uniswapV2Router()).quote(1e18, reserve0, reserve1),
userBalance: token.balanceOf(user),
devDeadline: lock.devDeadline(tokenAddress),
settingLockTime: lock.settingLockTime(tokenAddress),
boostAmount: booster.getBoostDuration(tokenAddress),
isFunded: lock.isFunded(tokenAddress),
isLpLocked: lock.isLpLocked(tokenAddress),
isSettingsLocked: lock.isSettingsLocked(tokenAddress)
});
}
}"
},
"interfaces/IEOS20.sol": {
"content": "pragma solidity ^0.8.0;
interface IEOS20 {
// FOR ETH OS
function initializeToken(address owner, address router, address deployer, uint256 _devDeadline) external;
function setSpecs(
uint256 _devFeePercent,
uint256 _maxDailyPumpRate,
uint256 _reflectionsPercent,
uint256 _liquidityPercent,
uint256 _reaperDeathTime,
uint256 _cooldown,
uint256 _winAmountPercent,
uint256 _apy,
uint256 _burnPercentBuy,
uint256 _burnPercentSell
) external;
function transferOwnershipOfTheToken(address) external;
function openTrading(bool _tradingOpen) external;
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function owner() external view returns (address);
function timeCreated() external view returns (uint256);
function deploymentBlock() external view returns (uint);
function uniswapV2Pair() external view returns (address);
function uniswapV2Router() external view returns (address);
function antiBot() external view returns (bool);
function maxWalletPercent() external view returns (uint);
function toggleYield(bool toggle) external;
function tradingOpen() external view returns (bool);
function yieldOn() external view returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function transfer(address _to, uint256 _value) external returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool success);
function approve(address _spender, uint256 _value) external returns (bool success);
function totalShares() external view returns (uint256);
function burn(uint256 _amount) external;
function getReserves() external view returns (uint112, uint112);
function getQuote(uint256 amountA, uint256 reserveA, uint256 reserveB) external view returns (uint256);
function lastBuyTimestamp() external view returns (uint256);
function reflectionsPercent() external view returns (uint256);
function liquidityPercent() external view returns (uint256);
function winAmountPercent() external view returns (uint256);
function devFeePercent() external view returns (uint256);
function burnPercentageBuy() external view returns (uint256);
function burnPercentageSell() external view returns (uint256);
function deathTime() external view returns (uint256);
function apy() external view returns (uint256);
function share(address user) external view returns (uint256);
function shares(address user) external view returns (uint256);
function ethAccumulated(address user) external view returns (uint256);
function ethAccumulatedForUi(address _user) external view returns (uint256);
function ethWithdrawn(address user) external view returns (uint256);
function ethWithdrawnForUi(address user) external view returns (uint256);
function totalEthDistributed() external view returns (uint256);
function devWithdrawn() external view returns (uint256);
function lpAdded() external view returns (uint256);
function pendingPonziTokens(address _user) external view returns (uint256);
function devClaimableEth() external view returns (uint256);
function lastPumpTimestamp() external view returns (uint256);
function maxDailyPumpRate() external view returns (uint256);
function pumpIsPublic() external view returns (bool);
function firstReceivedBlockTimeStamp(address) external view returns (uint256);
function immortal(address _user) external view returns (bool);
function deathStartedTimestamp() external view returns (uint256);
function cooldown() external view returns (uint256);
function winAmount() external view returns (uint256);
function currentWinner() external view returns (address);
function ponziStart() external view returns (uint256);
function mintBonus(uint256 amount, address _user) external;
function setMaxWallet(bool _antiBot, uint256 _maxWallet) external;
function volumeAmount() external view returns (uint256);
}
"
},
"interfaces/IUniswapV2Router02.sol": {
"content": "pragma solidity >=0.6.2;
import './IUniswapV2Router01.sol';
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function launch(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
uint8 buyLpFee,
uint8 sellLpFee,
uint8 buyProtocolFee,
uint8 sellProtocolFee,
address protocolAddress
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
"
},
"interfaces/IUniswapV2Pair.sol": {
"content": "pragma solidity >=0.5.0;
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}"
},
"src/Booster.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
☞ https://ethos.vision
???? https://x.com/Ethereum_OS
✌︎ https://t.me/ethosportal
Welcome to the Ethereum Operating System — the first-of-its-kind revenue generating DeFi pumpware
built as a social DeFi sandbox that is filled with composable elements so you can create, trade,
communicate, and participate—all in one place.
@
@@:
@@@::
==@@@::::
===@@@:::::
===+@@+::::::
====@@@::::::::
=====@@@:::::::::
======@@@::::::::::
=======@@@:::::::::::
=======*@@+::::::::::::
========@@@::::::::::::::
==========@@@::::::::::::::::
===========@@@:::::::::::::::::
============@@@::::::::::::::::::
============*@@=:::::::::::::::::::
=============@@@:::::::::::::::::::::
=====@@@======@@@::::::::@@@:::::::::::
======@@@======@@@::::::::@@@::::::::::::
=======@@@======@@@::::::::@@@:::::::::::::
=================@@=:::::::::::::::::::::::::
==================%@@::::::::::::::::::::::::::::
===================@@@:::::::::::::::::::::::::::::
====================@@@::::::::::::::::::::::::::::::
=====================@@@:::::::::::::::::::::::::::::::
=====================+@@-::::::::::::::::::::::::::::::::
======================@@@@@@@@@@@@@@*::::::::::::::::::::::
=======================@@@@@@@@@@@@@@::::::::::::::::::::::::
===================================@@@:::::::::::::::::::::::::
=================================@@@:::::::::::::::::::::::
=========@@@@===================@@@::::::::@@@*::::::::::
=========@@@@@@@==============*@@:::::%@@@@@:::::::::::
===========@@@@@@@@@@@#*+=+*@@@@@@@@@@@-:::::::::::
==============+@@@@@@@@@@@@@@@@@@@:::::::::::::::
==========================@@@::::::::::::::::::
========================@@@::::::::::::::::
======================@@@::::::::::::::::
=====================@@@:::::::::::::::
===================@@@:::::::::::::
==================@@@::::::::::::
================*@@=:::::::::::
==============@@@::::::::::
=============@@@:::::::::
============@@@::::::::
==========@@#::::::
========@@@::::::
=======@@@:::::
=====@@@:::
====@@@::
==*@@-:
=@@@:
@
@@@
@@@@@@@@@@@@@@@@@@@ @@@@@@@ ======= ========
@@@@@@@@@@@@@@@@@@ @@@@@ ==== ===== ===== =====
@@@@@ @@ @@@@ ===== ==== ==== ===
@@@@@ @ @@@@ ==== ===== ==== ===
@@@@@ @@@@ ==== ===== ==== ==
@@@@@ @@ @@@@ ===== ===== =====
@@@@@ @ @@@@ @@@@ @ ===== ===== =======
@@@@@ @@ @@@@@@@@@@@@ @@@@ @@@@@@@@ ===== ===== =========
@@@@@@@@@@@@@ @@@@ @@@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@ @@@@ ===== ===== ========
@@@@@ @@@@ @@@@ @@@@ ====== ===== ======
@@@@@ @@@@ @@@@ @@@@ ===== ===== =====
@@@@@ @@@@ @@@@ @@@@ ===== ===== == =====
@@@@@ @@ @@@@ @@@@ @@@@ ==== ===== === =====
@@@@@ @@@ @@@@@ @@@@ @@@@ ===== ==== ==== ====
@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@ @@@@@@ ===== ==== ===== =====
@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@ @@@@@@@@@ ========== =========
*/
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IEOS20.sol";
interface IEthPrice {
function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}
contract Booster is Ownable {
// Contracts States Mappings Events
IEOS20 public mainToken;
IEthPrice public ethUsdFeed;
uint updateTimeForEthPrice = 4 days;
uint256 public boostApyMultiplier = 20;
uint256 public boostApyDenominator = 1;
uint256 public totalBurned;
uint public hourCost = 3e18; // 1 dollar
mapping(address => uint256) public boostStartTime; // Effective start time
mapping(address => uint256) public boostSeconds;
mapping(address => uint256) public tokensBurned;
mapping(uint => mapping(address => address)) public boosterUser; // Effective end time
mapping(address => uint256) public boosterUserCount;
mapping(address => uint256) public lastTimeClaimedBonus;
mapping(address => uint256) public userBoostBonuses;
mapping(address => uint256) public savedBonusPonziTokens;
event BoostApplied(address indexed token, uint256 burnAmount);
mapping(address => uint256) public usdSpentOnBoost;
constructor() {
ethUsdFeed = IEthPrice(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419); // ETH/USD on Ethereum mainnet
}
// View
function getEthPrice() public view returns (uint) {
(uint80 roundId, int256 price, , uint256 updatedAt, uint80 answeredInRound) = ethUsdFeed.latestRoundData();
require(price > 0, "bad price");
require(answeredInRound >= roundId, "stale round");
require(updatedAt != 0 && block.timestamp - updatedAt < updateTimeForEthPrice, "stale price");
return uint(price);
}
function getEosPriceEth() public view returns (uint) {
(uint112 reserve0, uint112 reserve1) = mainToken.getReserves();
return mainToken.getQuote(1e18, reserve0, reserve1);
}
function getEosPriceInUsd() public view returns (uint) {
return getEosPriceEth() * getEthPrice()/ 1e8;
}
function getCostPerSecondWithPrice() public view returns (uint) {
return hourCost / 3600;
}
function getTokensForHourBoost() public view returns (uint) {
return 1e18 / getEosPriceInUsd() * 1e18;
}
function predictBoostSeconds(uint amount) public view returns (uint) {
return (amount * getEosPriceInUsd()) / getCostPerSecondWithPrice() / 1e18;
}
// Boost
function boostToken(address _token, uint256 _burnAmount) external {
require(_burnAmount > 0, "Amount must be greater than 0");
require(predictBoostSeconds(_burnAmount) > 1, "Amount must greater or equal to boost second cost.");
require(_token != address(0), "Invalid token address");
mainToken.transferFrom(msg.sender, address(this), _burnAmount);
mainToken.burn(_burnAmount);
if (getBoostDuration(_token) > 0) {
boostSeconds[_token] += predictBoostSeconds(_burnAmount);
} else {
boostStartTime[_token] = block.timestamp;
boostSeconds[_token] = predictBoostSeconds(_burnAmount);
}
usdSpentOnBoost[_token] += _burnAmount * getEosPriceInUsd() / 1e18;
tokensBurned[_token] += _burnAmount;
totalBurned += _burnAmount;
boosterUserCount[_token]++;
boosterUser[boosterUserCount[_token]][_token] = msg.sender;
if(pendingBonusEOS(msg.sender) > 0) {
savedBonusPonziTokens[msg.sender] = pendingBonusEOS(msg.sender);
}
lastTimeClaimedBonus[msg.sender] = block.timestamp;
userBoostBonuses[msg.sender] += _burnAmount;
emit BoostApplied(_token, _burnAmount);
}
function getBoostDuration(address _token) public view returns (uint256) {
if (boostStartTime[_token] != 0 && boostSeconds[_token] != 0) {
if (boostStartTime[_token] + boostSeconds[_token] > block.timestamp) {
return (boostStartTime[_token] + boostSeconds[_token])
- block.timestamp;
} else {
return 0;
}
} else {
return 0;
}
}
// Mint
function mintEOS() public {
uint toMint = pendingBonusEOS(msg.sender);
if(toMint > 0){
savedBonusPonziTokens[msg.sender] = 0;
lastTimeClaimedBonus[msg.sender] = block.timestamp;
mainToken.mintBonus(toMint, msg.sender);
}
}
function pendingBonusEOS(address _user) public view returns (uint256) {
uint256 time = mainToken.ponziStart() > lastTimeClaimedBonus[_user] ? mainToken.ponziStart() : lastTimeClaimedBonus[_user];
uint256 bonus = (((userBoostBonuses[_user] * mainToken.apy() / 10000 ) *
boostApyMultiplier / boostApyDenominator) / 86400) *
(block.timestamp - time) + savedBonusPonziTokens[_user];
return bonus;
}
function viewBonusTokensPerSecond(address _user) public view returns (uint256) {
return (((userBoostBonuses[_user] * mainToken.apy() / 10000 ) * boostApyMultiplier) / boostApyDenominator) / 86400;
}
// Admin
function setUpdateTimeForEthPrice(uint256 _updateTimeForEthPrice) public onlyOwner {
updateTimeForEthPrice = _updateTimeForEthPrice;
}
function setHourCost(uint256 _hourCost) public onlyOwner {
hourCost = _hourCost;
}
function setboostApyMultiplier(uint256 _boostApyMultiplier) public onlyOwner {
boostApyMultiplier = _boostApyMultiplier;
}
function setboostApyDenominator(uint256 _boostApyDenominator) public onlyOwner {
boostApyDenominator = _boostApyDenominator;
}
function recoverTokens(address _token, uint toWithdraw) public onlyOwner{
IEOS20 token = IEOS20(_token);
token.transfer(owner(), toWithdraw);
}
function recoverEth(address payable _user, uint toWithdraw) public onlyOwner{
(bool success,) = _user.call{value: toWithdraw}("");
}
function setMainTokenAddress(address _eos) public onlyOwner {
mainToken = IEOS20(_eos);
}
function setEthPriceFeed(address _ethUsdFeed) public onlyOwner {
ethUsdFeed = IEthPrice(_ethUsdFeed);
}
function setTokensBurned(address _token, uint amount) public onlyOwner{
tokensBurned[_token] = amount;
}
function setBoostStartTime(address _token, uint _time) public onlyOwner{
boostStartTime[_token] = _time;
}
function setTotalBurned(uint _burned) public onlyOwner {
totalBurned = _burned;
}
// Receive
receive() external payable {}
}"
},
"src/InfoService.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
☞ https://ethos.vision
???? https://x.com/Ethereum_OS
✌︎ https://t.me/ethosportal
Welcome to the Ethereum Operating System — the first-of-its-kind revenue generating DeFi pumpware
built as a social DeFi sandbox that is filled with composable elements so you can create, trade,
communicate, and participate—all in one place.
@
@@:
@@@::
==@@@::::
===@@@:::::
===+@@+::::::
====@@@::::::::
=====@@@:::::::::
======@@@::::::::::
=======@@@:::::::::::
=======*@@+::::::::::::
========@@@::::::::::::::
==========@@@::::::::::::::::
===========@@@:::::::::::::::::
============@@@::::::::::::::::::
============*@@=:::::::::::::::::::
=============@@@:::::::::::::::::::::
=====@@@======@@@::::::::@@@:::::::::::
======@@@======@@@::::::::@@@::::::::::::
=======@@@======@@@::::::::@@@:::::::::::::
=================@@=:::::::::::::::::::::::::
==================%@@::::::::::::::::::::::::::::
===================@@@:::::::::::::::::::::::::::::
====================@@@::::::::::::::::::::::::::::::
=====================@@@:::::::::::::::::::::::::::::::
=====================+@@-::::::::::::::::::::::::::::::::
======================@@@@@@@@@@@@@@*::::::::::::::::::::::
=======================@@@@@@@@@@@@@@::::::::::::::::::::::::
===================================@@@:::::::::::::::::::::::::
=================================@@@:::::::::::::::::::::::
=========@@@@===================@@@::::::::@@@*::::::::::
=========@@@@@@@==============*@@:::::%@@@@@:::::::::::
===========@@@@@@@@@@@#*+=+*@@@@@@@@@@@-:::::::::::
==============+@@@@@@@@@@@@@@@@@@@:::::::::::::::
==========================@@@::::::::::::::::::
========================@@@::::::::::::::::
======================@@@::::::::::::::::
=====================@@@:::::::::::::::
===================@@@:::::::::::::
==================@@@::::::::::::
================*@@=:::::::::::
==============@@@::::::::::
=============@@@:::::::::
============@@@::::::::
==========@@#::::::
========@@@::::::
=======@@@:::::
=====@@@:::
====@@@::
==*@@-:
=@@@:
@
@@@
@@@@@@@@@@@@@@@@@@@ @@@@@@@ ======= ========
@@@@@@@@@@@@@@@@@@ @@@@@ ==== ===== ===== =====
@@@@@ @@ @@@@ ===== ==== ==== ===
@@@@@ @ @@@@ ==== ===== ==== ===
@@@@@ @@@@ ==== ===== ==== ==
@@@@@ @@ @@@@ ===== ===== =====
@@@@@ @ @@@@ @@@@ @ ===== ===== =======
@@@@@ @@ @@@@@@@@@@@@ @@@@ @@@@@@@@ ===== ===== =========
@@@@@@@@@@@@@ @@@@ @@@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@ @@@@ ===== ===== ========
@@@@@ @@@@ @@@@ @@@@ ====== ===== ======
@@@@@ @@@@ @@@@ @@@@ ===== ===== =====
@@@@@ @@@@ @@@@ @@@@ ===== ===== == =====
@@@@@ @@ @@@@ @@@@ @@@@ ==== ===== === =====
@@@@@ @@@ @@@@@ @@@@ @@@@ ===== ==== ==== ====
@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@ @@@@@@ ===== ==== ===== =====
@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@ @@@@@@@@@ ========== =========
*/
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./math/SafeMathUint.sol";
import "./math/SafeMathInt.sol";
import "interfaces/IUniswapV2Router02.sol";
import "interfaces/IUniswapV2Factory.sol";
import "../interfaces/ITokenSettings.sol";
import "../interfaces/IBooster.sol";
import "../interfaces/IEOS20.sol";
import "./Deployer.sol";
interface IBooster {
function getEosPriceInUsd() external view returns (uint);
}
contract InfoService is Ownable, Pausable, ReentrancyGuard {
// Contracts
IEOS20 public mainToken;
IBooster public booster;
address public ETH_OS;
// States
uint public infoUpdatePrice = 0; // 10 dollars
uint public usernameUpdatePrice = 5; // 10 dollars
uint public avatarUpdatePrice = 5; // 10 dollars
uint public burnedViaUpdates;
uint public burnedViaReactions;
uint public burnedViaUserProfile;
// Mappings
// Reactions
mapping(uint256 => string) public reaction;
mapping(uint256 => uint256) public priceForReaction;
mapping(address => mapping(uint256 => uint256)) public reactionAmount;
// User Profile
mapping(address => string) public userName;
mapping(address => bool) public isUserNameUpdated;
mapping(address => string) public avatar;
mapping(string => bool) public isNameTaken;
mapping(string => address) public nameToAddress;
// Update Socials
mapping(address => string) public Description;
mapping(address => string) public Website;
mapping(address => string) public Socials;
mapping(address => string) public Image;
mapping(address => string) public Chat;
// Constructor
constructor() {
addReaction(1, unicode"????", 0);
addReaction(2, unicode"????", 0);
addReaction(3, unicode"????", 0);
addReaction(4, unicode"⚠️", 0);
addReaction(5, unicode"????", 5e18);
addReaction(6, unicode"????", 5e18);
addReaction(7, unicode"????", 5e18);
addReaction(8, unicode"❤️????", 5e18);
addReaction(9, unicode"????", 0);
addReaction(10, unicode"????", 0);
addReaction(11, unicode"????????", 5e18);
}
// Get Price for Update
function getPriceForUpdate(uint _price) public view returns (uint) {
return _price * 1e18 / booster.getEosPriceInUsd();
}
// Update Socials
function setDescription(address _token, string calldata _description) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(infoUpdatePrice > 0 && msg.sender != ETH_OS){
uint tokensToBurn = getPriceForUpdate(infoUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUpdates += tokensToBurn;
}
Description[_token] = _description;
}
function setWebsite(address _token, string calldata _website) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(infoUpdatePrice > 0 && msg.sender != ETH_OS){
uint tokensToBurn = getPriceForUpdate(infoUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUpdates += tokensToBurn;
}
Website[_token] = _website;
}
function setSocials(address _token, string calldata _socials) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(infoUpdatePrice > 0 && msg.sender != ETH_OS){
uint tokensToBurn = getPriceForUpdate(infoUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUpdates += tokensToBurn;
}
Socials[_token] = _socials;
}
function setImage(address _token, string calldata _image) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(infoUpdatePrice > 0 && msg.sender != ETH_OS){
uint tokensToBurn = getPriceForUpdate(infoUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUpdates += tokensToBurn;
}
Image[_token] = _image;
}
function setChat(address _token, string calldata _chat) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(infoUpdatePrice > 0 && msg.sender != ETH_OS){
uint tokensToBurn = getPriceForUpdate(infoUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUpdates += tokensToBurn;
}
Chat[_token] = _chat;
}
// User Profile
function setUserName(string calldata _name) public {
require(!isNameTaken[_name], "Name already taken");
if(usernameUpdatePrice > 0){
uint tokensToBurn = getPriceForUpdate(usernameUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUserProfile += tokensToBurn;
}
if(isUserNameUpdated[msg.sender]){
isNameTaken[userName[msg.sender]] = false;
nameToAddress[userName[msg.sender]] = address(0);
}
userName[msg.sender] = _name;
nameToAddress[_name] = msg.sender;
isNameTaken[_name] = true;
isUserNameUpdated[msg.sender] = true;
}
function setAvatar(string calldata _avatar) public {
if(avatarUpdatePrice > 0){
uint tokensToBurn = getPriceForUpdate(avatarUpdatePrice);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaUserProfile += tokensToBurn;
}
avatar[msg.sender] = _avatar;
}
// Reactions
function addReaction(uint256 id, string memory _reaction, uint256 _price) public onlyOwner {
priceForReaction[id] = _price;
reaction[id] = _reaction;
}
function react(address _token, uint256 id) public {
if(priceForReaction[id] > 0){
uint256 tokensToBurn = getPriceForUpdate(priceForReaction[id]);
mainToken.transferFrom(msg.sender, address(this), tokensToBurn);
mainToken.burn(tokensToBurn);
burnedViaReactions += tokensToBurn;
}
reactionAmount[_token][id] += 1;
}
// Admin
function setEthOS(address _ethOS) public onlyOwner {
ETH_OS = _ethOS;
}
function setBooster(address _booster) public onlyOwner {
booster = IBooster(_booster);
}
function setMainToken(address _mainToken) public onlyOwner {
mainToken = IEOS20(_mainToken);
}
function setPricesForUpdates(uint _info) public onlyOwner {
infoUpdatePrice = _info;
}
function setPriceForUserName(uint _price) public onlyOwner {
usernameUpdatePrice = _price;
}
function setPriceForAvatar(uint _price) public onlyOwner {
avatarUpdatePrice = _price;
}
}
"
},
"src/Lock.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/*
☞ https://ethos.vision
???? https://x.com/Ethereum_OS
✌︎ https://t.me/ethosportal
Welcome to the Ethereum Operating System — the first-of-its-kind revenue generating DeFi pumpware
built as a social DeFi sandbox that is filled with composable elements so you can create, trade,
communicate, and participate—all in one place.
@
@@:
@@@::
==@@@::::
===@@@:::::
===+@@+::::::
====@@@::::::::
=====@@@:::::::::
======@@@::::::::::
=======@@@:::::::::::
=======*@@+::::::::::::
========@@@::::::::::::::
==========@@@::::::::::::::::
===========@@@:::::::::::::::::
============@@@::::::::::::::::::
============*@@=:::::::::::::::::::
=============@@@:::::::::::::::::::::
=====@@@======@@@::::::::@@@:::::::::::
======@@@======@@@::::::::@@@::::::::::::
=======@@@======@@@::::::::@@@:::::::::::::
=================@@=:::::::::::::::::::::::::
==================%@@::::::::::::::::::::::::::::
===================@@@:::::::::::::::::::::::::::::
====================@@@::::::::::::::::::::::::::::::
=====================@@@:::::::::::::::::::::::::::::::
=====================+@@-::::::::::::::::::::::::::::::::
======================@@@@@@@@@@@@@@*::::::::::::::::::::::
=======================@@@@@@@@@@@@@@::::::::::::::::::::::::
===================================@@@:::::::::::::::::::::::::
=================================@@@:::::::::::::::::::::::
=========@@@@===================@@@::::::::@@@*::::::::::
=========@@@@@@@==============*@@:::::%@@@@@:::::::::::
===========@@@@@@@@@@@#*+=+*@@@@@@@@@@@-:::::::::::
==============+@@@@@@@@@@@@@@@@@@@:::::::::::::::
==========================@@@::::::::::::::::::
========================@@@::::::::::::::::
======================@@@::::::::::::::::
=====================@@@:::::::::::::::
===================@@@:::::::::::::
==================@@@::::::::::::
================*@@=:::::::::::
==============@@@::::::::::
=============@@@:::::::::
============@@@::::::::
==========@@#::::::
========@@@::::::
=======@@@:::::
=====@@@:::
====@@@::
==*@@-:
=@@@:
@
@@@
@@@@@@@@@@@@@@@@@@@ @@@@@@@ ======= ========
@@@@@@@@@@@@@@@@@@ @@@@@ ==== ===== ===== =====
@@@@@ @@ @@@@ ===== ==== ==== ===
@@@@@ @ @@@@ ==== ===== ==== ===
@@@@@ @@@@ ==== ===== ==== ==
@@@@@ @@ @@@@ ===== ===== =====
@@@@@ @ @@@@ @@@@ @ ===== ===== =======
@@@@@ @@ @@@@@@@@@@@@ @@@@ @@@@@@@@ ===== ===== =========
@@@@@@@@@@@@@ @@@@ @@@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@@ @@@@@ ===== ===== =========
@@@@@ @@ @@@@ @@@@ @@@@ ===== ===== ========
@@@@@ @@@@ @@@@ @@@@ ====== ===== ======
@@@@@ @@@@ @@@@ @@@@ ===== ===== =====
@@@@@ @@@@ @@@@ @@@@ ===== ===== == =====
@@@@@ @@ @@@@ @@@@ @@@@ ==== ===== === =====
@@@@@ @@@ @@@@@ @@@@ @@@@ ===== ==== ==== ====
@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@ @@@@@@ ===== ==== ===== =====
@@@@@@@@@@@@@@@@@@@@ @@@@@@ @@@@@@@@@ @@@@@@@@@ ========== =========
*/
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../interfaces/IEOS20.sol";
import "./Lock.sol";
interface IWithdrawLiquidity {
function hasWithdrawLiquidity(address _token) external view returns (bool);
}
contract Lock is Ownable, Pausable, ReentrancyGuard {
// Contracts
IWithdrawLiquidity public ethOS;
// Mappings
mapping(address => bool) public isFunded;
mapping(address => bool) public isLpLocked;
mapping(address => bool) public isSettingsLocked;
mapping(address => uint256) public devDeadline;
mapping(address => uint256) public settingLockTime;
// Events
event LpLocked(address _token);
event SettingsLocked(address _token);
// User
function lockLp(address _token) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
require(!ethOS.hasWithdrawLiquidity(_token), "Liquidity has been withdrawn");
isLpLocked[_token] = true;
emit LpLocked(_token);
}
function lockSettings(address _token) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
isSettingsLocked[_token] = true;
emit SettingsLocked(_token);
}
function prolongDeadLine(address _token, uint _time) public{
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(devDeadline[_token] > block.timestamp){
devDeadline[_token] += _time;
}else{
devDeadline[_token] = block.timestamp + _time;
}
}
function lockModifySettings(address _token, uint _lock) public {
require(msg.sender == IEOS20(_token).owner(), "Owner only");
if(settingLockTime[_token] > block.timestamp){
settingLockTime[_token] += _lock;
}else{
settingLockTime[_token] = block.timestamp + _lock;
}
}
// Admin
function setEthOS(address _ethOS) public onlyOwner{
ethOS = IWithdrawLiquidity(_ethOS);
}
function setIsFunded(address _token, bool _isFunded) public onlyOwner{
isFunded[_token] = _isFunded;
}
function setIsLpLocked(address _token, bool _isLpLocked) public onlyOwner{
isLpLocked[_token] = _isLpLocked;
}
function setIsSettingsLocked(address _token, bool _isSettingsLocked) public onlyOwner{
isSettingsLocked[_token] = _isSettingsLocked;
}
}"
},
"lib/openzeppelin-contracts/contracts/access/Ownable.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
"
},
"interfaces/IUniswapV2Router01.sol": {
"content": "pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}"
},
"lib/openzeppelin-contracts/contracts/utils/math/SafeMath.sol": {
"content": "// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0)
Submitted on: 2025-09-17 15:37:19
Comments
Log in to comment.
No comments yet.