Code Monkey home page Code Monkey logo

safe-nft-metadata-provider's Introduction

HashLips Lab logo

HashLips Lab

Welcome to the HashLips Lab monorepo. Our main tools, libraries and documentation can be found here.

safe-nft-metadata-provider's People

Contributors

liarco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

safe-nft-metadata-provider's Issues

Not updating unless server is redeployed

I have minted a token by the ID of 7 but it won't show unless I rebuild the server (on Digital Ocean). Then if i mint tokenId 8 it won't show again unless I rebuild the server.

It was previously working a few days ago but today it's requiring a server rebuild everytime. Any idea what the issue could be?

Misformed URL when replacing image URI

Hello! Great app. Issue with URL replacement

Looks like the PHP is replacing the image parameter in the json metadata with extra characters. Specifically here’s an example output

http:\/\/mydigital-app.ondigitalocean.app\/asset\/1.png

and the \/ now means that the image link isn't getting parsed correctly by the browser (goes to //asset//1.png instead of /asset/1.png

I couldn’t see an obvious place where this occurs, so wasn’t sure if it’s a Symfony routing thing? Maybe in UriUpdater.php? Thanks I’m advance for any help

[EDIT]
Still no luck, but I've been trying to isolate where this happens and it seems to be in a couple of places, but main one is CollectionManager.php with the function

     * @return array<string, mixed>
     */
    public function getMetadata(int $tokenId, string $assetUri = null): array
    {
        $metadata = $this->collectionFilesystemDriver->getMetadata($this->getMappedTokenId($tokenId));

        foreach ($this->metadataUpdaters as $metadataUpdater) {
            $metadataUpdater->updateMetadata(
                $metadata,
                $tokenId,
                $assetUri ?? $this->urlGenerator->generate(
                    RouteName::GET_ASSET,
                    [
                        'tokenId' => $tokenId,
                        '_format' => $this->collectionFilesystemDriver->getAssetsExtension(),
                    ],
                    UrlGeneratorInterface::ABSOLUTE_URL,
                ),
            );
        }

        return $metadata;
    }

urlGenerator and generate() from from Symfony and I have no idea why RouteName::GET_ASSET would add those additional slashes - but perhaps something weird going on with GET_ASSET?

Any help appreciated.

500 Internal Server Error

I am getting this error. I have deployed this exactly how the video shows and I think may be an issue with the app connecting with spaces. I have verified all files are in Spaces and I can connect through cyberduck. With that being said, I also checked the 16 variables and verify S3_FS_DRIVER_BUCKET_NAME field. Before I had just the name. This time, I tried with a / following the bucket name. That didn't work either.

