Astera-USD (asUSD) is the native Astera overcollateralized stablecoin integrated into Astera market, multichain using LayerZero and with a new innovative interest rate PID controle system.
yarn && forge installThis project supports both hardhat and forge compilation. By default, the compile command will execute both:
yarn compileyarn testSet up deployer wallet/account:
- Rename
.env.example->.env - Choose your preferred means of setting up your deployer wallet/account:
MNEMONIC="test test test test test test test test test test test junk"
or...
PRIVATE_KEY="0xabc...def"
- Fund this address with the corresponding chain's native tokens you want to deploy to.
To deploy your contracts to your desired blockchains, run the following command in your project's folder:
npx hardhat lz:deployMore information about available CLI arguments can be found using the --help flag:
npx hardhat lz:deploy --help- storage:
x - memory/stack:
x_ - function params:
_x - contracts/events/structs:
MyContract - errors:
MyContract__ERROR_DESCRIPTION - public/external functions:
myFunction() - internal/private functions:
_myFunction() - comments: "This is a comment to describe the variable
amount."
/**
* @dev Internal function called whenever a position's state needs to be modified.
* @param _amount Amount of poolToken to deposit/withdraw.
* @param _relicId The NFT ID of the position being updated.
* @param _kind Indicates whether tokens are being added to, or removed from, a pool.
* @param _harvestTo Address to send rewards to (zero address if harvest should not be performed).
* @return poolId_ Pool ID of the given position.
* @return received_ Amount of reward token dispensed to `_harvestTo` on harvest.
*/Please use yarn fmt before commiting.