⏳ Tokei ⏳
Tokei is a token streaming protocol, inspired by Sablier, for Starknet.
Tokei means "clock" in Japanese.
Getting Started
In this section, we will go through the steps to build and test the smart contracts.
Prerequisites
Build the contracts
Open a terminal and run the following command:
scarb build
This will build the smart contracts into target
directory.
Sample output:
tree target/dev
├── tokei.starknet_artifacts.json
├── tokei_ERC20.casm.json
├── tokei_ERC20.sierra.json
├── tokei_ERC721.casm.json
├── tokei_ERC721.sierra.json
├── tokei_TokeiLockupLinear.casm.json
└── tokei_TokeiLockupLinear.sierra.json
Test the contracts
Open a terminal and run the following command:
snforge
This will execute the tests in tests
directory and print the results.
Sample output:
Collected 1 test(s) and 2 test file(s)
Running 0 test(s) from src/lib.cairo
Running 1 test(s) from tests/test_lockup_linear.cairo
[PASS] test_lockup_linear::test_lockup_linear::given_normal_conditions_when_create_with_range_then_expected_results
Tests: 1 passed, 0 failed, 0 skipped