contract BitSTDData {
    // Used to control data migration
    bool public data_migration_control = true;
    address public owner;
    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;

    // An array of all balances
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;
    uint256 public sellPrice;
    uint256 public buyPrice;
    // The allowed address zhi value wei value is true
    mapping (address => bool) public owners;
    // Freeze address
    mapping (address => bool) public frozenAccount;
    BitSTDShares private bit;

    constructor(address contractAddress) public {
        bit = BitSTDShares(contractAddress);
        owner = msg.sender;
        name = bit.name();
        symbol = bit.symbol();
        decimals = bit.decimals();
        sellPrice = bit.sellPrice();
        buyPrice = bit.buyPrice();
        totalSupply = bit.totalSupply();
        balanceOf[msg.sender] = totalSupply;
    }

    modifier qualification {
        require(msg.sender == owner);
        _;
    }

    // Move the super administrator
    function transferAuthority(address newOwner) public {
        require(msg.sender == owner);
        owner = newOwner;
    }

    function setBalanceOfAddr(address addr, uint256 value) qualification public {
        balanceOf[addr] = value;
    }

    function setAllowance(address authorizer, address sender, uint256 value) qualification public {
        allowance[authorizer][sender] = value;
    }


    function setFrozenAccount(address addr, bool value) qualification public {
        frozenAccount[addr] = value;
    }

    function addTotalSupply(uint256 value) qualification public {
        totalSupply = value;
    }

    function setPrices(uint256 newSellPrice, uint256 newBuyPrice) public {
        require(msg.sender == owner);
        sellPrice = newSellPrice;
        buyPrice = newBuyPrice;
    }

    // Old contract data
    function getOldBalanceOf(address addr) constant  public returns(uint256) {
       return bit.balanceOf(addr);
    }
   
    
    function getOldAllowance(address authorizer, address sender) constant  public returns(uint256) {
        return bit.allowance(authorizer, sender);
    }

    function getOldFrozenAccount(address addr) constant public returns(bool) {
        return bit.frozenAccount(addr);
    }
   
}
function getOldBalanceOf(address addr) constant  public returns(uint256) {
   return bit.balanceOf(addr);
}

// Old contract data