Core smart contracts of Astra CL version
npm install @airdao/astra-cl-coreThis repository contains the core smart contracts for the Astra CL Protocol.
For higher level contracts, see the astra-cl-periphery
repository.
In order to deploy this code to a local testnet, you should install the npm package@airdao/astra-cl-core
and import the factory bytecode located at@airdao/astra-cl-core/artifacts/contracts/AstraCLFactory.sol/AstraCLFactory.json.
For example:
``typescript
import {
abi as FACTORY_ABI,
bytecode as FACTORY_BYTECODE,
} from '@airdao/astra-cl-core/artifacts/contracts/AstraCLFactory.sol/AstraCLFactory.sol.json'
// deploy the bytecode
`
This will ensure that you are testing against the same bytecode that is deployed to
AMB mainnet, testnet and devnet, and all Astra code will correctly interoperate with
your local deployment.
The Astra CL interfaces are available for import into solidity smart contracts
via the npm artifact @airdao/astra-cl-core, e.g.:
`solidity
import '@airdao/astra-cl-core/contracts/interfaces/IAstraCLPool.sol';
contract MyContract {
IAstraCLPool pool;
function doSomethingWithPool() {
// pool.swap(...);
}
}
``