1.0.3 • Published 1 year ago

@starspaceio/fixed-price-market v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

fixed-price-market

This package contains the command line client (cli) and software development kit (sdk) for interacting with the starspace fixed price market smart contracts and related graphql apis.

Development tips

yarn run watch is your friend.

Assuming watch is running w/o errors, you can interact with the cli by running: yarn exec --silent -- fixed-price-market eg:

yarn exec --silent -- fixed-price-market help list-token
Usage: fixed-price-market list-token [options] <creator-address> <collection-name> <token-name> <price>

Options:
  -c, --config <string>  aptos config (default: ".aptos/config.yaml")
  -m, --module <string>  module address
  -s, --seller <string>  aptos profile (default: "default")
  -h, --help             display help for command

Listing allowed collections

Use this command to see what collection allowed events we've ingested.

NOTE: this doesn't query the smart contract, but could be extended to do so in the future & probably will to aid in debugging production operations.

Usage:

yarn exec --silent -- fixed-price-market list-allowed-collections --help
Usage: fixed-price-market list-allowed-collections [options]

Options:
  -g, --graphql-endpoint <string>  module address (default: "http://127.0.0.1:9080/v1/graphql")
  -h, --help                       display help for command

Output:

yarn exec --silent -- fixed-price-market list-allowed-collections
{
  collection_allowed_events: [
    {
      id: 1,
      creator: '0xf6a8a0ee635650380698faf248066b006d11c2c2543d3b2cb75f93db4bbf21ba',
      collection: 'Degen Simians',
      collection_data_id_hash: 'a429bf9f77f0b1691c8e374edb33311eaa6d83758a063658f73255b3034634e9',
      __typename: 'collection_allowed_events'
    },
    {
      id: 2,
      creator: '0xefee40464ff3d55eaae1ad483550b466659ce0a593ae695541c0c1e91f2bf984',
      collection: 'Degen Simians',
      collection_data_id_hash: '8a943dd1851d3a7d754de7964508317999b3fe381e1456788f14d42c3853a8b8',
      __typename: 'collection_allowed_events'
    }
  ]
}