def deploy_rpc_test_contract(deploy_client, name):
    contract_path, contracts = get_test_contract(f"{name}.sol")
    contract_proxy, _ = deploy_client.deploy_solidity_contract(
        name, contracts, libraries=dict(), constructor_parameters=None, contract_path=contract_path
    )

    return contract_proxy
def add_forum(category_id=None):
    form = AddForumForm()

    if form.validate_on_submit():
        form.save()
        flash(_("Forum added."), "success")
        return redirect(url_for("management.forums"))
    else:
        form.groups.data = Group.query.order_by(Group.id.asc()).all()
        if category_id:
            category = Category.query.filter_by(id=category_id).first()
            form.category.data = category

    return render_template("management/forum_form.html", form=form,
                           title=_("Add Forum"))