Skip to content

Commit

Permalink
Using StaticJsonProvider to cut down chain calls (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
liarco authored Oct 30, 2023
1 parent 9b45f13 commit 5c4dd2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A flexible library to update collection data programmatically.",
"keywords": [],
"license": "MIT",
"version": "1.2.1",
"version": "1.2.2",
"contributors": [
"Marco Lipparini <[email protected]> (https://www.liarco.net)"
],
Expand Down
6 changes: 3 additions & 3 deletions src/lib/Util/Contracts/ERC721Contract.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Contract } from "ethers";
import { JsonRpcProvider } from "@ethersproject/providers";
import { StaticJsonRpcProvider, Provider } from "@ethersproject/providers";

export default class ERC721Contract extends Contract {
constructor (address: string, providerOrRpcUrl: JsonRpcProvider|string) {
const provider = (typeof providerOrRpcUrl === "string") ? new JsonRpcProvider(providerOrRpcUrl) : providerOrRpcUrl;
constructor (address: string, providerOrRpcUrl: Provider|string) {
const provider: Provider = (typeof providerOrRpcUrl === "string") ? new StaticJsonRpcProvider(providerOrRpcUrl) : providerOrRpcUrl;

super(
address,
Expand Down

0 comments on commit 5c4dd2b

Please sign in to comment.