[metadata-provider] [2022-02-20 22:09:51] DOCUMENT_ROOT changed to 'public/'
[metadata-provider] [2022-02-20 22:09:51] Assuming 512MB of RAM
[metadata-provider] [2022-02-20 22:09:51] PHP memory_limit is 128M Bytes
[metadata-provider] [2022-02-20 22:09:52] Starting php-fpm with 4 workers...
[metadata-provider] [2022-02-20 22:09:53] Starting httpd...
[metadata-provider] [2022-02-20 22:09:54] Application ready for connections on port 8080.
[metadata-provider] [2022-02-20 22:10:48] - - [20/Feb/2022:22:10:47 +0000] "-" 408 - "-" "-
[metadata-provider] [2022-02-20 22:10:58] - - [20/Feb/2022:22:10:57 +0000] "-" 408 - "-" "-
[metadata-provider] [2022-02-20 22:11:08] - - [20/Feb/2022:22:11:07 +0000] "-" 408 - "-" "-
[metadata-provider] [2022-02-20 22:11:18] - - [20/Feb/2022:22:11:17 +0000] "-" 408 - "-" "-
[metadata-provider] [2022-02-20 22:11:28] - - [20/Feb/2022:22:11:27 +0000] "-" 408 - "-" "-
[metadata-provider] [2022-02-20 22:11:31] {"message":"Matched route "root".","context":{"route":"root","route_parameters":{"_route":"root","_controller":"App\Controller\RootController"},"request_uri":"http://MYURI.ondigitalocean.app/","method":"GET"},"level":200,"level_name":"INFO","channel":"request","datetime":"2022-02-20T22:11:30.789357+00:00","extra":{}}
[metadata-provider] [2022-02-20 22:11:31] {"message":"Checking for authenticator support.","context":{"firewall_name":"main","authenticators":0},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-02-20T22:11:30.860677+00:00","extra":{}}
[metadata-provider] [2022-02-20 22:11:31] {"message":"Deprecated: Implicit conversion from float 86980.96499999508 to int loses precision","context":{"exception":{"class":"ErrorException","message":"Deprecated: Implicit conversion from float 86980.96499999508 to int loses precision","code":0,"file":"/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php:143"}},"level":200,"level_name":"INFO","channel":"php","datetime":"2022-02-20T22:11:31.041866+00:00","extra":{}}
[metadata-provider] [2022-02-20 22:11:31] {"message":"Deprecated: Implicit conversion from float 178986.78900000674 to int loses precision","context":{"exception":{"class":"ErrorException","message":"Deprecated: Implicit conversion from float 178986.78900000674 to int loses precision","code":0,"file":"/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php:143"}},"level":200,"level_name":"INFO","channel":"php","datetime":"2022-02-20T22:11:31.139344+00:00","extra":{}}
[metadata-provider] [2022-02-20 22:11:31] {"message":"Uncaught PHP Exception Aws\S3\Exception\S3Exception: "Error executing "GetObject" on "[BUCKET]%2F/abi.json"; AWS HTTP error: cURL error 6: Could not resolve host: [bucket]%2F (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)\" at /workspace/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php line 195","context":{"exception":{"class":"Aws\S3\Exception\S3Exception","message":"Error executing "GetObject" on "[bucket]%2F/abi.json"; AWS HTTP error: cURL error 6: Could not resolve host: [bucket]%2F (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)","code":0,"file":"/workspace/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:195","previous":{"class":"GuzzleHttp\\Exception\\ConnectException","message":"cURL error 6: Could not resolve host: [bucket]%2F (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)","code":0,"file":"/workspace/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:200"}}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-02-20T22:11:31.330508+00:00","extra":{}}
[metadata-provider] [2022-02-20 22:11:32] - - [20/Feb/2022:22:11:30 +0000] "GET / HTTP/1.1" 500 831 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.82 Safari/537.36
[metadata-provider] [2022-02-20 22:11:38] - - [20/Feb/2022:22:11:37 +0000] "-" 408 - "-" "-

Is there a way to mitigate a DDoS attack via the App

The server responded Http Error 500 since my app was bombarded by a ton of request, tried upgrading the App to a bigger plan but it doesn't help either. tried also contacting support but they said that they have security implementations as well but it didn't help too

Is this necessary?

I'm confused. Why would you have to hide the metadata prior to it being revealed?

  1. Couldn't you just create a list of metadata for the revealed URI and NOT upload the revealed metadata until you'r ready to reveal your collection?
    2.Use the art engine to generate new metadata and upload that to IPFS, then point your URI to the uploaded metadata which would just be a list of jason files depending on your total supply?
    3.Just not upload the revealed metadata.

Couldn't you just login to etherscan and use the contract function to change the reveal URI?

Is this process intended for people who have not done any of the previous steps or am I missing some sort of compatibility issues when communicating with truffle/hardhat and the dapp?

Sorry, just trying to understand why this is important. After the reveal, it's really up to the holder what they want to do with the NFT they have minted and showing rarity to the public is kinda important to display publicly that you do plan on awarding those who minted during the whitelist or presale.

Runetime logs error?

Hi, followed the youtube guide step by step, the only difference is that i chose Amsterdam instead of Frankfurt..
So everything is deployed and running but Digitalocean app cant open the url for the json files, cant view them.
When it requests get files this is what the logs show:
[metadata-provider] [2022-04-15 09:49:42] {"message":"Matched route \"get_metadata\".","context":{"route":"get_metadata","route_parameters":{"_route":"get_metadata","_format":"json","_controller":"App\\Controller\\MetadataController","tokenId":"1"},"request_uri":"http://nftslots-app-7b5lb.ondigitalocean.app/metadata/1.json","method":"GET"},"level":200,"level_name":"INFO","channel":"request","datetime":"2022-04-15T09:49:42.341699+00:00","extra":{}} [metadata-provider] [2022-04-15 09:49:42] {"message":"Checking for authenticator support.","context":{"firewall_name":"main","authenticators":0},"level":100,"level_name":"DEBUG","channel":"security","datetime":"2022-04-15T09:49:42.342362+00:00","extra":{}} [metadata-provider] [2022-04-15 09:49:42] {"message":"Lock acquired, now computing item \"cached_total_supply_provider.total_supply\"","context":{"key":"cached_total_supply_provider.total_supply"},"level":200,"level_name":"INFO","channel":"cache","datetime":"2022-04-15T09:49:42.405764+00:00","extra":{}} [metadata-provider] [2022-04-15 09:49:42] {"message":"Uncaught PHP Exception Exception: \"msgData must be a unprefixed hex value.\" at /workspace/vendor/digitaldonkey/ethereum-php/src/Abi.php line 93","context":{"exception":{"class":"Exception","message":"msgData must be a unprefixed hex value.","code":0,"file":"/workspace/vendor/digitaldonkey/ethereum-php/src/Abi.php:93"}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-04-15T09:49:42.801227+00:00","extra":{}} [metadata-provider] [2022-04-15 09:49:42] 10.244.7.85 - - [15/Apr/2022:09:49:42 +0000] "GET /metadata/1.json HTTP/1.1" 500 135 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.88 Safari/537.36

Also noticed the runtime log keeps running - 408 - logs, is that some kind of error?
Never ending loop:
[metadata-provider] [2022-04-15 09:46:40] 10.244.25.171 - - [15/Apr/2022:09:46:39 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:46:50] 10.244.5.132 - - [15/Apr/2022:09:46:49 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:46:50] 10.244.25.171 - - [15/Apr/2022:09:46:49 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:00] 10.244.5.132 - - [15/Apr/2022:09:46:59 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:00] 10.244.25.171 - - [15/Apr/2022:09:46:59 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:10] 10.244.5.132 - - [15/Apr/2022:09:47:09 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:10] 10.244.25.171 - - [15/Apr/2022:09:47:09 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:20] 10.244.5.132 - - [15/Apr/2022:09:47:19 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:20] 10.244.25.171 - - [15/Apr/2022:09:47:19 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:30] 10.244.5.132 - - [15/Apr/2022:09:47:29 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:30] 10.244.25.171 - - [15/Apr/2022:09:47:29 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:40] 10.244.5.132 - - [15/Apr/2022:09:47:39 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:40] 10.244.25.171 - - [15/Apr/2022:09:47:39 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:50] 10.244.5.132 - - [15/Apr/2022:09:47:49 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:47:50] 10.244.25.171 - - [15/Apr/2022:09:47:49 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:00] 10.244.5.132 - - [15/Apr/2022:09:47:59 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:00] 10.244.25.171 - - [15/Apr/2022:09:47:59 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:10] 10.244.5.132 - - [15/Apr/2022:09:48:09 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:10] 10.244.25.171 - - [15/Apr/2022:09:48:09 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:20] 10.244.5.132 - - [15/Apr/2022:09:48:19 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:20] 10.244.25.171 - - [15/Apr/2022:09:48:19 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:30] 10.244.5.132 - - [15/Apr/2022:09:48:29 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:30] 10.244.25.171 - - [15/Apr/2022:09:48:29 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:40] 10.244.5.132 - - [15/Apr/2022:09:48:39 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:40] 10.244.25.171 - - [15/Apr/2022:09:48:39 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:50] 10.244.5.132 - - [15/Apr/2022:09:48:49 +0000] "-" 408 - "-" "- [metadata-provider] [2022-04-15 09:48:50] 10.244.25.171 - - [15/Apr/2022:09:48:49 +0000] "-" 408 - "-" "-

Please help me.

Few questions regarding script

Is it possible to make that script starts from token #0 instead of #1?

If we don't need hidden png/json, can we just leave environmental variable empty/blank?

Also this is my image url in json file: "image":"http:\/\/tv3-app-vg9pw.ondigitalocean.app\/asset\/1.png"
What's up with \/

Also thank you for this script, this is literally a game changer

Image in json changing

Is it possible to NOT change the image in the revealed data to point to digital ocean (if we want to store it somewhere else, i.e. keep it as is)?

Invalid template URL

image

I got this message when I tried to deploy in the digital ocean. What should I do?

About CORS policy

I tried to request metadata from my server via Axios on React, and the response form digitalocean app is blocked because of CORS policy of the browser. I have no experience on php, so I would like to get some advice to resolve this CORS problem. How can I add additional headers on response of this app?

DigitalOcean deployment fails in v2

Hi!

I've been using your app for a project and it's been brilliant :D. However, when I come to deploy onto DigitalOcean I receive the following error message:

Error while creating app from Git template
Could not create app from Git template.

Getting owner: getting team data: rpc error: code = NotFound desc = team not found.

This only occurs on the main / v2 branches. I briefly tried to look into what might be causing the issue but I haven't been able to figure it out.

Can we don't replace metadata image file name?

Is it possible to don't touch on image's file name on metadata? Because some time we use 5 images for 1000 meta data then if the app replace all of image name then it will got problem.

What I would like to request is from ipfs://{CID}/{image_name}.{suffix} => {New URL}/{image_name}.{suffix}

Not compatible with ERC721A

I have tested this and it works well with ERC721 and tokens starting at 1 but if it is ERC721A and token ids start at 0 it doesn't read the supply for some reason. Always returns hidden for 0 and the rest are errors.

Adding variables for a Image and 3d file.

hello, how would i go about adding a separate variable for a Image and a 3d file? I have tried adding some new variables and tried recompiling but it failed. Can you point me to the right areas to edit or add new code to get this functional?

Variables:
GET_3D_ASSET = 'get_3d_asset';
GET_IMG_ASSET = 'get_img_asset';

asset folder setup:
3dfiles: assets/3dfiles/*.glb
images: assets/images/*.jpg

Compiler error ATM:
6_Run code-style checks (ECS).txt

Many Thanks

routename
assetcontroller
env

``

'Transaction reverted' error upon deployment

Hello,

I'm very excited to use this for my upcoming project! I am trying to do a test run with a previously launched collection but running into an issue when I deploy on Digital Ocean. It fails and gives me the error:

Error: missing revert data in call exception; Transaction reverted without a reason string [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (data="0x", transaction={"to":"0xB941cB348C51f369326905E98371680Cf98b5Bb4","data":"0xd5abeb01","accessList":null}, error={"reason":"processing response error","code":"SERVER_ERROR","body":"{"jsonrpc":"2.0","id":45,"error":{"code":-32000,"message":"execution reverted"}}","error":{"code":-32000},"requestBody":"{"method":"eth_call","params":[{"to":"0xb941cb348c51f369326905e98371680cf98b5bb4","data":"0xd5abeb01"},"latest"],"id":45,"jsonrpc":"2.0"}","requestMethod":"POST","url":"https://mainnet.infura.io/v3/my-api-key"}, code=CALL_EXCEPTION, version=providers/5.6.8)

If I take the transaction and try to run it in cURL I get the error:

{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"execution reverted"}}%

I'm not sure what I'm doing wrong, I tried this with two of my ERC-721 contracts as well as the mfers NFT contract and I get the same error with all three of them. I haven't made any changes to the project code either, although I do plan to in the near future.

Any suggestions?

Error when deploying to Digital Ocean

After hitting "Deploy to Digital Ocean" the website shows "error when trying to create the app" and gives the option to start over.
Start-over takes you to a wizard with the basic information of the app; the app deploys successfully but all the env variables are lost... I'd assume it's just a matter of versioning?

Digital Ocean Metadata

Hello @liarco

My digital ocean metadata is showing up on a single line.

{"name":"NFT Name #1","image":"http:\/\/test-9zf53.ondigitalocean.app\/asset\/1.png","attributes":[{"trait_type":"Background","value":"Off White C"},{"trait_type":"Race","value":"Red"},{"trait_type":"Eyes","value":"Joyful"},{"trait_type":"Clothing","value":"Bumblebee Jacket"},{"trait_type":"Mouth","value":"Pout"},{"trait_type":"Hair","value":"Green Samurai"}]}

Why does it appear this way? Thank you for your help in advance. The ERC721A integration is beautiful on mainnet and gas fees are insanely low. The dapp functions on both mobile metamask app and desktop chrome flawlessly. Bless you, sir!

Image not showing but json is fine

Hi. When I type the url for the json files of the already minted NFTs, the json files show just fine, with the image's urls. But when I try to reach the images it just gives me the 500 Internal Server Error. Any clue why this might be happening?

URI for json and image is generating extra slashes

Hi team, first and foremost thank you for your help with this! When looking at the json metadata, I noticed the image URI has extra slashes and causes the link to break.

For example: "image":http://app-dada.ondigitalocean.app/asset/1.png

I would love to tip you ETH if you can help resolve this ASAP. Thank you!

1155?

Have you considered doing this for 1155s? I have a use case where I need to mint 1155s in a random way. Oracles like Chainlink are problematic and very expensive. A great solution would be random generation just like a 721 collection, but to also avoid sniping using this tool.

Export assets fails after shuffle

Went through the entire youtube tutorial and when I run bin/console nft:export-assets the following error spits out:

Screen Shot 2022-04-06 at 4 39 06 PM

I have no idea how to solve this or what the error could be from. Everything else worked up until this point.

Multiple extensions for collection assets

Hello! So on digital ocean you are required to enter "COLLECTION_ASSETS_EXTENSION" and there is only room for 1 extension. I have 2500 nfts in my collection with 60 of them being GIF's and the rest being PNG. What do i do here?
Screen Shot 2022-05-03 at 4 35 02 PM

Deploy to Digital Ocean - Couldn't find environment variable: S3_PATH_PREFIX

I am getting this regardless what i try

[pepe-metadata] [2023-04-02 19:39:35] yarn run v1.22.19
[pepe-metadata] [2023-04-02 19:39:35] $ node dist/index.js
[pepe-metadata] [2023-04-02 19:39:36] /workspace/dist/config.js:13
[pepe-metadata] [2023-04-02 19:39:36] throw new Error(Couldn't find environment variable: ${environmentVariable});
[pepe-metadata] [2023-04-02 19:39:36] ^
[pepe-metadata] [2023-04-02 19:39:36]
[pepe-metadata] [2023-04-02 19:39:36] Error: Couldn't find environment variable: S3_PATH_PREFIX
[pepe-metadata] [2023-04-02 19:39:36] at getEnvironmentVariable (/workspace/dist/config.js:13:15)
[pepe-metadata] [2023-04-02 19:39:36] at Object. (/workspace/dist/config.js:24:21)
[pepe-metadata] [2023-04-02 19:39:36] at Module._compile (node:internal/modules/cjs/loader:1196:14)
[pepe-metadata] [2023-04-02 19:39:36] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)
[pepe-metadata] [2023-04-02 19:39:36] at Module.load (node:internal/modules/cjs/loader:1074:32)
[pepe-metadata] [2023-04-02 19:39:36] at Function.Module._load (node:internal/modules/cjs/loader:909:12)
[pepe-metadata] [2023-04-02 19:39:36] at Module.require (node:internal/modules/cjs/loader:1098:19)
[pepe-metadata] [2023-04-02 19:39:36] at require (node:internal/modules/cjs/helpers:108:18)
[pepe-metadata] [2023-04-02 19:39:36] at Object. (/workspace/dist/index.js:4:18)
[pepe-metadata] [2023-04-02 19:39:36] at Module._compile (node:internal/modules/cjs/loader:1196:14)
[pepe-metadata] [2023-04-02 19:39:36] error Command failed with exit code 1.
[pepe-metadata] [2023-04-02 19:39:36] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

metadata and erc-7210-collection (infura)

Hi,

When using both of the safe-metadata-provider and erc721-collection gits, they both use infura should we create a separate project-id for the safemetadata method or use the same one we setup in the erc721-collection for the contract?

Adding 3D Models To Provider

Hello, first of all, thank you for this resource. It is invaluable.

Second, im trying to customize the code to protect glb files alongside pngs for the tokens. Do I need to make any changes in hashlips-lab/collection-data-updater? I added the following code to index.ts

new S3BasicFileDataUpdater( "Model", s3Config, config.PRIVATE_MODELS_PATH, config.PUBLIC_MODELS_PATH, config.MODELS_EXTENSION, ),

I also added these to config.ts

PRIVATE_MODELS_PATH: getEnvironmentVariable("PRIVATE_MODELS_PATH"), PUBLIC_MODELS_PATH: getEnvironmentVariable("PUBLIC_MODELS_PATH"), MODELS_EXTENSION: getEnvironmentVariable("MODELS_EXTENSION"),

and likewise, updated .do/deploy.template.yaml and .env with

- key: PRIVATE_MODELS_PATH scope: RUN_TIME value: /private/models - key: PUBLIC_MODELS_PATH scope: RUN_TIME value: /public/models - key: MODELS_EXTENSION scope: RUN_TIME value: .glb

and

PRIVATE_MODELS_PATH=/private/models PUBLIC_MODELS_PATH=/public/models MODELS_EXTENSION=.glb

respectively.

Everything deploys fine, and the png's and metadata get moved from private to public, but it seems to be ignoring the models, even within the runtime logs. Am I missing something? Perhaps you could make a short tutorial on how to customize the code to add an additional asset class?

Thank you for taking the time <3

Hidden metadata fails with 500 Internal Server Error

Hey guys! Just updating here. There is an issue with the hidden metadata file structure. It basically fails with this error when you poll the metadata of an unminted NFT:

{"type":"https://tools.ietf.org/html/rfc2616#section-10","title":"An error occurred","status":500,"detail":"Internal Server Error"}

For minted ones it works great!! I followed all the video instructions as well. The folder in the space for hidden metadata is called "hidden" and inside there are the hidden.json and hidden.png files.

I also pulled these logs. You can see a "Syntax Error".

[metadata-provider] [2022-02-13 05:48:56] {"message":"Uncaught PHP Exception Nette\Utils\JsonException: "Syntax error" at /workspace/vendor/nette/utils/src/Utils/Json.php line 58","context":{"exception":{"class":"Nette\Utils\JsonException","message":"Syntax error","code":4,"file":"/workspace/vendor/nette/utils/src/Utils/Json.php:58"}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2022-02-13T05:48:56.011170+00:00","extra":{}}

Token 0

Hey, I'm still having a problem with token 0. Can you please tell me how I can change settings so that script starts with 0 instead of 1?

v2 beta Issues when copying data from private to public

I've check on my environment variable to see if all of the values we're in the same format but throws an error when copying the data from private to public folder

[metadata-provider] [2022-06-10 10:45:37] $ node dist/index.js
[metadata-provider] [2022-06-10 10:45:38] Revealing "Asset" for token 1...
[metadata-provider] [2022-06-10 10:45:38] Error copying "Asset" for token 1.
[metadata-provider] [2022-06-10 10:45:38] NoSuchKey: null
[metadata-provider] [2022-06-10 10:45:38]     at Request.extractError (/workspace/node_modules/aws-sdk/lib/services/s3.js:711:35)
[metadata-provider] [2022-06-10 10:45:38]     at Request.callListeners (/workspace/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
[metadata-provider] [2022-06-10 10:45:38]     at Request.emit (/workspace/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
[metadata-provider] [2022-06-10 10:45:38]     at Request.emit (/workspace/node_modules/aws-sdk/lib/request.js:686:14)
[metadata-provider] [2022-06-10 10:45:38]     at Request.transition (/workspace/node_modules/aws-sdk/lib/request.js:22:10)
[metadata-provider] [2022-06-10 10:45:38]     at AcceptorStateMachine.runTo (/workspace/node_modules/aws-sdk/lib/state_machine.js:14:12)
[metadata-provider] [2022-06-10 10:45:38]     at /workspace/node_modules/aws-sdk/lib/state_machine.js:26:10
[metadata-provider] [2022-06-10 10:45:38]     at Request.<anonymous> (/workspace/node_modules/aws-sdk/lib/request.js:38:9)
[metadata-provider] [2022-06-10 10:45:38]     at Request.<anonymous> (/workspace/node_modules/aws-sdk/lib/request.js:688:12)
[metadata-provider] [2022-06-10 10:45:38]     at Request.callListeners (/workspace/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
[metadata-provider] [2022-06-10 10:45:38]   code: 'NoSuchKey',
[metadata-provider] [2022-06-10 10:45:38]   region: null,
[metadata-provider] [2022-06-10 10:45:38]   time: 2022-06-10T10:45:38.984Z,
[metadata-provider] [2022-06-10 10:45:38]   requestId: 'tx00000000000002b0fca2c-0062a320d2-319989f1-nyc3c',
[metadata-provider] [2022-06-10 10:45:38]   extendedRequestId: undefined,
[metadata-provider] [2022-06-10 10:45:38]   cfId: undefined,
[metadata-provider] [2022-06-10 10:45:38]   statusCode: 404,
[metadata-provider] [2022-06-10 10:45:38]   retryable: false,
[metadata-provider] [2022-06-10 10:45:38]   retryDelay: 74.05141726685349
[metadata-provider] [2022-06-10 10:45:38] }
[metadata-provider] [2022-06-10 10:45:39] Revealing "Metadata" for token 1...
[metadata-provider] [2022-06-10 10:45:39] Error copying "Metadata" for token 1.
[metadata-provider] [2022-06-10 10:45:39] NoSuchKey: null
[metadata-provider] [2022-06-10 10:45:39]     at Request.extractError (/workspace/node_modules/aws-sdk/lib/services/s3.js:711:35)
[metadata-provider] [2022-06-10 10:45:39]     at Request.callListeners (/workspace/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
[metadata-provider] [2022-06-10 10:45:39]     at Request.emit (/workspace/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
[metadata-provider] [2022-06-10 10:45:39]     at Request.emit (/workspace/node_modules/aws-sdk/lib/request.js:686:14)
[metadata-provider] [2022-06-10 10:45:39]     at Request.transition (/workspace/node_modules/aws-sdk/lib/request.js:22:10)
[metadata-provider] [2022-06-10 10:45:39]     at AcceptorStateMachine.runTo (/workspace/node_modules/aws-sdk/lib/state_machine.js:14:12)
[metadata-provider] [2022-06-10 10:45:39]     at /workspace/node_modules/aws-sdk/lib/state_machine.js:26:10
[metadata-provider] [2022-06-10 10:45:39]     at Request.<anonymous> (/workspace/node_modules/aws-sdk/lib/request.js:38:9)
[metadata-provider] [2022-06-10 10:45:39]     at Request.<anonymous> (/workspace/node_modules/aws-sdk/lib/request.js:688:12)
[metadata-provider] [2022-06-10 10:45:39]     at Request.callListeners (/workspace/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
[metadata-provider] [2022-06-10 10:45:39]   code: 'NoSuchKey',
[metadata-provider] [2022-06-10 10:45:39]   region: null,
[metadata-provider] [2022-06-10 10:45:39]   time: 2022-06-10T10:45:39.040Z,
[metadata-provider] [2022-06-10 10:45:39]   requestId: 'tx0000000000000a3e87e0b-0062a320d3-3199e787-nyc3c',
[metadata-provider] [2022-06-10 10:45:39]   extendedRequestId: undefined,
[metadata-provider] [2022-06-10 10:45:39]   cfId: undefined,
[metadata-provider] [2022-06-10 10:45:39]   statusCode: 404,
[metadata-provider] [2022-06-10 10:45:39]   retryable: false,
[metadata-provider] [2022-06-10 10:45:39]   retryDelay: 59.67148001329863
[metadata-provider] [2022-06-10 10:45:39] }

image
folder structure
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.