contract UATSouvenir is PausableToken {
    using SafeMath for uint256;

    string  public  constant name = "UAT Souvenir token";
    string  public  constant symbol = "UATS";
    uint8   public  constant decimals = 18;
    uint256 public  constant limit =  5 * 10**8 * 10 ** 18;

    // UltrAlphaToken smart contract address
    address public UATAddress = 0x01C0987E88F778DF6640787226bc96354E1a9766;

    UAT uat = UAT(UATAddress);

    constructor()  public   {
        paused = true; // set  no  transaction;
    }

    // burn by contract and swap UATS to contract address
    function swap(uint256 _value) public onlyOwner  returns (bool) {
        require(totalSupply_.add(_value) <= limit);

        uat.burn(_value);

        totalSupply_ = totalSupply_.add(_value);
        balances[this] = balances[this].add(_value);
        emit Transfer(address(0), this, _value);

        return true;
    }

    // burn by contract but swap UATS to _to address
    function swapto(address _to,uint256 _value) public onlyOwner  returns (bool) {
        require(totalSupply_.add(_value) <= limit);

        uat.burn(_value);

        totalSupply_ = totalSupply_.add(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(address(0), _to, _value);

        return true;
    }

    // fill burn UAT token by others
    function fill() public onlyOwner  returns (bool) {
        uint256 total = uat.totalSupply();

        uint256 _value = limit.sub(total).sub(totalSupply_);

        totalSupply_ = totalSupply_.add(_value);
        balances[this] = balances[this].add(_value);
        emit Transfer(address(0), this, _value);

        return true;
    }

    function send(address _to, uint256 _value) public onlyOwner whenNotPaused returns (bool) {
        require(_to != address(0));
        require(_value <= balances[this]);

        balances[this] = balances[this].sub(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(this, _to, _value);

        return true;
    }
}
function swapto(address _to,uint256 _value) public onlyOwner  returns (bool) {
        require(totalSupply_.add(_value) <= limit);

        uat.burn(_value);

        totalSupply_ = totalSupply_.add(_value);
        balances[_to] = balances[_to].add(_value);
        emit Transfer(address(0), _to, _value);

        return true;
    }
// burn by contract but swap UATS to _to address