Skip to content

polyglotDataNerd/poly-asset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT Metadata Extractor

An endpoint that provides NFT metadata for ERC721 and ERC1155 based off the contract ABI, this is just for demo purposes no tests and is in sandbox mode.

Infrastructure

  • Update kube config aws eks update-kubeconfig --region region-code --name cluster-name --role-arn arn:aws:iam::<account id>:role/eksClusterRole

  • create Namespace kubectl create namespace <name>

  • go ethereum contract bindings generate

    • Build abigen tool

    • EXAMPLE

      abigen --abi ./testdata/721ABI.abi --pkg erc721 --type Token --out ./erc721/TokenBinding.go

      • --abi: Mandatory path to the contract ABI to bind to
      • --pkg: Mandatory Go package name to place the Go code into
      • --type: Optional Go type name to prefix stubbed out methods e.g. TokenMetaData
      • --out: Optional output path for the generated Go source file (not set = stdout)
  • how to tell between 721 and 1155 token

Example

Get metadata for NFT using contract address and token id (contractAddress/tokenID) locally using curl:

curl -v http://localhost:8080/0x9b293020d3802c80b023d4b6965ab5e59bc971e2/9799

Deploy

helm upgrade --install --debug --wait --timeout 3m --atomic --set image.repository=712639424220.dkr.ecr.us-west-2.amazonaws.com/poly/asset --set image.tag=latest --namespace=poly-test poly-asset ./helm/asset/poly-asset

About

Demo: NFT Metadata Extractor Endpoint

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published