-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BACK-1791: ensure prop IPFS gateway gets used instead of pinata
- Loading branch information
Showing
9 changed files
with
284 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from .arweave import ARWeaveAdapter | ||
from .base_adapter import AdapterConfig, BaseAdapter | ||
from .base_adapter import Adapter, AdapterConfig, BaseAdapter | ||
from .data_uri import DataURIAdapter | ||
from .default_adapter_configs import DEFAULT_ADAPTER_CONFIGS | ||
from .http_adapter import HTTPAdapter | ||
from .ipfs import IPFSAdapter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from offchain.metadata.adapters.arweave import ARWeaveAdapter | ||
from offchain.metadata.adapters.base_adapter import AdapterConfig | ||
from offchain.metadata.adapters.data_uri import DataURIAdapter | ||
from offchain.metadata.adapters.http_adapter import HTTPAdapter | ||
from offchain.metadata.adapters.ipfs import IPFSAdapter | ||
|
||
DEFAULT_ADAPTER_CONFIGS: list[AdapterConfig] = [ | ||
AdapterConfig( | ||
adapter_cls=ARWeaveAdapter, | ||
mount_prefixes=["ar://"], | ||
host_prefixes=["https://arweave.net/"], | ||
kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0}, | ||
), | ||
AdapterConfig(adapter_cls=DataURIAdapter, mount_prefixes=["data:"]), | ||
AdapterConfig( | ||
adapter_cls=IPFSAdapter, | ||
mount_prefixes=[ | ||
"ipfs://", | ||
"https://gateway.pinata.cloud/", | ||
"https://ipfs.io/", | ||
], | ||
host_prefixes=["https://gateway.pinata.cloud/ipfs/"], | ||
kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0}, | ||
), | ||
AdapterConfig( | ||
adapter_cls=HTTPAdapter, | ||
mount_prefixes=["https://", "http://"], | ||
kwargs={"pool_connections": 100, "pool_maxsize": 1000, "max_retries": 0}, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters