Giter Site home page Giter Site logo

imx-reactjs-integration-example's Introduction

Immutable X integration example

This is a skeleton React app for the purpose of providing code examples for building a marketplace on Immutable X. It covers:

  • View sell orders and buying NFTs
  • View Immutable X inventory and ETH balance
  • Creating and cancelling sell orders
  • Minting on Immutable X
  • Depositing and withdrawing ETH and NFTs

Polling

If you want to maintain a state of the entire Immutable X ecosystem in a local database, you currently have to poll our API endpoints and update events in your database accordingly. We will be looking at adding webhooks in the future.

Endpoint Action
/mints Insert new asset
/transfers Update asset ownership
/trades Update asset ownership
/orders Add and update orders
/withdrawals Set asset status to eth / update balance
/deposits Set asset status to imx / update balance

Available Scripts

In the project directory, you can run:

yarn install

This downloads and installs the required packages.

npx yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

imx-reactjs-integration-example's People

Contributors

calvwang9 avatar codeschwert avatar imartinez avatar mlockett42 avatar moot13 avatar samueltan-immutable avatar timm088 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

Watchers

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

imx-reactjs-integration-example's Issues

Compile error Type 'Wallet' is not assignable to type 'Signer' (inventory.tsx)

I am trying to run the repo. I cloned and installed the project as-is, and now I am getting this error:

imx-integration-example/src/Inventory.tsx
TypeScript error in imx-integration-example/src/Inventory.tsx(71,9):
Type 'Wallet' is not assignable to type 'Signer'.
  The types returned by 'provider.getBlock(...)' are incompatible between these types.
    Type 'Promise<import("imx-integration-example/node_modules/@ethersproject/abstract-provider/lib/index").Block>' is not assignable to type 'Promise<import("imx-integration-example/node_modules/@imtbl/imx-sdk/node_modules/@ethersproject/abstract-provider/lib/index").Block>'.
      Property '_difficulty' is missing in type 'import("imx-integration-example/node_modules/@ethersproject/abstract-provider/lib/index").Block' but required in type 'import("imx-integration-example/node_modules/@imtbl/imx-sdk/node_modules/@ethersproject/abstract-provider/lib/index").Block'.  TS2322

    69 |     const minterClient = await ImmutableXClient.build({
    70 |         publicApiUrl,
  > 71 |         signer: minter,
       |         ^
    72 |         starkContractAddress,
    73 |         registrationContractAddress,
    74 |     })

Unhandled Rejection (Error) on Start

Using node version v14.18.3, I cloned and installed.

After running the start command, npx yarn start, I open my browser to http://localhost:3000/ and get the below error:

Unhandled Rejection (Error): "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<title>Error</title>\n</head>\n<body>\n<pre>Cannot GET /orders</pre>\n</body>\n</html>\n"

image

Am I missing something after the install process?

mintv2 - mint_validation_failed

I got error on mint v2 for my contract- failed to verify signature with error mismatch of mint body owner key
Here is the contract address on ropsten - 0x9807ed40d87dbc39b9a4fea1c058aea4fef5ab2c

Gets compiler errors

When I try to run this I get a compiler error in the browser
Screenshot 2022-03-08 164017

The readme doesn't give any install step before running npx yarn start so I ran yarn install which appeared to install correctly, although it did update some package versions.

Operating system: Windows 10
Node Version: v14.19.0
Yarn Version: 1.22.15

Uncaught ReferenceError: process is not defined

Error on page load, prevents the loading and nothing works. Looks like code somewhere thinks it's running in Node.

VM278:2 Uncaught ReferenceError: process is not defined
at Object.4043 (:2:13168)
at r (:2:306599)
at Object.8048 (:2:9496)
at r (:2:306599)
at Object.8641 (:2:1379)
at r (:2:306599)
at :2:315627
at :2:324225
at :2:324229
at HTMLIFrameElement.e.onload (index.js:formatted:2473:NaN)

nft not for sale?

I minted an NFT on the Ropsten Testnet Network, deposited the NFT into Immutable X, the NFT has been locked in the Immutable X L1 smart contract, but I can't trade it on the https://market.ropsten.immutable.com/ platform This NFT is being sold, why? Can anyone tell me? thank you very much!

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.