NFT marketplace listings
How can I get the marketplace listings (on Opensea, Looksrare....) for an NFT?
Posted by Aleix almost 2 years ago
Retrieve all contracts deployed by a wallet
I'm hoping there is an easy solution that I'm just missing but I want to be able to enter a wallet address and retrieve all contracts owned/controlled by that wallet. Is this possible?
Posted by Aaron Gopp almost 2 years ago
429 error + refused to set header Accept Encoding
I know what the 429 error is! But our dapp hasn't changed and we're suddenly getting these along with a header error (refused to set unsafe header) we're literally calling ONE sdk endpoint, getNfts with two contracts as variables. I cannot believe we're exceeding the concurrent limit requests so surely something else is happening?
Anyone come across this?
Posted by RedLasso almost 2 years ago
Observation: Network config related
while trying "alchemy-sdk" as a novice I had typed-
```shell
const config = {
apiKey: process.env.ALCHEMY_KEY,
network: Network.GOERLI,
};
```
instead or
```shell
const config = {
apiKey: process.env.ALCHEMY_KEY,
network: Network.ETH_GOERLI,
};
```
what i observed was that I was able to retrieve my main Net information.
shouldn't I be getting an error?
Posted by defiman1729 almost 2 years ago
How to format my balance from a hex number
Using alchemy.core.getBalance(address) I receive the balance in hex value. How do I convert this to something more human readable? I can't seem to find anything about it in the docs.
Posted by [email protected] almost 2 years ago
getOwnersForCollection returns invalid data
found a strange behaviour comparing some stats for several collections
for example azuki colleciton has 10000 items, but the api returns when you count 10001
for Genuine Undead its even more weird they have exactly 10000 nfts but api returns 10018 and much more unique holders than there should be.
im sure that everything on my side is correct, tested and checked several times. Simply just add together all array lengths
Posted by Viljams almost 2 years ago
Alchemy SDK ethers.Contract() not available
Hey Hi,
I got a question regarding the Alchemy SDK.
Is it possible to create a new instance of a contract using “new ethers.Contract()” directly from the Alchemy SDK without importing the ethers object?
By that I mean to have access to ethers.js from the Alchemy SDK instead of having to also import ethers as a separate package.
Thank you in advance for your answer!
Posted by Killiane about 2 years ago
creating a provider?
seems like something has broken in the SDK
based on this code:
https://docs.alchemy.com/docs/how-to-mint-an-nft-from-code#step-1-create-an-alchemy-provider-using-ethers
`const provider = new ethers.providers.AlchemyProvider('mumbai', apiKey);`
gives
```
TypeError: Cannot read properties of null (reading 'name')
node_modules/@ethersproject/providers/src.ts/alchemy-provider.ts:57
switch (network.name) {
```
I also tried passing an object
```
const netObj = {
// name: 'MATIC_MUMBAI',
name: 'polygon-mumbai',
// chainId: 80001 // FIXME
}
```
using
"alchemy-sdk": "^2.0.2",
OK so the working magic codes are:
```
const netObj = {
// name: 'MATIC_MUMBAI',
// name: 'polygon-mumbai',
name: 'maticmum',
chainId: 80001 // hardwired bullshit
}
const provider = new ethers.providers.AlchemyProvider(netObj, apiKey);
```
is there a way to get the hardwired chainId somehow?
Posted by dc about 2 years ago