[ Download CSV Export ]
Latest 25 internal transaction
[ Download CSV Export ]
Contract Name:
BearnBar
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at BscScan.com on 2020-12-08 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @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); } /* * @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; } } /** * @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, 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) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * 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); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: weiValue}(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor(string memory name, string memory symbol) public { _name = name; _symbol = symbol; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface ITokenInterface is IERC20 { /** BFI has minters **/ function minters(address account) external view returns (bool); function mint(address _to, uint256 _amount) external; function cap() external returns (uint256); } // BearnBar is the coolest bar in town. You come in with some BFI, and leave with more! The longer you stay, the more BFI you get. // This contract handles swapping to and from sBFI, Bearn's staking token. contract BearnBar is ERC20("bearn.fi Staked Token", "sBFI") { using SafeERC20 for ITokenInterface; using SafeMath for uint256; ITokenInterface public bfi = ITokenInterface(0x81859801b01764D4f0Fa5E64729f5a6C3b91435b); address public governance; uint256 public constant BLOCKS_PER_YEAR = 10512000; uint256 public lastReleasedBlock = 0; uint256 public bfiPerBlock = 0; uint256 public yearlyEmissionRate = 6000; // 60% per year // Define the BFI token contract constructor(address _bfi) public { if (_bfi != address(0)) bfi = ITokenInterface(_bfi); governance = msg.sender; lastReleasedBlock = block.number; } function setGovernance(address _governance) public { require(_governance != address(0), "zero"); require(msg.sender == governance, "!governance"); governance = _governance; } function setYearlyEmissionRate(uint256 _rate) public { require(msg.sender == governance, "!governance"); require(_rate <= 10000, "over 100%"); yearlyEmissionRate = _rate; } function releasingRewards() public view returns (uint256) { return block.number.sub(lastReleasedBlock).mul(bfiPerBlock); } // @dev Return balance (deposited BFI + game/vault incentive + any external yield) plus releasing rewards function availableBalance() public view returns (uint256) { return bfi.balanceOf(address(this)).add(releasingRewards()); } // Safe BFI mint, ensure it is never over cap and we are the current owner. function _safeBfiMint(uint256 _amount) internal { if (bfi.minters(address(this))) { uint256 _totalSupply = bfi.totalSupply(); uint256 _cap = bfi.cap(); if (_totalSupply.add(_amount) > _cap) { bfi.mint(address(this), _cap.sub(_totalSupply)); } else { bfi.mint(address(this), _amount); } } } function _updateEmission(uint256 _withdraw) internal { uint256 _toRelease = releasingRewards(); if (_toRelease > 0) { _safeBfiMint(_toRelease); } uint256 _bal = bfi.balanceOf(address(this)).sub(_withdraw); if (_bal == 0) { bfiPerBlock = 0; } else { uint256 _oneYearReward = _bal.mul(yearlyEmissionRate).div(10000); bfiPerBlock = _oneYearReward.div(BLOCKS_PER_YEAR); } lastReleasedBlock = block.number; } // Enter the bar. Pay some BFIs. Earn some shares. // Locks BFI and mints sBFI function enter(uint256 _amount) public { require(_amount > 0, "!_amount"); // Gets the amount of available BFI locked in the contract uint256 _totalBFI = availableBalance(); // Gets the amount of sBFI in existence uint256 _totalShares = totalSupply(); if (_totalShares == 0 || _totalBFI == 0) { // If no sBFI exists, mint it 1:1 to the amount put in _mint(msg.sender, _amount); } else { // Calculate and mint the amount of sBFI the BFI is worth. The ratio will change overtime, as sBFI is burned/minted and BFI deposited + gained from fees / withdrawn. uint256 what = _amount.mul(_totalShares).div(_totalBFI); _mint(msg.sender, what); } // Lock the BFI in the contract bfi.safeTransferFrom(msg.sender, address(this), _amount); _updateEmission(0); } // Leave the bar. Claim back your BFI. // Unlocks the staked + gained BFI and burns sBFI function leave(uint256 _share) public { require(_share > 0, "!_share"); // Gets the amount of available BFI locked in the contract uint256 _totalBFI = availableBalance(); // Gets the amount of sBFI in existence uint256 _totalShares = totalSupply(); // Calculates the amount of BFI the sBFI is worth uint256 what = _share.mul(_totalBFI).div(_totalShares); _updateEmission(what); _burn(msg.sender, _share); bfi.safeTransfer(msg.sender, what); } // @dev Burn all sBFI you have and get back BFI. function exit() public { leave(balanceOf(msg.sender)); } // @dev price of 1 sBFI over BFI (should increase gradiently over time) function getPricePerFullShare() external view returns (uint256) { uint256 _ts = totalSupply(); return (_ts == 0) ? 1e18 : availableBalance().mul(1e18).div(_ts); } // This function allows governance to take unsupported tokens (non-core) out of the contract. This is in an effort to make someone whole, should they seriously mess up. // There is no guarantee governance will vote to return these. It also allows for removal of airdropped tokens. function governanceRecoverUnsupported( IERC20 _token, uint256 _amount, address _to ) external { require(msg.sender == governance, "!governance"); require(address(_token) != address(bfi), "BFI"); _token.transfer(_to, _amount); } }
[{"inputs":[{"internalType":"address","name":"_bfi","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"BLOCKS_PER_YEAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bfi","outputs":[{"internalType":"contract ITokenInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bfiPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"enter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastReleasedBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_share","type":"uint256"}],"name":"leave","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releasingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setYearlyEmissionRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"yearlyEmissionRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405260058054610100600160a81b0319167481859801b01764d4f0fa5e64729f5a6c3b91435b00179055600060078190556008556117706009553480156200004957600080fd5b506040516200243038038062002430833981810160405260208110156200006f57600080fd5b5051604080518082018252601581527f626561726e2e6669205374616b656420546f6b656e00000000000000000000006020828101918252835180850190945260048452637342464960e01b908401528151919291620000d29160039162000146565b508051620000e890600490602084019062000146565b50506005805460ff19166012179055506001600160a01b03811615620001295760058054610100600160a81b0319166101006001600160a01b038416021790555b50600680546001600160a01b0319163317905543600755620001e2565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b50620001c7929150620001cb565b5090565b5b80821115620001c75760008155600101620001cc565b61223e80620001f26000396000f3fe608060405234801561001057600080fd5b50600436106101ae5760003560e01c806377c7b8fc116100ee578063a9059cbb11610097578063d37db1d211610071578063d37db1d21461050e578063dbe6725714610516578063dd62ed3e1461051e578063e9fad8ee14610559576101ae565b8063a9059cbb1461049a578063ab033ea9146104d3578063ab2f0e5114610506576101ae565b8063a43a7e43116100c8578063a43a7e431461043c578063a457c2d714610444578063a59f3e0c1461047d576101ae565b806377c7b8fc14610424578063958a5dec1461042c57806395d89b4114610434576101ae565b8063395093511161015b57806356f765c71161013557806356f765c7146103c45780635aa6e675146103cc57806367dfd4c9146103d457806370a08231146103f1576101ae565b8063395093511461032957806339fd35571461036257806354575af414610381576101ae565b806318160ddd1161018c57806318160ddd146102ae57806323b872dd146102c8578063313ce5671461030b576101ae565b806306fdde03146101b3578063095ea7b3146102305780630b8771aa1461027d575b600080fd5b6101bb610561565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f55781810151838201526020016101dd565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102696004803603604081101561024657600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610615565b604080519115158252519081900360200190f35b610285610633565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6102b6610654565b60408051918252519081900360200190f35b610269600480360360608110156102de57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135909116906040013561065a565b6103136106fb565b6040805160ff9092168252519081900360200190f35b6102696004803603604081101561033f57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610704565b61037f6004803603602081101561037857600080fd5b503561075f565b005b61037f6004803603606081101561039757600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020810135916040909101351661085b565b6102b6610a12565b610285610a3a565b61037f600480360360208110156103ea57600080fd5b5035610a56565b6102b66004803603602081101561040757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610b37565b6102b6610b5f565b6102b6610b9f565b6101bb610ba5565b6102b6610c24565b6102696004803603604081101561045a57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610c2a565b61037f6004803603602081101561049357600080fd5b5035610c9f565b610269600480360360408110156104b057600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610d9c565b61037f600480360360208110156104e957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610db0565b6102b6610f01565b6102b6610fb5565b6102b6610fbc565b6102b66004803603604081101561053457600080fd5b5073ffffffffffffffffffffffffffffffffffffffff81358116916020013516610fc2565b61037f610ffa565b60038054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561060b5780601f106105e05761010080835404028352916020019161060b565b820191906000526020600020905b8154815290600101906020018083116105ee57829003601f168201915b5050505050905090565b600061062961062261100d565b8484611011565b5060015b92915050565b600554610100900473ffffffffffffffffffffffffffffffffffffffff1681565b60025490565b6000610667848484611158565b6106f18461067361100d565b6106ec856040518060600160405280602881526020016121286028913973ffffffffffffffffffffffffffffffffffffffff8a166000908152600160205260408120906106be61100d565b73ffffffffffffffffffffffffffffffffffffffff1681526020810191909152604001600020549190611328565b611011565b5060019392505050565b60055460ff1690565b600061062961071161100d565b846106ec856001600061072261100d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918c1681529252902054906113d9565b60065473ffffffffffffffffffffffffffffffffffffffff1633146107e557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b61271081111561085657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f6f76657220313030250000000000000000000000000000000000000000000000604482015290519081900360640190fd5b600955565b60065473ffffffffffffffffffffffffffffffffffffffff1633146108e157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b60055473ffffffffffffffffffffffffffffffffffffffff84811661010090920416141561097057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f4246490000000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156109e157600080fd5b505af11580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b5050505050565b6000610a35600854610a2f6007544361145490919063ffffffff16565b90611496565b905090565b60065473ffffffffffffffffffffffffffffffffffffffff1681565b60008111610ac557604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f215f736861726500000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610acf610f01565b90506000610adb610654565b90506000610af382610aed8686611496565b90611509565b9050610afe8161154b565b610b083385611672565b600554610b3190610100900473ffffffffffffffffffffffffffffffffffffffff1633836117bc565b50505050565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b600080610b6a610654565b90508015610b8f57610b8a81610aed670de0b6b3a7640000610a2f610f01565b610b99565b670de0b6b3a76400005b91505090565b60075481565b60048054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561060b5780601f106105e05761010080835404028352916020019161060b565b60085481565b6000610629610c3761100d565b846106ec856040518060600160405280602581526020016121e46025913960016000610c6161100d565b73ffffffffffffffffffffffffffffffffffffffff908116825260208083019390935260409182016000908120918d16815292529020549190611328565b60008111610d0e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f215f616d6f756e74000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6000610d18610f01565b90506000610d24610654565b9050801580610d31575081155b15610d4557610d403384611849565b610d63565b6000610d5583610aed8685611496565b9050610d613382611849565b505b600554610d8d90610100900473ffffffffffffffffffffffffffffffffffffffff1633308661197a565b610d97600061154b565b505050565b6000610629610da961100d565b8484611158565b73ffffffffffffffffffffffffffffffffffffffff8116610e3457604080517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048083019190915260248201527f7a65726f00000000000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b60065473ffffffffffffffffffffffffffffffffffffffff163314610eba57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f21676f7665726e616e6365000000000000000000000000000000000000000000604482015290519081900360640190fd5b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000610a35610f0e610a12565b600554604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905161010090920473ffffffffffffffffffffffffffffffffffffffff16916370a0823191602480820192602092909190829003018186803b158015610f8357600080fd5b505afa158015610f97573d6000803e3d6000fd5b505050506040513d6020811015610fad57600080fd5b5051906113d9565b62a0668081565b60095481565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b61100b61100633610b37565b610a56565b565b3390565b73ffffffffffffffffffffffffffffffffffffffff831661107d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806121966024913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166110e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806120bf6022913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b73ffffffffffffffffffffffffffffffffffffffff83166111c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806121716025913960400191505060405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216611230576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061207a6023913960400191505060405180910390fd5b61123b838383610d97565b611285816040518060600160405280602681526020016120e16026913973ffffffffffffffffffffffffffffffffffffffff86166000908152602081905260409020549190611328565b73ffffffffffffffffffffffffffffffffffffffff80851660009081526020819052604080822093909355908416815220546112c190826113d9565b73ffffffffffffffffffffffffffffffffffffffff8084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156113d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561139657818101518382015260200161137e565b50505050905090810190601f1680156113c35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561144d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600061144d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611328565b6000826114a55750600061062d565b828202828482816114b257fe5b041461144d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806121076021913960400191505060405180910390fd5b600061144d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a0f565b6000611555610a12565b905080156115665761156681611a8e565b600061162783600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156115f557600080fd5b505afa158015611609573d6000803e3d6000fd5b505050506040513d602081101561161f57600080fd5b505190611454565b905080611638576000600855611669565b6000611655612710610aed6009548561149690919063ffffffff16565b90506116648162a06680611509565b600855505b50504360075550565b73ffffffffffffffffffffffffffffffffffffffff82166116de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806121506021913960400191505060405180910390fd5b6116ea82600083610d97565b6117348160405180606001604052806022815260200161209d6022913973ffffffffffffffffffffffffffffffffffffffff85166000908152602081905260409020549190611328565b73ffffffffffffffffffffffffffffffffffffffff83166000908152602081905260409020556002546117679082611454565b60025560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610d97908490611db8565b73ffffffffffffffffffffffffffffffffffffffff82166118cb57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6118d760008383610d97565b6002546118e490826113d9565b60025573ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090205461191790826113d9565b73ffffffffffffffffffffffffffffffffffffffff83166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff80861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610b31908590611db8565b60008183611a78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815283516024840152835190928392604490910191908501908083836000831561139657818101518382015260200161137e565b506000838581611a8457fe5b0495945050505050565b600554604080517ff46eccc4000000000000000000000000000000000000000000000000000000008152306004820152905161010090920473ffffffffffffffffffffffffffffffffffffffff169163f46eccc491602480820192602092909190829003018186803b158015611b0357600080fd5b505afa158015611b17573d6000803e3d6000fd5b505050506040513d6020811015611b2d57600080fd5b505115611db5576000600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611b9e57600080fd5b505afa158015611bb2573d6000803e3d6000fd5b505050506040513d6020811015611bc857600080fd5b5051600554604080517f355274ea000000000000000000000000000000000000000000000000000000008152905192935060009261010090920473ffffffffffffffffffffffffffffffffffffffff169163355274ea9160048082019260209290919082900301818787803b158015611c4057600080fd5b505af1158015611c54573d6000803e3d6000fd5b505050506040513d6020811015611c6a57600080fd5b5051905080611c7983856113d9565b1115611d1d57600554610100900473ffffffffffffffffffffffffffffffffffffffff166340c10f1930611cad8486611454565b6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611d0057600080fd5b505af1158015611d14573d6000803e3d6000fd5b50505050610d97565b600554604080517f40c10f1900000000000000000000000000000000000000000000000000000000815230600482015260248101869052905161010090920473ffffffffffffffffffffffffffffffffffffffff16916340c10f199160448082019260009290919082900301818387803b158015611d9a57600080fd5b505af1158015611dae573d6000803e3d6000fd5b5050505050505b50565b6060611e1a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611e909092919063ffffffff16565b805190915015610d9757808060200190516020811015611e3957600080fd5b5051610d97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806121ba602a913960400191505060405180910390fd5b6060611e9f8484600085611ea7565b949350505050565b6060611eb285612073565b611f1d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310611f8757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611f4a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611fe9576040519150601f19603f3d011682016040523d82523d6000602084013e611fee565b606091505b50915091508115612002579150611e9f9050565b8051156120125780518082602001fd5b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181815286516024840152865187939192839260440191908501908083836000831561139657818101518382015260200161137e565b3b15159056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656445524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212209587528e607498b9588ffae3bea434a7167354197001f1d661bd9ee425be43e864736f6c634300060c003300000000000000000000000081859801b01764d4f0fa5e64729f5a6c3b91435b
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000081859801b01764d4f0fa5e64729f5a6c3b91435b
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000081859801b01764d4f0fa5e64729f5a6c3b91435b
Deployed ByteCode Sourcemap
30545:5235:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17333:83;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19439:169;;;;;;;;;;;;;;;;-1:-1:-1;19439:169:0;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;30689:88;;;:::i;:::-;;;;;;;;;;;;;;;;;;;18408:100;;;:::i;:::-;;;;;;;;;;;;;;;;20082:355;;;;;;;;;;;;;;;;-1:-1:-1;20082:355:0;;;;;;;;;;;;;;;;;;:::i;18260:83::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;20846:218;;;;;;;;;;;;;;;;-1:-1:-1;20846:218:0;;;;;;;;;:::i;31464:204::-;;;;;;;;;;;;;;;;-1:-1:-1;31464:204:0;;:::i;:::-;;35486:291;;;;;;;;;;;;;;;;-1:-1:-1;35486:291:0;;;;;;;;;;;;;;;;;;:::i;31676:136::-;;;:::i;30786:25::-;;;:::i;34238:547::-;;;;;;;;;;;;;;;;-1:-1:-1;34238:547:0;;:::i;18571:119::-;;;;;;;;;;;;;;;;-1:-1:-1;18571:119:0;;;;:::i;35002:185::-;;;:::i;30879:36::-;;;:::i;17535:87::-;;;:::i;30922:30::-;;;:::i;21567:269::-;;;;;;;;;;;;;;;;-1:-1:-1;21567:269:0;;;;;;;;;:::i;33204:927::-;;;;;;;;;;;;;;;;-1:-1:-1;33204:927:0;;:::i;18903:175::-;;;;;;;;;;;;;;;;-1:-1:-1;18903:175:0;;;;;;;;;:::i;31250:206::-;;;;;;;;;;;;;;;;-1:-1:-1;31250:206:0;;;;:::i;31931:136::-;;;:::i;30820:50::-;;;:::i;30959:40::-;;;:::i;19141:151::-;;;;;;;;;;;;;;;;-1:-1:-1;19141:151:0;;;;;;;;;;;:::i;34847:70::-;;;:::i;17333:83::-;17403:5;17396:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17370:13;;17396:12;;17403:5;;17396:12;;17403:5;17396:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17333:83;:::o;19439:169::-;19522:4;19539:39;19548:12;:10;:12::i;:::-;19562:7;19571:6;19539:8;:39::i;:::-;-1:-1:-1;19596:4:0;19439:169;;;;;:::o;30689:88::-;;;;;;;;;:::o;18408:100::-;18488:12;;18408:100;:::o;20082:355::-;20222:4;20239:36;20249:6;20257:9;20268:6;20239:9;:36::i;:::-;20286:121;20295:6;20303:12;:10;:12::i;:::-;20317:89;20355:6;20317:89;;;;;;;;;;;;;;;;;:19;;;;;;;:11;:19;;;;;;20337:12;:10;:12::i;:::-;20317:33;;;;;;;;;;;;;-1:-1:-1;20317:33:0;;;:89;:37;:89::i;:::-;20286:8;:121::i;:::-;-1:-1:-1;20425:4:0;20082:355;;;;;:::o;18260:83::-;18326:9;;;;18260:83;:::o;20846:218::-;20934:4;20951:83;20960:12;:10;:12::i;:::-;20974:7;20983:50;21022:10;20983:11;:25;20995:12;:10;:12::i;:::-;20983:25;;;;;;;;;;;;;;;;;;-1:-1:-1;20983:25:0;;;:34;;;;;;;;;;;:38;:50::i;31464:204::-;31550:10;;;;31536;:24;31528:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31604:5;31595;:14;;31587:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31634:18;:26;31464:204::o;35486:291::-;35645:10;;;;35631;:24;35623:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35717:3;;;35690:31;;;35717:3;;;;;35690:31;;35682:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;35740:6;:15;;;35756:3;35761:7;35740:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;35486:291:0:o;31676:136::-;31725:7;31752:52;31792:11;;31752:35;31769:17;;31752:12;:16;;:35;;;;:::i;:::-;:39;;:52::i;:::-;31745:59;;31676:136;:::o;30786:25::-;;;;;;:::o;34238:547::-;34304:1;34295:6;:10;34287:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;34398:17;34418:18;:16;:18::i;:::-;34398:38;;34498:20;34521:13;:11;:13::i;:::-;34498:36;-1:-1:-1;34606:12:0;34621:39;34498:36;34621:21;:6;34632:9;34621:10;:21::i;:::-;:25;;:39::i;:::-;34606:54;;34673:21;34689:4;34673:15;:21::i;:::-;34707:25;34713:10;34725:6;34707:5;:25::i;:::-;34743:3;;:34;;:3;;;;;34760:10;34772:4;34743:16;:34::i;:::-;34238:547;;;;:::o;18571:119::-;18664:18;;18637:7;18664:18;;;;;;;;;;;;18571:119::o;35002:185::-;35057:7;35077:11;35091:13;:11;:13::i;:::-;35077:27;-1:-1:-1;35123:8:0;;35122:57;;35142:37;35175:3;35142:28;35165:4;35142:18;:16;:18::i;:37::-;35122:57;;;35135:4;35122:57;35115:64;;;35002:185;:::o;30879:36::-;;;;:::o;17535:87::-;17607:7;17600:14;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17574:13;;17600:14;;17607:7;;17600:14;;17607:7;17600:14;;;;;;;;;;;;;;;;;;;;;;;;30922:30;;;;:::o;21567:269::-;21660:4;21677:129;21686:12;:10;:12::i;:::-;21700:7;21709:96;21748:15;21709:96;;;;;;;;;;;;;;;;;:11;:25;21721:12;:10;:12::i;:::-;21709:25;;;;;;;;;;;;;;;;;;-1:-1:-1;21709:25:0;;;:34;;;;;;;;;;;:96;:38;:96::i;33204:927::-;33272:1;33262:7;:11;33254:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;33367:17;33387:18;:16;:18::i;:::-;33367:38;;33467:20;33490:13;:11;:13::i;:::-;33467:36;-1:-1:-1;33520:17:0;;;:35;;-1:-1:-1;33541:14:0;;33520:35;33516:467;;;33640:26;33646:10;33658:7;33640:5;:26::i;:::-;33516:467;;;33878:12;33893:40;33923:9;33893:25;:7;33905:12;33893:11;:25::i;:40::-;33878:55;;33948:23;33954:10;33966:4;33948:5;:23::i;:::-;33516:467;;34036:3;;:56;;:3;;;;;34057:10;34077:4;34084:7;34036:20;:56::i;:::-;34105:18;34121:1;34105:15;:18::i;:::-;33204:927;;;:::o;18903:175::-;18989:4;19006:42;19016:12;:10;:12::i;:::-;19030:9;19041:6;19006:9;:42::i;31250:206::-;31320:25;;;31312:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31387:10;;;;31373;:24;31365:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;31424:10;:24;;;;;;;;;;;;;;;31250:206::o;31931:136::-;31980:7;32007:52;32040:18;:16;:18::i;:::-;32007:3;;:28;;;;;;32029:4;32007:28;;;;;;:3;;;;;;;:13;;:28;;;;;;;;;;;;;;;:3;:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32007:28:0;;:32;:52::i;30820:50::-;30862:8;30820:50;:::o;30959:40::-;;;;:::o;19141:151::-;19257:18;;;;19230:7;19257:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;19141:151::o;34847:70::-;34881:28;34887:21;34897:10;34887:9;:21::i;:::-;34881:5;:28::i;:::-;34847:70::o;3352:106::-;3440:10;3352:106;:::o;24746:380::-;24882:19;;;24874:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24961:21;;;24953:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25034:18;;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;:36;;;25086:32;;;;;;;;;;;;;;;;;24746:380;;;:::o;22326:573::-;22466:20;;;22458:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22547:23;;;22539:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22623:47;22644:6;22652:9;22663:6;22623:20;:47::i;:::-;22703:71;22725:6;22703:71;;;;;;;;;;;;;;;;;:17;;;:9;:17;;;;;;;;;;;;:71;:21;:71::i;:::-;22683:17;;;;:9;:17;;;;;;;;;;;:91;;;;22808:20;;;;;;;:32;;22833:6;22808:24;:32::i;:::-;22785:20;;;;:9;:20;;;;;;;;;;;;:55;;;;22856:35;;;;;;;22785:20;;22856:35;;;;;;;;;;;;;22326:573;;;:::o;5449:226::-;5569:7;5605:12;5597:6;;;;5589:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5641:5:0;;;5449:226::o;4546:181::-;4604:7;4636:5;;;4660:6;;;;4652:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4718:1;4546:181;-1:-1:-1;;;4546:181:0:o;5010:136::-;5068:7;5095:43;5099:1;5102;5095:43;;;;;;;;;;;;;;;;;:3;:43::i;5934:471::-;5992:7;6237:6;6233:47;;-1:-1:-1;6267:1:0;6260:8;;6233:47;6304:5;;;6308:1;6304;:5;:1;6328:5;;;;;:10;6320:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6881:132;6939:7;6966:39;6970:1;6973;6966:39;;;;;;;;;;;;;;;;;:3;:39::i;32575:532::-;32639:18;32660;:16;:18::i;:::-;32639:39;-1:-1:-1;32693:14:0;;32689:71;;32724:24;32737:10;32724:12;:24::i;:::-;32770:12;32785:43;32818:9;32785:3;;;;;;;;;;;:13;;;32807:4;32785:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32785:28:0;;:32;:43::i;:::-;32770:58;-1:-1:-1;32843:9:0;32839:218;;32883:1;32869:11;:15;32839:218;;;32917:22;32942:39;32975:5;32942:28;32951:18;;32942:4;:8;;:28;;;;:::i;:39::-;32917:64;-1:-1:-1;33010:35:0;32917:64;30862:8;33010:18;:35::i;:::-;32996:11;:49;-1:-1:-1;32839:218:0;-1:-1:-1;;33087:12:0;33067:17;:32;-1:-1:-1;32575:532:0:o;23890:418::-;23974:21;;;23966:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24046:49;24067:7;24084:1;24088:6;24046:20;:49::i;:::-;24129:68;24152:6;24129:68;;;;;;;;;;;;;;;;;:18;;;:9;:18;;;;;;;;;;;;:68;:22;:68::i;:::-;24108:18;;;:9;:18;;;;;;;;;;:89;24223:12;;:24;;24240:6;24223:16;:24::i;:::-;24208:12;:39;24263:37;;;;;;;;24289:1;;24263:37;;;;;;;;;;;;;23890:418;;:::o;26842:211::-;26986:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27009:23;26986:58;;;26959:86;;26979:5;;26959:19;:86::i;23180:378::-;23264:21;;;23256:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23334:49;23363:1;23367:7;23376:6;23334:20;:49::i;:::-;23411:12;;:24;;23428:6;23411:16;:24::i;:::-;23396:12;:39;23467:18;;;:9;:18;;;;;;;;;;;:30;;23490:6;23467:22;:30::i;:::-;23446:18;;;:9;:18;;;;;;;;;;;:51;;;;23513:37;;;;;;;23446:18;;:9;;23513:37;;;;;;;;;;23180:378;;:::o;27061:248::-;27232:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27255:27;27232:68;;;27205:96;;27225:5;;27205:19;:96::i;7509:312::-;7629:7;7664:12;7657:5;7649:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7688:9;7704:1;7700;:5;;;;;;;7509:312;-1:-1:-1;;;;;7509:312:0:o;32156:411::-;32219:3;;:26;;;;;;32239:4;32219:26;;;;;;:3;;;;;;;:11;;:26;;;;;;;;;;;;;;;:3;:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32219:26:0;32215:345;;;32262:20;32285:3;;;;;;;;;;;:15;;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32285:17:0;32332:3;;:9;;;;;;;;32285:17;;-1:-1:-1;32317:12:0;;32332:3;;;;;;;:7;;:9;;;;;32285:17;;32332:9;;;;;;;;32317:12;32332:3;:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;32332:9:0;;-1:-1:-1;32332:9:0;32360:25;:12;32377:7;32360:16;:25::i;:::-;:32;32356:193;;;32413:3;;;;;;;:8;32430:4;32437:22;:4;32446:12;32437:8;:22::i;:::-;32413:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32356:193;;;32501:3;;:32;;;;;;32518:4;32501:32;;;;;;;;;;;;:3;;;;;;;:8;;:32;;;;;-1:-1:-1;;32501:32:0;;;;;;;;-1:-1:-1;32501:3:0;:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32215:345;;;32156:411;:::o;29303:774::-;29727:23;29753:69;29781:4;29753:69;;;;;;;;;;;;;;;;;29761:5;29753:27;;;;:69;;;;;:::i;:::-;29837:17;;29727:95;;-1:-1:-1;29837:21:0;29833:237;;29992:10;29981:30;;;;;;;;;;;;;;;-1:-1:-1;29981:30:0;29973:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12729:230;12866:12;12898:53;12921:6;12929:4;12935:1;12938:12;12898:22;:53::i;:::-;12891:60;12729:230;-1:-1:-1;;;;12729:230:0:o;14217:1020::-;14390:12;14423:18;14434:6;14423:10;:18::i;:::-;14415:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14549:12;14563:23;14590:6;:11;;14609:8;14619:4;14590:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14548:76;;;;14639:7;14635:595;;;14670:10;-1:-1:-1;14663:17:0;;-1:-1:-1;14663:17:0;14635:595;14784:17;;:21;14780:439;;15047:10;15041:17;15108:15;15095:10;15091:2;15087:19;15080:44;14995:148;15183:20;;;;;;;;;;;;;;;;;;;;15190:12;;15183:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9789:444;10169:20;10217:8;;;9789:444::o
Swarm Source
ipfs://9587528e607498b9588ffae3bea434a7167354197001f1d661bd9ee425be43e8
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.