Skip to content

research-ag/icrc1-auction

Repository files navigation

ICRC-1 Auction

An auction canister for selling/buying ICRC1 fungible tokens

Local setup

It is assumed that you have:

  • Dfinity SDK installed
  • NodeJS installed

Once you have cloned the repository, follow this process in your terminal:

  1. In your project directory, run this command to install npm dependencies:
npm install
  1. Start local Internet Computer replica:
dfx start --clean --background
  1. Create canisters:
npm run create
  1. If you want to use mocked ICRC1 ledger as quote ledger for debug purposes, put just created icrc1_ledger_mock canister id into dfx.json::icrc1_auction->init_arg->first principal

  2. Setup and deploy canisters locally

npm run setup
  1. Call function init on auction canister:
dfx canister call icrc1_auction init
  1. Now you can use auction locally. Mocked ICRC1 ledger allows to create tokens out of thin air using issueTokens function. You should create at least one additional ICRC1 ledger in order to be able to place any bid/ask. This repo provides additional canister icrc1_ledger_mock_2, which you can register as another ICRC1 ledger in auction for testing

  2. To start frontend in development mode, run:

CANISTER_ID_ICRC1_AUCTION=<canister_id> npm run dev:frontend

Replace <canister_id> with your local auction canister id

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published