25 lines
1.0 KiB
TypeScript
25 lines
1.0 KiB
TypeScript
|
|
export interface CommunityResourcable {
|
|
isCommunityResource(): boolean;
|
|
}
|
|
|
|
// Show the throttle message only once
|
|
const shown: Set<string> = new Set();
|
|
export function showThrottleMessage(service: string) {
|
|
if (shown.has(service)) { return; }
|
|
shown.add(service);
|
|
|
|
console.log("========= NOTICE =========")
|
|
console.log(`Request-Rate Exceeded for ${ service } (this message will not be repeated)`);
|
|
console.log("");
|
|
console.log("The default API keys for each service are provided as a highly-throttled,");
|
|
console.log("community resource for low-traffic projects and early prototyping.");
|
|
console.log("");
|
|
console.log("While your application will continue to function, we highly recommended");
|
|
console.log("signing up for your own API keys to improve performance, increase your");
|
|
console.log("request rate/limit and enable other perks, such as metrics and advanced APIs.");
|
|
console.log("");
|
|
console.log("For more details: https:/\/docs.ethers.io/api-keys/");
|
|
console.log("==========================");
|
|
}
|