An auction canister for selling/buying ICRC1 fungible tokens
It is assumed that you have:
- Dfinity SDK installed
- NodeJS installed
Once you have cloned the repository, follow this process in your terminal:
- In your project directory, run this command to install npm dependencies:
npm install
- Start local Internet Computer replica:
dfx start --clean --background
- Create canisters:
npm run create
-
If you want to use mocked ICRC1 ledger as quote ledger for debug purposes, put just created
icrc1_ledger_mock
canister id intodfx.json::icrc1_auction->init_arg->first principal
-
Setup and deploy canisters locally
npm run setup
- Call function
init
on auction canister:
dfx canister call icrc1_auction init
-
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 canistericrc1_ledger_mock_2
, which you can register as another ICRC1 ledger in auction for testing -
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