Skip to content

Commit

Permalink
feat: support enhanced apis in alchemy provider (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
avasisht23 authored and moldy530 committed Nov 16, 2023
1 parent af3b387 commit 9caf47e
Show file tree
Hide file tree
Showing 2 changed files with 161 additions and 1 deletion.
160 changes: 160 additions & 0 deletions packages/alchemy/src/__tests__/__snapshots__/provider.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,163 @@ Alchemy {
},
}
`;

exports[`Alchemy Provider Tests > should have called propety 1`] = `
Alchemy {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
"core": CoreNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"debug": DebugNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"nft": NftNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"notify": NotifyNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"transact": TransactNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"ws": WebSocketNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
}
`;

exports[`Alchemy Provider Tests > should have enhanced api properties extended from the Alchemy SDK 1`] = `
Alchemy {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
"core": CoreNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"debug": DebugNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"nft": NftNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"notify": NotifyNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"transact": TransactNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
"ws": WebSocketNamespace {
"config": AlchemyConfig {
"apiKey": "test",
"authToken": undefined,
"batchRequests": false,
"maxRetries": 5,
"network": "eth-sepolia",
"requestTimeout": 0,
"url": undefined,
},
},
}
`;
2 changes: 1 addition & 1 deletion packages/alchemy/src/__tests__/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { Alchemy, Network } from "alchemy-sdk";
import { toHex, type Address, type Chain, type HDAccount } from "viem";
import { mnemonicToAccount } from "viem/accounts";
import { polygonMumbai } from "viem/chains";
import { polygonMumbai, sepolia } from "viem/chains";
import { AlchemyProvider } from "../provider.js";

describe("Alchemy Provider Tests", () => {
Expand Down

0 comments on commit 9caf47e

Please sign in to comment.