Source Code
Latest 25 from a total of 1,535 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Emergency Withdr... | 42726391 | 167 days ago | IN | 0 S | 0.00258918 | ||||
| Emergency Withdr... | 42573367 | 168 days ago | IN | 0 S | 0.00335456 | ||||
| Withdraw | 30876568 | 241 days ago | IN | 0 S | 0.00617729 | ||||
| Withdraw | 26750095 | 258 days ago | IN | 0 S | 0.00443955 | ||||
| Withdraw | 26750033 | 258 days ago | IN | 0 S | 0.00570938 | ||||
| Withdraw | 17879420 | 299 days ago | IN | 0 S | 0.00674015 | ||||
| Withdraw | 17879378 | 299 days ago | IN | 0 S | 0.00668531 | ||||
| Withdraw | 14013951 | 317 days ago | IN | 0 S | 0.00660439 | ||||
| Withdraw | 13283327 | 320 days ago | IN | 0 S | 0.00590845 | ||||
| Withdraw | 13283243 | 320 days ago | IN | 0 S | 0.00669305 | ||||
| Withdraw | 13273250 | 320 days ago | IN | 0 S | 0.00559094 | ||||
| Withdraw | 13273155 | 320 days ago | IN | 0 S | 0.00708886 | ||||
| Withdraw | 13160932 | 321 days ago | IN | 0 S | 0.00567791 | ||||
| Withdraw | 13160749 | 321 days ago | IN | 0 S | 0.0045137 | ||||
| Withdraw | 13142371 | 321 days ago | IN | 0 S | 0.0045137 | ||||
| Deposit | 13115191 | 321 days ago | IN | 0 S | 0.00574651 | ||||
| Withdraw | 13110989 | 321 days ago | IN | 0 S | 0.0045137 | ||||
| Withdraw | 13065586 | 321 days ago | IN | 0 S | 0.00729499 | ||||
| Deposit | 13064766 | 321 days ago | IN | 0 S | 0.00798538 | ||||
| Deposit | 13064414 | 321 days ago | IN | 0 S | 0.00769151 | ||||
| Withdraw | 13038814 | 322 days ago | IN | 0 S | 0.00593421 | ||||
| Withdraw | 13038792 | 322 days ago | IN | 0 S | 0.0047499 | ||||
| Deposit | 12986582 | 322 days ago | IN | 0 S | 0.00574651 | ||||
| Withdraw | 12986276 | 322 days ago | IN | 0 S | 0.0045137 | ||||
| Deposit | 12940447 | 322 days ago | IN | 0 S | 0.00659306 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | ||||
|---|---|---|---|---|---|---|---|
| 42726391 | 167 days ago | 0 S | |||||
| 42573367 | 168 days ago | 0 S | |||||
| 30876568 | 241 days ago | 0 S | |||||
| 30876568 | 241 days ago | 0 S | |||||
| 30876568 | 241 days ago | 0 S | |||||
| 30876568 | 241 days ago | 0 S | |||||
| 26750095 | 258 days ago | 0 S | |||||
| 26750095 | 258 days ago | 0 S | |||||
| 26750095 | 258 days ago | 0 S | |||||
| 26750095 | 258 days ago | 0 S | |||||
| 26750033 | 258 days ago | 0 S | |||||
| 26750033 | 258 days ago | 0 S | |||||
| 26750033 | 258 days ago | 0 S | |||||
| 26750033 | 258 days ago | 0 S | |||||
| 17879420 | 299 days ago | 0 S | |||||
| 17879420 | 299 days ago | 0 S | |||||
| 17879420 | 299 days ago | 0 S | |||||
| 17879420 | 299 days ago | 0 S | |||||
| 17879378 | 299 days ago | 0 S | |||||
| 17879378 | 299 days ago | 0 S | |||||
| 17879378 | 299 days ago | 0 S | |||||
| 17879378 | 299 days ago | 0 S | |||||
| 14013951 | 317 days ago | 0 S | |||||
| 14013951 | 317 days ago | 0 S | |||||
| 14013951 | 317 days ago | 0 S |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
MatrixGenesisRewardPool
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1
/*
░▒▓██████████████▓▒░ ░▒▓██████▓▒░▒▓████████▓▒░▒▓███████▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░ ░▒▓█▓▒░ ░▒▓███████▓▒░░▒▓█▓▒░░▒▓██████▓▒░ ░▒▓████████▓▒░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░
https://matrixai.finance/
*/
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "../interfaces/IBasisAsset.sol";
contract MatrixGenesisRewardPool is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// governance
address public operator;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
}
// Info of each pool.
struct PoolInfo {
IERC20 token; // Address of LP token contract.
uint256 depFee; // deposit fee that is applied to created pool.
uint256 allocPoint; // How many allocation points assigned to this pool. MATRIXs to distribute per block.
uint256 lastRewardTime; // Last time that MATRIXs distribution occurs.
uint256 accMatrixPerShare; // Accumulated MATRIXs per share, times 1e18. See below.
bool isStarted; // if lastRewardTime has passed
uint256 poolMatrixPerSec; // rewards per second for pool (acts as allocPoint)
}
IERC20 public matrix;
address public devFund;
// Info of each pool.
PoolInfo[] public poolInfo;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation points. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The time when MATRIX mining starts.
uint256 public poolStartTime;
// The time when MATRIX mining ends.
uint256 public poolEndTime;
uint256 public matrixPerSecond = 0 ether;
uint256 public runningTime = 7 days;
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);
event RewardPaid(address indexed user, uint256 amount);
constructor(
address _matrix,
address _devFund,
uint256 _poolStartTime
) {
require(block.timestamp < _poolStartTime, "pool cant be started in the past");
if (_matrix != address(0)) matrix = IERC20(_matrix);
if(_devFund != address(0)) devFund = _devFund;
poolStartTime = _poolStartTime;
poolEndTime = _poolStartTime + runningTime;
operator = msg.sender;
devFund = _devFund;
// create all the pools
add(0.402314814814815000 ether, 0, IERC20(0x37C4c5e345ae4d4041b7f519343f942716fc6fE6), false, 0); // Matrix-S - 28%
add(0.359209656084656000 ether, 100, IERC20(0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38), false, 0); // S - 25%
add(0.143683862433862000 ether, 100, IERC20(0xE5DA20F15420aD15DE0fa650600aFc998bbE3955), false, 0); // stS - 10%
add(0.143683862433862000 ether, 100, IERC20(0x29219dd400f2Bf60E5a23d13Be72B486D4038894), false, 0); // USDC.e - 10%
add(0.143683862433862000 ether, 100, IERC20(0xd3DCe716f3eF535C5Ff8d041c1A41C3bd89b97aE), false, 0); // scUSD - 10%
add(0.086210317460317500 ether, 100, IERC20(0x44E23B1F3f4511b3a7e81077Fd9F2858dF1B7579), false, 0); // MCLB - 6%
add(0.071841931216931200 ether, 100, IERC20(0x79bbF4508B1391af3A0F4B30bb5FC4aa9ab0E07C), false, 0); // ANON - 5%
add(0.057473544973545000 ether, 100, IERC20(0x3333111A391cC08fa51353E9195526A70b333333), false, 0); // X33 - 4%
add(0.028736772486772500 ether, 100, IERC20(0x9fDbC3f8Abc05Fa8f3Ad3C17D2F806c1230c4564), false, 0); // GOGLZ - 2%
}
modifier onlyOperator() {
require(operator == msg.sender, "MatrixGenesisRewardPool: caller is not the operator");
_;
}
function poolLength() external view returns (uint256) {
return poolInfo.length;
}
function checkPoolDuplicate(IERC20 _token) internal view {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
require(poolInfo[pid].token != _token, "MatrixGenesisRewardPool: existing pool?");
}
}
// bulk add pools
function addBulk(uint256[] calldata _allocPoints, uint256[] calldata _depFees, IERC20[] calldata _tokens, bool _withUpdate, uint256 _lastRewardTime) external onlyOperator {
require(_allocPoints.length == _depFees.length && _allocPoints.length == _tokens.length, "MatrixGenesisRewardPool: invalid length");
for (uint256 i = 0; i < _allocPoints.length; i++) {
add(_allocPoints[i], _depFees[i], _tokens[i], _withUpdate, _lastRewardTime);
}
}
// Add new lp to the pool. Can only be called by operator.
function add(
uint256 _allocPoint,
uint256 _depFee,
IERC20 _token,
bool _withUpdate,
uint256 _lastRewardTime
) public onlyOperator {
checkPoolDuplicate(_token);
if (_withUpdate) {
massUpdatePools();
}
if (block.timestamp < poolStartTime) {
// chef is sleeping
if (_lastRewardTime == 0) {
_lastRewardTime = poolStartTime;
} else {
if (_lastRewardTime < poolStartTime) {
_lastRewardTime = poolStartTime;
}
}
} else {
// chef is cooking
if (_lastRewardTime == 0 || _lastRewardTime < block.timestamp) {
_lastRewardTime = block.timestamp;
}
}
bool _isStarted = (_lastRewardTime <= poolStartTime) || (_lastRewardTime <= block.timestamp);
poolInfo.push(PoolInfo({
token: _token,
depFee: _depFee,
allocPoint: _allocPoint,
poolMatrixPerSec: _allocPoint,
lastRewardTime: _lastRewardTime,
accMatrixPerShare: 0,
isStarted: _isStarted
}));
if (_isStarted) {
totalAllocPoint = totalAllocPoint.add(_allocPoint);
matrixPerSecond = matrixPerSecond.add(_allocPoint);
}
}
// Update the given pool's MATRIX allocation point. Can only be called by the operator.
function set(uint256 _pid, uint256 _allocPoint, uint256 _depFee) public onlyOperator {
massUpdatePools();
PoolInfo storage pool = poolInfo[_pid];
require(_depFee < 200); // deposit fee cant be more than 2%;
pool.depFee = _depFee;
if (pool.isStarted) {
totalAllocPoint = totalAllocPoint.sub(pool.allocPoint).add(_allocPoint);
matrixPerSecond = matrixPerSecond.sub(pool.poolMatrixPerSec).add(_allocPoint);
}
pool.allocPoint = _allocPoint;
pool.poolMatrixPerSec = _allocPoint;
}
function bulkSet(uint256[] calldata _pids, uint256[] calldata _allocPoints, uint256[] calldata _depFees) external onlyOperator {
require(_pids.length == _allocPoints.length && _pids.length == _depFees.length, "MatrixGenesisRewardPool: invalid length");
for (uint256 i = 0; i < _pids.length; i++) {
set(_pids[i], _allocPoints[i], _depFees[i]);
}
}
// Return accumulate rewards over the given _from to _to block.
function getGeneratedReward(uint256 _fromTime, uint256 _toTime) public view returns (uint256) {
if (_fromTime >= _toTime) return 0;
if (_toTime >= poolEndTime) {
if (_fromTime >= poolEndTime) return 0;
if (_fromTime <= poolStartTime) return poolEndTime.sub(poolStartTime).mul(matrixPerSecond);
return poolEndTime.sub(_fromTime).mul(matrixPerSecond);
} else {
if (_toTime <= poolStartTime) return 0;
if (_fromTime <= poolStartTime) return _toTime.sub(poolStartTime).mul(matrixPerSecond);
return _toTime.sub(_fromTime).mul(matrixPerSecond);
}
}
// View function to see pending MATRIXs on frontend.
function pendingMATRIX(uint256 _pid, address _user) external view returns (uint256) {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accMatrixPerShare = pool.accMatrixPerShare;
uint256 tokenSupply = pool.token.balanceOf(address(this));
if (block.timestamp > pool.lastRewardTime && tokenSupply != 0) {
uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
uint256 _matrixReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
accMatrixPerShare = accMatrixPerShare.add(_matrixReward.mul(1e18).div(tokenSupply));
}
return user.amount.mul(accMatrixPerShare).div(1e18).sub(user.rewardDebt);
}
function massUpdatePools() public {
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
// massUpdatePoolsInRange
function massUpdatePoolsInRange(uint256 _fromPid, uint256 _toPid) public {
require(_fromPid <= _toPid, "MatrixGenesisRewardPool: invalid range");
for (uint256 pid = _fromPid; pid <= _toPid; ++pid) {
updatePool(pid);
}
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) private {
PoolInfo storage pool = poolInfo[_pid];
if (block.timestamp <= pool.lastRewardTime) {
return;
}
uint256 tokenSupply = pool.token.balanceOf(address(this));
if (tokenSupply == 0) {
pool.lastRewardTime = block.timestamp;
return;
}
if (!pool.isStarted) {
pool.isStarted = true;
totalAllocPoint = totalAllocPoint.add(pool.allocPoint);
matrixPerSecond = matrixPerSecond.add(pool.poolMatrixPerSec);
}
if (totalAllocPoint > 0) {
uint256 _generatedReward = getGeneratedReward(pool.lastRewardTime, block.timestamp);
uint256 _matrixReward = _generatedReward.mul(pool.allocPoint).div(totalAllocPoint);
pool.accMatrixPerShare = pool.accMatrixPerShare.add(_matrixReward.mul(1e18).div(tokenSupply));
}
pool.lastRewardTime = block.timestamp;
}
function setDevFund(address _devFund) public onlyOperator {
devFund = _devFund;
}
// Deposit LP tokens.
function deposit(uint256 _pid, uint256 _amount) public nonReentrant {
address _sender = msg.sender;
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 _pending = user.amount.mul(pool.accMatrixPerShare).div(1e18).sub(user.rewardDebt);
if (_pending > 0) {
safeMatrixTransfer(_sender, _pending);
emit RewardPaid(_sender, _pending);
}
}
if (_amount > 0 ) {
pool.token.safeTransferFrom(_sender, address(this), _amount);
uint256 depositDebt = _amount.mul(pool.depFee).div(10000);
user.amount = user.amount.add(_amount.sub(depositDebt));
pool.token.safeTransfer(devFund, depositDebt);
}
user.rewardDebt = user.amount.mul(pool.accMatrixPerShare).div(1e18);
emit Deposit(_sender, _pid, _amount);
}
// Withdraw LP tokens.
function withdraw(uint256 _pid, uint256 _amount) public nonReentrant {
address _sender = msg.sender;
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 _pending = user.amount.mul(pool.accMatrixPerShare).div(1e18).sub(user.rewardDebt);
if (_pending > 0) {
safeMatrixTransfer(_sender, _pending);
emit RewardPaid(_sender, _pending);
}
if (_amount > 0) {
user.amount = user.amount.sub(_amount);
pool.token.safeTransfer(_sender, _amount);
}
user.rewardDebt = user.amount.mul(pool.accMatrixPerShare).div(1e18);
emit Withdraw(_sender, _pid, _amount);
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
function emergencyWithdraw(uint256 _pid) public nonReentrant {
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
uint256 _amount = user.amount;
user.amount = 0;
user.rewardDebt = 0;
pool.token.safeTransfer(msg.sender, _amount);
emit EmergencyWithdraw(msg.sender, _pid, _amount);
}
// Safe matrix transfer function, just in case if rounding error causes pool to not have enough MATRIXs.
function safeMatrixTransfer(address _to, uint256 _amount) internal {
uint256 _matrixBal = matrix.balanceOf(address(this));
if (_matrixBal > 0) {
if (_amount > _matrixBal) {
matrix.safeTransfer(_to, _matrixBal);
} else {
matrix.safeTransfer(_to, _amount);
}
}
}
function setOperator(address _operator) external onlyOperator {
operator = _operator;
}
function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external onlyOperator {
require(_token != matrix, "MatrixGenesisRewardPool: cannot recover MATRIX token");
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
PoolInfo storage pool = poolInfo[pid];
require(_token != pool.token, "ShareRewardPool: Token cannot be pool token");
}
_token.safeTransfer(to, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/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.
*
* ==== Security Considerations
*
* There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
* expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
* considered as an intention to spend the allowance in any specific way. The second is that because permits have
* built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
* take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
* generally recommended is:
*
* ```solidity
* function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
* try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
* doThing(..., value);
* }
*
* function doThing(..., uint256 value) public {
* token.safeTransferFrom(msg.sender, address(this), value);
* ...
* }
* ```
*
* Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
* `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
* {SafeERC20-safeTransferFrom}).
*
* Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
* contracts should have entry points that don't rely on permit.
*/
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].
*
* CAUTION: See Security Considerations above.
*/
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.9.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 (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/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;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
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");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
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");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or 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 {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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 (last updated v4.9.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @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 a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* 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) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBasisAsset {
function mint(address recipient, uint256 amount) external returns (bool);
function burn(uint256 amount) external;
function burnFrom(address from, uint256 amount) external;
function isOperator() external returns (bool);
function operator() external view returns (address);
function transferOperator(address newOperator_) external;
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_matrix","type":"address"},{"internalType":"address","name":"_devFund","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","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":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depFee","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"uint256[]","name":"_depFees","type":"uint256[]"},{"internalType":"contract IERC20[]","name":"_tokens","type":"address[]"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"addBulk","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_pids","type":"uint256[]"},{"internalType":"uint256[]","name":"_allocPoints","type":"uint256[]"},{"internalType":"uint256[]","name":"_depFees","type":"uint256[]"}],"name":"bulkSet","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":[],"name":"devFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromPid","type":"uint256"},{"internalType":"uint256","name":"_toPid","type":"uint256"}],"name":"massUpdatePoolsInRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"matrix","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"matrixPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingMATRIX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"depFee","type":"uint256"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accMatrixPerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"},{"internalType":"uint256","name":"poolMatrixPerSec","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_depFee","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devFund","type":"address"}],"name":"setDevFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040526000600655600060095562093a80600a5534801561002157600080fd5b506040516125cd3803806125cd8339810160408190526100409161080a565b60016000554281116100995760405162461bcd60e51b815260206004820181905260248201527f706f6f6c2063616e74206265207374617274656420696e20746865207061737460448201526064015b60405180910390fd5b6001600160a01b038316156100c457600280546001600160a01b0319166001600160a01b0385161790555b6001600160a01b038216156100ef57600380546001600160a01b0319166001600160a01b0384161790555b6007819055600a54610101908261085f565b60085560018054336001600160a01b031991821617909155600380549091166001600160a01b0384161790556101576705954f3148ea031860007337c4c5e345ae4d4041b7f519343f942716fc6fe681806102b4565b6101826704fc2b476ed0ef80606473039e2fb66102314ce7b64ce5ce3e5183bc94ad386000806102b4565b6101ad6701fe77b62c539170606473e5da20f15420ad15de0fa650600afc998bbe39556000806102b4565b6101d86701fe77b62c53917060647329219dd400f2bf60e5a23d13be72b486d40388946000806102b4565b6102036701fe77b62c539170606473d3dce716f3ef535c5ff8d041c1a41c3bd89b97ae6000806102b4565b61022e67013247d3b432253c60647344e23b1f3f4511b3a7e81077fd9f2858df1b75796000806102b4565b61025866ff3bdb1629c98060647379bbf4508b1391af3a0f4b30bb5fc4aa9ab0e07c6000806102b4565b61028266cc2fe278216e286064733333111a391cc08fa51353e9195526a70b3333336000806102b4565b6102ac666617f13c10b7146064739fdbc3f8abc05fa8f3ad3c17d2f806c1230c45646000806102b4565b5050506108ed565b6001546001600160a01b031633146103345760405162461bcd60e51b815260206004820152603360248201527f4d617472697847656e65736973526577617264506f6f6c3a2063616c6c65722060448201527f6973206e6f7420746865206f70657261746f72000000000000000000000000006064820152608401610090565b61033d836104bd565b811561034b5761034b61056c565b60075442101561037a5780600003610366575060075461038e565b60075481101561037557506007545b61038e565b80158061038657504281105b1561038e5750425b6000600754821115806103a15750428211155b905060046040518060e00160405280866001600160a01b0316815260200187815260200188815260200184815260200160008152602001831515815260200188815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c08201518160060155505080156104b5576006546104a1908761058f565b6006556009546104b1908761058f565b6009555b505050505050565b60045460005b8181101561056757826001600160a01b0316600482815481106104e8576104e8610872565b60009182526020909120600790910201546001600160a01b03160361055f5760405162461bcd60e51b815260206004820152602760248201527f4d617472697847656e65736973526577617264506f6f6c3a206578697374696e6044820152666720706f6f6c3f60c81b6064820152608401610090565b6001016104c3565b505050565b60045460005b8181101561058b57610583816105a4565b600101610572565b5050565b600061059b828461085f565b90505b92915050565b6000600482815481106105b9576105b9610872565b90600052602060002090600702019050806003015442116105d8575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106449190610888565b90508060000361065957504260039091015550565b600582015460ff1661069d5760058201805460ff1916600117905560028201546006546106859161058f565b60069081558201546009546106999161058f565b6009555b600654156107105760006106bb83600301544261071b60201b60201c565b905060006106e26006546106dc8660020154856107ca60201b90919060201c565b906107d6565b90506107086106fd846106dc84670de0b6b3a76400006107ca565b60048601549061058f565b600485015550505b504260039091015550565b600081831061072c5750600061059e565b60085482106107895760085483106107465750600061059e565b60075483116107745760095460075460085461076d929161076791906107e2565b906107ca565b905061059e565b60095460085461076d919061076790866107e2565b600754821161079a5750600061059e565b60075483116107b95760095460075461076d91906107679085906107e2565b60095461076d9061076784866107e2565b600061059b82846108a1565b600061059b82846108b8565b600061059b82846108da565b80516001600160a01b038116811461080557600080fd5b919050565b60008060006060848603121561081f57600080fd5b610828846107ee565b9250610836602085016107ee565b6040949094015192959394509192915050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561059e5761059e610849565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561089a57600080fd5b5051919050565b808202811582820484141761059e5761059e610849565b6000826108d557634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561059e5761059e610849565b611cd1806108fc6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635f96dc11116100de578063943f013d11610097578063b947a88d11610071578063b947a88d14610367578063deb5ce081461037a578063e2bbb15814610383578063fddc298c1461039657600080fd5b8063943f013d14610338578063ae4db91914610341578063b3ab15fb1461035457600080fd5b80635f96dc11146102b157806362d30368146102ba578063630b5ba1146102cd5780636e271dd5146102d557806390c5ed6a146102de57806393f1a40b146102f157600080fd5b80634390d2a8116101305780634390d2a81461023d57806343b0e8df14610250578063441a3e70146102655780635312ea8e1461027857806354575af41461028b578063570ca7351461029e57600080fd5b8063081e3eda1461017857806313bb63fd1461018f5780631526fe27146101a257806317caf6f1146101f6578063231f0c6a146101ff57806332c2a96614610212575b600080fd5b6004545b6040519081526020015b60405180910390f35b61017c61019d3660046117a9565b6103a9565b6101b56101b03660046117d9565b610516565b604080516001600160a01b03909816885260208801969096529486019390935260608501919091526080840152151560a083015260c082015260e001610186565b61017c60065481565b61017c61020d3660046117f2565b610572565b600254610225906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b600354610225906001600160a01b031681565b61026361025e366004611814565b610631565b005b6102636102733660046117f2565b610705565b6102636102863660046117d9565b6108cd565b610263610299366004611840565b610981565b600154610225906001600160a01b031681565b61017c60075481565b6102636102c83660046118dc565b610af1565b610263610bc6565b61017c60085481565b6102636102ec36600461199f565b610be5565b6103236102ff3660046117a9565b60056020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610186565b61017c600a5481565b61026361034f3660046119f1565b610d98565b6102636103623660046119f1565b610de4565b6102636103753660046117f2565b610e30565b61017c60095481565b6102636103913660046117f2565b610eb6565b6102636103a4366004611a0e565b611085565b600080600484815481106103bf576103bf611ab4565b600091825260208083208784526005825260408085206001600160a01b0389811687529352808520600460079590950290920184810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a0823190602401602060405180830381865afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104619190611aca565b905083600301544211801561047557508015155b156104d857600061048a856003015442610572565b905060006104b16006546104ab88600201548561114890919063ffffffff16565b9061115b565b90506104d36104cc846104ab84670de0b6b3a7640000611148565b8590611167565b935050505b6105098360010154610503670de0b6b3a76400006104ab86886000015461114890919063ffffffff16565b90611173565b9450505050505b92915050565b6004818154811061052657600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b0390951696509294919390929160ff169087565b600081831061058357506000610510565b60085482106105eb57600854831061059d57506000610510565b60075483116105d0576105c96009546105c360075460085461117390919063ffffffff16565b90611148565b9050610510565b6105c96009546105c38560085461117390919063ffffffff16565b60075482116105fc57506000610510565b6007548311610620576105c96009546105c36007548561117390919063ffffffff16565b6009546105c9906105c38486611173565b6001546001600160a01b031633146106645760405162461bcd60e51b815260040161065b90611ae3565b60405180910390fd5b61066c610bc6565b60006004848154811061068157610681611ab4565b9060005260206000209060070201905060c8821061069e57600080fd5b60018101829055600581015460ff16156106f3576106d5836106cf836002015460065461117390919063ffffffff16565b90611167565b60069081558101546009546106ef9185916106cf91611173565b6009555b60028101839055600601919091555050565b61070d61117f565b600033905060006004848154811061072757610727611ab4565b600091825260208083208784526005825260408085206001600160a01b0388168652909252922080546007909202909201925084111561079e5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015260640161065b565b6107a7856111d8565b60006107d88260010154610503670de0b6b3a76400006104ab8760040154876000015461114890919063ffffffff16565b9050801561082e576107ea8482611343565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161082591815260200190565b60405180910390a25b84156108585781546108409086611173565b82558254610858906001600160a01b031685876113ea565b6004830154825461087691670de0b6b3a7640000916104ab91611148565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505050506108c96001600055565b5050565b6108d561117f565b6000600482815481106108ea576108ea611ab4565b60009182526020808320858452600582526040808520338087529352842080548582556001820195909555600790930201805490945091929161093a916001600160a01b039190911690836113ea565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a350505061097e6001600055565b50565b6001546001600160a01b031633146109ab5760405162461bcd60e51b815260040161065b90611ae3565b6002546001600160a01b0390811690841603610a265760405162461bcd60e51b815260206004820152603460248201527f4d617472697847656e65736973526577617264506f6f6c3a2063616e6e6f74206044820152733932b1b7bb32b91026a0aa2924ac103a37b5b2b760611b606482015260840161065b565b60045460005b81811015610ad657600060048281548110610a4957610a49611ab4565b6000918252602090912060079091020180549091506001600160a01b0390811690871603610acd5760405162461bcd60e51b815260206004820152602b60248201527f5368617265526577617264506f6f6c3a20546f6b656e2063616e6e6f7420626560448201526a103837b7b6103a37b5b2b760a91b606482015260840161065b565b50600101610a2c565b50610aeb6001600160a01b03851683856113ea565b50505050565b6001546001600160a01b03163314610b1b5760405162461bcd60e51b815260040161065b90611ae3565b8685148015610b2957508683145b610b455760405162461bcd60e51b815260040161065b90611b36565b60005b87811015610bbb57610bb3898983818110610b6557610b65611ab4565b90506020020135888884818110610b7e57610b7e611ab4565b90506020020135878785818110610b9757610b97611ab4565b9050602002016020810190610bac91906119f1565b8686610be5565b600101610b48565b505050505050505050565b60045460005b818110156108c957610bdd816111d8565b600101610bcc565b6001546001600160a01b03163314610c0f5760405162461bcd60e51b815260040161065b90611ae3565b610c188361144d565b8115610c2657610c26610bc6565b600754421015610c555780600003610c415750600754610c69565b600754811015610c5057506007545b610c69565b801580610c6157504281105b15610c695750425b600060075482111580610c7c5750428211155b905060046040518060e00160405280866001600160a01b0316815260200187815260200188815260200184815260200160008152602001831515815260200188815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c0820151816006015550508015610d9057600654610d7c9087611167565b600655600954610d8c9087611167565b6009555b505050505050565b6001546001600160a01b03163314610dc25760405162461bcd60e51b815260040161065b90611ae3565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610e0e5760405162461bcd60e51b815260040161065b90611ae3565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b80821115610e8f5760405162461bcd60e51b815260206004820152602660248201527f4d617472697847656e65736973526577617264506f6f6c3a20696e76616c69646044820152652072616e676560d01b606482015260840161065b565b815b818111610eb157610ea1816111d8565b610eaa81611b93565b9050610e91565b505050565b610ebe61117f565b6000339050600060048481548110610ed857610ed8611ab4565b600091825260208083208784526005825260408085206001600160a01b0388168652909252922060079091029091019150610f12856111d8565b805415610fa2576000610f4a8260010154610503670de0b6b3a76400006104ab8760040154876000015461114890919063ffffffff16565b90508015610fa057610f5c8482611343565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610f9791815260200190565b60405180910390a25b505b8315611015578154610fbf906001600160a01b03168430876114f7565b6000610fde6127106104ab85600101548861114890919063ffffffff16565b9050610ff5610fed8683611173565b835490611167565b82556003548354611013916001600160a01b039182169116836113ea565b505b6004820154815461103391670de0b6b3a7640000916104ab91611148565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a35050506108c96001600055565b6001546001600160a01b031633146110af5760405162461bcd60e51b815260040161065b90611ae3565b84831480156110bd57508481145b6110d95760405162461bcd60e51b815260040161065b90611b36565b60005b8581101561113f576111378787838181106110f9576110f9611ab4565b9050602002013586868481811061111257611112611ab4565b9050602002013585858581811061112b5761112b611ab4565b90506020020135610631565b6001016110dc565b50505050505050565b60006111548284611bac565b9392505050565b60006111548284611bc3565b60006111548284611be5565b60006111548284611bf8565b6002600054036111d15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161065b565b6002600055565b6000600482815481106111ed576111ed611ab4565b906000526020600020906007020190508060030154421161120c575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112789190611aca565b90508060000361128d57504260039091015550565b600582015460ff166112d15760058201805460ff1916600117905560028201546006546112b991611167565b60069081558201546009546112cd91611167565b6009555b600654156113385760006112e9836003015442610572565b9050600061130a6006546104ab86600201548561114890919063ffffffff16565b9050611330611325846104ab84670de0b6b3a7640000611148565b600486015490611167565b600485015550505b504260039091015550565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561138c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b09190611aca565b90508015610eb157808211156113d757600254610eb1906001600160a01b031684836113ea565b600254610eb1906001600160a01b031684845b6040516001600160a01b038316602482015260448101829052610eb190849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261152f565b60045460005b81811015610eb157826001600160a01b03166004828154811061147857611478611ab4565b60009182526020909120600790910201546001600160a01b0316036114ef5760405162461bcd60e51b815260206004820152602760248201527f4d617472697847656e65736973526577617264506f6f6c3a206578697374696e6044820152666720706f6f6c3f60c81b606482015260840161065b565b600101611453565b6040516001600160a01b0380851660248301528316604482015260648101829052610aeb9085906323b872dd60e01b90608401611416565b6000611584826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116049092919063ffffffff16565b90508051600014806115a55750808060200190518101906115a59190611c0b565b610eb15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161065b565b6060611613848460008561161b565b949350505050565b60608247101561167c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161065b565b600080866001600160a01b031685876040516116989190611c4c565b60006040518083038185875af1925050503d80600081146116d5576040519150601f19603f3d011682016040523d82523d6000602084013e6116da565b606091505b50915091506116eb878383876116f6565b979650505050505050565b6060831561176557825160000361175e576001600160a01b0385163b61175e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161065b565b5081611613565b611613838381511561177a5781518083602001fd5b8060405162461bcd60e51b815260040161065b9190611c68565b6001600160a01b038116811461097e57600080fd5b600080604083850312156117bc57600080fd5b8235915060208301356117ce81611794565b809150509250929050565b6000602082840312156117eb57600080fd5b5035919050565b6000806040838503121561180557600080fd5b50508035926020909101359150565b60008060006060848603121561182957600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561185557600080fd5b833561186081611794565b925060208401359150604084013561187781611794565b809150509250925092565b60008083601f84011261189457600080fd5b50813567ffffffffffffffff8111156118ac57600080fd5b6020830191508360208260051b85010111156118c757600080fd5b9250929050565b801515811461097e57600080fd5b60008060008060008060008060a0898b0312156118f857600080fd5b883567ffffffffffffffff81111561190f57600080fd5b61191b8b828c01611882565b909950975050602089013567ffffffffffffffff81111561193b57600080fd5b6119478b828c01611882565b909750955050604089013567ffffffffffffffff81111561196757600080fd5b6119738b828c01611882565b9095509350506060890135611987816118ce565b979a9699509497939692959194509192608001359150565b600080600080600060a086880312156119b757600080fd5b853594506020860135935060408601356119d081611794565b925060608601356119e0816118ce565b949793965091946080013592915050565b600060208284031215611a0357600080fd5b813561115481611794565b60008060008060008060608789031215611a2757600080fd5b863567ffffffffffffffff811115611a3e57600080fd5b611a4a89828a01611882565b909750955050602087013567ffffffffffffffff811115611a6a57600080fd5b611a7689828a01611882565b909550935050604087013567ffffffffffffffff811115611a9657600080fd5b611aa289828a01611882565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611adc57600080fd5b5051919050565b60208082526033908201527f4d617472697847656e65736973526577617264506f6f6c3a2063616c6c65722060408201527234b9903737ba103a34329037b832b930ba37b960691b606082015260800190565b60208082526027908201527f4d617472697847656e65736973526577617264506f6f6c3a20696e76616c6964604082015266040d8cadccee8d60cb1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600060018201611ba557611ba5611b7d565b5060010190565b808202811582820484141761051057610510611b7d565b600082611be057634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561051057610510611b7d565b8181038181111561051057610510611b7d565b600060208284031215611c1d57600080fd5b8151611154816118ce565b60005b83811015611c43578181015183820152602001611c2b565b50506000910152565b60008251611c5e818460208701611c28565b9190910192915050565b6020815260008251806020840152611c87816040850160208701611c28565b601f01601f1916919091016040019291505056fea2646970667358221220e5a7fb401785f702facb46331f5647afe94c0c613232a2a1604ce4c7c97e650964736f6c634300081a00330000000000000000000000007e3db94eb504e4fd9d4ab4d0181956fb0cdbd0a500000000000000000000000000e2aafd3de98517ec86d91b25a1161cc3b5ca3d0000000000000000000000000000000000000000000000000000000067c9e2a0
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80635f96dc11116100de578063943f013d11610097578063b947a88d11610071578063b947a88d14610367578063deb5ce081461037a578063e2bbb15814610383578063fddc298c1461039657600080fd5b8063943f013d14610338578063ae4db91914610341578063b3ab15fb1461035457600080fd5b80635f96dc11146102b157806362d30368146102ba578063630b5ba1146102cd5780636e271dd5146102d557806390c5ed6a146102de57806393f1a40b146102f157600080fd5b80634390d2a8116101305780634390d2a81461023d57806343b0e8df14610250578063441a3e70146102655780635312ea8e1461027857806354575af41461028b578063570ca7351461029e57600080fd5b8063081e3eda1461017857806313bb63fd1461018f5780631526fe27146101a257806317caf6f1146101f6578063231f0c6a146101ff57806332c2a96614610212575b600080fd5b6004545b6040519081526020015b60405180910390f35b61017c61019d3660046117a9565b6103a9565b6101b56101b03660046117d9565b610516565b604080516001600160a01b03909816885260208801969096529486019390935260608501919091526080840152151560a083015260c082015260e001610186565b61017c60065481565b61017c61020d3660046117f2565b610572565b600254610225906001600160a01b031681565b6040516001600160a01b039091168152602001610186565b600354610225906001600160a01b031681565b61026361025e366004611814565b610631565b005b6102636102733660046117f2565b610705565b6102636102863660046117d9565b6108cd565b610263610299366004611840565b610981565b600154610225906001600160a01b031681565b61017c60075481565b6102636102c83660046118dc565b610af1565b610263610bc6565b61017c60085481565b6102636102ec36600461199f565b610be5565b6103236102ff3660046117a9565b60056020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610186565b61017c600a5481565b61026361034f3660046119f1565b610d98565b6102636103623660046119f1565b610de4565b6102636103753660046117f2565b610e30565b61017c60095481565b6102636103913660046117f2565b610eb6565b6102636103a4366004611a0e565b611085565b600080600484815481106103bf576103bf611ab4565b600091825260208083208784526005825260408085206001600160a01b0389811687529352808520600460079590950290920184810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a0823190602401602060405180830381865afa15801561043d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104619190611aca565b905083600301544211801561047557508015155b156104d857600061048a856003015442610572565b905060006104b16006546104ab88600201548561114890919063ffffffff16565b9061115b565b90506104d36104cc846104ab84670de0b6b3a7640000611148565b8590611167565b935050505b6105098360010154610503670de0b6b3a76400006104ab86886000015461114890919063ffffffff16565b90611173565b9450505050505b92915050565b6004818154811061052657600080fd5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b0390951696509294919390929160ff169087565b600081831061058357506000610510565b60085482106105eb57600854831061059d57506000610510565b60075483116105d0576105c96009546105c360075460085461117390919063ffffffff16565b90611148565b9050610510565b6105c96009546105c38560085461117390919063ffffffff16565b60075482116105fc57506000610510565b6007548311610620576105c96009546105c36007548561117390919063ffffffff16565b6009546105c9906105c38486611173565b6001546001600160a01b031633146106645760405162461bcd60e51b815260040161065b90611ae3565b60405180910390fd5b61066c610bc6565b60006004848154811061068157610681611ab4565b9060005260206000209060070201905060c8821061069e57600080fd5b60018101829055600581015460ff16156106f3576106d5836106cf836002015460065461117390919063ffffffff16565b90611167565b60069081558101546009546106ef9185916106cf91611173565b6009555b60028101839055600601919091555050565b61070d61117f565b600033905060006004848154811061072757610727611ab4565b600091825260208083208784526005825260408085206001600160a01b0388168652909252922080546007909202909201925084111561079e5760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015260640161065b565b6107a7856111d8565b60006107d88260010154610503670de0b6b3a76400006104ab8760040154876000015461114890919063ffffffff16565b9050801561082e576107ea8482611343565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04868260405161082591815260200190565b60405180910390a25b84156108585781546108409086611173565b82558254610858906001600160a01b031685876113ea565b6004830154825461087691670de0b6b3a7640000916104ab91611148565b600183015560405185815286906001600160a01b038616907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3505050506108c96001600055565b5050565b6108d561117f565b6000600482815481106108ea576108ea611ab4565b60009182526020808320858452600582526040808520338087529352842080548582556001820195909555600790930201805490945091929161093a916001600160a01b039190911690836113ea565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959060200160405180910390a350505061097e6001600055565b50565b6001546001600160a01b031633146109ab5760405162461bcd60e51b815260040161065b90611ae3565b6002546001600160a01b0390811690841603610a265760405162461bcd60e51b815260206004820152603460248201527f4d617472697847656e65736973526577617264506f6f6c3a2063616e6e6f74206044820152733932b1b7bb32b91026a0aa2924ac103a37b5b2b760611b606482015260840161065b565b60045460005b81811015610ad657600060048281548110610a4957610a49611ab4565b6000918252602090912060079091020180549091506001600160a01b0390811690871603610acd5760405162461bcd60e51b815260206004820152602b60248201527f5368617265526577617264506f6f6c3a20546f6b656e2063616e6e6f7420626560448201526a103837b7b6103a37b5b2b760a91b606482015260840161065b565b50600101610a2c565b50610aeb6001600160a01b03851683856113ea565b50505050565b6001546001600160a01b03163314610b1b5760405162461bcd60e51b815260040161065b90611ae3565b8685148015610b2957508683145b610b455760405162461bcd60e51b815260040161065b90611b36565b60005b87811015610bbb57610bb3898983818110610b6557610b65611ab4565b90506020020135888884818110610b7e57610b7e611ab4565b90506020020135878785818110610b9757610b97611ab4565b9050602002016020810190610bac91906119f1565b8686610be5565b600101610b48565b505050505050505050565b60045460005b818110156108c957610bdd816111d8565b600101610bcc565b6001546001600160a01b03163314610c0f5760405162461bcd60e51b815260040161065b90611ae3565b610c188361144d565b8115610c2657610c26610bc6565b600754421015610c555780600003610c415750600754610c69565b600754811015610c5057506007545b610c69565b801580610c6157504281105b15610c695750425b600060075482111580610c7c5750428211155b905060046040518060e00160405280866001600160a01b0316815260200187815260200188815260200184815260200160008152602001831515815260200188815250908060018154018082558091505060019003906000526020600020906007020160009091909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a81548160ff02191690831515021790555060c0820151816006015550508015610d9057600654610d7c9087611167565b600655600954610d8c9087611167565b6009555b505050505050565b6001546001600160a01b03163314610dc25760405162461bcd60e51b815260040161065b90611ae3565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001546001600160a01b03163314610e0e5760405162461bcd60e51b815260040161065b90611ae3565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b80821115610e8f5760405162461bcd60e51b815260206004820152602660248201527f4d617472697847656e65736973526577617264506f6f6c3a20696e76616c69646044820152652072616e676560d01b606482015260840161065b565b815b818111610eb157610ea1816111d8565b610eaa81611b93565b9050610e91565b505050565b610ebe61117f565b6000339050600060048481548110610ed857610ed8611ab4565b600091825260208083208784526005825260408085206001600160a01b0388168652909252922060079091029091019150610f12856111d8565b805415610fa2576000610f4a8260010154610503670de0b6b3a76400006104ab8760040154876000015461114890919063ffffffff16565b90508015610fa057610f5c8482611343565b836001600160a01b03167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e048682604051610f9791815260200190565b60405180910390a25b505b8315611015578154610fbf906001600160a01b03168430876114f7565b6000610fde6127106104ab85600101548861114890919063ffffffff16565b9050610ff5610fed8683611173565b835490611167565b82556003548354611013916001600160a01b039182169116836113ea565b505b6004820154815461103391670de0b6b3a7640000916104ab91611148565b600182015560405184815285906001600160a01b038516907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a35050506108c96001600055565b6001546001600160a01b031633146110af5760405162461bcd60e51b815260040161065b90611ae3565b84831480156110bd57508481145b6110d95760405162461bcd60e51b815260040161065b90611b36565b60005b8581101561113f576111378787838181106110f9576110f9611ab4565b9050602002013586868481811061111257611112611ab4565b9050602002013585858581811061112b5761112b611ab4565b90506020020135610631565b6001016110dc565b50505050505050565b60006111548284611bac565b9392505050565b60006111548284611bc3565b60006111548284611be5565b60006111548284611bf8565b6002600054036111d15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161065b565b6002600055565b6000600482815481106111ed576111ed611ab4565b906000526020600020906007020190508060030154421161120c575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112789190611aca565b90508060000361128d57504260039091015550565b600582015460ff166112d15760058201805460ff1916600117905560028201546006546112b991611167565b60069081558201546009546112cd91611167565b6009555b600654156113385760006112e9836003015442610572565b9050600061130a6006546104ab86600201548561114890919063ffffffff16565b9050611330611325846104ab84670de0b6b3a7640000611148565b600486015490611167565b600485015550505b504260039091015550565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561138c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b09190611aca565b90508015610eb157808211156113d757600254610eb1906001600160a01b031684836113ea565b600254610eb1906001600160a01b031684845b6040516001600160a01b038316602482015260448101829052610eb190849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261152f565b60045460005b81811015610eb157826001600160a01b03166004828154811061147857611478611ab4565b60009182526020909120600790910201546001600160a01b0316036114ef5760405162461bcd60e51b815260206004820152602760248201527f4d617472697847656e65736973526577617264506f6f6c3a206578697374696e6044820152666720706f6f6c3f60c81b606482015260840161065b565b600101611453565b6040516001600160a01b0380851660248301528316604482015260648101829052610aeb9085906323b872dd60e01b90608401611416565b6000611584826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116049092919063ffffffff16565b90508051600014806115a55750808060200190518101906115a59190611c0b565b610eb15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161065b565b6060611613848460008561161b565b949350505050565b60608247101561167c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161065b565b600080866001600160a01b031685876040516116989190611c4c565b60006040518083038185875af1925050503d80600081146116d5576040519150601f19603f3d011682016040523d82523d6000602084013e6116da565b606091505b50915091506116eb878383876116f6565b979650505050505050565b6060831561176557825160000361175e576001600160a01b0385163b61175e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161065b565b5081611613565b611613838381511561177a5781518083602001fd5b8060405162461bcd60e51b815260040161065b9190611c68565b6001600160a01b038116811461097e57600080fd5b600080604083850312156117bc57600080fd5b8235915060208301356117ce81611794565b809150509250929050565b6000602082840312156117eb57600080fd5b5035919050565b6000806040838503121561180557600080fd5b50508035926020909101359150565b60008060006060848603121561182957600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561185557600080fd5b833561186081611794565b925060208401359150604084013561187781611794565b809150509250925092565b60008083601f84011261189457600080fd5b50813567ffffffffffffffff8111156118ac57600080fd5b6020830191508360208260051b85010111156118c757600080fd5b9250929050565b801515811461097e57600080fd5b60008060008060008060008060a0898b0312156118f857600080fd5b883567ffffffffffffffff81111561190f57600080fd5b61191b8b828c01611882565b909950975050602089013567ffffffffffffffff81111561193b57600080fd5b6119478b828c01611882565b909750955050604089013567ffffffffffffffff81111561196757600080fd5b6119738b828c01611882565b9095509350506060890135611987816118ce565b979a9699509497939692959194509192608001359150565b600080600080600060a086880312156119b757600080fd5b853594506020860135935060408601356119d081611794565b925060608601356119e0816118ce565b949793965091946080013592915050565b600060208284031215611a0357600080fd5b813561115481611794565b60008060008060008060608789031215611a2757600080fd5b863567ffffffffffffffff811115611a3e57600080fd5b611a4a89828a01611882565b909750955050602087013567ffffffffffffffff811115611a6a57600080fd5b611a7689828a01611882565b909550935050604087013567ffffffffffffffff811115611a9657600080fd5b611aa289828a01611882565b979a9699509497509295939492505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215611adc57600080fd5b5051919050565b60208082526033908201527f4d617472697847656e65736973526577617264506f6f6c3a2063616c6c65722060408201527234b9903737ba103a34329037b832b930ba37b960691b606082015260800190565b60208082526027908201527f4d617472697847656e65736973526577617264506f6f6c3a20696e76616c6964604082015266040d8cadccee8d60cb1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600060018201611ba557611ba5611b7d565b5060010190565b808202811582820484141761051057610510611b7d565b600082611be057634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561051057610510611b7d565b8181038181111561051057610510611b7d565b600060208284031215611c1d57600080fd5b8151611154816118ce565b60005b83811015611c43578181015183820152602001611c2b565b50506000910152565b60008251611c5e818460208701611c28565b9190910192915050565b6020815260008251806020840152611c87816040850160208701611c28565b601f01601f1916919091016040019291505056fea2646970667358221220e5a7fb401785f702facb46331f5647afe94c0c613232a2a1604ce4c7c97e650964736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007e3db94eb504e4fd9d4ab4d0181956fb0cdbd0a500000000000000000000000000e2aafd3de98517ec86d91b25a1161cc3b5ca3d0000000000000000000000000000000000000000000000000000000067c9e2a0
-----Decoded View---------------
Arg [0] : _matrix (address): 0x7e3db94eb504E4Fd9d4ab4d0181956fb0cdBd0A5
Arg [1] : _devFund (address): 0x00E2AAFd3dE98517EC86d91b25A1161cC3b5cA3D
Arg [2] : _poolStartTime (uint256): 1741284000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007e3db94eb504e4fd9d4ab4d0181956fb0cdbd0a5
Arg [1] : 00000000000000000000000000e2aafd3de98517ec86d91b25a1161cc3b5ca3d
Arg [2] : 0000000000000000000000000000000000000000000000000000000067c9e2a0
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.14
Net Worth in S
Token Allocations
WS
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| SONIC | 100.00% | $0.066424 | 2.0863 | $0.1385 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.