Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.43 KB

README.md

File metadata and controls

43 lines (28 loc) · 1.43 KB

IAMM SDK

This project was generated with Trampoline.

Organization

Generators

High level functions that use a TContract to perform operations (by generating transactions) that interact with IAMM NFTs.

Schemas

Molecule-defined structures and bindings to rust-native types.

Scripts

Smart contracts written with Capsule

Build Instructions

To build generators and schemas, run cargo build --workspace.

Build Contract with Capsule

To build the contracts using Capsule:

  1. Ensure Capsule is installed cargo install ckb-capsule
  2. cd scripts/iamm_nft
  3. capsule build

Build Contract without Capsule

Ensure you have the necessary pre-requisites installed:

  1. install ckb-binary-patcher cargo install --git https://github.com/xxuejie/ckb-binary-patcher.git
  2. add target rustup target add riscv64imac-unknown-none-elf apt-get install gcc-riscv64imac-unknown-none-elf

Then, to build the nft contract: cd scripts/iamm_nft and bash build.sh.

If the bash script produces errors such as this: error: failed to run custom build command for ckb-std v0.9.0

then you may need to install the the riscv toolchain

Note: We do not use capsule build because it prevents using the iamm_nft-schemas package as a dependency due to the project structure.