def METHOD_NAME(
    rpc_file: Path,
    keystore_file: Path,
    password: str,
    abi_dir: Path,
    artifacts_dir: Path,
    deploy_mintable_token: bool,
    commit_check: bool,
    **chains: dict,
) -> None:
    """Deploy L2 Beamer contracts on the specified chains and set up the trusted call chain."""
    beamer.util.setup_logging(log_level="DEBUG", log_json=False)
    if commit_check:
        _ensure_commit_is_on_remote()
    rpc_info = beamer.util.load_rpc_info(rpc_file)
    log.info("Loaded RPC file")
    account = beamer.util.account_from_keyfile(keystore_file, password)
    log.info("Loaded keystore file", address=account.address)
    path = artifacts_dir / "base.deployment.json"
    base_deployment = beamer.artifacts.Deployment.from_file(path)
    log.info(
        "Loaded base chain deployment", path=str(path), chain_id=base_deployment.base.chain_id
    )
    url = rpc_info[base_deployment.base.chain_id]
    base_w3 = make_web3(url, account)
    assert base_w3.eth.chain_id == base_deployment.base.chain_id
    log.info("Connected to base chain RPC", chain_id=base_deployment.base.chain_id, url=url)
    abi_manager = ABIManager(abi_dir)
    resolver = obtain_contract(base_w3, abi_manager, base_deployment, "Resolver")
    for path in chains["chain.json"]:
        chain = beamer.METHOD_NAME.config.Chain.from_file(path)
        log.info("Loaded chain config", name=chain.name, chain_id=chain.chain_id, path=str(path))
        url = rpc_info[chain.chain_id]
        w3 = make_web3(url, account, timeout=60)
        assert w3.eth.chain_id == chain.chain_id
        log.info("Connected to chain RPC", chain_id=chain.chain_id, url=url)
        l1_contracts, l2_contracts = deploy_beamer(w3, abi_manager, chain, resolver)
        if deploy_mintable_token:
            l2_contracts += (deploy_contract(w3, abi_manager, ("MintableToken", int(1e18))),)
        name = chain.name.lower().replace(" ", "-")
        path = artifacts_dir / f"{chain.chain_id}-{name}.deployment.json"
        generate_artifacts(path, account.address, l1_contracts, l2_contracts)
        log.info("Generated artifact", path=str(path))