Source Code
Latest 25 from a total of 1,208 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 425988443 | 5 days ago | IN | 0 ETH | 0.00000229 | ||||
| Withdraw | 363725586 | 185 days ago | IN | 0 ETH | 0.00000115 | ||||
| Withdraw | 359741028 | 196 days ago | IN | 0 ETH | 0.00000548 | ||||
| Withdraw | 325626867 | 295 days ago | IN | 0 ETH | 0.00000286 | ||||
| Withdraw | 313665602 | 330 days ago | IN | 0 ETH | 0.00000117 | ||||
| Withdraw | 286259496 | 410 days ago | IN | 0 ETH | 0.00000469 | ||||
| Withdraw | 279109258 | 431 days ago | IN | 0 ETH | 0.00000172 | ||||
| Withdraw | 277948973 | 434 days ago | IN | 0 ETH | 0.00000153 | ||||
| Withdraw | 277637695 | 435 days ago | IN | 0 ETH | 0.00000179 | ||||
| Withdraw | 277470817 | 435 days ago | IN | 0 ETH | 0.00000183 | ||||
| Withdraw | 273372478 | 447 days ago | IN | 0 ETH | 0.00000295 | ||||
| Withdraw | 271988480 | 451 days ago | IN | 0 ETH | 0.00000222 | ||||
| Withdraw | 271719555 | 452 days ago | IN | 0 ETH | 0.00000204 | ||||
| Withdraw | 266058609 | 469 days ago | IN | 0 ETH | 0.00000194 | ||||
| Withdraw | 265230656 | 471 days ago | IN | 0 ETH | 0.00000178 | ||||
| Withdraw | 265167027 | 471 days ago | IN | 0 ETH | 0.00000277 | ||||
| Withdraw | 265006525 | 472 days ago | IN | 0 ETH | 0.00000457 | ||||
| Withdraw | 264755066 | 472 days ago | IN | 0 ETH | 0.00000355 | ||||
| Withdraw | 258608427 | 490 days ago | IN | 0 ETH | 0.00000165 | ||||
| Withdraw | 255594229 | 499 days ago | IN | 0 ETH | 0.00000209 | ||||
| Withdraw | 255418340 | 500 days ago | IN | 0 ETH | 0.00000161 | ||||
| Withdraw | 253208287 | 506 days ago | IN | 0 ETH | 0.00000136 | ||||
| Withdraw | 251028380 | 512 days ago | IN | 0 ETH | 0.00000123 | ||||
| Withdraw | 248523263 | 520 days ago | IN | 0 ETH | 0.00000118 | ||||
| Withdraw | 248358239 | 520 days ago | IN | 0 ETH | 0.00000118 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 72065924 | 1049 days ago | 0 ETH | ||||
| 72065924 | 1049 days ago | 0 ETH | ||||
| 72065924 | 1049 days ago | 0 ETH | ||||
| 72065924 | 1049 days ago | 0 ETH | ||||
| 71337605 | 1051 days ago | 0 ETH | ||||
| 71337605 | 1051 days ago | 0 ETH | ||||
| 71337605 | 1051 days ago | 0 ETH | ||||
| 71191156 | 1051 days ago | 0 ETH | ||||
| 71191156 | 1051 days ago | 0 ETH | ||||
| 71191156 | 1051 days ago | 0 ETH | ||||
| 71191156 | 1051 days ago | 0 ETH | ||||
| 71190879 | 1051 days ago | 0 ETH | ||||
| 71190879 | 1051 days ago | 0 ETH | ||||
| 71190879 | 1051 days ago | 0 ETH | ||||
| 71105919 | 1051 days ago | 0 ETH | ||||
| 71105919 | 1051 days ago | 0 ETH | ||||
| 71105919 | 1051 days ago | 0 ETH | ||||
| 70963580 | 1052 days ago | 0 ETH | ||||
| 70963580 | 1052 days ago | 0 ETH | ||||
| 70963580 | 1052 days ago | 0 ETH | ||||
| 70899215 | 1052 days ago | 0 ETH | ||||
| 70899215 | 1052 days ago | 0 ETH | ||||
| 70899215 | 1052 days ago | 0 ETH | ||||
| 70899215 | 1052 days ago | 0 ETH | ||||
| 70897704 | 1052 days ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BenisWithPermit
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 5000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract BenisWithPermit is Ownable {
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
uint256 remainingWBANReward; // WBAN Tokens that weren't distributed for user per pool.
//
// We do some fancy math here. Basically, any point in time, the amount of WBAN
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accWBANPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws Staked tokens to a pool. Here's what happens:
// 1. The pool's `accWBANPerShare` (and `lastRewardTime`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 stakingToken; // Contract address of staked token
uint256 stakingTokenTotalAmount; //Total amount of deposited tokens
uint256 accWBANPerShare; // Accumulated wBAN per share, times 1e12. See below.
uint32 lastRewardTime; // Last timestamp number that wBAN distribution occurs.
uint16 allocPoint; // How many allocation points assigned to this pool. wBAN to distribute per second.
}
IERC20 public immutable wban; // wBAN TOKEN
uint256 public wbanPerSecond; // wBAN tokens vested per second
address private rewardsDistributor;
PoolInfo[] public poolInfo; // Info of each pool
mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Info of each user that stakes tokens
uint256 public totalAllocPoint = 0; // Total allocation points. Must be the sum of all allocation points in all pools
uint32 public immutable startTime; // The timestamp when wBAN farming starts
uint32 public endTime; // Time on which the reward calculation should end
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
constructor(
IERC20 _wban,
uint256 _wbanPerSecond,
uint32 _startTime,
address _rewardsDistributor
) {
wban = _wban;
wbanPerSecond = _wbanPerSecond;
startTime = _startTime;
endTime = _startTime;
rewardsDistributor = _rewardsDistributor;
}
function changeEndTime(uint32 addSeconds) external onlyOwner {
endTime += addSeconds;
}
function reduceEndTime(uint32 subSeconds) external onlyOwner {
require(endTime - subSeconds >= block.timestamp, "Can't have end time in the past");
endTime -= subSeconds;
}
// Changes wBAN token reward per second. Use this function to moderate the `lockup amount`.
// Essentially this function changes the amount of the reward which is entitled to the
// user for his token staking by the time the `endTime` is passed.
// Good practice to update pools without messing up the contract
function setWBANPerSecond(uint256 _wbanPerSecond, bool _withUpdate) external onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
wbanPerSecond = _wbanPerSecond;
}
// How many pools are in the contract
function poolLength() external view returns (uint256) {
return poolInfo.length;
}
// Add a new staking token to the pool. Can only be called by the owner.
// VERY IMPORTANT NOTICE
// ----------- DO NOT add the same staking token more than once. Rewards will be messed up if you do. -------------
// Good practice to update pools without messing up the contract
function add(
uint16 _allocPoint,
IERC20 _stakingToken,
bool _withUpdate
) external onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardTime = block.timestamp > startTime ? block.timestamp : startTime;
totalAllocPoint += _allocPoint;
poolInfo.push(
PoolInfo({
stakingToken: _stakingToken,
stakingTokenTotalAmount: 0,
allocPoint: _allocPoint,
lastRewardTime: uint32(lastRewardTime),
accWBANPerShare: 0
})
);
}
function withdrawRewards() external onlyOwner returns (uint256) {
uint256 wbanBalance = wban.balanceOf(address(this));
if (wbanBalance > 0) {
wban.safeTransfer(rewardsDistributor, wbanBalance);
}
return wbanBalance;
}
// Update the given pool's wBAN allocation point. Can only be called by the owner.
// Good practice to update pools without messing up the contract
function set(
uint256 _pid,
uint16 _allocPoint,
bool _withUpdate
) external onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint;
poolInfo[_pid].allocPoint = _allocPoint;
}
// Return reward multiplier over the given _from to _to time.
function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) {
_from = _from > startTime ? _from : startTime;
if (_from > endTime || _to < startTime) {
return 0;
}
if (_to > endTime) {
return endTime - _from;
}
return _to - _from;
}
// View function to see pending wBAN on frontend.
function pendingWBAN(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accWBANPerShare = pool.accWBANPerShare;
if (block.timestamp > pool.lastRewardTime && pool.stakingTokenTotalAmount != 0) {
uint256 multiplier = getMultiplier(pool.lastRewardTime, block.timestamp);
uint256 wbanReward = (multiplier * wbanPerSecond * pool.allocPoint) / totalAllocPoint;
accWBANPerShare += (wbanReward * 1e12) / pool.stakingTokenTotalAmount;
}
return ((user.amount * accWBANPerShare) / 1e12) - user.rewardDebt + user.remainingWBANReward;
}
// Update reward vairables for all pools. Be careful of gas spending!
function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
if (block.timestamp <= pool.lastRewardTime) {
return;
}
if (pool.stakingTokenTotalAmount == 0) {
pool.lastRewardTime = uint32(block.timestamp);
return;
}
uint256 multiplier = getMultiplier(pool.lastRewardTime, block.timestamp);
uint256 wbanReward = (multiplier * wbanPerSecond * pool.allocPoint) / totalAllocPoint;
pool.accWBANPerShare += (wbanReward * 1e12) / pool.stakingTokenTotalAmount;
pool.lastRewardTime = uint32(block.timestamp);
}
// Deposit staking tokens to Benis for wBAN rewards.
function deposit(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending =
((user.amount * pool.accWBANPerShare) / 1e12) - user.rewardDebt + user.remainingWBANReward;
user.remainingWBANReward = safeRewardTransfer(msg.sender, pending);
}
pool.stakingToken.safeTransferFrom(address(msg.sender), address(this), _amount);
user.amount += _amount;
pool.stakingTokenTotalAmount += _amount;
user.rewardDebt = (user.amount * pool.accWBANPerShare) / 1e12;
emit Deposit(msg.sender, _pid, _amount);
}
// Deposit staking tokens to Benis for wBAN rewards, using EIP712 signatures.
function depositWithPermit(
uint256 _pid,
uint256 _amount,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) public {
IERC20 stakingToken = poolInfo[_pid].stakingToken;
IERC20Permit(address(stakingToken)).permit(msg.sender, address(this), _amount, deadline, v, r, s);
deposit(_pid, _amount);
}
// Withdraw staked tokens from Benis.
function withdraw(uint256 _pid, uint256 _amount) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "Benis: not enough LP");
updatePool(_pid);
uint256 pending = ((user.amount * pool.accWBANPerShare) / 1e12) - user.rewardDebt + user.remainingWBANReward;
user.remainingWBANReward = safeRewardTransfer(msg.sender, pending);
user.amount -= _amount;
pool.stakingTokenTotalAmount -= _amount;
user.rewardDebt = (user.amount * pool.accWBANPerShare) / 1e12;
pool.stakingToken.safeTransfer(address(msg.sender), _amount);
emit Withdraw(msg.sender, _pid, _amount);
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 userAmount = user.amount;
pool.stakingTokenTotalAmount -= userAmount;
delete userInfo[_pid][msg.sender];
pool.stakingToken.safeTransfer(address(msg.sender), userAmount);
emit EmergencyWithdraw(msg.sender, _pid, userAmount);
}
// Safe wBAN transfer function. Just in case if the pool does not have enough wBAN token,
// The function returns the amount which is owed to the user
function safeRewardTransfer(address _to, uint256 _amount) internal returns (uint256) {
uint256 wbanBalance = wban.balanceOf(address(this));
if (wbanBalance == 0) {
//save some gas fee
return _amount;
}
if (_amount > wbanBalance) {
wban.safeTransfer(_to, wbanBalance);
return _amount - wbanBalance;
}
wban.safeTransfer(_to, _amount);
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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 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'
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) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @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
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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");
(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");
(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");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with 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) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}{
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 5000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_wban","type":"address"},{"internalType":"uint256","name":"_wbanPerSecond","type":"uint256"},{"internalType":"uint32","name":"_startTime","type":"uint32"},{"internalType":"address","name":"_rewardsDistributor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint16","name":"_allocPoint","type":"uint16"},{"internalType":"contract IERC20","name":"_stakingToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"addSeconds","type":"uint32"}],"name":"changeEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingWBAN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"stakingTokenTotalAmount","type":"uint256"},{"internalType":"uint256","name":"accWBANPerShare","type":"uint256"},{"internalType":"uint32","name":"lastRewardTime","type":"uint32"},{"internalType":"uint16","name":"allocPoint","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"subSeconds","type":"uint32"}],"name":"reduceEndTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint16","name":"_allocPoint","type":"uint16"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wbanPerSecond","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"setWBANPerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"remainingWBANReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wban","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wbanPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60c060405260006005553480156200001657600080fd5b5060405162001db138038062001db18339810160408190526200003991620000ff565b6200004433620000af565b60609390931b6001600160601b03191660805260019190915560e081901b6001600160e01b03191660a0526006805463ffffffff90921663ffffffff19909216919091179055600280546001600160a01b0319166001600160a01b039092169190911790556200017a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000806080858703121562000115578384fd5b8451620001228162000161565b60208601516040870151919550935063ffffffff8116811462000143578283fd5b6060860151909250620001568162000161565b939692955090935050565b6001600160a01b03811681146200017757600080fd5b50565b60805160601c60a05160e01c611bc5620001ec6000396000818161030401528181610a5501528181610a8201528181610ac401528181610c9c0152610cc90152600081816101c401528181610ea701528181610f42015281816112800152818161131f01526113650152611bc56000f3fe608060405234801561001057600080fd5b50600436106101a35760003560e01c8063715018a6116100ee57806398ec8da611610097578063cf42947b11610071578063cf42947b146103d6578063d1c1b4a8146103e9578063e2bbb158146103fc578063f2fde38b1461040f57600080fd5b806398ec8da6146103b2578063c31df763146103c5578063c7b8981c146103ce57600080fd5b80638dbb1e3a116100c85780638dbb1e3a14610337578063916696151461034a57806393f1a40b1461035d57600080fd5b8063715018a6146102f757806378e97925146102ff5780638da5cb5b1461032657600080fd5b80634678132a116101505780635312ea8e1161012a5780635312ea8e146102c9578063535c710e146102dc578063630b5ba1146102ef57600080fd5b80634678132a14610290578063515bc323146102a357806351eb05a6146102b657600080fd5b806317caf6f11161018157806317caf6f11461024d5780633197cbb614610256578063441a3e701461027b57600080fd5b8063081e3eda146101a85780630ef0b250146101bf5780631526fe27146101fe575b600080fd5b6003545b6040519081526020015b60405180910390f35b6101e67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101b6565b61021161020c366004611891565b610422565b604080516001600160a01b03909616865260208601949094529284019190915263ffffffff16606083015261ffff16608082015260a0016101b6565b6101ac60055481565b6006546102669063ffffffff1681565b60405163ffffffff90911681526020016101b6565b61028e610289366004611938565b61047a565b005b61028e61029e3660046118f0565b610629565b61028e6102b1366004611959565b610645565b61028e6102c4366004611891565b61072d565b61028e6102d7366004611891565b61087c565b61028e6102ea3660046119b0565b610964565b61028e610a12565b61028e610a3d565b6102667f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b03166101e6565b6101ac610345366004611938565b610a51565b6101ac6103583660046118c1565b610b37565b61039761036b3660046118c1565b600460209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101b6565b61028e6103c0366004611849565b610c82565b6101ac60015481565b6101ac610e6c565b61028e6103e43660046119b0565b610f70565b61028e6103f7366004611914565b610f93565b61028e61040a366004611938565b61105e565b61028e61041d366004611811565b6111b5565b6003818154811061043257600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919063ffffffff811690640100000000900461ffff1685565b60006003838154811061049d57634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526004808352604080862033875290935291909320805492909102909201925083111561051d5760405162461bcd60e51b815260206004820152601460248201527f42656e69733a206e6f7420656e6f756768204c5000000000000000000000000060448201526064015b60405180910390fd5b6105268461072d565b60008160020154826001015464e8d4a510008560020154856000015461054c9190611aa1565b6105569190611a81565b6105609190611ade565b61056a9190611a41565b90506105763382611245565b600283015581548490839060009061058f908490611ade565b92505081905550838360010160008282546105aa9190611ade565b90915550506002830154825464e8d4a51000916105c691611aa1565b6105d09190611a81565b600183015582546105eb906001600160a01b03163386611396565b604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a35050505050565b610631611462565b801561063f5761063f610a12565b50600155565b60006003878154811061066857634e487b7160e01b600052603260045260246000fd5b60009182526020909120600491820201546040517fd505accf0000000000000000000000000000000000000000000000000000000081523392810192909252306024830152604482018890526064820187905260ff8616608483015260a4820185905260c482018490526001600160a01b03169150819063d505accf9060e401600060405180830381600087803b15801561070257600080fd5b505af1158015610716573d6000803e3d6000fd5b50505050610724878761105e565b50505050505050565b60006003828154811061075057634e487b7160e01b600052603260045260246000fd5b60009182526020909120600490910201600381015490915063ffffffff164211610778575050565b60018101546107b55760030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000164263ffffffff1617905550565b60038101546000906107cd9063ffffffff1642610a51565b905060006005548360030160049054906101000a900461ffff1661ffff16600154846107f99190611aa1565b6108039190611aa1565b61080d9190611a81565b60018401549091506108248264e8d4a51000611aa1565b61082e9190611a81565b8360020160008282546108419190611a41565b9091555050505060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000164263ffffffff1617905550565b60006003828154811061089f57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600480835260408086203387529093529184208054939092020160018101805491955091938392916108df908490611ade565b90915550506000848152600460209081526040808320338085529252822082815560018101839055600201919091558354610926916001600160a01b039091169083611396565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a350505050565b61096c611462565b600654429061098290839063ffffffff16611af5565b63ffffffff1610156109d65760405162461bcd60e51b815260206004820152601f60248201527f43616e2774206861766520656e642074696d6520696e207468652070617374006044820152606401610514565b600680548291906000906109f190849063ffffffff16611af5565b92506101000a81548163ffffffff021916908363ffffffff16021790555050565b60035460005b81811015610a3957610a298161072d565b610a3281611b46565b9050610a18565b5050565b610a45611462565b610a4f60006114bc565b565b60007f000000000000000000000000000000000000000000000000000000000000000063ffffffff168311610aac577f000000000000000000000000000000000000000000000000000000000000000063ffffffff16610aae565b825b60065490935063ffffffff16831180610aec57507f000000000000000000000000000000000000000000000000000000000000000063ffffffff1682105b15610af957506000610b31565b60065463ffffffff16821115610b2457600654610b1d90849063ffffffff16611ade565b9050610b31565b610b2e8383611ade565b90505b92915050565b60008060038481548110610b5b57634e487b7160e01b600052603260045260246000fd5b60009182526020808320878452600480835260408086206001600160a01b038a168752909352919093209102909101600281015460038201549193509063ffffffff1642118015610baf5750600183015415155b15610c3c576003830154600090610bcc9063ffffffff1642610a51565b905060006005548560030160049054906101000a900461ffff1661ffff1660015484610bf89190611aa1565b610c029190611aa1565b610c0c9190611a81565b6001860154909150610c238264e8d4a51000611aa1565b610c2d9190611a81565b610c379084611a41565b925050505b60028201546001830154835464e8d4a5100090610c5a908590611aa1565b610c649190611a81565b610c6e9190611ade565b610c789190611a41565b9695505050505050565b610c8a611462565b8015610c9857610c98610a12565b60007f000000000000000000000000000000000000000000000000000000000000000063ffffffff164211610cf3577f000000000000000000000000000000000000000000000000000000000000000063ffffffff16610cf5565b425b90508361ffff1660056000828254610d0d9190611a41565b90915550506040805160a0810182526001600160a01b03948516815260006020820181815292820181815263ffffffff9485166060840190815261ffff98891660808501908152600380546001810182559452935160049093027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b81018054949099167fffffffffffffffffffffffff00000000000000000000000000000000000000009094169390931790975592517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c82015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d83015593517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e90910180549451909516640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000009094169116179190911790915550565b6000610e76611462565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b158015610ef157600080fd5b505afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2991906118a9565b90508015610f6b57600254610f6b906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116911683611396565b905090565b610f78611462565b600680548291906000906109f190849063ffffffff16611a59565b610f9b611462565b8015610fa957610fa9610a12565b8161ffff1660038481548110610fcf57634e487b7160e01b600052603260045260246000fd5b6000918252602090912060049091020160030154600554610ffc91640100000000900461ffff1690611ade565b6110069190611a41565b600581905550816003848154811061102e57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160030160046101000a81548161ffff021916908361ffff160217905550505050565b60006003838154811061108157634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526004808352604080862033875290935291909320910290910191506110b28461072d565b8054156111105760008160020154826001015464e8d4a51000856002015485600001546110df9190611aa1565b6110e99190611a81565b6110f39190611ade565b6110fd9190611a41565b90506111093382611245565b6002830155505b8154611127906001600160a01b0316333086611524565b8281600001600082825461113b9190611a41565b92505081905550828260010160008282546111569190611a41565b90915550506002820154815464e8d4a510009161117291611aa1565b61117c9190611a81565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610956565b6111bd611462565b6001600160a01b0381166112395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610514565b611242816114bc565b50565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa91906118a9565b90508061130a5782915050610b31565b80831115611358576113466001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168583611396565b6113508184611ade565b915050610b31565b61138c6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168585611396565b5060009392505050565b6040516001600160a01b03831660248201526044810182905261145d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261157b565b505050565b6000546001600160a01b03163314610a4f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610514565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526115759085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016113db565b50505050565b60006115d0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116609092919063ffffffff16565b80519091501561145d57808060200190518101906115ee919061182d565b61145d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610514565b606061166f8484600085611679565b90505b9392505050565b6060824710156116f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610514565b6001600160a01b0385163b6117485760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610514565b600080866001600160a01b0316858760405161176491906119d4565b60006040518083038185875af1925050503d80600081146117a1576040519150601f19603f3d011682016040523d82523d6000602084013e6117a6565b606091505b50915091506117b68282866117c1565b979650505050505050565b606083156117d0575081611672565b8251156117e05782518084602001fd5b8160405162461bcd60e51b815260040161051491906119f0565b803561ffff8116811461180c57600080fd5b919050565b600060208284031215611822578081fd5b813561167281611b95565b60006020828403121561183e578081fd5b815161167281611baa565b60008060006060848603121561185d578182fd5b611866846117fa565b9250602084013561187681611b95565b9150604084013561188681611baa565b809150509250925092565b6000602082840312156118a2578081fd5b5035919050565b6000602082840312156118ba578081fd5b5051919050565b600080604083850312156118d3578182fd5b8235915060208301356118e581611b95565b809150509250929050565b60008060408385031215611902578182fd5b8235915060208301356118e581611baa565b600080600060608486031215611928578283fd5b83359250611876602085016117fa565b6000806040838503121561194a578182fd5b50508035926020909101359150565b60008060008060008060c08789031215611971578182fd5b863595506020870135945060408701359350606087013560ff81168114611996578283fd5b9598949750929560808101359460a0909101359350915050565b6000602082840312156119c1578081fd5b813563ffffffff81168114611672578182fd5b600082516119e6818460208701611b1a565b9190910192915050565b6020815260008251806020840152611a0f816040850160208701611b1a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008219821115611a5457611a54611b7f565b500190565b600063ffffffff808316818516808303821115611a7857611a78611b7f565b01949350505050565b600082611a9c57634e487b7160e01b81526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611ad957611ad9611b7f565b500290565b600082821015611af057611af0611b7f565b500390565b600063ffffffff83811690831681811015611b1257611b12611b7f565b039392505050565b60005b83811015611b35578181015183820152602001611b1d565b838111156115755750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b7857611b78611b7f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461124257600080fd5b801515811461124257600080fdfea164736f6c6343000804000a000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a03400000000000000000000000000000000000000000000000002de4644c015dc00000000000000000000000000000000000000000000000000000000006390d927000000000000000000000000d7eb548715fdc282d237dd826b1a99d86bfec79c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a35760003560e01c8063715018a6116100ee57806398ec8da611610097578063cf42947b11610071578063cf42947b146103d6578063d1c1b4a8146103e9578063e2bbb158146103fc578063f2fde38b1461040f57600080fd5b806398ec8da6146103b2578063c31df763146103c5578063c7b8981c146103ce57600080fd5b80638dbb1e3a116100c85780638dbb1e3a14610337578063916696151461034a57806393f1a40b1461035d57600080fd5b8063715018a6146102f757806378e97925146102ff5780638da5cb5b1461032657600080fd5b80634678132a116101505780635312ea8e1161012a5780635312ea8e146102c9578063535c710e146102dc578063630b5ba1146102ef57600080fd5b80634678132a14610290578063515bc323146102a357806351eb05a6146102b657600080fd5b806317caf6f11161018157806317caf6f11461024d5780633197cbb614610256578063441a3e701461027b57600080fd5b8063081e3eda146101a85780630ef0b250146101bf5780631526fe27146101fe575b600080fd5b6003545b6040519081526020015b60405180910390f35b6101e67f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a03481565b6040516001600160a01b0390911681526020016101b6565b61021161020c366004611891565b610422565b604080516001600160a01b03909616865260208601949094529284019190915263ffffffff16606083015261ffff16608082015260a0016101b6565b6101ac60055481565b6006546102669063ffffffff1681565b60405163ffffffff90911681526020016101b6565b61028e610289366004611938565b61047a565b005b61028e61029e3660046118f0565b610629565b61028e6102b1366004611959565b610645565b61028e6102c4366004611891565b61072d565b61028e6102d7366004611891565b61087c565b61028e6102ea3660046119b0565b610964565b61028e610a12565b61028e610a3d565b6102667f000000000000000000000000000000000000000000000000000000006390d92781565b6000546001600160a01b03166101e6565b6101ac610345366004611938565b610a51565b6101ac6103583660046118c1565b610b37565b61039761036b3660046118c1565b600460209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101b6565b61028e6103c0366004611849565b610c82565b6101ac60015481565b6101ac610e6c565b61028e6103e43660046119b0565b610f70565b61028e6103f7366004611914565b610f93565b61028e61040a366004611938565b61105e565b61028e61041d366004611811565b6111b5565b6003818154811061043257600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919063ffffffff811690640100000000900461ffff1685565b60006003838154811061049d57634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526004808352604080862033875290935291909320805492909102909201925083111561051d5760405162461bcd60e51b815260206004820152601460248201527f42656e69733a206e6f7420656e6f756768204c5000000000000000000000000060448201526064015b60405180910390fd5b6105268461072d565b60008160020154826001015464e8d4a510008560020154856000015461054c9190611aa1565b6105569190611a81565b6105609190611ade565b61056a9190611a41565b90506105763382611245565b600283015581548490839060009061058f908490611ade565b92505081905550838360010160008282546105aa9190611ade565b90915550506002830154825464e8d4a51000916105c691611aa1565b6105d09190611a81565b600183015582546105eb906001600160a01b03163386611396565b604051848152859033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a35050505050565b610631611462565b801561063f5761063f610a12565b50600155565b60006003878154811061066857634e487b7160e01b600052603260045260246000fd5b60009182526020909120600491820201546040517fd505accf0000000000000000000000000000000000000000000000000000000081523392810192909252306024830152604482018890526064820187905260ff8616608483015260a4820185905260c482018490526001600160a01b03169150819063d505accf9060e401600060405180830381600087803b15801561070257600080fd5b505af1158015610716573d6000803e3d6000fd5b50505050610724878761105e565b50505050505050565b60006003828154811061075057634e487b7160e01b600052603260045260246000fd5b60009182526020909120600490910201600381015490915063ffffffff164211610778575050565b60018101546107b55760030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000164263ffffffff1617905550565b60038101546000906107cd9063ffffffff1642610a51565b905060006005548360030160049054906101000a900461ffff1661ffff16600154846107f99190611aa1565b6108039190611aa1565b61080d9190611a81565b60018401549091506108248264e8d4a51000611aa1565b61082e9190611a81565b8360020160008282546108419190611a41565b9091555050505060030180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000164263ffffffff1617905550565b60006003828154811061089f57634e487b7160e01b600052603260045260246000fd5b60009182526020808320858452600480835260408086203387529093529184208054939092020160018101805491955091938392916108df908490611ade565b90915550506000848152600460209081526040808320338085529252822082815560018101839055600201919091558354610926916001600160a01b039091169083611396565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020015b60405180910390a350505050565b61096c611462565b600654429061098290839063ffffffff16611af5565b63ffffffff1610156109d65760405162461bcd60e51b815260206004820152601f60248201527f43616e2774206861766520656e642074696d6520696e207468652070617374006044820152606401610514565b600680548291906000906109f190849063ffffffff16611af5565b92506101000a81548163ffffffff021916908363ffffffff16021790555050565b60035460005b81811015610a3957610a298161072d565b610a3281611b46565b9050610a18565b5050565b610a45611462565b610a4f60006114bc565b565b60007f000000000000000000000000000000000000000000000000000000006390d92763ffffffff168311610aac577f000000000000000000000000000000000000000000000000000000006390d92763ffffffff16610aae565b825b60065490935063ffffffff16831180610aec57507f000000000000000000000000000000000000000000000000000000006390d92763ffffffff1682105b15610af957506000610b31565b60065463ffffffff16821115610b2457600654610b1d90849063ffffffff16611ade565b9050610b31565b610b2e8383611ade565b90505b92915050565b60008060038481548110610b5b57634e487b7160e01b600052603260045260246000fd5b60009182526020808320878452600480835260408086206001600160a01b038a168752909352919093209102909101600281015460038201549193509063ffffffff1642118015610baf5750600183015415155b15610c3c576003830154600090610bcc9063ffffffff1642610a51565b905060006005548560030160049054906101000a900461ffff1661ffff1660015484610bf89190611aa1565b610c029190611aa1565b610c0c9190611a81565b6001860154909150610c238264e8d4a51000611aa1565b610c2d9190611a81565b610c379084611a41565b925050505b60028201546001830154835464e8d4a5100090610c5a908590611aa1565b610c649190611a81565b610c6e9190611ade565b610c789190611a41565b9695505050505050565b610c8a611462565b8015610c9857610c98610a12565b60007f000000000000000000000000000000000000000000000000000000006390d92763ffffffff164211610cf3577f000000000000000000000000000000000000000000000000000000006390d92763ffffffff16610cf5565b425b90508361ffff1660056000828254610d0d9190611a41565b90915550506040805160a0810182526001600160a01b03948516815260006020820181815292820181815263ffffffff9485166060840190815261ffff98891660808501908152600380546001810182559452935160049093027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b81018054949099167fffffffffffffffffffffffff00000000000000000000000000000000000000009094169390931790975592517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c82015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d83015593517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e90910180549451909516640100000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000009094169116179190911790915550565b6000610e76611462565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a0346001600160a01b0316906370a082319060240160206040518083038186803b158015610ef157600080fd5b505afa158015610f05573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2991906118a9565b90508015610f6b57600254610f6b906001600160a01b037f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a0348116911683611396565b905090565b610f78611462565b600680548291906000906109f190849063ffffffff16611a59565b610f9b611462565b8015610fa957610fa9610a12565b8161ffff1660038481548110610fcf57634e487b7160e01b600052603260045260246000fd5b6000918252602090912060049091020160030154600554610ffc91640100000000900461ffff1690611ade565b6110069190611a41565b600581905550816003848154811061102e57634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160030160046101000a81548161ffff021916908361ffff160217905550505050565b60006003838154811061108157634e487b7160e01b600052603260045260246000fd5b600091825260208083208684526004808352604080862033875290935291909320910290910191506110b28461072d565b8054156111105760008160020154826001015464e8d4a51000856002015485600001546110df9190611aa1565b6110e99190611a81565b6110f39190611ade565b6110fd9190611a41565b90506111093382611245565b6002830155505b8154611127906001600160a01b0316333086611524565b8281600001600082825461113b9190611a41565b92505081905550828260010160008282546111569190611a41565b90915550506002820154815464e8d4a510009161117291611aa1565b61117c9190611a81565b6001820155604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1590602001610956565b6111bd611462565b6001600160a01b0381166112395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610514565b611242816114bc565b50565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009081906001600160a01b037f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a03416906370a082319060240160206040518083038186803b1580156112c257600080fd5b505afa1580156112d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fa91906118a9565b90508061130a5782915050610b31565b80831115611358576113466001600160a01b037f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a034168583611396565b6113508184611ade565b915050610b31565b61138c6001600160a01b037f000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a034168585611396565b5060009392505050565b6040516001600160a01b03831660248201526044810182905261145d9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915261157b565b505050565b6000546001600160a01b03163314610a4f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610514565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526115759085907f23b872dd00000000000000000000000000000000000000000000000000000000906084016113db565b50505050565b60006115d0826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116609092919063ffffffff16565b80519091501561145d57808060200190518101906115ee919061182d565b61145d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610514565b606061166f8484600085611679565b90505b9392505050565b6060824710156116f15760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610514565b6001600160a01b0385163b6117485760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610514565b600080866001600160a01b0316858760405161176491906119d4565b60006040518083038185875af1925050503d80600081146117a1576040519150601f19603f3d011682016040523d82523d6000602084013e6117a6565b606091505b50915091506117b68282866117c1565b979650505050505050565b606083156117d0575081611672565b8251156117e05782518084602001fd5b8160405162461bcd60e51b815260040161051491906119f0565b803561ffff8116811461180c57600080fd5b919050565b600060208284031215611822578081fd5b813561167281611b95565b60006020828403121561183e578081fd5b815161167281611baa565b60008060006060848603121561185d578182fd5b611866846117fa565b9250602084013561187681611b95565b9150604084013561188681611baa565b809150509250925092565b6000602082840312156118a2578081fd5b5035919050565b6000602082840312156118ba578081fd5b5051919050565b600080604083850312156118d3578182fd5b8235915060208301356118e581611b95565b809150509250929050565b60008060408385031215611902578182fd5b8235915060208301356118e581611baa565b600080600060608486031215611928578283fd5b83359250611876602085016117fa565b6000806040838503121561194a578182fd5b50508035926020909101359150565b60008060008060008060c08789031215611971578182fd5b863595506020870135945060408701359350606087013560ff81168114611996578283fd5b9598949750929560808101359460a0909101359350915050565b6000602082840312156119c1578081fd5b813563ffffffff81168114611672578182fd5b600082516119e6818460208701611b1a565b9190910192915050565b6020815260008251806020840152611a0f816040850160208701611b1a565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b60008219821115611a5457611a54611b7f565b500190565b600063ffffffff808316818516808303821115611a7857611a78611b7f565b01949350505050565b600082611a9c57634e487b7160e01b81526012600452602481fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611ad957611ad9611b7f565b500290565b600082821015611af057611af0611b7f565b500390565b600063ffffffff83811690831681811015611b1257611b12611b7f565b039392505050565b60005b83811015611b35578181015183820152602001611b1d565b838111156115755750506000910152565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b7857611b78611b7f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461124257600080fd5b801515811461124257600080fdfea164736f6c6343000804000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a03400000000000000000000000000000000000000000000000002de4644c015dc00000000000000000000000000000000000000000000000000000000006390d927000000000000000000000000d7eb548715fdc282d237dd826b1a99d86bfec79c
-----Decoded View---------------
Arg [0] : _wban (address): 0xe20B9e246db5a0d21BF9209E4858Bc9A3ff7A034
Arg [1] : _wbanPerSecond (uint256): 206679894000000000
Arg [2] : _startTime (uint32): 1670437159
Arg [3] : _rewardsDistributor (address): 0xD7eB548715FdC282d237Dd826b1A99d86bfec79c
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000e20b9e246db5a0d21bf9209e4858bc9a3ff7a034
Arg [1] : 00000000000000000000000000000000000000000000000002de4644c015dc00
Arg [2] : 000000000000000000000000000000000000000000000000000000006390d927
Arg [3] : 000000000000000000000000d7eb548715fdc282d237dd826b1a99d86bfec79c
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$113.68
Net Worth in ETH
0.049807
Token Allocations
WBAN
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ARB | 100.00% | $0.00042 | 270,943.7898 | $113.68 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.