/** * @module * * Utilities used by the Mangrove smart contract repos. */ import { VersionNetworkDeployment } from "./types"; /** * Transform {@link CoreContractsNetworkDeployment} and {@link StratContractsNetworkDeployment} (possibly both) * to a structure that can be easily serialized the JSON format used by the Mangrove smart contract repos when * reading addresses: * * ``` * { * "mainnet": [ * { "name": "Mangrove", "address": "0x..." }, * { "name": "MgvOracle", "address": "0x..." }, * ... * ], * "maticmum": ... * } * ``` * * @param deploymentsPerNetworkList List of deployments to transform, i.e. {@link CoreContractsNetworkDeployment} or {@link StratContractsNetworkDeployment} (possibly both). * @returns Named addresses grouped by named network. */ export declare function toNamedAddressesPerNamedNetwork>>(...deploymentsPerNetworkList: T[]): Record; /** Create an appropriate SemVer pattern for use when querying for deployments that are compatible * with a given contract package version. * * For release versions of contract packages, any deployment of the same major.minor version, * _excluding_ prereleases, is considered compatible. * * For pre-release versions of contract packages, any deployment of the same major.minor version, * _including_ prereleases, is considered compatible. * This is achieved by replacing the last prerelease component by 0 and using the caret '^' pattern. * This pattern is equivalent to '>= x.y.z-0 < x+1.0.0'. * * Examples: * - 2.0.0-alpha.1 => ^2.0.0-alpha.0 * - 2.0.0-4 => ^2.0.0-0 * * @param contractPackageVersion The version of the contract package to create a pattern for. * @returns A SemVer pattern that matches all versions of the contract package that are compatible * with the given version. */ export declare function createContractVersionPattern(contractPackageVersion: string): string;