GithubHelp home page GithubHelp logo

jiangyongkang / immutable-x-helper Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 236 KB

使用 Immutable X 开发部署智能合约,以及 Immutable X 的一些接口的使用。

Shell 0.77% JavaScript 0.70% Solidity 75.99% TypeScript 22.53%
solidity hardhat immutable

immutable-x-helper's Introduction

Immutable X Helper

Immutable X 是一个 Layer2 网络。主要的优势是交易无 Gas 并且可以立即确认交易Immutable X 是用中心化的接口实现的,没办法在 Layer2 的层上去调用合约中的方法。只能调用 IMX 提供的一些中心化接口。

Deploy Contract

$ yarn ropsten:deploy
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/deploy.ts
Generating typings for: 1 artifacts in dir: typechain for target: ethers-v5
Successfully generated 5 typings!
Compiled 1 Solidity file successfully
IMXERC721Demo deployed to: 0xFf20e251dF05bA2300c139f7F410e5AE19AB0623
Done in 210.28s.

Create Project

$ yarn ropsten:createProject
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/createProject.ts
No need to generate any newer typings.
Create Project Successful, Project Id: 51691
Done in 7.29s.

Create Collection

$ yarn ropsten:createCollection
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/createCollection.ts
No need to generate any newer typings.
Create Collection Response: {"address":"0xff20e251df05ba2300c139f7f410e5ae19ab0623","name":"IMX ERC721 Demo","description":"IMX ERC721 Demo","icon_url":"","collection_image_url":"","project_id":51691,"metadata_api_url":"https://ipfs.io/ipfs/"}
Done in 9.24s.

Mint NFT

$ yarn ropsten:mint
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/mint.ts
No need to generate any newer typings.
Mint NFT: {"results":[{"token_id":"1653811075567","contract_address":"0xff20e251df05ba2300c139f7f410e5ae19ab0623","tx_id":4581750}]}
Done in 7.21s.

Create Order

$ yarn ropsten:order:create
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/createOrder.ts
No need to generate any newer typings.
CreateOrder: {"order_id":128442,"status":"","time":0}
Done in 9.02s.

Cancel Order

$ yarn ropsten:order:cancel
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/cancelOrder.ts
No need to generate any newer typings.
{ order_id: 128442, status: '' }
Done in 8.77s.

Show Balance

$ yarn ropsten:balance:show
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/showBalance.ts
No need to generate any newer typings.
ShowBalance: {"result":[{"symbol":"ETH","balance":"100000000400000000","preparing_withdrawal":"0","withdrawable":"0"}],"cursor":"eyJfIjoiIiwic3ltYm9sIjoiRVRIIiwiY29udHJhY3RfYWRkcmVzcyI6IiIsImlteCI6IjEwMDAwMDAwMDQwMDAwMDAwMCIsInByZXBhcmluZ193aXRoZHJhd2FsIjoiMCIsIndpdGhkcmF3YWJsZSI6IjAifQ"}
Done in 6.01s.

Transfer Balance

$ yarn ropsten:balance:transfer
yarn run v1.22.18
$ npx hardhat run --network ropsten scripts/transferBalance.ts
No need to generate any newer typings.
TransferId: 4581751 Transfer 0.0000000001ETH From: 0x8c1c499415a19e4086dcaf94803ab01cb7185570 To: 0x64f44b31ad0ed4537f94a5c084cfba8945463345
Done in 9.72s.

immutable-x-helper's People

Contributors

jiangyongkang avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.