Equation Contracts is a collection of smart contracts for perpetual contracts.
To compile the contracts locally, follow these steps:
- Clone the repository:
git clone [email protected]:EquationDAO/equation-contracts.git
- Install the required dependencies:
npm install
- Install husky hooks:
npm run prepare
- Compile the contracts:
npm run build
To deploy the contracts to a network and verify it, follow these steps:
- Create a
.env
file in the root directory of the project with the following contents:
# .env
PRIVATE_KEY=your-private-key
ARBISCAN_API_KEY=your-arbiscan-api-key
- Run the deployment script:
sh ./scripts/deploy.sh -n <network-name> -c <chain-id> -d true -v true
# Example: sh ./scripts/deploy.sh -n arbitrum-goerli -c 421613 -d true -v true
- View the deployed contracts in the
./deployments
directory.
The Equation Contracts project is deployed to the following networks:
Network | Chain ID | Contracts |
---|---|---|
Arbitrum Mainnet | 42161 | View |
The Equation Contracts project uses a variety of open-source licenses for its codebase. The licensing details for
each portion of the project can be found in the individual source code files via the SPDX-License-Identifier
header.
Here is a summary of the licensing information for different parts of the project:
- Code under the
./contracts/**/interfaces
directory is licensed under the GPL-2.0 license. - Third-party code used in the project is subject to the following licenses:
- MIT License
- GPL-2.0 License
- Code under the
./contracts/test
directory is not licensed for use outside of the Equation Contracts project. - All other code in the project is licensed under the BSL-1.1 license.