pragma solidity ^0.6.0;
library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
}
function mul(uint a, uint b) internal pure returns (uint c) {
c = a * b;
require(a == 0 || c / a == b);
}
function div(uint a, uint b) internal pure returns (uint c) {
require(b > 0);
c = a / b;
}
}
// ----------------------------------------------------------------------------
// ERC Token Standard #20 Interface
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
// ----------------------------------------------------------------------------
abstract contract ERC20Interface {
function totalSupply()virtual public view returns (uint);
function balanceOf(address tokenOwner) virtual public view returns (uint balance);
function allowance(address tokenOwner, address spender)virtual public view returns (uint remaining);
function transfer(address to, uint tokens)virtual public returns (bool success);
function approve(address spender, uint tokens) virtual public returns (bool success);
function transferFrom(address from, address to, uint tokens)virtual public returns (bool success);
event Transfer(address indexed from, address indexed to, uint tokens);
event Approval(address indexed tokenOwner, address indexed spender, uint tokens);
}
abstract contract PETH {
function GetUserInfo(address user) virtual public view returns (bool ,uint256,address,uint256,uint256,uint256,uint256);
}
// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call
//
// Borrowed from MiniMeToken
// ----------------------------------------------------------------------------
abstract contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 tokens, address token, bytes memory data) virtual public ;
}
// ----------------------------------------------------------------------------
// Owned contract
// ----------------------------------------------------------------------------
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
constructor() public {
owner = msg.sender;
}
modifier onlyOwner {
require(msg.sender == owner);
_;
}
function transferOwnership(address _newOwner) public onlyOwner {
newOwner = _newOwner;
}
function acceptOwnership() public {
require(msg.sender == newOwner);
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
newOwner = address(0);
}
}
contract MFI_Stacking is Owned {
event EVENT_STACK(address indexed user, uint tokens);
event EVENT_RECEIVE(address indexed user, uint tokens);
event EVENT_UNSTACK(address indexed user, uint tokens);
struct User{
bool Registered;
address User_Address;
address Referer_Address;
uint Stacking_Amount;
uint Contribution_Amount;
uint Accelerator_Stacking_Amount;
uint Token_Amount;
uint Stacking_Block_Number_Start;
uint Stacking_Operation_Block_Stamp;
uint256 m_LastUpdatedSumOfWeightedStackingReciprocale128;
}
using SafeMath for uint;
//addr for user updater
address public m_Updater_Address;
//addr for user relationship
address public m_Referer_Info_Address;
// addr for stacking token
address public m_Stacking_Address;
// addr for target token
address public m_Token_Address;
// addr for token which accelerates stacking
address public m_Liquid_Proof_Address;
//game's block span
uint public m_Stacking_Block_Number_Start;
uint public m_Stacking_Block_Number_Stop;
// total amount of stacking
uint256 public m_Total_Stacking;
// total user number
uint256 public m_User_Count;
// total amount of acceleractor token
uint256 public m_Accelerator_Total_Stacking;
uint256 public m_2TimesThreshold=1.5e18;
uint256 public m_1TimesThreshold=20.0e18;
uint256 public m_WeightOfBlock;
uint256 public m_BlockNumOfLastUpdate=0;
uint256 public m_SumOfWeightedStackingReciprocale128=0;
uint256 public m_FIX_POINT=( 1*2**128);
uint256 public LP_Binding_Rate_Numerator=16265 ;
uint256 public LP_Binding_Rate_Denominator=10000;
// indicate whether game is paused true=pause false=play
bool m_Game_Pause;
//if user unstacking within a span of blocks take 10% receiving token for fee;
uint256 m_Punishment_Span;
modifier onlyPayloadSize(uint size) {
require(!(msg.data.length < size + 4));
_;
}
modifier NotGamePause()
{
require(m_Game_Pause!=true);
_;
}
modifier OnlyRegistered()
{
require(m_User_Map[msg.sender].Registered==true);
_;
}
mapping(address => User) public m_User_Map;
constructor() public {
m_Total_Stacking=1*10**18;
m_Accelerator_Total_Stacking=1;
m_Game_Pause=false;
m_User_Count=1;
m_Punishment_Span=40320;
m_BlockNumOfLastUpdate=block.number;
m_Stacking_Block_Number_Start=block.number;
m_Stacking_Block_Number_Stop=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
m_WeightOfBlock=0.06185185185e18;
m_Referer_Info_Address=0xD2A98CE01478E46E3376f90a4Fb5Db3c40212D43;
m_Stacking_Address=0xD2A98CE01478E46E3376f90a4Fb5Db3c40212D43;
m_Liquid_Proof_Address=0xe7f15F697eE71DF9E208CCf15Ff95e7aD41a067A;
m_Token_Address=0xEaDC218Ac4cB7895a5A56e6484646b48f841C45a;
}
function Set_Token_Address( address stacking,address lp,address token) public onlyOwner{
m_Stacking_Address=stacking;
m_Token_Address=token;
m_Liquid_Proof_Address=lp;
}
function Set_Referer_Info_Address( address addr) public onlyOwner{
m_Referer_Info_Address=addr;
}
function Set_Updater_Address( address addr) public onlyOwner{
m_Updater_Address=addr;
}
function Set_Reward_Rate_Threshold( uint256 t2 ,uint256 t3) public onlyOwner{
m_2TimesThreshold=t2;
m_1TimesThreshold=t3;
}
function Set_Punishment_Span( uint span) public onlyOwner{
m_Punishment_Span=span;
}
function Pause( ) public onlyOwner{
m_Game_Pause=true;
m_Stacking_Block_Number_Stop=block.number;
}
function Resume( ) public onlyOwner{
m_Game_Pause=false;
m_Stacking_Block_Number_Stop=0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
}
function Start_At(uint block_number) public onlyOwner{
if(block_number==0)
{
uint number = block.number;
m_Stacking_Block_Number_Start=number;
}else
{
m_Stacking_Block_Number_Start=block_number;
}
}
function Stop_At(uint block_number) public onlyOwner{
if(block_number==0)
{
uint number = block.number;
m_Stacking_Block_Number_Stop=number;
}else
{
m_Stacking_Block_Number_Stop=block_number;
}
}
function Get_User_Info(address user ) public view returns(bool ,address, address, uint ,uint,uint)
{
return
(
m_User_Map[user]. Registered,
m_User_Map[user]. User_Address,
m_User_Map[user]. Referer_Address,
m_User_Map[user]. Stacking_Amount,
m_User_Map[user]. Contribution_Amount,
m_User_Map[user]. Stacking_Operation_Block_Stamp
);
}
function Get_Game_Info() public view returns(uint256,uint256,uint256 )
{
return(
m_Total_Stacking,m_User_Count,m_Punishment_Span
);
}
function Do_Registering() public NotGamePause returns(bool){
// initialize user data
Update_Global_Data();
address Referer=GetRefererAddress(msg.sender);
uint256 UserLevel=GetUserGrade(msg.sender);
require( Referer != address(0),"REFERER ERROR");
require( m_User_Map[msg.sender].Registered==false,"USER EXIST");
require( UserLevel>=1,"USER GRADE ERROR");
m_User_Map[msg.sender].Registered=true;
m_User_Map[msg.sender].User_Address=msg.sender;
m_User_Map[msg.sender].Referer_Address=GetRefererAddress(msg.sender);
m_User_Map[msg.sender].Stacking_Block_Number_Start= block.number;
m_User_Map[msg.sender].m_LastUpdatedSumOfWeightedStackingReciprocale128=m_SumOfWeightedStackingReciprocale128;
//m_User_Count=m_User_Count+1;
return true;
}
function GetRefererAddress(address user )private returns(address)
{
(bool Register,uint256 PETH_Quota,address Referer,uint256 UserLevel,uint256 Losed,uint256 PickedUp,uint256 ExactProfit)= PETH( m_Referer_Info_Address).GetUserInfo(user);
return (Referer);
}
function GetUserGrade(address user )private returns(uint256)
{
(bool Register,uint256 PETH_Quota,address Referer,uint256 UserLevel,uint256 Losed,uint256 PickedUp,uint256 ExactProfit)= PETH( m_Referer_Info_Address).GetUserInfo(user);
return (UserLevel);
}
function Do_Stacking(uint stacking_amount) public OnlyRegistered NotGamePause returns(bool){
//transfer from user to contract
bool res=false;
res=ERC20Interface(m_Stacking_Address).transferFrom(msg.sender, address(this),stacking_amount);
if(res ==false)
{
//if failed revert transaction;
revert();
}
uint256 lp_stacking_amount =stacking_amount/LP_Binding_Rate_Denominator;
lp_stacking_amount=lp_stacking_amount * LP_Binding_Rate_Numerator;
res=ERC20Interface(m_Liquid_Proof_Address).transferFrom(msg.sender, address(this),lp_stacking_amount);
if(res ==false)
{
//if failed revert transaction;
revert();
}
uint256 old_stacking_amount=m_User_Map[msg.sender].Stacking_Amount;
// update token value in pass;
Update_Global_Data();
Update_User(msg.sender,false);
m_User_Map[msg.sender].Stacking_Operation_Block_Stamp=block.number;
// update user and contract data
m_Total_Stacking=m_Total_Stacking.add(stacking_amount);
m_User_Map[msg.sender].Stacking_Amount= m_User_Map[msg.sender].Stacking_Amount+stacking_amount;
//------------------------------------------------------------
// add contribute
//------------------------------------------------------------
address referer_address=GetRefererAddress(msg.sender);
Update_User(referer_address,false);
m_User_Map[referer_address].Contribution_Amount=m_User_Map[referer_address].Contribution_Amount.add(stacking_amount/5);
//------------------------------------------------------------
// add contribute
//------------------------------------------------------------
referer_address=GetRefererAddress(referer_address);
Update_User(referer_address,false);
m_User_Map[referer_address].Contribution_Amount=m_User_Map[referer_address].Contribution_Amount.add(stacking_amount/10);
//adjust user count
if(old_stacking_amount<15e16 && m_User_Map[msg.sender].Stacking_Amount>=15e16 )
{
m_User_Count=m_User_Count+1;
}
emit EVENT_STACK(msg.sender,stacking_amount);
return true;
}
function Do_Receiving() public OnlyRegistered NotGamePause returns(bool) {
//TODO: UPDATE
Update_Global_Data();
Update_User(msg.sender,false);
bool res=false;
if( (block.number - m_User_Map[msg.sender].Stacking_Operation_Block_Stamp )< m_Punishment_Span)
{
res=ERC20Interface(m_Token_Address).transfer(msg.sender,m_User_Map[msg.sender].Token_Amount*9/10);
ERC20Interface(m_Token_Address).transfer(address(0),m_User_Map[msg.sender].Token_Amount*1/10);
if(res ==false)
{
revert();
}
}else{
res=ERC20Interface(m_Token_Address).transfer(msg.sender,m_User_Map[msg.sender].Token_Amount);
if(res ==false)
{
revert();
}
}
//send token to user
emit EVENT_RECEIVE(msg.sender,m_User_Map[msg.sender].Token_Amount);
// update user data
m_User_Map[msg.sender].Token_Amount=0;
return true;
}
//function
function Do_Unstacking(uint stacking_amount) public OnlyRegistered returns(bool) {
//check balance
require( m_User_Map[msg.sender].Stacking_Amount>=stacking_amount);
Update_Global_Data();
Update_User(msg.sender,false);
uint256 old_stacking_amount=m_User_Map[msg.sender].Stacking_Amount;
bool res=false;
res=ERC20Interface(m_Stacking_Address).transfer(msg.sender,stacking_amount);
if(res ==false)
{
revert();
}
uint256 lp_stacking_amount =stacking_amount/LP_Binding_Rate_Denominator;
lp_stacking_amount=lp_stacking_amount * LP_Binding_Rate_Numerator;
res=ERC20Interface(m_Liquid_Proof_Address).transfer(msg.sender,lp_stacking_amount);
if(res ==false)
{
//if failed revert transaction;
revert();
}
m_User_Map[msg.sender].Stacking_Amount= m_User_Map[msg.sender].Stacking_Amount.sub(stacking_amount);
m_Total_Stacking=m_Total_Stacking.sub(stacking_amount);
//------------------------------------------------------------
// delete contribute
//------------------------------------------------------------
address referer_address=GetRefererAddress(msg.sender);
Update_User(referer_address,false);
m_User_Map[referer_address].Contribution_Amount= m_User_Map[referer_address].Contribution_Amount.sub(stacking_amount/5);
//------------------------------------------------------------
// delete contribute
//------------------------------------------------------------
referer_address=GetRefererAddress(referer_address);
Update_User(referer_address,false);
m_User_Map[referer_address].Contribution_Amount= m_User_Map[referer_address].Contribution_Amount.sub(stacking_amount/10);
//adjust user count
if(old_stacking_amount>=15e16 && m_User_Map[msg.sender].Stacking_Amount<15e16 )
{
m_User_Count=m_User_Count-1;
}
emit EVENT_UNSTACK(msg.sender,stacking_amount);
return true;
}
function Do_Game_Update() public returns(bool){
require(msg.sender==m_Updater_Address,"DISQUALIFIED");
Update_Global_Data();
//Update_User(user,false);
return true;
}
function Do_Update_User(address user) public returns(bool){
require(msg.sender==m_Updater_Address,"DISQUALIFIED");
//Update_Global_Data();
require(m_User_Map[user].Registered==true);
Update_User(user,false);
return true;
}
function Update_Global_Data() private
{
uint block_num_clamp=block.number;
if(block_num_clamp>m_Stacking_Block_Number_Stop)
{
block_num_clamp=m_Stacking_Block_Number_Stop;
}
if(block_num_clamp<m_Stacking_Block_Number_Start)
{
block_num_clamp=m_Stacking_Block_Number_Start;
}
uint256 block_span=block_num_clamp-m_BlockNumOfLastUpdate;
if(block_span==0)
{
}else{
uint256 delta= m_FIX_POINT;
uint256 t_total_stacking=m_Total_Stacking;
delta=delta/t_total_stacking;
delta=delta*block_span*m_WeightOfBlock;
m_SumOfWeightedStackingReciprocale128=m_SumOfWeightedStackingReciprocale128+delta;
}
m_BlockNumOfLastUpdate=block_num_clamp;
}
function Do_Update() public OnlyRegistered NotGamePause returns(bool){
Update_Global_Data();
Update_User(msg.sender,false);
return true;
}
function Update_User(address user,bool punishment) private
{
if(m_User_Map[user].Registered==false)
{
return;
}
uint256 block_num_clamp=block.number;
if(block_num_clamp>m_Stacking_Block_Number_Stop)
{
block_num_clamp=m_Stacking_Block_Number_Stop;
}
m_User_Map[user].User_Address=user;
//// check user's block number which should be lower than current number and greater than 0;
if(m_User_Map[user].Stacking_Block_Number_Start<=m_Stacking_Block_Number_Start)
{
m_User_Map[user].Stacking_Block_Number_Start= block_num_clamp;
}
if(m_User_Map[user].Stacking_Block_Number_Start> block_num_clamp)
{
m_User_Map[user].Stacking_Block_Number_Start= block_num_clamp;
}
if(m_User_Map[user].Stacking_Block_Number_Start>= m_Stacking_Block_Number_Stop )
{
m_User_Map[user].Stacking_Block_Number_Start=m_Stacking_Block_Number_Stop;
}
////Get how many blocks between last operation and current block///
//uint block_span=block_num_clamp - m_User_Map[user].Stacking_Block_Number_Start;
////BASE///////////////////////////////////////////////////////////////
uint fixed_point=(2**12);
uint quantity=m_SumOfWeightedStackingReciprocale128.sub( m_User_Map[user].m_LastUpdatedSumOfWeightedStackingReciprocale128);
quantity=quantity/fixed_point;
quantity=( m_User_Map[user].Stacking_Amount+m_User_Map[user].Contribution_Amount)*quantity;
quantity =quantity/( m_FIX_POINT);
quantity =quantity*fixed_point;
//////////////////////////////////////
quantity =quantity*10;
quantity =quantity/13;
/////////////////////////////////////
uint prize_rate= GetAccelerationRate(user);
quantity=quantity*prize_rate;
quantity=quantity/3;
////Punishment/////////////////////////////////////////////////////////////////////////
if(punishment)
{
uint256 burn_quantity=quantity/10;
//TODO:burn
bool res=false;
//
res=ERC20Interface(m_Token_Address).transfer(address(0),burn_quantity);
quantity=TakeFee10(quantity);
}
////Update Token Data////////////////////////////////////////////////////////////
m_User_Map[user].Token_Amount= m_User_Map[user].Token_Amount.add(quantity);
////Update Block Number////////////////////////////////////////////////////////////
m_User_Map[user].Stacking_Block_Number_Start= block_num_clamp;
////Update LastUpdatedSumOfWeightedStackingReciprocale128////////////////////////////////////////////////////////////
m_User_Map[user].m_LastUpdatedSumOfWeightedStackingReciprocale128= m_SumOfWeightedStackingReciprocale128;
}
function GetAccelerationRate(address user) private view returns (uint )
{
//uint t_s=m_Total_Stacking;
//uint a_s=t_s/m_User_Count;
//uint a_s_range_left=a_s*1160/1000;
//uint a_s_range_right=a_s*2000/1000;
if(m_User_Map[user].Stacking_Amount<m_2TimesThreshold)
{
return 2;
}
if(m_User_Map[user].Stacking_Amount>m_1TimesThreshold)
{
return 1;
}
return 3;
}
function Take_Token(address token_address,uint token_amount) public onlyOwner{
ERC20Interface(token_address).transfer(msg.sender,token_amount);
}
function TakeFee10(uint token_amount) private pure returns (uint) {
uint res=token_amount;
res=res*9;
res=res/10;
return res;
}
function ViewReceiving(address user) public view returns (uint) {
////Get how many blocks between last operation and current block///
uint block_num_clamp=block.number;
if(block_num_clamp>m_Stacking_Block_Number_Stop)
{
block_num_clamp=m_Stacking_Block_Number_Stop;
}
if(block_num_clamp<m_Stacking_Block_Number_Start)
{
block_num_clamp=m_Stacking_Block_Number_Start;
}
uint256 block_span=block_num_clamp-m_BlockNumOfLastUpdate;
uint256 t_SumOfWeightedStackingReciprocale128=m_SumOfWeightedStackingReciprocale128;
if(block_span==0)
{
//m_TotalStackingOfLastUpdate=stacking_amount+m_TotalStackingOfLastUpdate;
}else{
uint256 delta= m_FIX_POINT;
uint256 t_total_stacking=m_Total_Stacking;
delta=delta/t_total_stacking;
delta=delta*block_span*m_WeightOfBlock;
t_SumOfWeightedStackingReciprocale128=m_SumOfWeightedStackingReciprocale128+delta;
}
////BASE///////////////////////////////////////////////////////////////
uint fixed_point=(2**12);
uint quantity=t_SumOfWeightedStackingReciprocale128.sub( m_User_Map[user].m_LastUpdatedSumOfWeightedStackingReciprocale128);
quantity=quantity/fixed_point;
quantity=( m_User_Map[user].Stacking_Amount+m_User_Map[user].Contribution_Amount)*quantity;
quantity =quantity/( m_FIX_POINT);
quantity =quantity*fixed_point;
//////////////////////////////////////
quantity =quantity*10;
quantity =quantity/13;
/////////////////////////////////////
uint prize_rate= GetAccelerationRate(user);
quantity=quantity*prize_rate;
quantity=quantity/3;
/////////////////////////////////////////////////////////////////////////////
uint res=quantity+m_User_Map[user].Token_Amount;
return res;
}
function Set_Block_Weight(uint256 block_weight)public onlyOwner
{
m_WeightOfBlock=block_weight;
}
}
{
"compilationTarget": {
"browser/MFI_LP_AUTO_Instance.sol": "MFI_Stacking"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"EVENT_RECEIVE","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"EVENT_STACK","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokens","type":"uint256"}],"name":"EVENT_UNSTACK","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"Do_Game_Update","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Do_Receiving","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Do_Registering","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stacking_amount","type":"uint256"}],"name":"Do_Stacking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stacking_amount","type":"uint256"}],"name":"Do_Unstacking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Do_Update","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"Do_Update_User","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Get_Game_Info","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"Get_User_Info","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LP_Binding_Rate_Denominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LP_Binding_Rate_Numerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"Resume","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"block_weight","type":"uint256"}],"name":"Set_Block_Weight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"span","type":"uint256"}],"name":"Set_Punishment_Span","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"Set_Referer_Info_Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"t2","type":"uint256"},{"internalType":"uint256","name":"t3","type":"uint256"}],"name":"Set_Reward_Rate_Threshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stacking","type":"address"},{"internalType":"address","name":"lp","type":"address"},{"internalType":"address","name":"token","type":"address"}],"name":"Set_Token_Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"Set_Updater_Address","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"block_number","type":"uint256"}],"name":"Start_At","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"block_number","type":"uint256"}],"name":"Stop_At","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_address","type":"address"},{"internalType":"uint256","name":"token_amount","type":"uint256"}],"name":"Take_Token","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"ViewReceiving","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"m_1TimesThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_2TimesThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Accelerator_Total_Stacking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_BlockNumOfLastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_FIX_POINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Liquid_Proof_Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Referer_Info_Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Stacking_Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Stacking_Block_Number_Start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Stacking_Block_Number_Stop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_SumOfWeightedStackingReciprocale128","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Token_Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Total_Stacking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_Updater_Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_User_Count","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"m_User_Map","outputs":[{"internalType":"bool","name":"Registered","type":"bool"},{"internalType":"address","name":"User_Address","type":"address"},{"internalType":"address","name":"Referer_Address","type":"address"},{"internalType":"uint256","name":"Stacking_Amount","type":"uint256"},{"internalType":"uint256","name":"Contribution_Amount","type":"uint256"},{"internalType":"uint256","name":"Accelerator_Stacking_Amount","type":"uint256"},{"internalType":"uint256","name":"Token_Amount","type":"uint256"},{"internalType":"uint256","name":"Stacking_Block_Number_Start","type":"uint256"},{"internalType":"uint256","name":"Stacking_Operation_Block_Stamp","type":"uint256"},{"internalType":"uint256","name":"m_LastUpdatedSumOfWeightedStackingReciprocale128","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"m_WeightOfBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]