import { ContractType, ENVIRONMENT } from "../types/dimo.js";
import { CHAIN_ABI_MAPPING, ENV_MAPPING } from "../constants/mappings.js";
export async function safeTransferVehicleID(args, walletClient, publicClient, environment = "prod") {
    var _a;
    const contracts = CHAIN_ABI_MAPPING[(_a = ENV_MAPPING.get(environment)) !== null && _a !== void 0 ? _a : ENVIRONMENT.PROD].contracts;
    const { request } = await publicClient.simulateContract({
        address: contracts[ContractType.DIMO_VEHICLE_ID].address,
        abi: contracts[ContractType.DIMO_VEHICLE_ID].abi,
        functionName: "safeTransferFrom",
        args: [args.from, args.to, args.vehicleId],
        account: walletClient.account,
    });
    return await walletClient.writeContract(request);
}
//# sourceMappingURL=safeTransferVehicles.js.map