More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xfB575062...06075c3D3 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Minion
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 2000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import { ITimeToken } from "./ITimeToken.sol"; /// @title Minion contract /// @author Einar Cesar - TIME Token Finance - https://timetoken.finance /// @notice Has the ability to produce TIME tokens for any contract which extends its behavior /// @dev It should have being enabled to produce TIME before or it will not work as desired. Sometimes, the coordinator address is the contract itself contract Minion { ITimeToken internal immutable _timeToken; address internal _coordinator; constructor(address coordinatorAddress, ITimeToken timeToken) { _coordinator = coordinatorAddress; _timeToken = timeToken; } /// @notice Produce TIME tokens and transfer them to the registered coordinator, if it has one /// @dev If the coordinator is an external contract, it maintains a fraction of the produced TIME as incentive for the protocol (which increases the number of token holders) function _produceTime() internal { _timeToken.mining(); if (_coordinator != address(this)) { uint256 amountToTransfer = (_timeToken.balanceOf(address(this)) * 9_999) / 10_000; if (amountToTransfer > 0) { _timeToken.transfer(_coordinator, amountToTransfer); } } } /// @notice Enables the contract to produce TIME tokens /// @dev It should be called right after the creation of the contract /// @return success Informs if the operation was carried correctly function enableMining() external payable returns (bool success) { require(msg.value > 0); try _timeToken.enableMining{ value: msg.value }() { success = true; } catch { } return success; } /// @notice External call for the _produceTime() function /// @dev Sometimes, when the Minion contract is inherited from another contract, it can calls the private function. Otherwise, the external function should exist in order to produce TIME for the contract function produceTime() external { _produceTime(); } /// @notice Alters the coordinator address /// @dev Depending on the strategy, a new coordinator may be necessary for the Minion... Only the old coordinator must be responsible to designate the new one /// @param newCoordinator The new coordinator address function updateCoordinator(address newCoordinator) external { require(msg.sender == _coordinator, "Minion: only coordinator can call this function"); _coordinator = newCoordinator; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; interface ITimeToken { function DEVELOPER_ADDRESS() external view returns (address); function BASE_FEE() external view returns (uint256); function COMISSION_RATE() external view returns (uint256); function SHARE_RATE() external view returns (uint256); function TIME_BASE_LIQUIDITY() external view returns (uint256); function TIME_BASE_FEE() external view returns (uint256); function TOLERANCE() external view returns (uint256); function dividendPerToken() external view returns (uint256); function firstBlock() external view returns (uint256); function isMiningAllowed(address account) external view returns (bool); function liquidityFactorNative() external view returns (uint256); function liquidityFactorTime() external view returns (uint256); function numberOfHolders() external view returns (uint256); function numberOfMiners() external view returns (uint256); function sharedBalance() external view returns (uint256); function poolBalance() external view returns (uint256); function totalMinted() external view returns (uint256); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function burn(uint256 amount) external; function transfer(address to, uint256 amount) external returns (bool success); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool success); function averageMiningRate() external view returns (uint256); function donateEth() external payable; function enableMining() external payable; function enableMiningWithTimeToken() external; function fee() external view returns (uint256); function feeInTime() external view returns (uint256); function mining() external; function saveTime() external payable returns (bool success); function spendTime(uint256 timeAmount) external returns (bool success); function swapPriceNative(uint256 amountNative) external view returns (uint256); function swapPriceTimeInverse(uint256 amountTime) external view returns (uint256); function accountShareBalance(address account) external view returns (uint256); function withdrawableShareBalance(address account) external view returns (uint256); function withdrawShare() external; receive() external payable; }
{ "remappings": [ "@layerzerolabs/=lib/solidity-examples/", "@aave/core-v3/=lib/aave-v3-core/", "@chainlink/=lib/chainlink/", "@0x/contracts-utils/=lib/0xprotocol/utils/", "@0x/zero-ex/=lib/0xprotocol/zero-ex/", "@0x/contracts-erc20/=lib/0xprotocol/erc20/", "@openzeppelin/=lib/openzeppelin-contracts/", "@superform-core/=lib/superform-core/", "@uniswap/v3-periphery/=lib/v3-periphery/", "@uniswap/v3-core/=lib/v3-core/", "@uniswap/swap-router-contracts/=lib/swap-router-contracts/", "0xprotocol/=lib/0xprotocol/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@prb/test/=lib/pt-v5-vault/lib/pt-v5-prize-pool/lib/prb-math/lib/prb-test/src/", "ERC1155A/=lib/superform-core/lib/ERC1155A/", "aave-v3-core/=lib/aave-v3-core/", "brokentoken/=lib/pt-v5-vault/lib/brokentoken/src/", "chainlink/=lib/chainlink/", "ds-test/=lib/superform-core/lib/ds-test/src/", "erc4626-tests/=lib/pt-v5-vault/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "layerzero/=lib/layerzero/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/pt-v5-vault/lib/openzeppelin-contracts/contracts/", "owner-manager-contracts/=lib/pt-v5-vault/lib/owner-manager-contracts/contracts/", "pigeon/=lib/superform-core/lib/pigeon/src/", "prb-math/=lib/pt-v5-vault/lib/pt-v5-prize-pool/lib/prb-math/src/", "prb-test/=lib/pt-v5-vault/lib/pt-v5-prize-pool/lib/prb-math/lib/prb-test/src/", "pt-v5-claimable-interface/=lib/pt-v5-vault/lib/pt-v5-claimable-interface/src/", "pt-v5-liquidator-interfaces/=lib/pt-v5-vault/lib/pt-v5-liquidator-interfaces/src/", "pt-v5-prize-pool/=lib/pt-v5-vault/lib/pt-v5-prize-pool/src/", "pt-v5-twab-controller/=lib/pt-v5-vault/lib/pt-v5-twab-controller/src/", "pt-v5-vault/=lib/pt-v5-vault/src/", "ring-buffer-lib/=lib/pt-v5-vault/lib/pt-v5-twab-controller/lib/ring-buffer-lib/src/", "solady/=lib/superform-core/lib/pigeon/lib/solady/", "solidity-examples/=lib/solidity-examples/contracts/", "solidity-stringutils/=lib/superform-core/lib/surl/lib/solidity-stringutils/", "solmate/=lib/superform-core/lib/ERC1155A/lib/solmate/src/", "super-vaults/=lib/superform-core/lib/super-vaults/src/", "superform-core/=lib/superform-core/", "surl/=lib/superform-core/lib/surl/", "swap-router-contracts/=lib/swap-router-contracts/contracts/", "uniform-random-number/=lib/pt-v5-vault/lib/pt-v5-prize-pool/lib/uniform-random-number/src/", "v2-core/=lib/superform-core/lib/super-vaults/lib/v2-core/contracts/", "v2-periphery/=lib/superform-core/lib/super-vaults/lib/v2-periphery/contracts/", "v3-core/=lib/v3-core/", "v3-periphery/=lib/v3-periphery/contracts/", "v4-core/=lib/v4-core/contracts/", "weird-erc20/=lib/pt-v5-vault/lib/brokentoken/lib/weird-erc20/src/" ], "optimizer": { "enabled": true, "runs": 2000000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"coordinatorAddress","type":"address"},{"internalType":"contract ITimeToken","name":"timeToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"enableMining","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"produceTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCoordinator","type":"address"}],"name":"updateCoordinator","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x6080604052600436106100345760003560e01c80634eb747e614610039578063a3e7f6dd14610050578063f9f94e341461006c575b600080fd5b34801561004557600080fd5b5061004e61008c565b005b610058610096565b604051901515815260200160405180910390f35b34801561007857600080fd5b5061004e610087366004610453565b61012a565b61009461021c565b565b60008034116100a457600080fd5b7f0000000000000000000000001666cf136d89ba9071c476eaf23035bccd7f3a3673ffffffffffffffffffffffffffffffffffffffff1663a3e7f6dd346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561010c57600080fd5b505af19350505050801561011e575060015b15610127575060015b90565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4d696e696f6e3a206f6e6c7920636f6f7264696e61746f722063616e2063616c60448201527f6c20746869732066756e6374696f6e0000000000000000000000000000000000606482015260840160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b7f0000000000000000000000001666cf136d89ba9071c476eaf23035bccd7f3a3673ffffffffffffffffffffffffffffffffffffffff1663662fac396040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561028457600080fd5b505af1158015610298573d6000803e3d6000fd5b505060005473ffffffffffffffffffffffffffffffffffffffff16301491506100949050576040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906127109073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001666cf136d89ba9071c476eaf23035bccd7f3a3616906370a0823190602401602060405180830381865afa15801561034e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103729190610490565b61037e9061270f6104a9565b61038891906104ed565b90508015610450576000546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390527f0000000000000000000000001666cf136d89ba9071c476eaf23035bccd7f3a369091169063a9059cbb906044016020604051808303816000875af115801561042a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061044e9190610528565b505b50565b60006020828403121561046557600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461048957600080fd5b9392505050565b6000602082840312156104a257600080fd5b5051919050565b80820281158282048414176104e7577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b92915050565b600082610523577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561053a57600080fd5b8151801515811461048957600080fdfea2646970667358221220f5697db98bec1c120f5b72b34213658658cbdd9c7f0d5ee02df1a00ff6b05d5164736f6c63430008180033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.