编译器
0.8.19+commit.7dd6d404
文件 1 的 18:AccessControlBase.sol
import "@openzeppelin/contracts/utils/Context.sol";
import "../interfaces/core/IVaultAccessControlRegistry.sol";
pragma solidity 0.8.19;
contract AccessControlBase is Context {
IVaultAccessControlRegistry public immutable registry;
address public immutable timelockAddressImmutable;
constructor(address _vaultRegistry, address _timelock) {
registry = IVaultAccessControlRegistry(_vaultRegistry);
timelockAddressImmutable = _timelock;
}
modifier onlyGovernance() {
require(registry.isCallerGovernance(_msgSender()), "Forbidden: Only Governance");
_;
}
modifier onlyEmergency() {
require(registry.isCallerEmergency(_msgSender()), "Forbidden: Only Emergency");
_;
}
modifier onlySupport() {
require(registry.isCallerSupport(_msgSender()), "Forbidden: Only Support");
_;
}
modifier onlyTeam() {
require(registry.isCallerTeam(_msgSender()), "Forbidden: Only Team");
_;
}
modifier onlyProtocol() {
require(registry.isCallerProtocol(_msgSender()), "Forbidden: Only Protocol");
_;
}
modifier protocolNotPaused() {
require(!registry.isProtocolPaused(), "Forbidden: Protocol Paused");
_;
}
modifier onlyTimelockGovernance() {
address timelockActive_;
if (!registry.timelockActivated()) {
timelockActive_ = registry.governanceAddress();
} else {
timelockActive_ = timelockAddressImmutable;
}
require(_msgSender() == timelockActive_, "Forbidden: Only TimelockGovernance");
_;
}
}
文件 2 的 18:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
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");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
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");
}
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);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
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);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
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);
}
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
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 {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
文件 3 的 18:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 4 的 18:IAccessControl.sol
pragma solidity ^0.8.0;
interface IAccessControl {
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) external view returns (bool);
function getRoleAdmin(bytes32 role) external view returns (bytes32);
function grantRole(bytes32 role, address account) external;
function revokeRole(bytes32 role, address account) external;
function renounceRole(bytes32 role, address account) external;
}
文件 5 的 18:IBaseFDT.sol
pragma solidity >=0.6.0 <0.9.0;
interface IBaseFDT {
function withdrawableFundsOf_WLP(address owner) external view returns (uint256);
function withdrawableFundsOf_VWINR(address owner) external view returns (uint256);
function withdrawFunds_WLP() external;
function withdrawFunds_VWINR() external;
function withdrawFunds() external;
event FundsDistributed_WLP(address indexed by, uint256 fundsDistributed_WLP);
event FundsDistributed_VWINR(address indexed by, uint256 fundsDistributed_VWINR);
event FundsWithdrawn_WLP(
address indexed by,
uint256 fundsWithdrawn_WLP,
uint256 totalWithdrawn_WLP
);
event FundsWithdrawn_VWINR(
address indexed by,
uint256 fundsWithdrawn_VWINR,
uint256 totalWithdrawn_VWINR
);
}
文件 6 的 18:IBasicFDT.sol
pragma solidity >=0.6.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./IBaseFDT.sol";
interface IBasicFDT is IBaseFDT, IERC20 {
event PointsPerShareUpdated_WLP(uint256);
event PointsCorrectionUpdated_WLP(address indexed, int256);
event PointsPerShareUpdated_VWINR(uint256);
event PointsCorrectionUpdated_VWINR(address indexed, int256);
function withdrawnFundsOf_WLP(address) external view returns (uint256);
function accumulativeFundsOf_WLP(address) external view returns (uint256);
function withdrawnFundsOf_VWINR(address) external view returns (uint256);
function accumulativeFundsOf_VWINR(address) external view returns (uint256);
function updateFundsReceived_WLP() external;
function updateFundsReceived_VWINR() external;
}
文件 7 的 18:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
文件 8 的 18:IFeeStrategy.sol
pragma solidity 0.8.19;
interface IFeeStrategy {
function calculate(address _token, uint256 _amount) external returns (uint256 amount_);
function currentMultiplier() external view returns (int256);
function computeDollarValue(
address _token,
uint256 _amount
) external view returns (uint256 _dollarValue);
}
文件 9 的 18:IMiningStrategy.sol
pragma solidity 0.8.19;
interface IMiningStrategy {
function calculate(
address _account,
uint256 _amount,
uint256 _mintedByGames
) external returns (uint256 amount_);
function increaseVolume(address _input, uint256 _amount) external;
function decreaseVolume(address _input, uint256 _amount) external;
function currentMultiplier() external view returns (int256);
}
文件 10 的 18:IReferralStorage.sol
pragma solidity 0.8.19;
interface IReferralStorage {
struct Tier {
uint256 WLPRate;
uint256 vWINRRate;
}
event SetWithdrawInterval(uint256 timeInterval);
event SetHandler(address handler, bool isActive);
event SetPlayerReferralCode(address account, bytes32 code);
event SetTier(uint256 tierId, uint256 WLPRate, uint256 vWINRRate);
event SetReferrerTier(address referrer, uint256 tierId);
event RegisterCode(address account, bytes32 code);
event SetCodeOwner(address account, address newAccount, bytes32 code);
event GovSetCodeOwner(bytes32 code, address newAccount);
event Claim(address referrer, uint256 wlpAmount);
event Reward(address referrer, address player, address token, uint256 amount, uint256 rebateAmount);
event RewardRemoved(address referrer, address player, address token, uint256 amount, bool isFully);
event VaultUpdated(address vault);
event VaultUtilsUpdated(address vaultUtils);
event WLPManagerUpdated(address wlpManager);
event SyncTokens();
event TokenTransferredByTimelock(address token, address recipient, uint256 amount);
event DeleteAllWhitelistedTokens();
event TokenAddedToWhitelist(address addedTokenAddress);
event AddReferrerToBlacklist(address referrer, bool setting);
event ReferrerBlacklisted(address referrer);
event NoRewardToSet(address player);
event SetVestedWINRRate(uint256 vWINRRate);
function codeOwners(bytes32 _code) external view returns (address);
function playerReferralCodes(address _account) external view returns (bytes32);
function referrerTiers(address _account) external view returns (uint256);
function getPlayerReferralInfo(address _account) external view returns (bytes32, address);
function setPlayerReferralCode(address _account, bytes32 _code) external;
function setTier(uint256 _tierId, uint256 _WLPRate) external;
function setReferrerTier(address _referrer, uint256 _tierId) external;
function govSetCodeOwner(bytes32 _code, address _newAccount) external;
function getReferrerTier(address _referrer) external view returns (Tier memory tier_);
function getPlayerVestedWINRRate(address _account) external view returns (uint256);
}
文件 11 的 18:ITokenManager.sol
pragma solidity 0.8.19;
interface ITokenManager {
function takeVestedWINR(address _from, uint256 _amount) external;
function takeWINR(address _from, uint256 _amount) external;
function sendVestedWINR(address _to, uint256 _amount) external;
function sendWINR(address _to, uint256 _amount) external;
function burnVestedWINR(uint256 _amount) external;
function burnWINR(uint256 _amount) external;
function mintWINR(address _to, uint256 _amount) external;
function sendWLP(address _to, uint256 _amount) external;
function mintOrTransferByPool(address _to, uint256 _amount) external;
function mintVestedWINR(address _input, uint256 _amount, address _recipient) external returns(uint256 _mintAmount);
function mintedByGames() external returns (uint256);
function MAX_MINT() external returns (uint256);
function share(uint256 amount) external;
}
文件 12 的 18:IVaultAccessControlRegistry.sol
import "@openzeppelin/contracts/access/IAccessControl.sol";
pragma solidity >=0.6.0 <0.9.0;
interface IVaultAccessControlRegistry is IAccessControl {
function timelockActivated() external view returns (bool);
function governanceAddress() external view returns (address);
function pauseProtocol() external;
function unpauseProtocol() external;
function isCallerGovernance(address _account) external view returns (bool);
function isCallerEmergency(address _account) external view returns (bool);
function isCallerProtocol(address _account) external view returns (bool);
function isCallerTeam(address _account) external view returns (bool);
function isCallerSupport(address _account) external view returns (bool);
function isProtocolPaused() external view returns (bool);
function changeGovernanceAddress(address _governanceAddress) external;
event DeadmanSwitchFlipped();
event GovernanceChange(address newGovernanceAddress);
}
文件 13 的 18:IWINR.sol
pragma solidity 0.8.19;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IWINR is IERC20 {
function mint(address account, uint256 amount) external returns (uint256, uint256);
function burn(uint256 amount) external;
function MAX_SUPPLY() external view returns (uint256);
}
文件 14 的 18:IWINRStaking.sol
pragma solidity 0.8.19;
interface IWINRStaking {
function share(uint256 amount) external;
function totalWeight() external view returns (uint256);
struct StakeDividend {
uint256 amount;
uint256 profitDebt;
uint256 weight;
uint128 depositTime;
}
struct StakeVesting {
uint256 amount;
uint256 weight;
uint256 vestingDuration;
uint256 profitDebt;
uint256 startTime;
uint256 accTokenFirstDay;
uint256 accTokenPerDay;
bool withdrawn;
bool cancelled;
}
struct Period {
uint256 duration;
uint256 minDuration;
uint256 claimDuration;
uint256 minPercent;
}
struct WeightMultipliers {
uint256 winr;
uint256 vWinr;
uint256 vWinrVesting;
}
event Donation(address indexed player, uint amount);
event Share(uint256 amount, uint256 totalWeight, uint256 totalStakedVWINR, uint256 totalStakedWINR);
event DepositVesting(
address indexed user,
uint256 index,
uint256 startTime,
uint256 endTime,
uint256 amount,
uint256 profitDebt,
bool isVested,
bool isVesting
);
event DepositDividend(
address indexed user,
uint256 amount,
uint256 profitDebt,
bool isVested
);
event Withdraw(
address indexed user,
uint256 withdrawTime,
uint256 index,
uint256 amount,
uint256 redeem,
uint256 vestedBurn
);
event WithdrawBatch(
address indexed user,
uint256 withdrawTime,
uint256[] indexes,
uint256 amount,
uint256 redeem,
uint256 vestedBurn
);
event Unstake(
address indexed user,
uint256 unstakeTime,
uint256 amount,
uint256 burnedAmount,
bool isVested
);
event Cancel(
address indexed user,
uint256 cancelTime,
uint256 index,
uint256 burnedAmount,
uint256 sentAmount
);
event ClaimVesting(address indexed user, uint256 reward, uint256 index);
event ClaimVestingBatch(address indexed user, uint256 reward, uint256[] indexes);
event ClaimDividend(address indexed user, uint256 reward, bool isVested);
event ClaimDividendBatch(address indexed user, uint256 reward);
event WeightMultipliersUpdate(WeightMultipliers _weightMultipliers);
event UnstakeBurnPercentageUpdate(uint256 _unstakeBurnPercentage);
}
文件 15 的 18:ReentrancyGuard.sol
pragma solidity >=0.8.0;
abstract contract ReentrancyGuard {
uint256 private locked = 1;
modifier nonReentrant() virtual {
require(locked == 1, "REENTRANCY");
locked = 2;
_;
locked = 1;
}
}
文件 16 的 18:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
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));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
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");
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 17 的 18:TokenManager.sol
pragma solidity 0.8.19;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "solmate/src/utils/ReentrancyGuard.sol";
import "../interfaces/core/ITokenManager.sol";
import "../interfaces/tokens/IWINR.sol";
import "./AccessControlBase.sol";
import "../interfaces/strategies/IMiningStrategy.sol";
import "../interfaces/strategies/IFeeStrategy.sol";
import "../interfaces/stakings/IWINRStaking.sol";
import "../interfaces/referrals/IReferralStorage.sol";
import "../tokens/wlp/interfaces/IBasicFDT.sol";
contract TokenManager is AccessControlBase, ReentrancyGuard {
using SafeERC20 for IWINR;
using SafeERC20 for IERC20;
event Converted(address indexed account, uint256 amount);
event StrategiesSet(
IMiningStrategy indexed miningStrategyAddress,
IFeeStrategy indexed feeStrategyAddress
);
event TokensSet(IWINR indexed WINR, IWINR indexed vWINRAddress);
event WINRStakingSet(IWINRStaking indexed WINRStakingAddress);
event ReferralStorageSet(IReferralStorage indexed referralStorageAddress);
IWINR public immutable WINR;
IWINR public immutable vWINR;
IBasicFDT public immutable WLP;
IWINRStaking public WINRStaking;
IReferralStorage public referralStorage;
IMiningStrategy public miningStrategy;
IFeeStrategy public feeStrategy;
uint256 public mintedByGames;
uint256 public immutable MAX_MINT;
uint256 public totalConverted;
uint256 public sendableAmount;
uint256 public accumFee;
uint256 public mintDivider;
uint256 private constant BASIS_POINTS = 10000;
constructor(
IWINR _WINR,
IWINR _vWINR,
IBasicFDT _WLP,
uint256 _maxMint,
address _vaultRegistry,
address _timelock
) AccessControlBase(_vaultRegistry, _timelock) {
WINR = _WINR;
vWINR = _vWINR;
WLP = _WLP;
MAX_MINT = _maxMint;
mintDivider = 4;
}
function setStrategies(
IMiningStrategy _miningStrategy,
IFeeStrategy _feeStrategy
) external onlyGovernance {
miningStrategy = _miningStrategy;
feeStrategy = _feeStrategy;
emit StrategiesSet(miningStrategy, feeStrategy);
}
function setWINRStaking(IWINRStaking _WINRStaking) external onlyGovernance {
require(address(_WINRStaking) != address(0), "address can not be zero");
WINRStaking = _WINRStaking;
emit WINRStakingSet(WINRStaking);
}
function setReferralStorage(IReferralStorage _referralStorage) external onlyGovernance {
referralStorage = _referralStorage;
emit ReferralStorageSet(referralStorage);
}
function setMintDivider(uint256 _mintDivider) external onlyGovernance {
mintDivider = _mintDivider;
}
function takeVestedWINR(address _from, uint256 _amount) external nonReentrant onlyProtocol {
vWINR.safeTransferFrom(_from, address(this), _amount);
}
function takeWINR(address _from, uint256 _amount) external nonReentrant onlyProtocol {
WINR.safeTransferFrom(_from, address(this), _amount);
}
function sendVestedWINR(address _to, uint256 _amount) external nonReentrant onlyProtocol {
vWINR.safeTransfer(_to, _amount);
}
function sendWINR(address _to, uint256 _amount) external nonReentrant onlyProtocol {
_sendWINR(_to, _amount);
}
function mintWINR(address _to, uint256 _amount) external nonReentrant onlyProtocol {
_mintWINR(_to, _amount);
}
function burnVestedWINR(uint256 _amount) external nonReentrant onlyProtocol {
vWINR.burn(_amount);
}
function burnWINR(uint256 _amount) external nonReentrant onlyProtocol {
WINR.burn(_amount);
}
function mintOrTransferByPool(
address _to,
uint256 _amount
) external nonReentrant onlyProtocol {
if (sendableAmount >= _amount) {
sendableAmount -= _amount;
_sendWINR(_to, _amount);
} else {
_mintWINR(_to, _amount);
}
}
function sendWLP(address _to, uint256 _amount) external nonReentrant onlyProtocol {
IERC20(WLP).safeTransfer(_to, _amount);
}
function _mintWINR(address _to, uint256 _amount) internal {
WINR.mint(_to, _amount);
}
function _sendWINR(address _to, uint256 _amount) internal {
WINR.safeTransfer(_to, _amount);
}
function share(uint256 amount) external nonReentrant onlyProtocol {
WINRStaking.share(amount);
}
function convertToken(uint256 _amount) external nonReentrant {
WINR.safeTransferFrom(msg.sender, address(this), _amount);
vWINR.mint(msg.sender, _amount);
totalConverted += _amount;
sendableAmount += _amount;
emit Converted(msg.sender, _amount);
}
function mintVestedWINR(
address _input,
uint256 _amount,
address _recipient
) external nonReentrant onlyProtocol returns(uint256 _mintAmount){
uint256 _feeAmount = feeStrategy.calculate(_input, _amount);
_mintAmount = miningStrategy.calculate(_recipient, _feeAmount, mintedByGames);
uint256 _vWINRRate = referralStorage.getPlayerVestedWINRRate(_recipient);
if (_vWINRRate > 0) {
_mintAmount += (_mintAmount * _vWINRRate) / BASIS_POINTS;
}
if (mintedByGames + _mintAmount > MAX_MINT) {
_mintAmount = MAX_MINT - mintedByGames;
}
vWINR.mint(_recipient, _mintAmount);
accumFee += _mintAmount / mintDivider;
mintedByGames += _mintAmount;
}
function mintFee() external nonReentrant onlySupport {
vWINR.mint(address(WLP), accumFee);
WLP.updateFundsReceived_VWINR();
accumFee = 0;
}
function increaseVolume(address _input, uint256 _amount) external nonReentrant onlyProtocol {
miningStrategy.increaseVolume(_input, _amount);
}
function decreaseVolume(address _input, uint256 _amount) external nonReentrant onlyProtocol {
miningStrategy.decreaseVolume(_input, _amount);
}
}
文件 18 的 18:draft-IERC20Permit.sol
pragma solidity ^0.8.0;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
{
"compilationTarget": {
"contracts/core/TokenManager.sol": "TokenManager"
},
"evmVersion": "paris",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [
":@ensdomains/=node_modules/@ensdomains/",
":@openzeppelin/=node_modules/@openzeppelin/",
":@uniswap/=node_modules/@uniswap/",
":base64-sol/=node_modules/base64-sol/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":eth-gas-reporter/=node_modules/eth-gas-reporter/",
":forge-std/=lib/forge-std/src/",
":hardhat/=node_modules/hardhat/",
":solmate/=node_modules/solmate/"
]
}
[{"inputs":[{"internalType":"contract IWINR","name":"_WINR","type":"address"},{"internalType":"contract IWINR","name":"_vWINR","type":"address"},{"internalType":"contract IBasicFDT","name":"_WLP","type":"address"},{"internalType":"uint256","name":"_maxMint","type":"uint256"},{"internalType":"address","name":"_vaultRegistry","type":"address"},{"internalType":"address","name":"_timelock","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Converted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IReferralStorage","name":"referralStorageAddress","type":"address"}],"name":"ReferralStorageSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IMiningStrategy","name":"miningStrategyAddress","type":"address"},{"indexed":true,"internalType":"contract IFeeStrategy","name":"feeStrategyAddress","type":"address"}],"name":"StrategiesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IWINR","name":"WINR","type":"address"},{"indexed":true,"internalType":"contract IWINR","name":"vWINRAddress","type":"address"}],"name":"TokensSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IWINRStaking","name":"WINRStakingAddress","type":"address"}],"name":"WINRStakingSet","type":"event"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WINR","outputs":[{"internalType":"contract IWINR","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WINRStaking","outputs":[{"internalType":"contract IWINRStaking","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WLP","outputs":[{"internalType":"contract IBasicFDT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accumFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnVestedWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"convertToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_input","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"decreaseVolume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeStrategy","outputs":[{"internalType":"contract IFeeStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_input","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseVolume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"miningStrategy","outputs":[{"internalType":"contract IMiningStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintDivider","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintOrTransferByPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_input","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"mintVestedWINR","outputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedByGames","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralStorage","outputs":[{"internalType":"contract IReferralStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract IVaultAccessControlRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendVestedWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendWLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintDivider","type":"uint256"}],"name":"setMintDivider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IReferralStorage","name":"_referralStorage","type":"address"}],"name":"setReferralStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMiningStrategy","name":"_miningStrategy","type":"address"},{"internalType":"contract IFeeStrategy","name":"_feeStrategy","type":"address"}],"name":"setStrategies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IWINRStaking","name":"_WINRStaking","type":"address"}],"name":"setWINRStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"share","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"takeVestedWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"takeWINR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelockAddressImmutable","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalConverted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vWINR","outputs":[{"internalType":"contract IWINR","name":"","type":"address"}],"stateMutability":"view","type":"function"}]