Neo's Personal Matrix

    @item-protocol/contracts-store
    TypeScript icon, indicating that this package has built-in type declarations

    1.1.0 • Public • Published

    Store Contract

    This package contains implementations of store contract based on item protocol. Addresses of the deployed contracts can be found in the deploys file within this package.

    Features

    • Sell any item based on item protocol
    • Buy an item for sale
    • Cancel sale

    Installation

    Install

    yarn add @item-protocol/contracts-store

    Usage

    import { sell } from '@item-protocol/contracts-store'
    
    const seed = 'your seed'
    
    export default async () => {
      const assetId = '2iKLS4iYPU47MtmJYJji5iRPwPiRh1inDMNcX4p7t69W'
      const req = sell(assetId, 10, 'WAVES', 25)
      await req.broadcast(seed)
    } 

    Configuration

    Item protocol uses a shared configuration package @item-protocol/config, some fields use environment variables. To change ChainId, run the command:

    export CHAIN_ID=W

    Contributing

    We strongly recommend that the community help us make improvements and determine the future direction of the protocol. To report bugs within this package, please create an issue in this repository.

    Please read our contribution guidelines before getting started.

    Install Dependencies

    yarn install

    Build

    To build this package, run the following from the monorepo root directory:

    yarn build --scope @item-protocol/contracts-store

    Run Tests

    yarn test:contract

    About testing

    By default, contracts are tested on a private node. To start a node and all dependent services, run the command from the monorepo root directory:

    docker-compose -f docker-compose.devnet.yml up

    Or you can run tests on testnet, you need to setup the configuration and run:

    yarn test:contract --env=testnet

    Keywords

    none

    Install

    npm i @item-protocol/contracts-store

    DownloadsWeekly Downloads

    2

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    15.6 kB

    Total Files

    14

    Last publish

    Collaborators

    • vecheslav