@airdao/astra-cl-core
v1.0.0
Published
Core smart contracts of Astra CL version
Downloads
98
Readme
Astra CL Core
This repository contains the core smart contracts for the Astra CL Protocol. For higher level contracts, see the astra-cl-periphery repository.
Local deployment
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:
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.
Using solidity interfaces
The Astra CL interfaces are available for import into solidity smart contracts
via the npm artifact @airdao/astra-cl-core
, e.g.:
import '@airdao/astra-cl-core/contracts/interfaces/IAstraCLPool.sol';
contract MyContract {
IAstraCLPool pool;
function doSomethingWithPool() {
// pool.swap(...);
}
}