账户
0x77...4d57
0x77...4D57

0x77...4D57

$500
此合同的源代码已经过验证!
合同元数据
编译器
0.8.28+commit.7893614a
语言
Solidity
合同源代码
文件 1 的 5:Context.sol
// SPDX-License-Identifier: MIT
// 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;
    }
}
合同源代码
文件 2 的 5:IERC20.sol
// SPDX-License-Identifier: MIT
// 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);
}
合同源代码
文件 3 的 5:Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @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);
    }
}
合同源代码
文件 4 的 5:PWTPresale_250125.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.28;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";

/// @title PWT Manager
/// @author NSLab Co., Ltd.
/// @notice This contract manages the presale process for PWT tokens.

contract PWTManager is Ownable, ReentrancyGuard {
    address public usdt;
    address public beneficiary;
    address public addressZero = address(0);
    uint256 public totalPwtBought;
    uint256 public totalPwtStaked;
    uint256 public totalPwtRaised;
    uint256 public totalPwtRaisedInUsdWei;
    uint256 public totalLastPwtRaised;
    uint8 private _isPreviousDataInit;
    uint8 private _isPwtInit;
    uint8 private _pwtDecimals;

    modifier initPwt() {
        require(_isPwtInit == 0, "PWT already initialized");
        _isPwtInit = 1;
        _;
    }

    // Supported tokens configuration
    mapping(address => bool) public SupportedTokens;
    mapping(address => uint8) public TokenDecimals;

    // Conversion rates for each token (how many tokens needed for 1 PWT)
    mapping(address token => uint256 rate) public TokenRates;

    // Track balance of users who bought PWT
    mapping(address user => uint256 balance) public PwtBoughtTotal;

    // Track balance of users who staked PWT
    mapping(address user => uint256 balance) public PwtStakedTotal;

    // Events
    event BeneficiaryUpdated(
        address indexed oldBeneficiary,
        address indexed newBeneficiary
    );
    event PwtSet(address indexed PwtContract, uint256 indexed timestamp);

    event TokenAdded(
        address indexed token,
        uint8 indexed decimals,
        uint256 indexed rate
    );
    event TokenRemoved(address indexed token);
    event TokenPurchased(
        address indexed buyer,
        address indexed token,
        uint256 indexed amount,
        uint256 pwtAmount
    );
    event PwtRaisedThisPeriod(
        uint256 indexed amountRaised,
        uint256 indexed amountRaisedInUsd,
        uint256 indexed timestamp
    );

    constructor(address _beneficiary) Ownable(msg.sender) {
        beneficiary = _beneficiary;
        usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
        _pwtDecimals = 18;

        address[7] memory users = [
            0x5C903458b9Ca6587408B998DFDe0Bc9a80141e81,
            0x803bbf352C51aC2F4b03881525B8f960875E1770,
            0xeBb057a4483dAa4C721b286a836a00bD6C2c0df2,
            0x7ee6bE6912e8EeD5B7327e6A21c23aCdb7Eb2EB1,
            0x1722cA74a4D6A84D11c2e7b7E7f3dB7059aAAeeF,
            0xE7B56fb86eEcF6F952BE86085aC3c85D4f3640DB,
            0x7b80E47091F6FDB23F83b63A4A2473AFBF715FA7
        ];

        uint256[7] memory balances = [
            uint256(62238736646539712029725),
            uint256(371574547143520668834),
            uint256(12411054112195929174251),
            uint256(11583650504716200562634),
            uint256(1034254509349660764520),
            uint256(1406586132715538639748),
            uint256(1009432401125268906172)
        ];

        for (uint i = 0; i < users.length; i++) {
            PwtBoughtTotal[users[i]] = balances[i];
            totalPwtBought += balances[i];
            totalPwtRaised += balances[i];
        }
    }

    // Set PWT token address. MUST BE FIRST FUNCTION TO CALL AND ONLY ONCE
    function setPwt(address _pwt) external onlyOwner initPwt {
        require(_pwt != addressZero, "Invalid address");
        // pwtPresale = PWTPresale(_pwt);
        emit PwtSet(_pwt, block.timestamp);
    }

    // Owner function to:
    // 1. Add supported token
    // 2. Update the rates for the token
    // Ex:
    // - rates of token X = 1, meaning 1 PWT = 1 token X. getPwtAmount(token X, 1) equals 1
    // - rates of token X = 2e18, meaning 1 PWT = 2 token X. getPwtAmount(token X, 1) equals 0.5
    // 3. emit the total PWT raised in USD for the last period to event

    function updateSupportedToken(
        address[] memory tokens,
        uint8[] memory decimals,
        uint256[] memory rates
    ) public onlyOwner {
        require(
            tokens.length == decimals.length && decimals.length == rates.length,
            "Array length mismatch"
        );
        uint256 length = tokens.length;

        // Save the difference amount of PWT raised from the last update
        uint256 deltaPwt = totalPwtRaised - totalLastPwtRaised;
        uint256 deltaPwtInUsd = (deltaPwt * TokenRates[usdt]) /
            (10 ** _pwtDecimals);

        // Save the current PWT raised for the next update
        totalLastPwtRaised = totalPwtRaised;
        totalPwtRaisedInUsdWei += deltaPwtInUsd;

        for (uint256 i = 0; i < length; i++) {
            address token = tokens[i];
            uint8 decimal = decimals[i];
            uint256 rate = rates[i];
            require(rate > 0, "Rate must be greater than 0");

            SupportedTokens[token] = true;
            TokenDecimals[token] = decimal;
            TokenRates[token] = rate;

            emit TokenAdded(token, decimal, rate);
        }

        emit PwtRaisedThisPeriod(deltaPwt, deltaPwtInUsd, block.timestamp);
    }

    // Owner function to remove supported token
    function removeSupportedToken(
        address[] calldata tokens
    ) external onlyOwner {
        uint256 length = tokens.length;

        for (uint256 i = 0; i < length; i++) {
            address token = tokens[i];
            require(SupportedTokens[token], "Token not supported"); //should output which token is not supported

            SupportedTokens[token] = false;
            delete TokenDecimals[token];
            delete TokenRates[token];

            emit TokenRemoved(token);
        }
    }

    // Function to buy PWT with ETH
    function buyPwtWithEth() public payable nonReentrant {
        require(TokenRates[addressZero] > 0, "Rate not set");
        require(msg.value > 0, "Amount must be greater than 0");

        uint256 pwtAmount = getPwtAmount(addressZero, msg.value);
        require(pwtAmount > 0, "PWT amount too small");

        // Transfer ETH from buyer to beneficiary
        (bool sent, ) = beneficiary.call{value: msg.value}("");
        require(sent, "Failed to send Ether");

        // Record the purchase
        totalPwtRaised += pwtAmount;
        totalPwtBought += pwtAmount;
        PwtBoughtTotal[msg.sender] += pwtAmount;

        emit TokenPurchased(msg.sender, addressZero, msg.value, pwtAmount);
    }

    // Function to buy PWT tokens using ERC20 tokens
    function buyPwtWithErc20(
        address token,
        uint256 amount
    ) public nonReentrant {
        require(SupportedTokens[token], "Token not supported");
        require(TokenRates[token] > 0, "Rate not set");
        require(amount > 0, "Amount must be greater than 0");
        require(token != addressZero, "Use buyPwtWithEth for ETH");

        // Calculate PWT amount to be received with proper decimal handling
        uint256 pwtAmount = getPwtAmount(token, amount);
        require(pwtAmount > 0, "PWT amount too small");

        // Transfer tokens from buyer to beneficiary
        IERC20(token).transferFrom(msg.sender, beneficiary, amount);

        // Record the purchase
        totalPwtRaised += pwtAmount;
        totalPwtBought += pwtAmount;
        PwtBoughtTotal[msg.sender] += pwtAmount;

        emit TokenPurchased(msg.sender, token, amount, pwtAmount);
    }

    // Function to stake PWT with ETH
    function stakePwtWithEth() external payable nonReentrant {
        require(TokenRates[addressZero] > 0, "Rate not set");
        require(msg.value > 0, "Amount must be greater than 0");

        // For ETH (18 decimals), multiply by 1e18 before division to maintain precision
        uint256 pwtAmount = getPwtAmount(addressZero, msg.value);
        require(pwtAmount > 0, "PWT amount too small");

        // Transfer ETH from buyer to beneficiary
        (bool sent, ) = beneficiary.call{value: msg.value}("");
        require(sent, "Failed to send Ether");

        // Record the stake
        totalPwtRaised += pwtAmount;
        totalPwtStaked += pwtAmount;
        PwtStakedTotal[msg.sender] += pwtAmount;

        emit TokenPurchased(msg.sender, addressZero, msg.value, pwtAmount);
    }

    // Function to stake PWT using ERC20 tokens
    function stakePwtWithErc20(
        address token,
        uint256 amount
    ) external nonReentrant {
        require(SupportedTokens[token], "Token not supported");
        require(TokenRates[token] > 0, "Rate not set");
        require(amount > 0, "Amount must be greater than 0");
        require(token != addressZero, "Use stakePwtWithEth for ETH");

        // Calculate PWT amount to be received with proper decimal handling
        uint256 pwtAmount = getPwtAmount(token, amount);
        require(pwtAmount > 0, "PWT amount too small");

        // Transfer tokens from buyer to beneficiary
        IERC20(token).transferFrom(msg.sender, beneficiary, amount);

        // Record the stake
        totalPwtRaised += pwtAmount;
        totalPwtStaked += pwtAmount;
        PwtStakedTotal[msg.sender] += pwtAmount;

        emit TokenPurchased(msg.sender, token, amount, pwtAmount);
    }

    // Change beneficiary
    function changeBeneficiary(address newBeneficiary) external onlyOwner {
        address oldBeneficiary = beneficiary;
        beneficiary = newBeneficiary;

        emit BeneficiaryUpdated(oldBeneficiary, newBeneficiary);
    }

    // GETTER FUNCTIONS //
    // View function to get PWT amount for given token amount
    function getPwtAmount(
        address token,
        uint256 amount
    ) public view returns (uint256) {
        require(SupportedTokens[token], "Token not supported");
        require(TokenRates[token] > 0, "Rate not set");

        return (amount * (10 ** _pwtDecimals)) / TokenRates[token];
    }

    // View function to get total purchased amount for a buyer and token
    function getTotalPurchasedPwt(
        address user
    )
        public
        view
        returns (uint256 totalValue, uint256 totalBought, uint256 totalStaked)
    {
        totalBought = PwtBoughtTotal[user];
        totalStaked = PwtStakedTotal[user];
        totalValue = totalBought + totalStaked;
        return (totalValue, totalBought, totalStaked);
    }

    // View function to get how much PWT has been raised
    function getRaisedPwt()
        public
        view
        returns (
            uint256 totalRaised,
            uint256 totalInUsd,
            uint256 totalBought,
            uint256 totalStaked
        )
    {
        totalRaised = totalPwtRaised;
        totalInUsd = totalPwtRaisedInUsdWei;
        totalBought = totalPwtBought;
        totalStaked = totalPwtStaked;
    }

    // Emergency function to withdraw stuck tokens (only owner)
    function withdrawToken(address token, uint256 amount) external onlyOwner {
        require(token != addressZero, "Use withdrawEth()");
        IERC20(token).transfer(beneficiary, amount);
    }

    function withdrawEth() external onlyOwner {
        // Transfer ETH from buyer to beneficiary
        (bool sent, ) = beneficiary.call{value: (address(this).balance)}("");
        require(sent, "Failed to send Ether");
    }

    // Function to receive ETH
    receive() external payable {
        revert("Use buy/stake with ETH");
    }

    fallback() external payable {
        revert("Function/method ID is not found");
    }
}
合同源代码
文件 5 的 5:ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}
设置
{
  "compilationTarget": {
    "contracts/PWTPresale_250125.sol": "PWTManager"
  },
  "evmVersion": "cancun",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": []
}
ABI
[{"inputs":[{"internalType":"address","name":"_beneficiary","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"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldBeneficiary","type":"address"},{"indexed":true,"internalType":"address","name":"newBeneficiary","type":"address"}],"name":"BeneficiaryUpdated","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":"uint256","name":"amountRaised","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amountRaisedInUsd","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PwtRaisedThisPeriod","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"PwtContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"PwtSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint8","name":"decimals","type":"uint8"},{"indexed":true,"internalType":"uint256","name":"rate","type":"uint256"}],"name":"TokenAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pwtAmount","type":"uint256"}],"name":"TokenPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"TokenRemoved","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"PwtBoughtTotal","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"PwtStakedTotal","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"SupportedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TokenDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"TokenRates","outputs":[{"internalType":"uint256","name":"rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addressZero","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiary","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"buyPwtWithErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyPwtWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newBeneficiary","type":"address"}],"name":"changeBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getPwtAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRaisedPwt","outputs":[{"internalType":"uint256","name":"totalRaised","type":"uint256"},{"internalType":"uint256","name":"totalInUsd","type":"uint256"},{"internalType":"uint256","name":"totalBought","type":"uint256"},{"internalType":"uint256","name":"totalStaked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTotalPurchasedPwt","outputs":[{"internalType":"uint256","name":"totalValue","type":"uint256"},{"internalType":"uint256","name":"totalBought","type":"uint256"},{"internalType":"uint256","name":"totalStaked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"name":"removeSupportedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pwt","type":"address"}],"name":"setPwt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakePwtWithErc20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakePwtWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"totalLastPwtRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPwtBought","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPwtRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPwtRaisedInUsdWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPwtStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint8[]","name":"decimals","type":"uint8[]"},{"internalType":"uint256[]","name":"rates","type":"uint256[]"}],"name":"updateSupportedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]