Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
SWPxVoterProxy
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "./Interfaces/SWPX/ISWPxVoterProxy.sol"; import "./Interfaces/SWPX/IRevenueSharingPool.sol"; import "./Interfaces/Pancake/IMasterChef.sol"; import "./Interfaces/SWPX/IVotingEscrowV1_1.sol"; import "./lib/TransferHelper.sol"; contract SWPxVoterProxy is ISWPxVoterProxy, OwnableUpgradeable { using SafeERC20 for IERC20; using SafeMath for uint256; address public swpx; IMasterChefV2 public masterChef; address public veSWPx; address public booster; address public depositor; address public bribeManager; uint256 constant FEE_DENOMINATOR = 10000; uint256 public bribeCallerFee; uint256 public bribeProtocolFee; address public bribeFeeCollector; address[] public revenueSharingPools; uint256 lockedTokenId = 0; uint256 nextIncreaseUnlockAt; // 7 days, to use as denominator in lock calculation uint256 private constant WEEK = 604800; // 2 years uint256 private constant MAX_LOCK_DURATION = 63_072_000; // 2 years event SWPxLockMinted(uint256 tokenId); event SWPxLocked(uint256 amount); event SWPxLockDurationIncreased(uint256 lockedUntil); modifier onlyBooster() { require(msg.sender == booster, "!auth"); _; } modifier onlyDepositor() { require(msg.sender == depositor, "!auth"); _; } function initialize() public initializer { __Ownable_init(); } function setParams( address _masterChef, address _swpx, address _veSWPx, address _booster, address _depositor ) external onlyOwner { require(booster == address(0), "!init"); // require(_masterChef != address(0), "invalid _masterChef!"); require(_swpx != address(0), "invalid _cake!"); // require(_veSWPx != address(0), "invalid _veSWPx!"); // require(_booster != address(0), "invalid _booster!"); require(_depositor != address(0), "invalid _depositor!"); masterChef = IMasterChefV2(_masterChef); swpx = _swpx; veSWPx = _veSWPx; booster = _booster; depositor = _depositor; emit BoosterUpdated(_booster); emit DepositorUpdated(_depositor); } function setBribeManager(address _bribeManager) external onlyOwner { require(_bribeManager != address(0), "invald _bribeManager!"); bribeManager = _bribeManager; } function setBribeCallerFee(uint256 _bribeCallerFee) external onlyOwner { require(_bribeCallerFee <= 100, "invalid _bribeCallerFee!"); bribeCallerFee = _bribeCallerFee; } function setBribeProtocolFee(uint256 _bribeProtocolFee) external onlyOwner { require(_bribeProtocolFee <= 2000, "invalid _bribeProtocolFee!"); bribeProtocolFee = _bribeProtocolFee; } function setBribeFeeCollector( address _bribeFeeCollector ) external onlyOwner { require( _bribeFeeCollector != address(0), "invalid _bribeFeeCollector!" ); bribeFeeCollector = _bribeFeeCollector; } function addRevenueSharingPool( address _revenueSharingPool ) external onlyOwner { revenueSharingPools.push(_revenueSharingPool); emit RevenueSharingPoolAdded(_revenueSharingPool); } function lockSWPx(uint256 _lockDays) external override onlyDepositor { uint256 balance = IERC20(swpx).balanceOf(address(this)); if (balance == 0) return; IERC20(swpx).approve(veSWPx, 0); IERC20(swpx).approve(veSWPx, balance); //check is lock if created if (lockedTokenId == 0) { // // First time deposit: need to create a new lock, this will mint a new NFT and we save the token id (uint256 newTokenId, ) = IVotingEscrowV1_1(veSWPx).create_lock( balance, MAX_LOCK_DURATION ); lockedTokenId = newTokenId; // Will relock in one week nextIncreaseUnlockAt = ((block.timestamp + WEEK) / WEEK) * WEEK; emit SWPxLockMinted(lockedTokenId); emit SWPxLocked(balance); } else { // Lock expired? (no deposits for 2 years?) if ( block.timestamp > IVotingEscrowV1_1(veSWPx).locked__end(lockedTokenId) ) { IVotingEscrowV1_1(veSWPx).withdraw(lockedTokenId); balance = IERC20(swpx).balanceOf(address(this)); //create a new lock (lockedTokenId, ) = IVotingEscrowV1_1(veSWPx).create_lock( balance, MAX_LOCK_DURATION ); // will relock in one week nextIncreaseUnlockAt = ((block.timestamp + WEEK) / WEEK) * WEEK; emit SWPxLockMinted(lockedTokenId); emit SWPxLocked(balance); } else { // Increase lock amount IVotingEscrowV1_1(veSWPx).increase_amount(lockedTokenId, balance); emit SWPxLocked(balance); // Lock is still active, just increase the lock duration if(block.timestamp > nextIncreaseUnlockAt){ IVotingEscrowV1_1(veSWPx).increase_unlock_time(lockedTokenId, MAX_LOCK_DURATION); // Thena rounds the lock down to the week emit SWPxLockDurationIncreased(((block.timestamp + MAX_LOCK_DURATION) / WEEK) * WEEK); // Once a week, increase the lock nextIncreaseUnlockAt = ((block.timestamp + WEEK) / WEEK) * WEEK; } } } } function _getRevenueSharingPoolRewardToken( address _sharingPool ) internal view returns (address) { address rewardToken = IRevenueSharingPool(_sharingPool).rewardToken(); if (rewardToken == address(0)) { rewardToken = AddressLib.PLATFORM_TOKEN_ADDRESS; } return rewardToken; } function _approveTokenIfNeeded( address _token, address _to, uint256 _amount ) internal { if (IERC20(_token).allowance(address(this), _to) < _amount) { IERC20(_token).safeApprove(_to, 0); IERC20(_token).safeApprove(_to, type(uint256).max); } } receive() external payable {} }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../GSN/ContextUpgradeable.sol"; import "../proxy/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } 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; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; // solhint-disable-next-line no-inline-assembly assembly { cs := extcodesize(self) } return cs == 0; } }
// 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, 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; } }
// 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: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @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"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @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 on 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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { 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); } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface IMasterChefV2 { function deposit(uint256 _pid, uint256 _amount) external; function withdraw(uint256 _pid, uint256 _amount) external; function pendingCake( uint256 _pid, address _user ) external view returns (uint256); function userInfo( uint256 _pid, address _user ) external view returns (uint256, uint256); function emergencyWithdraw(uint256 _pid) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface IRevenueSharingPool { function lastTokenTimestamp() external view returns (uint256); function checkpointToken() external; function checkpointTotalSupply() external; function claim(address user) external returns (uint256); function claimForUser(address user) external returns (uint256); function setRecipient(address _user, address _recipient) external; function rewardToken() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; interface ISWPxVoterProxy { function lockSWPx(uint256 _lockDays) external; event RevenueSharingPoolAdded(address _revenueSharingPool); event BoosterUpdated(address _booster); event DepositorUpdated(address _depositor); }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface IVotingEscrowV1_1 { /// @notice Get timestamp when `_tokenId`'s lock finishes /// @param _tokenId User NFT /// @return Epoch time of the lock end function locked__end(uint256 _tokenId) external view returns (uint256); /// @notice Deposit `_value` tokens for `msg.sender` and lock for `_lock_duration` /// @param _value Amount to deposit /// @param _lock_duration Number of seconds to lock tokens for (rounded down to nearest week) function create_lock( uint256 _value, uint256 _lock_duration ) external returns (uint256 newTokenId, uint256 votingPower); /// @notice Deposit `_value` tokens for `_tokenId` and add to the lock /// @dev Anyone (even a smart contract) can deposit for someone else, but /// cannot extend their locktime and deposit for a brand new user /// @param _tokenId lock NFT /// @param _value Amount to add to user's lock function deposit_for( uint256 _tokenId, uint256 _value ) external returns (uint256 votingPower); /// @notice Deposit `_value` additional tokens for `_tokenId` without modifying the unlock time /// @param _value Amount of tokens to deposit and add to the lock function increase_amount( uint256 _tokenId, uint256 _value ) external returns (uint256 votingPower); function increase_unlock_time( uint256 _tokenId, uint256 _lock_duration ) external returns (uint256 votingPower); // @notice Withdraw all tokens for `_tokenId` /// @dev Only possible if the lock has expired function withdraw(uint256 _tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; library AddressLib { address public constant PLATFORM_TOKEN_ADDRESS = 0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf; function isPlatformToken(address addr) internal pure returns (bool) { return addr == PLATFORM_TOKEN_ADDRESS; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./AddressLib.sol"; library TransferHelper { using AddressLib for address; function safeTransferToken( address token, address to, uint value ) internal { if (token.isPlatformToken()) { safeTransferETH(to, value); } else { safeTransfer(IERC20(token), to, value); } } function safeTransferETH( address to, uint value ) internal { (bool success, ) = address(to).call{value: value}(""); require(success, "TransferHelper: Sending ETH failed"); } function balanceOf(address token, address addr) internal view returns (uint) { if (token.isPlatformToken()) { return addr.balance; } else { return IERC20(token).balanceOf(addr); } } function safeTransfer( IERC20 token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))) -> 0xa9059cbb (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransfer: transfer failed' ); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))) -> 0x23b872dd (bool success, bytes memory data) = address(token).call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransferFrom: transfer failed' ); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_booster","type":"address"}],"name":"BoosterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_depositor","type":"address"}],"name":"DepositorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_revenueSharingPool","type":"address"}],"name":"RevenueSharingPoolAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lockedUntil","type":"uint256"}],"name":"SWPxLockDurationIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"SWPxLockMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SWPxLocked","type":"event"},{"inputs":[{"internalType":"address","name":"_revenueSharingPool","type":"address"}],"name":"addRevenueSharingPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"booster","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bribeCallerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bribeFeeCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bribeManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bribeProtocolFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockDays","type":"uint256"}],"name":"lockSWPx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"masterChef","outputs":[{"internalType":"contract IMasterChefV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"revenueSharingPools","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bribeCallerFee","type":"uint256"}],"name":"setBribeCallerFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bribeFeeCollector","type":"address"}],"name":"setBribeFeeCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_bribeManager","type":"address"}],"name":"setBribeManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bribeProtocolFee","type":"uint256"}],"name":"setBribeProtocolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_masterChef","type":"address"},{"internalType":"address","name":"_swpx","type":"address"},{"internalType":"address","name":"_veSWPx","type":"address"},{"internalType":"address","name":"_booster","type":"address"},{"internalType":"address","name":"_depositor","type":"address"}],"name":"setParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swpx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"veSWPx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526000606f5534801561001557600080fd5b5061167f806100256000396000f3fe60806040526004361061012e5760003560e01c8063b42d50ef116100ab578063d612a5821161006f578063d612a582146102c6578063e2a578cd146102e6578063e789b148146102fb578063eddac97a1461031b578063f2fde38b1461033b578063fb85f91e1461035b57610135565b8063b42d50ef14610247578063b881373f1461025c578063c6def0761461027c578063c7c4ff4614610291578063cf26b0c7146102a657610135565b8063715018a6116100f2578063715018a6146101de5780638129fc1c146101f35780638da5cb5b1461020857806398dd1d611461021d5780639ba5cd551461023257610135565b806304b2b31e1461013a5780631d7f54be14610165578063334f01f914610187578063411eadf8146101a9578063575a86b2146101c957610135565b3661013557005b600080fd5b34801561014657600080fd5b5061014f61037b565b60405161015c9190611632565b60405180910390f35b34801561017157600080fd5b50610185610180366004611382565b610381565b005b34801561019357600080fd5b5061019c610a90565b60405161015c91906113d5565b3480156101b557600080fd5b506101856101c43660046112d7565b610a9f565b3480156101d557600080fd5b5061019c610b1c565b3480156101ea57600080fd5b50610185610b2b565b3480156101ff57600080fd5b50610185610baa565b34801561021457600080fd5b5061019c610c34565b34801561022957600080fd5b5061014f610c43565b34801561023e57600080fd5b5061019c610c49565b34801561025357600080fd5b5061019c610c58565b34801561026857600080fd5b50610185610277366004611382565b610c67565b34801561028857600080fd5b5061019c610cc3565b34801561029d57600080fd5b5061019c610cd2565b3480156102b257600080fd5b506101856102c13660046112d7565b610ce1565b3480156102d257600080fd5b5061019c6102e1366004611382565b610d5e565b3480156102f257600080fd5b5061019c610d85565b34801561030757600080fd5b506101856103163660046112f9565b610d94565b34801561032757600080fd5b50610185610336366004611382565b610f0a565b34801561034757600080fd5b506101856103563660046112d7565b610f65565b34801561036757600080fd5b506101856103763660046112d7565b61101c565b606b5481565b6069546001600160a01b031633146103b45760405162461bcd60e51b81526004016103ab906115dc565b60405180910390fd5b6065546040516370a0823160e01b81526000916001600160a01b0316906370a08231906103e59030906004016113d5565b60206040518083038186803b1580156103fd57600080fd5b505afa158015610411573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610435919061139a565b9050806104425750610a8d565b60655460675460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392610479929116906000906004016113e9565b602060405180830381600087803b15801561049357600080fd5b505af11580156104a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cb9190611362565b5060655460675460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926105029291169085906004016113e9565b602060405180830381600087803b15801561051c57600080fd5b505af1158015610530573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105549190611362565b50606f5461066f576067546040516365fc387360e01b81526000916001600160a01b0316906365fc3873906105939085906303c267009060040161163b565b6040805180830381600087803b1580156105ac57600080fd5b505af11580156105c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e491906113b2565b50606f819055905062093a80804281010402607055606f546040517fb0e824a41ccc82db1001558da51c50f40b3e140cc63950e585a3a460abd345469161062a91611632565b60405180910390a17f103a220deb302bbe29906bb4d3b9514e2234b5ada00e1831a6d1ef786feb585c826040516106619190611632565b60405180910390a150610a8b565b606754606f5460405163f8a0576360e01b81526001600160a01b039092169163f8a05763916106a091600401611632565b60206040518083038186803b1580156106b857600080fd5b505afa1580156106cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f0919061139a565b4211156108e857606754606f54604051632e1a7d4d60e01b81526001600160a01b0390921691632e1a7d4d9161072891600401611632565b600060405180830381600087803b15801561074257600080fd5b505af1158015610756573d6000803e3d6000fd5b50506065546040516370a0823160e01b81526001600160a01b0390911692506370a08231915061078a9030906004016113d5565b60206040518083038186803b1580156107a257600080fd5b505afa1580156107b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107da919061139a565b6067546040516365fc387360e01b81529192506001600160a01b0316906365fc3873906108119084906303c267009060040161163b565b6040805180830381600087803b15801561082a57600080fd5b505af115801561083e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086291906113b2565b50606f5562093a80804281010402607055606f546040517fb0e824a41ccc82db1001558da51c50f40b3e140cc63950e585a3a460abd34546916108a491611632565b60405180910390a17f103a220deb302bbe29906bb4d3b9514e2234b5ada00e1831a6d1ef786feb585c816040516108db9190611632565b60405180910390a1610a8b565b606754606f546040516350c1d7a960e11b81526001600160a01b039092169163a183af529161091b91859060040161163b565b602060405180830381600087803b15801561093557600080fd5b505af1158015610949573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096d919061139a565b507f103a220deb302bbe29906bb4d3b9514e2234b5ada00e1831a6d1ef786feb585c8160405161099d9190611632565b60405180910390a1607054421115610a8b57606754606f5460405163a4d855df60e01b81526001600160a01b039092169163a4d855df916109e6916303c267009060040161163b565b602060405180830381600087803b158015610a0057600080fd5b505af1158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a38919061139a565b507f21d95f1b10a5c4a22784273403555c1fa08b7397335889436960aef94d40b2b562093a8080426303c26700010402604051610a759190611632565b60405180910390a162093a808042810104026070555b505b50565b6065546001600160a01b031681565b610aa76110d7565b6033546001600160a01b03908116911614610ad45760405162461bcd60e51b81526004016103ab906114f5565b6001600160a01b038116610afa5760405162461bcd60e51b81526004016103ab906114be565b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b6066546001600160a01b031681565b610b336110d7565b6033546001600160a01b03908116911614610b605760405162461bcd60e51b81526004016103ab906114f5565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b600054610100900460ff1680610bc35750610bc36110db565b80610bd1575060005460ff16155b610bed5760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff16158015610c18576000805460ff1961ff0019909116610100171660011790555b610c206110e1565b8015610a8d576000805461ff001916905550565b6033546001600160a01b031690565b606c5481565b6067546001600160a01b031681565b606d546001600160a01b031681565b610c6f6110d7565b6033546001600160a01b03908116911614610c9c5760405162461bcd60e51b81526004016103ab906114f5565b6107d0811115610cbe5760405162461bcd60e51b81526004016103ab9061152a565b606c55565b6068546001600160a01b031681565b6069546001600160a01b031681565b610ce96110d7565b6033546001600160a01b03908116911614610d165760405162461bcd60e51b81526004016103ab906114f5565b6001600160a01b038116610d3c5760405162461bcd60e51b81526004016103ab90611580565b606a80546001600160a01b0319166001600160a01b0392909216919091179055565b606e8181548110610d6b57fe5b6000918252602090912001546001600160a01b0316905081565b606a546001600160a01b031681565b610d9c6110d7565b6033546001600160a01b03908116911614610dc95760405162461bcd60e51b81526004016103ab906114f5565b6068546001600160a01b031615610df25760405162461bcd60e51b81526004016103ab90611561565b6001600160a01b038416610e185760405162461bcd60e51b81526004016103ab90611448565b6001600160a01b038116610e3e5760405162461bcd60e51b81526004016103ab906115af565b606680546001600160a01b03199081166001600160a01b0388811691909117909255606580548216878416179055606780548216868416179055606880548216858416179055606980549091169183169190911790556040517f5407aa361e671ca7c620332ea4c073198f8bc6125f2aceb4766a160b5afec16190610ec49084906113d5565b60405180910390a17f8cf8be695b910a30beed2532e7990699dfe014923098dc301a0e96205e46e25a81604051610efb91906113d5565b60405180910390a15050505050565b610f126110d7565b6033546001600160a01b03908116911614610f3f5760405162461bcd60e51b81526004016103ab906114f5565b6064811115610f605760405162461bcd60e51b81526004016103ab906115fb565b606b55565b610f6d6110d7565b6033546001600160a01b03908116911614610f9a5760405162461bcd60e51b81526004016103ab906114f5565b6001600160a01b038116610fc05760405162461bcd60e51b81526004016103ab90611402565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6110246110d7565b6033546001600160a01b039081169116146110515760405162461bcd60e51b81526004016103ab906114f5565b606e80546001810182556000919091527f9930d9ff0dee0ef5ca2f7710ea66b8f84dd0f5f5351ecffe72b952cd9db7142a0180546001600160a01b0319166001600160a01b0383161790556040517fbd99fbf53509aabc245d1607963f619916db8217c058345e3ba9ed1c0f92a608906110cc9083906113d5565b60405180910390a150565b3390565b303b1590565b600054610100900460ff16806110fa57506110fa6110db565b80611108575060005460ff16155b6111245760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff1615801561114f576000805460ff1961ff0019909116610100171660011790555b61115761115f565b610c206111e0565b600054610100900460ff168061117857506111786110db565b80611186575060005460ff16155b6111a25760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff16158015610c20576000805460ff1961ff0019909116610100171660011790558015610a8d576000805461ff001916905550565b600054610100900460ff16806111f957506111f96110db565b80611207575060005460ff16155b6112235760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff1615801561124e576000805460ff1961ff0019909116610100171660011790555b60006112586110d7565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610a8d576000805461ff001916905550565b80356001600160a01b03811681146112d157600080fd5b92915050565b6000602082840312156112e8578081fd5b6112f283836112ba565b9392505050565b600080600080600060a08688031215611310578081fd5b61131a87876112ba565b945061132987602088016112ba565b935061133887604088016112ba565b925061134787606088016112ba565b915061135687608088016112ba565b90509295509295909350565b600060208284031215611373578081fd5b815180151581146112f2578182fd5b600060208284031215611393578081fd5b5035919050565b6000602082840312156113ab578081fd5b5051919050565b600080604083850312156113c4578182fd5b505080516020909101519092909150565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600e908201526d696e76616c6964205f63616b652160901b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601b908201527f696e76616c6964205f6272696265466565436f6c6c6563746f72210000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f696e76616c6964205f627269626550726f746f636f6c46656521000000000000604082015260600190565b602080825260059082015264085a5b9a5d60da1b604082015260600190565b602080825260159082015274696e76616c64205f62726962654d616e616765722160581b604082015260600190565b602080825260139082015272696e76616c6964205f6465706f7369746f722160681b604082015260600190565b602080825260059082015264042c2eae8d60db1b604082015260600190565b60208082526018908201527f696e76616c6964205f627269626543616c6c6572466565210000000000000000604082015260600190565b90815260200190565b91825260208201526040019056fea264697066735822122053c31208fb2ec48e65a608a5a5320f9df7a59d434ce890ef772828fd2187a6f664736f6c634300060c0033
Deployed Bytecode
0x60806040526004361061012e5760003560e01c8063b42d50ef116100ab578063d612a5821161006f578063d612a582146102c6578063e2a578cd146102e6578063e789b148146102fb578063eddac97a1461031b578063f2fde38b1461033b578063fb85f91e1461035b57610135565b8063b42d50ef14610247578063b881373f1461025c578063c6def0761461027c578063c7c4ff4614610291578063cf26b0c7146102a657610135565b8063715018a6116100f2578063715018a6146101de5780638129fc1c146101f35780638da5cb5b1461020857806398dd1d611461021d5780639ba5cd551461023257610135565b806304b2b31e1461013a5780631d7f54be14610165578063334f01f914610187578063411eadf8146101a9578063575a86b2146101c957610135565b3661013557005b600080fd5b34801561014657600080fd5b5061014f61037b565b60405161015c9190611632565b60405180910390f35b34801561017157600080fd5b50610185610180366004611382565b610381565b005b34801561019357600080fd5b5061019c610a90565b60405161015c91906113d5565b3480156101b557600080fd5b506101856101c43660046112d7565b610a9f565b3480156101d557600080fd5b5061019c610b1c565b3480156101ea57600080fd5b50610185610b2b565b3480156101ff57600080fd5b50610185610baa565b34801561021457600080fd5b5061019c610c34565b34801561022957600080fd5b5061014f610c43565b34801561023e57600080fd5b5061019c610c49565b34801561025357600080fd5b5061019c610c58565b34801561026857600080fd5b50610185610277366004611382565b610c67565b34801561028857600080fd5b5061019c610cc3565b34801561029d57600080fd5b5061019c610cd2565b3480156102b257600080fd5b506101856102c13660046112d7565b610ce1565b3480156102d257600080fd5b5061019c6102e1366004611382565b610d5e565b3480156102f257600080fd5b5061019c610d85565b34801561030757600080fd5b506101856103163660046112f9565b610d94565b34801561032757600080fd5b50610185610336366004611382565b610f0a565b34801561034757600080fd5b506101856103563660046112d7565b610f65565b34801561036757600080fd5b506101856103763660046112d7565b61101c565b606b5481565b6069546001600160a01b031633146103b45760405162461bcd60e51b81526004016103ab906115dc565b60405180910390fd5b6065546040516370a0823160e01b81526000916001600160a01b0316906370a08231906103e59030906004016113d5565b60206040518083038186803b1580156103fd57600080fd5b505afa158015610411573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610435919061139a565b9050806104425750610a8d565b60655460675460405163095ea7b360e01b81526001600160a01b039283169263095ea7b392610479929116906000906004016113e9565b602060405180830381600087803b15801561049357600080fd5b505af11580156104a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104cb9190611362565b5060655460675460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926105029291169085906004016113e9565b602060405180830381600087803b15801561051c57600080fd5b505af1158015610530573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105549190611362565b50606f5461066f576067546040516365fc387360e01b81526000916001600160a01b0316906365fc3873906105939085906303c267009060040161163b565b6040805180830381600087803b1580156105ac57600080fd5b505af11580156105c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e491906113b2565b50606f819055905062093a80804281010402607055606f546040517fb0e824a41ccc82db1001558da51c50f40b3e140cc63950e585a3a460abd345469161062a91611632565b60405180910390a17f103a220deb302bbe29906bb4d3b9514e2234b5ada00e1831a6d1ef786feb585c826040516106619190611632565b60405180910390a150610a8b565b606754606f5460405163f8a0576360e01b81526001600160a01b039092169163f8a05763916106a091600401611632565b60206040518083038186803b1580156106b857600080fd5b505afa1580156106cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f0919061139a565b4211156108e857606754606f54604051632e1a7d4d60e01b81526001600160a01b0390921691632e1a7d4d9161072891600401611632565b600060405180830381600087803b15801561074257600080fd5b505af1158015610756573d6000803e3d6000fd5b50506065546040516370a0823160e01b81526001600160a01b0390911692506370a08231915061078a9030906004016113d5565b60206040518083038186803b1580156107a257600080fd5b505afa1580156107b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107da919061139a565b6067546040516365fc387360e01b81529192506001600160a01b0316906365fc3873906108119084906303c267009060040161163b565b6040805180830381600087803b15801561082a57600080fd5b505af115801561083e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086291906113b2565b50606f5562093a80804281010402607055606f546040517fb0e824a41ccc82db1001558da51c50f40b3e140cc63950e585a3a460abd34546916108a491611632565b60405180910390a17f103a220deb302bbe29906bb4d3b9514e2234b5ada00e1831a6d1ef786feb585c816040516108db9190611632565b60405180910390a1610a8b565b606754606f546040516350c1d7a960e11b81526001600160a01b039092169163a183af529161091b91859060040161163b565b602060405180830381600087803b15801561093557600080fd5b505af1158015610949573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096d919061139a565b507f103a220deb302bbe29906bb4d3b9514e2234b5ada00e1831a6d1ef786feb585c8160405161099d9190611632565b60405180910390a1607054421115610a8b57606754606f5460405163a4d855df60e01b81526001600160a01b039092169163a4d855df916109e6916303c267009060040161163b565b602060405180830381600087803b158015610a0057600080fd5b505af1158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a38919061139a565b507f21d95f1b10a5c4a22784273403555c1fa08b7397335889436960aef94d40b2b562093a8080426303c26700010402604051610a759190611632565b60405180910390a162093a808042810104026070555b505b50565b6065546001600160a01b031681565b610aa76110d7565b6033546001600160a01b03908116911614610ad45760405162461bcd60e51b81526004016103ab906114f5565b6001600160a01b038116610afa5760405162461bcd60e51b81526004016103ab906114be565b606d80546001600160a01b0319166001600160a01b0392909216919091179055565b6066546001600160a01b031681565b610b336110d7565b6033546001600160a01b03908116911614610b605760405162461bcd60e51b81526004016103ab906114f5565b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b600054610100900460ff1680610bc35750610bc36110db565b80610bd1575060005460ff16155b610bed5760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff16158015610c18576000805460ff1961ff0019909116610100171660011790555b610c206110e1565b8015610a8d576000805461ff001916905550565b6033546001600160a01b031690565b606c5481565b6067546001600160a01b031681565b606d546001600160a01b031681565b610c6f6110d7565b6033546001600160a01b03908116911614610c9c5760405162461bcd60e51b81526004016103ab906114f5565b6107d0811115610cbe5760405162461bcd60e51b81526004016103ab9061152a565b606c55565b6068546001600160a01b031681565b6069546001600160a01b031681565b610ce96110d7565b6033546001600160a01b03908116911614610d165760405162461bcd60e51b81526004016103ab906114f5565b6001600160a01b038116610d3c5760405162461bcd60e51b81526004016103ab90611580565b606a80546001600160a01b0319166001600160a01b0392909216919091179055565b606e8181548110610d6b57fe5b6000918252602090912001546001600160a01b0316905081565b606a546001600160a01b031681565b610d9c6110d7565b6033546001600160a01b03908116911614610dc95760405162461bcd60e51b81526004016103ab906114f5565b6068546001600160a01b031615610df25760405162461bcd60e51b81526004016103ab90611561565b6001600160a01b038416610e185760405162461bcd60e51b81526004016103ab90611448565b6001600160a01b038116610e3e5760405162461bcd60e51b81526004016103ab906115af565b606680546001600160a01b03199081166001600160a01b0388811691909117909255606580548216878416179055606780548216868416179055606880548216858416179055606980549091169183169190911790556040517f5407aa361e671ca7c620332ea4c073198f8bc6125f2aceb4766a160b5afec16190610ec49084906113d5565b60405180910390a17f8cf8be695b910a30beed2532e7990699dfe014923098dc301a0e96205e46e25a81604051610efb91906113d5565b60405180910390a15050505050565b610f126110d7565b6033546001600160a01b03908116911614610f3f5760405162461bcd60e51b81526004016103ab906114f5565b6064811115610f605760405162461bcd60e51b81526004016103ab906115fb565b606b55565b610f6d6110d7565b6033546001600160a01b03908116911614610f9a5760405162461bcd60e51b81526004016103ab906114f5565b6001600160a01b038116610fc05760405162461bcd60e51b81526004016103ab90611402565b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b6110246110d7565b6033546001600160a01b039081169116146110515760405162461bcd60e51b81526004016103ab906114f5565b606e80546001810182556000919091527f9930d9ff0dee0ef5ca2f7710ea66b8f84dd0f5f5351ecffe72b952cd9db7142a0180546001600160a01b0319166001600160a01b0383161790556040517fbd99fbf53509aabc245d1607963f619916db8217c058345e3ba9ed1c0f92a608906110cc9083906113d5565b60405180910390a150565b3390565b303b1590565b600054610100900460ff16806110fa57506110fa6110db565b80611108575060005460ff16155b6111245760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff1615801561114f576000805460ff1961ff0019909116610100171660011790555b61115761115f565b610c206111e0565b600054610100900460ff168061117857506111786110db565b80611186575060005460ff16155b6111a25760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff16158015610c20576000805460ff1961ff0019909116610100171660011790558015610a8d576000805461ff001916905550565b600054610100900460ff16806111f957506111f96110db565b80611207575060005460ff16155b6112235760405162461bcd60e51b81526004016103ab90611470565b600054610100900460ff1615801561124e576000805460ff1961ff0019909116610100171660011790555b60006112586110d7565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610a8d576000805461ff001916905550565b80356001600160a01b03811681146112d157600080fd5b92915050565b6000602082840312156112e8578081fd5b6112f283836112ba565b9392505050565b600080600080600060a08688031215611310578081fd5b61131a87876112ba565b945061132987602088016112ba565b935061133887604088016112ba565b925061134787606088016112ba565b915061135687608088016112ba565b90509295509295909350565b600060208284031215611373578081fd5b815180151581146112f2578182fd5b600060208284031215611393578081fd5b5035919050565b6000602082840312156113ab578081fd5b5051919050565b600080604083850312156113c4578182fd5b505080516020909101519092909150565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252600e908201526d696e76616c6964205f63616b652160901b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252601b908201527f696e76616c6964205f6272696265466565436f6c6c6563746f72210000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f696e76616c6964205f627269626550726f746f636f6c46656521000000000000604082015260600190565b602080825260059082015264085a5b9a5d60da1b604082015260600190565b602080825260159082015274696e76616c64205f62726962654d616e616765722160581b604082015260600190565b602080825260139082015272696e76616c6964205f6465706f7369746f722160681b604082015260600190565b602080825260059082015264042c2eae8d60db1b604082015260600190565b60208082526018908201527f696e76616c6964205f627269626543616c6c6572466565210000000000000000604082015260600190565b90815260200190565b91825260208201526040019056fea264697066735822122053c31208fb2ec48e65a608a5a5320f9df7a59d434ce890ef772828fd2187a6f664736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.