// File: @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol
pragma solidity >=0.6.2;
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
// File: @uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol
pragma solidity >=0.6.2;
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
// File: @uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol
pragma solidity >=0.5.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: contracts/agentv1.sol
pragma solidity 0.8.28;
contract AgentV1 is IERC20, Ownable {
string private _name;
string private _symbol;
uint256 private _supply;
uint8 private _decimals = 18;
// Fee-related variables
uint8 private _fee = 15; // Transaction fee
uint8 private _agentShare = 33; // Share of fees allocated to the agent
uint8 private _burnShare = 33; // Share of fees allocated to burning
uint8 private _liquidityShare = 33; // Share of fees allocated to liquidity
uint256 private _threshold = 100000 * 1e18; // Token threshold for swapping
// Address-related variables
address private _agent; // Address of the agent wallet
address private _pair; // Uniswap pair address
address private _collateral; // Collateral token address
address private _router; // Uniswap router address
address private _usdc = 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913; // USDC token address
address private _burn = 0x000000000000000000000000000000000000dEaD; // Dead address for burning
// Flags and mappings
bool private _blocked; // Used to prevent reentrancy during swaps
mapping(address => uint256) private _balances; // Balances of addresses
mapping(address => mapping(address => uint256)) private _allowances; // Allowances for transfers
mapping(address => bool) private _whitelistedSenders; // Whitelisted senders exempt from fees
mapping(address => bool) private _whitelistedRecipients; // Whitelisted recipients exempt from fees
/**
* @dev Modifier to prevent reentrancy during critical operations.
*/
modifier blocking() {
_blocked = true;
_;
_blocked = false;
}
/**
* @dev Contract constructor that initializes the token and its settings.
* @param name_ Token name
* @param symbol_ Token symbol
* @param supply_ Initial token supply
* @param collateral_ Address of the collateral token
* @param router_ Address of the Uniswap router
*/
constructor(
string memory name_,
string memory symbol_,
uint256 supply_,
address collateral_,
address router_
) Ownable(msg.sender) {
_name = name_;
_symbol = symbol_;
_supply = supply_;
_collateral = collateral_;
_router = router_;
// Initialize Uniswap pair
address factory = IUniswapV2Router02(_router).factory();
_pair = IUniswapV2Factory(factory).createPair(address(this), _collateral);
// Whitelist addresses
_whitelistedSenders[address(this)] = true;
_whitelistedRecipients[address(this)] = true;
_whitelistedSenders[msg.sender] = true;
_whitelistedRecipients[msg.sender] = true;
// Mint the initial supply to the deployer
_balances[msg.sender] = _supply;
emit Transfer(address(0), msg.sender, _supply);
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used for the token.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev Returns the total supply of the token.
*/
function totalSupply() public view override returns (uint256) {
return _supply;
}
/**
* @dev Returns the balance of a specific account.
*/
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
/**
* @dev Returns the allowance set for a spender by an owner.
*/
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev Approves a spender to transfer tokens on behalf of the caller.
*/
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
/**
* @dev Transfers tokens to a recipient.
*/
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
/**
* @dev Transfers tokens from a sender to a recipient using an allowance.
*/
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
_spendAllowance(sender, msg.sender, amount);
_transfer(sender, recipient, amount);
return true;
}
/**
* @dev Internal function to approve a spender.
*/
function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "Approve from zero address");
require(spender != address(0), "Approve to zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Internal function to spend an allowance.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal {
uint256 currentAllowance = _allowances[owner][spender];
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "Insufficient allowance");
_approve(owner, spender, currentAllowance - amount);
}
}
/**
* @dev Internal function to handle token transfers, including fees and swaps.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "Transfer from zero address");
require(recipient != address(0), "Transfer to zero address");
require(_balances[sender] >= amount, "Transfer amount exceeds balance");
_balances[sender] -= amount;
// Skip fee logic if sender/recipient is whitelisted or no fee is set
if (_blocked || _whitelistedSenders[sender] || _whitelistedRecipients[recipient] || _fee == 0) {
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
} else {
// Perform token swaps if threshold is reached
if (_balances[address(this)] > _threshold && msg.sender != _pair) {
_swap();
}
uint256 fee = (amount * _fee) / 1000; // Calculate fee
uint256 amountAfterFee = amount - fee;
// Distribute fee and transfer the rest to the recipient
_balances[address(this)] += fee;
_balances[recipient] += amountAfterFee;
emit Transfer(sender, address(this), fee);
emit Transfer(sender, recipient, amountAfterFee);
}
}
/**
* @dev Handles the agent's share of fees by swapping tokens for ETH and sending it to the agent.
* This function calculates the agent's portion of the fee, swaps it into ETH using the Uniswap router,
* and transfers the resulting ETH to the agent's address.
*/
function _handleAgentPortion(uint256 tokenBalance) internal {
uint256 agentPortion = (tokenBalance * _agentShare) / 100;
if (agentPortion == 0) return;
address[] memory agentPath = new address[](4);
agentPath[0] = address(this); // Start with the contract's token
agentPath[1] = _collateral; // Intermediate swap to collateral token
agentPath[2] = _usdc; // Intermediate swap to USDC
agentPath[3] = IUniswapV2Router02(_router).WETH(); // Final swap to WETH (ETH)
IUniswapV2Router02(_router).swapExactTokensForETHSupportingFeeOnTransferTokens(
agentPortion,
0, // Accept any amount of ETH
agentPath,
_agent, // Send ETH to the agent's wallet
block.timestamp
);
}
/**
* @dev Handles the burn share of fees by transferring tokens to the burn address.
* This function calculates the burn portion of the fee, swaps it to the collateral token,
* and transfers the resulting tokens to the burn address.
*/
function _handleBurnPortion(uint256 tokenBalance) internal {
uint256 burnPortion = (tokenBalance * _burnShare) / 100;
if (burnPortion == 0) return;
// Define the swap path for burning
address[] memory burnPath = new address[](2);
burnPath[0] = address(this); // Start with the contract's token
burnPath[1] = _collateral; // Final swap to the collateral token
IUniswapV2Router02(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens(
burnPortion,
0, // Accept any amount of collateral
burnPath,
_burn, // Transfer tokens to the burn address
block.timestamp
);
}
/**
* @dev Handles the liquidity share of fees by adding liquidity to the Uniswap pair.
* This function swaps half of the liquidity portion into the collateral token and uses both tokens
* to add liquidity to the Uniswap pair. Any resulting LP tokens are burned.
*/
function _handleLiquidityPortion(uint256 tokenBalance) internal {
uint256 liquidityPortion = (tokenBalance * _liquidityShare) / 100;
uint256 halfLiquidityPortion = liquidityPortion / 2;
if (halfLiquidityPortion == 0) return;
// Record collateral balance before the swap
uint256 collateralBefore = IERC20(_collateral).balanceOf(_agent);
// Swap half of the liquidity portion into collateral
address[] memory liquidityPath = new address[](2);
liquidityPath[0] = address(this); // Start with the contract's token
liquidityPath[1] = _collateral; // Swap to collateral
IUniswapV2Router02(_router).swapExactTokensForTokensSupportingFeeOnTransferTokens(
halfLiquidityPortion,
0, // Accept any amount of collateral
liquidityPath,
_agent, // Send collateral temporarily to the agent
block.timestamp
);
// Calculate the received collateral amount
uint256 collateralAfter = IERC20(_collateral).balanceOf(_agent);
uint256 collateralAmount = collateralAfter - collateralBefore;
if (collateralAmount == 0) return;
// Ensure allowance for transferring collateral back to the contract
uint256 collateralAllowance = IERC20(_collateral).allowance(_agent, address(this));
if (collateralAllowance < collateralAmount) return;
// Transfer collateral from the agent back to the contract
IERC20(_collateral).transferFrom(_agent, address(this), collateralAmount);
uint256 collateralBalance = IERC20(_collateral).balanceOf(address(this));
require(collateralBalance >= collateralAmount, "Insufficient collateral balance");
// Approve collateral for adding liquidity
IERC20(_collateral).approve(_router, collateralAmount);
// Add liquidity to the Uniswap pair
(,, uint256 liquidityTokens) = IUniswapV2Router02(_router).addLiquidity(
address(this), // Contract's token
_collateral, // Collateral as the pair token
halfLiquidityPortion, // Half of the liquidity portion in the contract's token
collateralAmount, // The corresponding collateral amount
0, // Minimum amount of the contract's token (slippage tolerance)
0, // Minimum amount of collateral (slippage tolerance)
address(this), // Send LP tokens to the contract
block.timestamp
);
// Burn the LP tokens if any were created
if (liquidityTokens == 0) return;
IERC20(_pair).transfer(address(0), liquidityTokens); // Send LP tokens to the burn address
}
/**
* @dev Initiates the token swap process, distributing fees to the agent, burn address, and liquidity pool.
*/
function _swap() internal blocking {
uint256 tokenBalance = _balances[address(this)];
require(tokenBalance > 0, "No tokens to swap");
// Approve the Uniswap router to spend the contract's tokens
_approve(address(this), _router, tokenBalance);
// Distribute the token balance across the defined fee shares
_handleAgentPortion(tokenBalance);
_handleBurnPortion(tokenBalance);
_handleLiquidityPortion(tokenBalance);
}
/**
* @dev Updates the transaction fee percentage. Can only be set by the owner.
*/
function setFee(uint8 fee) external onlyOwner {
require(fee <= 30, "Fee is too high");
_fee = fee;
}
/**
* @dev Updates the percentage allocation for agent, burn, or liquidity shares. Can only be set by the owner.
* Ensures the total allocation does not exceed 100%.
*/
function setShare(uint8 percent, uint8 index) external onlyOwner {
require(percent <= 100, "Percentage is too high");
if (index == 0) {
_agentShare = percent;
} else if (index == 1) {
_burnShare = percent;
} else if (index == 2) {
_liquidityShare = percent;
}
require(_agentShare + _burnShare + _liquidityShare <= 100, "Percentages cannot exceed 100");
}
/**
* @dev Updates the token swap threshold. Can only be set by the owner.
*/
function setThreshold(uint256 amount) external onlyOwner {
_threshold = amount;
}
/**
* @dev Updates the agent address. Can only be set by the owner.
*/
function setAgent(address account) external onlyOwner {
require(account != address(0), "Agent address cannot be zero");
_agent = account;
// Whitelist
_whitelistedSenders[_agent] = true;
_whitelistedRecipients[_agent] = true;
}
/**
* @dev Whitelists or removes an address from the list of whitelisted senders. Can only be set by the owner.
*/
function whitelistSender(address account, bool status) external onlyOwner {
_whitelistedSenders[account] = status;
}
/**
* @dev Whitelists or removes an address from the list of whitelisted recipients. Can only be set by the owner.
*/
function whitelistRecipient(address account, bool status) external onlyOwner {
_whitelistedRecipients[account] = status;
}
/**
* @dev Allows the contract to receive ETH. Required for Uniswap operations.
*/
receive() external payable {}
}
{
"compilationTarget": {
"AgentV1.sol": "AgentV1"
},
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"supply_","type":"uint256"},{"internalType":"address","name":"collateral_","type":"address"},{"internalType":"address","name":"router_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"},{"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":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"address","name":"account","type":"address"}],"name":"setAgent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"fee","type":"uint8"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"percent","type":"uint8"},{"internalType":"uint8","name":"index","type":"uint8"}],"name":"setShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelistRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelistSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]