### Install AirSwap Utils Package Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/utils/README.md Installs the AirSwap Utils package using Yarn. This is the first step to using the utilities in your project. ```console yarn add @airswap/utils ``` -------------------------------- ### Install AirSwap Stores Package Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/stores/README.md Installs the @airswap/stores package using Yarn. This is the first step to integrate AirSwap's storage solutions into your project. ```console yarn add @airswap/stores ``` -------------------------------- ### Install Dependencies Source: https://github.com/airswap/airswap-protocols/blob/develop/source/batch-call/README.md Installs the necessary dependencies for the project using Yarn. ```bash yarn ``` -------------------------------- ### Install AirSwap Libraries Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/libraries/README.md Installs the AirSwap libraries package using Yarn. This is the first step to integrate AirSwap protocols into your project. ```console yarn add @airswap/libraries ``` -------------------------------- ### Common Development Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/utils/README.md Lists essential commands for managing the AirSwap project, including dependency installation, contract compilation, testing, and cleaning build artifacts. ```console yarn install yarn clean yarn compile yarn test ``` -------------------------------- ### AirSwap Protocols Project Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/swap-erc20/README.md This section details the common commands used for managing the AirSwap protocols project, including dependency installation, contract compilation, testing, and deployment. ```bash yarn # Install dependencies ``` ```bash yarn clean # Delete the contract build folder ``` ```bash yarn compile # Compile all contracts to build folder ``` ```bash yarn coverage # Report test coverage ``` ```bash yarn test # Run all tests in test folder ``` ```bash yarn test:ci # Run ci tests in test folder ``` ```bash yarn deploy --network # Deploy on a network using --network flag ``` ```bash yarn verify --network # Verify on a network using --network flag ``` -------------------------------- ### Project Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/wrapper/README.md Common commands for managing the AirSwap protocols project, including dependency installation, compilation, testing, and deployment. ```shell yarn yarn clean yarn compile yarn coverage yarn test yarn test:ci yarn deploy yarn verify ``` -------------------------------- ### AirSwap Protocol Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/swap/README.md Common commands for managing the AirSwap protocol project, including dependency installation, compilation, testing, and deployment. ```bash yarn yarn clean yarn compile yarn coverage yarn test yarn test:ci yarn deploy --network yarn verify --network ``` -------------------------------- ### Start Ganache Local Blockchain Source: https://github.com/airswap/airswap-protocols/blob/develop/source/batch-call/README.md Starts a local Ganache blockchain instance, which is required for running contract tests. ```bash yarn ganache ``` -------------------------------- ### AirSwap Project Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/delegate-erc20/README.md Common commands for managing the AirSwap project, including dependency installation, contract compilation, testing, and deployment. ```bash yarn yarn clean yarn compile yarn coverage yarn test yarn test:ci yarn deploy --network yarn verify --network ``` -------------------------------- ### Project Management Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/stores/README.md A collection of essential Yarn commands for managing the AirSwap project, including dependency installation, cleaning build artifacts, compiling contracts, and running tests. ```console yarn yarn clean yarn compile yarn test ``` -------------------------------- ### AirSwap Project Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/registry/README.md Common commands for managing the AirSwap project, including dependency installation, contract compilation, testing, and deployment. These commands are typically executed using Yarn. ```bash yarn yarn clean yarn compile yarn coverage yarn test yarn test:ci yarn deploy --network yarn verify --network ``` -------------------------------- ### AirSwap Project Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/pool/README.md This section details the various yarn commands available for managing the AirSwap project, including dependency installation, contract compilation, testing, and deployment. ```shell yarn # Install dependencies ``` ```shell yarn clean # Delete the contract `build` folder ``` ```shell yarn compile # Compile all contracts to `build` folder ``` ```shell yarn coverage # Report test coverage ``` ```shell yarn test # Run all tests in `test` folder ``` ```shell yarn test:ci # Run CI tests in `test` folder ``` ```shell yarn deploy --network # Deploy on a network using --network flag ``` ```shell yarn verify --network # Verify on a network using --network flag ``` -------------------------------- ### AirSwap Project Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/source/staking/README.md This section details the common Yarn commands used for managing the AirSwap project. These commands cover dependency installation, contract compilation, testing, and deployment/verification processes. ```bash yarn # Install dependencies yarn clean # Delete the contract "build" folder yarn compile # Compile all contracts to "build" folder yarn coverage # Report test coverage yarn test # Run all tests in "test" folder yarn test:ci # Run ci tests in "test" folder yarn deploy --network # Deploy on a network using --network flag yarn verify --network # Verify on a network using --network flag ``` -------------------------------- ### AirSwap Regular Development Process Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Details the step-by-step process for regular development and releases, including feature branching, merging to beta and main, and tagging. ```markdown **Regular development process for a complete release** 1. New work and features are cut from and merged to "develop" 1. Cut feature branches from develop 2. Merge feature branches into develop (Squash and Merge) 2. Merge "develop" into "beta" to publish beta packages. (Semver: x.x.x-beta.x) 1. Merge develop into beta (Merge Commit): this will publish NPM with "beta" tag. 2. Tag beta release from beta branch. (x.x.x-beta.x) 3. Share tagged release with auditors if auditing. 3. Merge "develop" into "main" to publish latest packages. (Semver: x.x.x) 1. Merge develop into main (Merge Commit): this will publish NPM with "latest" tag. 2. Merge main into beta: this will update the beta with latest. 3. Tag release from main branch. (x.x.x) Each `deploys.js` must be limited to contracts deployed from that package version. ``` -------------------------------- ### Run Redis Initialization Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/stores/README.md Commands to compile contracts and initialize Redis indexes. This is crucial for setting up the Redis environment for the AirSwap protocols. ```console yarn compile; yarn redis:init ``` -------------------------------- ### Compile Contracts Source: https://github.com/airswap/airswap-protocols/blob/develop/source/batch-call/README.md Compiles all smart contracts in the project and outputs them to the 'build' folder. ```bash yarn compile ``` -------------------------------- ### AirSwap Development Tools Packages Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Lists the available development tool packages for AirSwap, including their npm versions and purpose. ```markdown | Package | Version | Description | | :-------------------------------------- | :---------------------------------------------------------------------------------------------------------- | :----------------------- | | [`@airswap/libraries`](tools/libraries) | [![npm](https://img.shields.io/npm/v/@airswap/libraries)](https://www.npmjs.com/package/@airswap/libraries) | Libraries for Developers | | [`@airswap/utils`](/tools/utils) | [![npm](https://img.shields.io/npm/v/@airswap/utils)](https://www.npmjs.com/package/@airswap/utils) | Utils for Developers | ``` -------------------------------- ### Initialize Redis Store Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/stores/README.md Demonstrates how to import and initialize the Redis store from the @airswap/stores package. It requires a Redis connection URL, typically provided via environment variables. ```TypeScript import { Redis } from '@airswap/stores'; const store = new Redis(process.env.REDISCLOUD_URL) ``` -------------------------------- ### AirSwap Contract Packages Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Lists the available smart contract packages within the AirSwap protocols repository, including their npm versions and a brief description of their functionality. ```markdown | Package | Version | Description | | :------------------------------------------ | :------------------------------------------------------------------------------------------------------------ | :-------------------------- | | [`@airswap/registry`](/source/registry) | [![npm](https://img.shields.io/npm/v/@airswap/registry)](https://www.npmjs.com/package/@airswap/registry) | Server Registry | | [`@airswap/swap`](/source/swap) | [![npm](https://img.shields.io/npm/v/@airswap/swap)](https://www.npmjs.com/package/@airswap/swap) | Atomic Token Swap | | [`@airswap/swap-erc20`](/source/swap-erc20) | [![npm](https://img.shields.io/npm/v/@airswap/swap-erc20)](https://www.npmjs.com/package/@airswap/swap-erc20) | Atomic Token Swap (ERC20) | | [`@airswap/wrapper`](/source/wrapper) | [![npm](https://img.shields.io/npm/v/@airswap/wrapper)](https://www.npmjs.com/package/@airswap/wrapper) | Wrapper for Native Tokens | | [`@airswap/staking`](/source/staking) | [![npm](https://img.shields.io/npm/v/@airswap/staking)](https://www.npmjs.com/package/@airswap/staking) | Staking for Members | | [`@airswap/pool`](/source/pool) | [![npm](https://img.shields.io/npm/v/@airswap/pool)](https://www.npmjs.com/package/@airswap/pool) | Rewards Pool for Members | | [`@airswap/batch-call`](/source/batch-call) | [![npm](https://img.shields.io/npm/v/@airswap/batch-call)](https://www.npmjs.com/package/@airswap/batch-call) | Batch Token and Order Calls | ``` -------------------------------- ### Deploy and Verify Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Commands for deploying and verifying AirSwap protocol packages. The `--network` flag specifies the target network, and the deployment account is derived from the `PRIVATE_KEY` environment variable. ```shell yarn deploy --network sepolia yarn verify --network sepolia ``` -------------------------------- ### Dockerized Redis for Local Development Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/stores/README.md Provides the Docker command to run a Redis instance locally. This is useful for development and testing purposes without needing a cloud-based Redis instance. ```console docker run -p 6379:6379 --name redis-stack redis/redis-stack:latest ``` -------------------------------- ### Run Contract Tests Source: https://github.com/airswap/airswap-protocols/blob/develop/source/batch-call/README.md Executes all contract tests defined in the 'test' folder. Requires compilation and a running Ganache instance. ```bash yarn test ``` -------------------------------- ### AirSwap Development Commands Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Common Yarn commands used for managing AirSwap contracts and code, including compilation, testing, and linting. ```bash yarn compile # Compile all contracts to `build` folders. yarn clean # Clean all contract `build` folders. yarn test # Run all contract tests in `test` folders. yarn lint:fix # Run eslint for all JavaScript code. yarn pretty:fix # Run prettier for all JavaScript code. ``` -------------------------------- ### AirSwap Individual Package Process Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Describes the process for releasing individual package features or patches, focusing on branching from main and merging. ```markdown **Individual package features or patches** 1. Cut a feature or fix branch from main. 2. Merge fix into main (Squash and Merge): this will publish to NPM with "latest" tag. 3. Merge main into develop. ``` -------------------------------- ### AirSwap Release Branching Strategy Source: https://github.com/airswap/airswap-protocols/blob/develop/README.md Outlines the branching and merging strategy for AirSwap contracts and tools to manage development, testing, and releases. ```markdown Flow for contracts and associated tools: Branch from Develop; Merge Feature → Develop → Beta → Main Flow for tool updates (not contracts): Branch from Main; Merge Feature → Main → Develop ``` -------------------------------- ### Import AirSwap Utils Functions Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/utils/README.md Demonstrates how to import specific utility functions like `toDecimalString` and `toAtomicString` from the `@airswap/utils` package into your TypeScript application. ```TypeScript import { toDecimalString, toAtomicString } from '@airswap/utils'; ``` -------------------------------- ### Import AirSwap Libraries Source: https://github.com/airswap/airswap-protocols/blob/develop/tools/libraries/README.md Demonstrates how to import essential AirSwap library components into your TypeScript application. These components are crucial for interacting with AirSwap protocols. ```TypeScript import { Indexer, Server, Swap } from '@airswap/libraries'; ``` -------------------------------- ### Clean Build Folder Source: https://github.com/airswap/airswap-protocols/blob/develop/source/batch-call/README.md Deletes the contract build artifacts from the 'build' folder. ```bash yarn clean ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.