文件 1 的 10:Context.sol
pragma solidity ^0.6.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}
文件 2 的 10:DeFiatGovernedUtils.sol
pragma solidity ^0.6.0;
import "./DeFiatUtils.sol";
import "../interfaces/IDeFiatGov.sol";
abstract contract DeFiatGovernedUtils is DeFiatUtils {
event GovernanceUpdated(address indexed user, address governance);
address public governance;
modifier onlyMastermind {
require(
msg.sender == IDeFiatGov(governance).mastermind() || msg.sender == owner(),
"Gov: Only Mastermind"
);
_;
}
modifier onlyGovernor {
require(
IDeFiatGov(governance).viewActorLevelOf(msg.sender) >= 2 || msg.sender == owner(),
"Gov: Only Governors"
);
_;
}
modifier onlyPartner {
require(
IDeFiatGov(governance).viewActorLevelOf(msg.sender) >= 1 || msg.sender == owner(),
"Gov: Only Partners"
);
_;
}
function _setGovernance(address _governance) internal {
require(_governance != governance, "SetGovernance: No governance change");
governance = _governance;
emit GovernanceUpdated(msg.sender, governance);
}
function setGovernance(address _governance) external onlyGovernor {
_setGovernance(_governance);
}
}
文件 3 的 10:DeFiatPoints.sol
pragma solidity ^0.6.0;
import "./interfaces/IDeFiatPoints.sol";
import "./lib/@openzeppelin/token/ERC20/ERC20.sol";
import "./utils/DeFiatGovernedUtils.sol";
contract DeFiatPoints is ERC20("DeFiat Points v2", "DFTPv2"), IDeFiatPoints, DeFiatGovernedUtils {
using SafeMath for uint256;
event DiscountUpdated(address indexed user, uint256 discount);
event TrancheUpdated(address indexed user, uint256 tranche, uint256 pointsNeeded);
event AllTranchesUpdated(address indexed user);
event TokenUpdated(address indexed user, address token);
event PointsUpdated(address indexed user, address indexed subject, uint256 amount);
event WhitelistedUpdated(address indexed user, address indexed subject, bool whitelist);
event RedirectionUpdated(address indexed user, address indexed subject, bool redirect);
address public token;
mapping (uint256 => uint256) public discountTranches;
mapping (address => uint256) private _discounts;
mapping (address => uint256) private _lastTx;
mapping (address => bool) private _whitelisted;
mapping (address => bool) private _redirection;
constructor(address _governance) public {
_setGovernance(_governance);
_mint(msg.sender, 150000 * 1e18);
}
function viewDiscountOf(address _address) public override view returns (uint256) {
return _discounts[_address];
}
function viewEligibilityOf(address _address) public override view returns (uint256 tranche) {
uint256 balance = balanceOf(_address);
for (uint256 i = 0; i <= 9; i++) {
if (balance >= discountTranches[i]) {
tranche = i;
} else {
return tranche;
}
}
}
function discountPointsNeeded(uint256 _tranche) public override view returns (uint256 pointsNeeded) {
return (discountTranches[_tranche]);
}
function viewTxThreshold() public override view returns (uint256) {
return IDeFiatGov(governance).viewTxThreshold();
}
function viewWhitelisted(address _address) public override view returns (bool) {
return _whitelisted[_address];
}
function viewRedirection(address _address) public override view returns (bool) {
return _redirection[_address];
}
function _updateDiscount(address user, uint256 discount) internal {
_discounts[user] = discount;
emit DiscountUpdated(user, discount);
}
function updateMyDiscount() public returns (bool) {
uint256 tranche = viewEligibilityOf(msg.sender);
uint256 discount = tranche * 10;
require(discount != _discounts[msg.sender], "UpdateDiscount: No discount change");
_updateDiscount(msg.sender, discount);
}
function overrideDiscount(address user, uint256 discount) external onlyGovernor {
require(discount <= 100, "OverrideDiscount: Must be in-bounds");
require(_discounts[user] != discount, "OverrideDiscount: No discount change");
_updateDiscount(user, discount);
}
function setDiscountTranches(uint256 tranche, uint256 pointsNeeded) external onlyGovernor {
require(tranche < 10, "SetTranche: Maximum tranche level exceeded");
require(discountTranches[tranche] != pointsNeeded, "SetTranche: No change detected");
discountTranches[tranche] = pointsNeeded;
emit TrancheUpdated(msg.sender, tranche, pointsNeeded);
}
function setAll10DiscountTranches(
uint256 _pointsNeeded1, uint256 _pointsNeeded2, uint256 _pointsNeeded3, uint256 _pointsNeeded4,
uint256 _pointsNeeded5, uint256 _pointsNeeded6, uint256 _pointsNeeded7, uint256 _pointsNeeded8,
uint256 _pointsNeeded9
) external onlyGovernor {
discountTranches[0] = 0;
discountTranches[1] = _pointsNeeded1;
discountTranches[2] = _pointsNeeded2;
discountTranches[3] = _pointsNeeded3;
discountTranches[4] = _pointsNeeded4;
discountTranches[5] = _pointsNeeded5;
discountTranches[6] = _pointsNeeded6;
discountTranches[7] = _pointsNeeded7;
discountTranches[8] = _pointsNeeded8;
discountTranches[9] = _pointsNeeded9;
emit AllTranchesUpdated(msg.sender);
}
function overrideLoyaltyPoints(address _address, uint256 _points) external override onlyGovernor {
uint256 balance = balanceOf(_address);
if (balance == _points) {
return;
}
_burn(_address, balance);
if (_points > 0) {
_mint(_address, _points);
}
emit PointsUpdated(msg.sender, _address, _points);
}
function addPoints(address _address, uint256 _txSize, uint256 _points) external onlyGovernor {
if (!_whitelisted[msg.sender]) {
return;
}
if(_txSize >= viewTxThreshold() && _lastTx[tx.origin] < block.number){
if (_redirection[_address]) {
_mint(tx.origin, _points);
} else {
_mint(_address, _points);
}
_lastTx[tx.origin] = block.number;
}
}
function _transfer(address sender, address recipient, uint256 amount) internal override {
ERC20._transfer(sender, recipient, amount);
if (IDeFiatGov(governance).viewActorLevelOf(sender) == 0) {
uint256 tranche = viewEligibilityOf(sender);
_discounts[sender] = tranche * 10;
}
}
function burn(uint256 amount) external {
_burn(msg.sender, amount);
}
function setWhitelisted(address _address, bool _whitelist) external override onlyGovernor {
require(_whitelisted[_address] != _whitelist, "SetWhitelisted: No whitelist change");
_whitelisted[_address] = _whitelist;
emit WhitelistedUpdated(msg.sender, _address, _whitelist);
}
function setRedirection(address _address, bool _redirect) external override onlyGovernor {
require(_redirection[_address] != _redirect, "SetRedirection: No redirection change");
_redirection[_address] = _redirect;
emit RedirectionUpdated(msg.sender, _address, _redirect);
}
function setToken(address _token) external onlyGovernor {
require(_token != token, "SetToken: No token change");
token = _token;
emit TokenUpdated(msg.sender, token);
}
}
文件 4 的 10:DeFiatUtils.sol
pragma solidity ^0.6.0;
import "../lib/@openzeppelin/token/ERC20/IERC20.sol";
import "../lib/@openzeppelin/access/Ownable.sol";
abstract contract DeFiatUtils is Ownable {
event TokenSweep(address indexed user, address indexed token, uint256 amount);
function sweep(address token) external onlyOwner {
uint256 amount = IERC20(token).balanceOf(address(this));
require(amount > 0, "Sweep: No token balance");
IERC20(token).transfer(msg.sender, amount);
if (address(this).balance > 0) {
payable(msg.sender).transfer(address(this).balance);
}
emit TokenSweep(msg.sender, token, amount);
}
function kill() external onlyOwner {
selfdestruct(payable(msg.sender));
}
}
文件 5 的 10:ERC20.sol
pragma solidity >=0.6.0 <0.8.0;
import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
function name() public view returns (string memory) {
return _name;
}
function symbol() public view returns (string memory) {
return _symbol;
}
function decimals() public view returns (uint8) {
return _decimals;
}
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}
文件 6 的 10:IDeFiatGov.sol
pragma solidity ^0.6.0;
interface IDeFiatGov {
function mastermind() external view returns (address);
function viewActorLevelOf(address _address) external view returns (uint256);
function viewFeeDestination() external view returns (address);
function viewTxThreshold() external view returns (uint256);
function viewBurnRate() external view returns (uint256);
function viewFeeRate() external view returns (uint256);
}
文件 7 的 10:IDeFiatPoints.sol
pragma solidity ^0.6.0;
interface IDeFiatPoints {
function viewDiscountOf(address _address) external view returns (uint256);
function viewEligibilityOf(address _address) external view returns (uint256 tranche);
function discountPointsNeeded(uint256 _tranche) external view returns (uint256 pointsNeeded);
function viewTxThreshold() external view returns (uint256);
function viewWhitelisted(address _address) external view returns (bool);
function viewRedirection(address _address) external view returns (bool);
function setWhitelisted(address _address, bool _whitelist) external;
function setRedirection(address _address, bool _redirect) external;
function overrideLoyaltyPoints(address _address, uint256 _points) external;
}
文件 8 的 10:IERC20.sol
pragma solidity >=0.6.0 <0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, 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 sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 9 的 10:Ownable.sol
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
function owner() public view returns (address) {
return _owner;
}
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
文件 10 的 10:SafeMath.sol
pragma solidity >=0.6.0 <0.8.0;
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
return c;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
{
"compilationTarget": {
"contracts/DeFiatPoints.sol": "DeFiatPoints"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"AllTranchesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"discount","type":"uint256"}],"name":"DiscountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"governance","type":"address"}],"name":"GovernanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"subject","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PointsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"subject","type":"address"},{"indexed":false,"internalType":"bool","name":"redirect","type":"bool"}],"name":"RedirectionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenSweep","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tranche","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pointsNeeded","type":"uint256"}],"name":"TrancheUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"subject","type":"address"},{"indexed":false,"internalType":"bool","name":"whitelist","type":"bool"}],"name":"WhitelistedUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_txSize","type":"uint256"},{"internalType":"uint256","name":"_points","type":"uint256"}],"name":"addPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tranche","type":"uint256"}],"name":"discountPointsNeeded","outputs":[{"internalType":"uint256","name":"pointsNeeded","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"discountTranches","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"discount","type":"uint256"}],"name":"overrideDiscount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_points","type":"uint256"}],"name":"overrideLoyaltyPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pointsNeeded1","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded2","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded3","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded4","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded5","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded6","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded7","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded8","type":"uint256"},{"internalType":"uint256","name":"_pointsNeeded9","type":"uint256"}],"name":"setAll10DiscountTranches","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tranche","type":"uint256"},{"internalType":"uint256","name":"pointsNeeded","type":"uint256"}],"name":"setDiscountTranches","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_redirect","type":"bool"}],"name":"setRedirection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bool","name":"_whitelist","type":"bool"}],"name":"setWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateMyDiscount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"viewDiscountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"viewEligibilityOf","outputs":[{"internalType":"uint256","name":"tranche","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"viewRedirection","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"viewTxThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"viewWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]