This repository contains the source code for contracts and testing suites for all of Parallel's omnichain-related contracts. Documentation for each main contract can be found in the /docs folder.
- Broadcast folder contains Foundry transactions executed by scripts.
- Contracts folder contains contracts source code.
- Deploy folder contains hardhat deployment scripts.
- Deployments folder contains info of contracts deployed per network.
- Docs folder contains all documentation related to main contracts.
- Script folder contains Foundry scripts to interact with onchain contracts.
- Test folder contains all tests related to the contracts with mocks and settings.
- Utils folder contains helper functions.
The BridgeableToken.sol
allow a principal token to be bridgeable by leveraging on LayerZero's OFT standard with custom credit/debit limits. See the BridgeableToken documentation for more details.
Foundry is used for testing and scripting. To Install foundry follow the instructions.
bun i
The Foundry script relies solely on the PRIVATE_KEY. The MNEMONIC is used on the Hardhat side and will override the PRIVATE_KEY if it is defined.
MNEMONIC=
PRIVATE_KEY=0x...
ALCHEMY_API_KEY=
bun run compile
There are 2 types of tests:
- Classic tests (Units/Integrations) :
bun run test
- Invariant tests:
bun run test:invariant
You will find other useful commands in the package.json file.
All contracts is under the MIT
License, see LICENSE
.