class BridgeSupport {

    public Integer voteFeePerKbChange(Transaction tx, Coin feePerKb) {
        AddressBasedAuthorizer authorizer = bridgeConstants.getFeePerKbChangeAuthorizer();
        if (!authorizer.isAuthorized(tx)) {
            return FEE_PER_KB_GENERIC_ERROR_CODE;
        }

        ABICallElection feePerKbElection = provider.getFeePerKbElection(authorizer);
        ABICallSpec feeVote = new ABICallSpec("setFeePerKb", new byte[][]{BridgeSerializationUtils.serializeCoin(feePerKb)});
        boolean successfulVote = feePerKbElection.vote(feeVote, tx.getSender());
        if (!successfulVote) {
            return -1;
        }

        ABICallSpec winner = feePerKbElection.getWinner();
        if (winner == null) {
            logger.info("Successful fee per kb vote for {}", feePerKb);
            return 1;
        }

        Coin winnerFee;
        try {
            winnerFee = BridgeSerializationUtils.deserializeCoin(winner.getArguments()[0]);
        } catch (Exception e) {
            logger.warn("Exception deserializing winner feePerKb", e);
            return FEE_PER_KB_GENERIC_ERROR_CODE;
        }

        if (winnerFee == null) {
            logger.warn("Invalid winner feePerKb: feePerKb can't be null");
            return FEE_PER_KB_GENERIC_ERROR_CODE;
        }

        if (!winnerFee.equals(feePerKb)) {
            logger.debug("Winner fee is different than the last vote: maybe you forgot to clear winners");
        }

        logger.info("Fee per kb changed to {}", winnerFee);
        provider.setFeePerKb(winnerFee);
        feePerKbElection.clear();
        return 1;
    }

    public  BridgeSupport(
            UscSystemProperties config,
            Repository repository,
            BridgeEventLogger eventLogger,
            BridgeConstants bridgeConstants,
            BridgeStorageProvider provider,
            UldBlockstoreWithCache uldBlockStore,
            UldBlockChain uldBlockChain,
            Block executionBlock);
    public  BridgeSupport(
            UscSystemProperties config,
            Repository repository,
            BridgeEventLogger eventLogger,
            UscAddress contractAddress,
            Block uscExecutionBlock);
    public  BridgeSupport(
            UscSystemProperties config,
            Repository repository,
            BridgeEventLogger eventLogger,
            BridgeStorageProvider provider,
            Block uscExecutionBlock);
    private  BridgeSupport(
            Repository repository,
            BridgeStorageProvider provider,
            Block executionBlock,
            UscSystemProperties config,
            BridgeConstants bridgeConstants,
            BridgeEventLogger eventLogger,
            Context uldContext,
            UldBlockstoreWithCache uldBlockStore,
            UldBlockChain uldBlockChain);
    public  BridgeSupport(
            Repository repository,
            BridgeStorageProvider provider,
            Block executionBlock,
            UscSystemProperties config,
            BridgeConstants bridgeConstants,
            BridgeEventLogger eventLogger,
            Context uldContext,
            FederationSupport federationSupport,
            UldBlockstoreWithCache uldBlockStore,
            UldBlockChain uldBlockChain);

}