contract IxIface is hasVersion,
                    ixPaymentEvents,
                    ixBackendEvents,
                    ixEvents,
                    SVBallotConsts,
                    owned,
                    CanReclaimToken,
                    upgradePtr,
                    payoutAllC {

    /* owner functions */
    function addBBFarm(BBFarmIface bbFarm) external returns (uint8 bbFarmId);
    function setABackend(bytes32 toSet, address newSC) external;
    function deprecateBBFarm(uint8 bbFarmId, BBFarmIface _bbFarm) external;

    /* global getters */
    function getPayments() external view returns (IxPaymentsIface);
    function getBackend() external view returns (IxBackendIface);
    function getBBFarm(uint8 bbFarmId) external view returns (BBFarmIface);
    function getBBFarmID(bytes4 bbNamespace) external view returns (uint8 bbFarmId);
    function getCommAuction() external view returns (CommAuctionIface);

    /* init a democ */
    function dInit(address defualtErc20, bool disableErc20OwnerClaim) external payable returns (bytes32);

    /* democ owner / editor functions */
    function setDEditor(bytes32 democHash, address editor, bool canEdit) external;
    function setDNoEditors(bytes32 democHash) external;
    function setDOwner(bytes32 democHash, address newOwner) external;
    function dOwnerErc20Claim(bytes32 democHash) external;
    function setDErc20(bytes32 democHash, address newErc20) external;
    function dAddCategory(bytes32 democHash, bytes32 categoryName, bool hasParent, uint parent) external;
    function dDeprecateCategory(bytes32 democHash, uint categoryId) external;
    function dUpgradeToPremium(bytes32 democHash) external;
    function dDowngradeToBasic(bytes32 democHash) external;
    function dSetArbitraryData(bytes32 democHash, bytes key, bytes value) external;
    function dSetCommunityBallotsEnabled(bytes32 democHash, bool enabled) external;
    function dDisableErc20OwnerClaim(bytes32 democHash) external;

    /* democ getters (that used to be here) should be called on either backend or payments directly */
    /* use IxLib for convenience functions from other SCs */

    /* ballot deployment */
    // only ix owner - used for adding past or special ballots
    function dAddBallot(bytes32 democHash, uint ballotId, uint256 packed) external;
    function dDeployCommunityBallot(bytes32 democHash, bytes32 specHash, bytes32 extraData, uint128 packedTimes) external payable;
    function dDeployBallot(bytes32 democHash, bytes32 specHash, bytes32 extraData, uint256 packed) external payable;
}
function dAddBallot(bytes32 democHash, uint ballotId, uint256 packed) external;

// only ix owner - used for adding past or special ballots