Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 196 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Mass Harvest | 24387071 | 30 days ago | IN | 0 ETH | 0.00044593 | ||||
| Mass Harvest | 23483654 | 156 days ago | IN | 0 ETH | 0.00129571 | ||||
| Mass Harvest | 22987897 | 225 days ago | IN | 0 ETH | 0.00051548 | ||||
| Mass Harvest | 22947238 | 231 days ago | IN | 0 ETH | 0.00133816 | ||||
| Mass Harvest | 22508826 | 292 days ago | IN | 0 ETH | 0.0001039 | ||||
| Mass Harvest | 22441329 | 302 days ago | IN | 0 ETH | 0.00280513 | ||||
| Mass Harvest | 22386930 | 309 days ago | IN | 0 ETH | 0.00004516 | ||||
| Mass Harvest | 22295491 | 322 days ago | IN | 0 ETH | 0.00025855 | ||||
| Mass Harvest | 22268765 | 326 days ago | IN | 0 ETH | 0.00076477 | ||||
| Mass Harvest | 22267758 | 326 days ago | IN | 0 ETH | 0.00034777 | ||||
| Mass Harvest | 22171615 | 339 days ago | IN | 0 ETH | 0.00007336 | ||||
| Mass Harvest | 22156050 | 342 days ago | IN | 0 ETH | 0.00026756 | ||||
| Mass Harvest | 22136757 | 344 days ago | IN | 0 ETH | 0.00011135 | ||||
| Mass Harvest | 22124655 | 346 days ago | IN | 0 ETH | 0.00005867 | ||||
| Mass Harvest | 22083535 | 352 days ago | IN | 0 ETH | 0.00027892 | ||||
| Mass Harvest | 22083492 | 352 days ago | IN | 0 ETH | 0.00028442 | ||||
| Mass Harvest | 22083461 | 352 days ago | IN | 0 ETH | 0.00026968 | ||||
| Mass Harvest | 22083411 | 352 days ago | IN | 0 ETH | 0.00031607 | ||||
| Mass Harvest | 22083369 | 352 days ago | IN | 0 ETH | 0.00028054 | ||||
| Mass Harvest | 22083337 | 352 days ago | IN | 0 ETH | 0.00013035 | ||||
| Mass Harvest | 22083214 | 352 days ago | IN | 0 ETH | 0.00028948 | ||||
| Mass Harvest | 22083121 | 352 days ago | IN | 0 ETH | 0.00011974 | ||||
| Mass Harvest | 22075573 | 353 days ago | IN | 0 ETH | 0.00011183 | ||||
| Mass Harvest | 22075487 | 353 days ago | IN | 0 ETH | 0.00014603 | ||||
| Mass Harvest | 22018264 | 361 days ago | IN | 0 ETH | 0.00204211 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xD610d39a...9225CBEe3 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
YieldFarm
Compiler Version
v0.6.11+commit.5ef660b1
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.11;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IStaking.sol";
contract YieldFarm {
// lib
using SafeMath for uint;
using SafeMath for uint128;
// constants
uint public immutable TOTAL_DISTRIBUTED_AMOUNT;
uint public immutable NR_OF_EPOCHS;
// state variables
// addreses
address private immutable _token;
address private immutable _communityVault;
// contracts
IERC20 private immutable _push;
IStaking private _staking;
uint[] private epochs;
uint private immutable _genesisEpochAmount;
uint private _deprecationPerEpoch;
uint128 public lastInitializedEpoch;
mapping(address => uint128) public lastEpochIdHarvested;
uint public epochDuration; // init from staking contract
uint public epochStart; // init from staking contract
// events
event MassHarvest(address indexed user, uint256 epochsHarvested, uint256 totalValue);
event Harvest(address indexed user, uint128 indexed epochId, uint256 amount);
// constructor
// @param totalDistributedAmount
constructor(address pushTokenAddress, address token, address stakeContract, address communityVault, uint genesisEpochAmount, uint deprecationPerEpoch, uint nrOfEpochs) public {
_push = IERC20(pushTokenAddress);
_token = token;
_staking = IStaking(stakeContract);
_communityVault = communityVault;
epochDuration = _staking.epochDuration();
epochStart = _staking.epoch1Start() + epochDuration;
uint n = nrOfEpochs;
uint difference = (n.mul(n.sub(1))).div(2); //Changed formula, we count first n-1 numbers not n since substraction happens after first epoch uint difference = (n.mul(n.add(1))).div(2);
TOTAL_DISTRIBUTED_AMOUNT = (genesisEpochAmount.mul(n)).sub(difference.mul(deprecationPerEpoch)); //Changed, formula was not multplying correctly, doesn't hamper contract since used in frontend
NR_OF_EPOCHS = nrOfEpochs;
epochs = new uint[](nrOfEpochs + 1);
_genesisEpochAmount = genesisEpochAmount;
_deprecationPerEpoch = deprecationPerEpoch;
}
// public methods
// public method to harvest all the unharvested epochs until current epoch - 1
function massHarvest() external returns (uint){
uint totalDistributedValue;
uint epochId = _getEpochId().sub(1); // fails in epoch 0
uint lastEpochIdHarvestedUser = lastEpochIdHarvested[msg.sender];
// force max number of epochs
if (epochId > NR_OF_EPOCHS) {
epochId = NR_OF_EPOCHS;
}
for (uint128 i = lastEpochIdHarvested[msg.sender] + 1; i <= epochId; i++) {
// i = epochId
// compute distributed Value and do one single transfer at the end
totalDistributedValue += _harvest(i);
}
emit MassHarvest(msg.sender, epochId - lastEpochIdHarvestedUser, totalDistributedValue);
if (totalDistributedValue > 0) {
_push.transferFrom(_communityVault, msg.sender, totalDistributedValue);
}
return totalDistributedValue;
}
function harvest (uint128 epochId) external returns (uint){
// checks for requested epoch
require (_getEpochId() > epochId, "This epoch is in the future");
require(epochId <= NR_OF_EPOCHS, "Maximum number of epochs exceeded");
require (lastEpochIdHarvested[msg.sender].add(1) == epochId, "Harvest in order");
uint userReward = _harvest(epochId);
if (userReward > 0) {
_push.transferFrom(_communityVault, msg.sender, userReward);
}
emit Harvest(msg.sender, epochId, userReward);
return userReward;
}
// views
// calls to the staking smart contract to retrieve the epoch total pool size
function getPoolSize(uint128 epochId) external view returns (uint) {
return _getPoolSize(epochId);
}
function getCurrentEpoch() external view returns (uint) {
return _getEpochId();
}
// calls to the staking smart contract to retrieve user balance for an epoch
function getEpochStake(address userAddress, uint128 epochId) external view returns (uint) {
return _getUserBalancePerEpoch(userAddress, epochId);
}
function userLastEpochIdHarvested() external view returns (uint){
return lastEpochIdHarvested[msg.sender];
}
// internal methods
function _initEpoch(uint128 epochId) internal {
require(lastInitializedEpoch.add(1) == epochId, "Epoch can be init only in order");
lastInitializedEpoch = epochId;
// call the staking smart contract to init the epoch
epochs[epochId] = _getPoolSize(epochId);
}
function _harvest (uint128 epochId) internal returns (uint) {
// try to initialize an epoch. if it can't it fails
// if it fails either user either a BarnBridge account will init not init epochs
if (lastInitializedEpoch < epochId) {
_initEpoch(epochId);
}
// Set user state for last harvested
lastEpochIdHarvested[msg.sender] = epochId;
// compute and return user total reward. For optimization reasons the transfer have been moved to an upper layer (i.e. massHarvest needs to do a single transfer)
// exit if there is no stake on the epoch
if (epochs[epochId] == 0) {
return 0;
}
return _calcTotalAmountPerEpoch(epochId)
.mul(_getUserBalancePerEpoch(msg.sender, epochId))
.div(epochs[epochId]);
}
function _calcTotalAmountPerEpoch(uint256 epochId) internal view returns (uint) {
return _genesisEpochAmount.sub(epochId.mul(_deprecationPerEpoch));
}
function _getPoolSize(uint128 epochId) internal view returns (uint) {
// retrieve token token balance
return _staking.getEpochPoolSize(_token, _stakingEpochId(epochId));
}
function _getUserBalancePerEpoch(address userAddress, uint128 epochId) internal view returns (uint){
// retrieve token token balance per user per epoch
return _staking.getEpochUserBalance(userAddress, _token, _stakingEpochId(epochId));
}
// compute epoch id from blocktimestamp and epochstart date
function _getEpochId() internal view returns (uint128 epochId) {
if (block.timestamp < epochStart) {
return 0;
}
epochId = uint128(block.timestamp.sub(epochStart).div(epochDuration).add(1));
}
// get the staking epoch which is 1 epoch more
function _stakingEpochId(uint128 epochId) pure internal returns (uint128) {
return epochId + 1;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/access/Ownable.sol";
interface IStaking {
function getEpochId(uint timestamp) external view returns (uint); // get epoch id
function getEpochUserBalance(address user, address token, uint128 epoch) external view returns(uint);
function getEpochPoolSize(address token, uint128 epoch) external view returns (uint);
function epoch1Start() external view returns (uint);
function epochDuration() external view returns (uint);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <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 () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
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 {
emit OwnershipTransferred(_owner, address(0));
_owner = 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");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"pushTokenAddress","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"stakeContract","type":"address"},{"internalType":"address","name":"communityVault","type":"address"},{"internalType":"uint256","name":"genesisEpochAmount","type":"uint256"},{"internalType":"uint256","name":"deprecationPerEpoch","type":"uint256"},{"internalType":"uint256","name":"nrOfEpochs","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint128","name":"epochId","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"epochsHarvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalValue","type":"uint256"}],"name":"MassHarvest","type":"event"},{"inputs":[],"name":"NR_OF_EPOCHS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_DISTRIBUTED_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"epochStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint128","name":"epochId","type":"uint128"}],"name":"getEpochStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"epochId","type":"uint128"}],"name":"getPoolSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"epochId","type":"uint128"}],"name":"harvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastEpochIdHarvested","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastInitializedEpoch","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"userLastEpochIdHarvested","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0x6101406040523480156200001257600080fd5b506040516200117638038062001176833981810160405260e08110156200003857600080fd5b508051602080830151604080850151606080870151608088015160a089015160c0998a015189851b6001600160601b03199081166101005288861b8116909b52600080546001600160a01b0319166001600160a01b0380891691909117918290559585901b909b1660e05286516327f843b560e11b81529651999a9799959893979296919590949290921692634ff0876a92600480840193829003018186803b158015620000e557600080fd5b505afa158015620000fa573d6000803e3d6000fd5b505050506040513d60208110156200011157600080fd5b505160058190556000546040805163f4a4341d60e01b815290516001600160a01b039092169163f4a4341d91600480820192602092909190829003018186803b1580156200015e57600080fd5b505afa15801562000173573d6000803e3d6000fd5b505050506040513d60208110156200018a57600080fd5b505101600655806000620001df6002620001cb620001b6856001620002aa602090811b620006f017901c565b856200030d60201b6200074d1790919060201c565b6200037260201b620007a61790919060201c565b90506200022d620001ff85836200030d60201b6200074d1790919060201c565b6200021984886200030d60201b6200074d1790919060201c565b620002aa60201b620006f01790919060201c565b60805260a0839052600183016001600160401b03811180156200024f57600080fd5b506040519080825280602002602001820160405280156200027a578160200160208202803683370190505b5080516200029191600191602090910190620003db565b50505061012092909252600255506200044b9350505050565b60008282111562000302576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b6000826200031e5750600062000307565b828202828482816200032c57fe5b04146200036b5760405162461bcd60e51b8152600401808060200182810382526021815260200180620011556021913960400191505060405180910390fd5b9392505050565b6000808211620003c9576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381620003d357fe5b049392505050565b82805482825590600052602060002090810192821562000419579160200282015b8281111562000419578251825591602001919060010190620003fc565b50620004279291506200042b565b5090565b6200044891905b8082111562000427576000815560010162000432565b90565b60805160a05160c05160601c60e05160601c6101005160601c61012051610c99620004bc60003980610bf052508061035b528061060d52508061032452806105d65250806109395280610a5f5250806101d0528061023d528061026552806104d25250806103f95250610c996000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806373eff2fd1161007157806373eff2fd146101285780639c7ec8811461016a578063a1c130d414610172578063a43564eb1461017a578063b97dd9e2146101a0578063f7e251f8146101a8576100b4565b806305917ac0146100b957806315e5a1e5146100d3578063290e4544146100db57806343312451146100e35780634ff0876a14610118578063674247d614610120575b600080fd5b6100c16101ce565b60408051918252519081900360200190f35b6100c16101f2565b6100c16101f8565b6100c1600480360360408110156100f957600080fd5b5080356001600160a01b031690602001356001600160801b03166103dc565b6100c16103f1565b6100c16103f7565b61014e6004803603602081101561013e57600080fd5b50356001600160a01b031661041b565b604080516001600160801b039092168252519081900360200190f35b61014e610436565b6100c1610445565b6100c16004803603602081101561019057600080fd5b50356001600160801b0316610461565b6100c16106cd565b6100c1600480360360208110156101be57600080fd5b50356001600160801b03166106e5565b7f000000000000000000000000000000000000000000000000000000000000000081565b60065481565b600080600061021f600161020a61080d565b6001600160801b03169063ffffffff6106f016565b336000908152600460205260409020549091506001600160801b03167f0000000000000000000000000000000000000000000000000000000000000000821115610287577f000000000000000000000000000000000000000000000000000000000000000091505b336000908152600460205260409020546001600160801b03166001015b82816001600160801b0316116102c9576102bd8161085e565b909301926001016102a4565b5060408051828403815260208101859052815133927fb68dafc1da13dc868096d0b87347c831d0bda92d178317eb1dec7f788444485c928290030190a282156103d357604080516323b872dd60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301523360248301526044820186905291517f0000000000000000000000000000000000000000000000000000000000000000909216916323b872dd916064808201926020929091908290030181600087803b1580156103a657600080fd5b505af11580156103ba573d6000803e3d6000fd5b505050506040513d60208110156103d057600080fd5b50505b50909150505b90565b60006103e88383610924565b90505b92915050565b60055481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6004602052600090815260409020546001600160801b031681565b6003546001600160801b031681565b336000908152600460205260409020546001600160801b031690565b6000816001600160801b031661047561080d565b6001600160801b0316116104d0576040805162461bcd60e51b815260206004820152601b60248201527f546869732065706f636820697320696e20746865206675747572650000000000604482015290519081900360640190fd5b7f0000000000000000000000000000000000000000000000000000000000000000826001600160801b031611156105385760405162461bcd60e51b8152600401808060200182810382526021815260200180610c436021913960400191505060405180910390fd5b336000908152600460205260409020546001600160801b03808416916105669116600163ffffffff6109f116565b146105ab576040805162461bcd60e51b815260206004820152601060248201526f2430b93b32b9ba1034b71037b93232b960811b604482015290519081900360640190fd5b60006105b68361085e565b9050801561068557604080516323b872dd60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301523360248301526044820184905291517f0000000000000000000000000000000000000000000000000000000000000000909216916323b872dd916064808201926020929091908290030181600087803b15801561065857600080fd5b505af115801561066c573d6000803e3d6000fd5b505050506040513d602081101561068257600080fd5b50505b6040805182815290516001600160801b0385169133917f04ad45a69eeed9c390c3a678fed2d4b90bde98e742de9936d5e0915bf3d0ea4e9181900360200190a390505b919050565b60006106d761080d565b6001600160801b0316905090565b60006103eb82610a4b565b600082821115610747576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261075c575060006103eb565b8282028284828161076957fe5b04146103e85760405162461bcd60e51b8152600401808060200182810382526021815260200180610c226021913960400191505060405180910390fd5b60008082116107fc576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161080557fe5b049392505050565b6000600654421015610821575060006103d9565b610859600161084d600554610841600654426106f090919063ffffffff16565b9063ffffffff6107a616565b9063ffffffff6109f116565b905090565b6003546000906001600160801b03808416911610156108805761088082610b18565b33600090815260046020526040902080546001600160801b0319166001600160801b0384169081179091556001805490919081106108ba57fe5b9060005260206000200154600014156108d5575060006106c8565b6103eb6001836001600160801b0316815481106108ee57fe5b90600052602060002001546108416109063386610924565b610918866001600160801b0316610bd4565b9063ffffffff61074d16565b600080546001600160a01b0316638c028dd0847f000000000000000000000000000000000000000000000000000000000000000061096186610c1b565b604080516001600160e01b031960e087901b1681526001600160a01b0394851660048201529290931660248301526001600160801b0316604482015290516064808301926020929190829003018186803b1580156109be57600080fd5b505afa1580156109d2573d6000803e3d6000fd5b505050506040513d60208110156109e857600080fd5b50519392505050565b6000828201838110156103e8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080546001600160a01b0316632ca32d7e7f0000000000000000000000000000000000000000000000000000000000000000610a8785610c1b565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160801b03166001600160801b031681526020019250505060206040518083038186803b158015610ae657600080fd5b505afa158015610afa573d6000803e3d6000fd5b505050506040513d6020811015610b1057600080fd5b505192915050565b6003546001600160801b0380831691610b399116600163ffffffff6109f116565b14610b8b576040805162461bcd60e51b815260206004820152601f60248201527f45706f63682063616e20626520696e6974206f6e6c7920696e206f7264657200604482015290519081900360640190fd5b600380546001600160801b0319166001600160801b038316179055610baf81610a4b565b6001826001600160801b031681548110610bc557fe5b60009182526020909120015550565b60006103eb610bee6002548461074d90919063ffffffff16565b7f00000000000000000000000000000000000000000000000000000000000000009063ffffffff6106f016565b6001019056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d6178696d756d206e756d626572206f662065706f636873206578636565646564a264697066735822122089053b1300f8b72d6f9a2e361ed59c89c376d5fd2fce379be112281b03f7564f64736f6c634300060b0033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77000000000000000000000000f418588522d5dd018b425e472991e52ebbeeeeee000000000000000000000000af31fd9c3b0350424bf96e551d2d1264d84662050000000000000000000000009d2513f5b539dc774c66b28acec94e4bd00105c2000000000000000000000000bbc3d9331dcaf3d0d5abd81f59d6471d3548e1df000000000000000000000000000000000000000000000ff2056c038062100000000000000000000000000000000000000000000000000030ca024f987b900000000000000000000000000000000000000000000000000000000000000000001c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806373eff2fd1161007157806373eff2fd146101285780639c7ec8811461016a578063a1c130d414610172578063a43564eb1461017a578063b97dd9e2146101a0578063f7e251f8146101a8576100b4565b806305917ac0146100b957806315e5a1e5146100d3578063290e4544146100db57806343312451146100e35780634ff0876a14610118578063674247d614610120575b600080fd5b6100c16101ce565b60408051918252519081900360200190f35b6100c16101f2565b6100c16101f8565b6100c1600480360360408110156100f957600080fd5b5080356001600160a01b031690602001356001600160801b03166103dc565b6100c16103f1565b6100c16103f7565b61014e6004803603602081101561013e57600080fd5b50356001600160a01b031661041b565b604080516001600160801b039092168252519081900360200190f35b61014e610436565b6100c1610445565b6100c16004803603602081101561019057600080fd5b50356001600160801b0316610461565b6100c16106cd565b6100c1600480360360208110156101be57600080fd5b50356001600160801b03166106e5565b7f000000000000000000000000000000000000000000000000000000000000001c81565b60065481565b600080600061021f600161020a61080d565b6001600160801b03169063ffffffff6106f016565b336000908152600460205260409020549091506001600160801b03167f000000000000000000000000000000000000000000000000000000000000001c821115610287577f000000000000000000000000000000000000000000000000000000000000001c91505b336000908152600460205260409020546001600160801b03166001015b82816001600160801b0316116102c9576102bd8161085e565b909301926001016102a4565b5060408051828403815260208101859052815133927fb68dafc1da13dc868096d0b87347c831d0bda92d178317eb1dec7f788444485c928290030190a282156103d357604080516323b872dd60e01b81526001600160a01b037f000000000000000000000000bbc3d9331dcaf3d0d5abd81f59d6471d3548e1df811660048301523360248301526044820186905291517f000000000000000000000000f418588522d5dd018b425e472991e52ebbeeeeee909216916323b872dd916064808201926020929091908290030181600087803b1580156103a657600080fd5b505af11580156103ba573d6000803e3d6000fd5b505050506040513d60208110156103d057600080fd5b50505b50909150505b90565b60006103e88383610924565b90505b92915050565b60055481565b7f00000000000000000000000000000000000000000001766e5066dae44720000081565b6004602052600090815260409020546001600160801b031681565b6003546001600160801b031681565b336000908152600460205260409020546001600160801b031690565b6000816001600160801b031661047561080d565b6001600160801b0316116104d0576040805162461bcd60e51b815260206004820152601b60248201527f546869732065706f636820697320696e20746865206675747572650000000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000001c826001600160801b031611156105385760405162461bcd60e51b8152600401808060200182810382526021815260200180610c436021913960400191505060405180910390fd5b336000908152600460205260409020546001600160801b03808416916105669116600163ffffffff6109f116565b146105ab576040805162461bcd60e51b815260206004820152601060248201526f2430b93b32b9ba1034b71037b93232b960811b604482015290519081900360640190fd5b60006105b68361085e565b9050801561068557604080516323b872dd60e01b81526001600160a01b037f000000000000000000000000bbc3d9331dcaf3d0d5abd81f59d6471d3548e1df811660048301523360248301526044820184905291517f000000000000000000000000f418588522d5dd018b425e472991e52ebbeeeeee909216916323b872dd916064808201926020929091908290030181600087803b15801561065857600080fd5b505af115801561066c573d6000803e3d6000fd5b505050506040513d602081101561068257600080fd5b50505b6040805182815290516001600160801b0385169133917f04ad45a69eeed9c390c3a678fed2d4b90bde98e742de9936d5e0915bf3d0ea4e9181900360200190a390505b919050565b60006106d761080d565b6001600160801b0316905090565b60006103eb82610a4b565b600082821115610747576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008261075c575060006103eb565b8282028284828161076957fe5b04146103e85760405162461bcd60e51b8152600401808060200182810382526021815260200180610c226021913960400191505060405180910390fd5b60008082116107fc576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161080557fe5b049392505050565b6000600654421015610821575060006103d9565b610859600161084d600554610841600654426106f090919063ffffffff16565b9063ffffffff6107a616565b9063ffffffff6109f116565b905090565b6003546000906001600160801b03808416911610156108805761088082610b18565b33600090815260046020526040902080546001600160801b0319166001600160801b0384169081179091556001805490919081106108ba57fe5b9060005260206000200154600014156108d5575060006106c8565b6103eb6001836001600160801b0316815481106108ee57fe5b90600052602060002001546108416109063386610924565b610918866001600160801b0316610bd4565b9063ffffffff61074d16565b600080546001600160a01b0316638c028dd0847f000000000000000000000000af31fd9c3b0350424bf96e551d2d1264d846620561096186610c1b565b604080516001600160e01b031960e087901b1681526001600160a01b0394851660048201529290931660248301526001600160801b0316604482015290516064808301926020929190829003018186803b1580156109be57600080fd5b505afa1580156109d2573d6000803e3d6000fd5b505050506040513d60208110156109e857600080fd5b50519392505050565b6000828201838110156103e8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080546001600160a01b0316632ca32d7e7f000000000000000000000000af31fd9c3b0350424bf96e551d2d1264d8466205610a8785610c1b565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160801b03166001600160801b031681526020019250505060206040518083038186803b158015610ae657600080fd5b505afa158015610afa573d6000803e3d6000fd5b505050506040513d6020811015610b1057600080fd5b505192915050565b6003546001600160801b0380831691610b399116600163ffffffff6109f116565b14610b8b576040805162461bcd60e51b815260206004820152601f60248201527f45706f63682063616e20626520696e6974206f6e6c7920696e206f7264657200604482015290519081900360640190fd5b600380546001600160801b0319166001600160801b038316179055610baf81610a4b565b6001826001600160801b031681548110610bc557fe5b60009182526020909120015550565b60006103eb610bee6002548461074d90919063ffffffff16565b7f000000000000000000000000000000000000000000000ff2056c0380621000009063ffffffff6106f016565b6001019056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d6178696d756d206e756d626572206f662065706f636873206578636565646564a264697066735822122089053b1300f8b72d6f9a2e361ed59c89c376d5fd2fce379be112281b03f7564f64736f6c634300060b0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.