@sonastream/core
v0.0.23
Published
A set of contracts for the sona protocol
Downloads
30
Keywords
Readme
Sona Protocol
Table of Contents
Requirements
Contracts
contracts
├── SonaReserveAuction.sol
├── SonaRewardToken.sol
├── SonaRewards.sol
├── access
│ ├── SonaAdmin.sol
│ └── SonaMinter.sol
├── interfaces
│ ├── IRewardGateway.sol
│ ├── ISonaReserveAuction.sol
│ ├── ISonaRewardToken.sol
│ └── IWETH.sol
├── test
│ ├── SonaReserveAuction.t.sol
│ ├── SonaRewardToken.t.sol
│ ├── SonaRewards.t.sol
│ ├── Util.sol
│ ├── access
│ │ └── SonaAdmin.t.sol
│ └── mock
│ ├── ContractBidderMock.sol
│ ├── ERC20Mock.sol
│ └── Weth9Mock.sol
└── utils
├── AddressableTokenId.sol
└── ZeroCheck.sol
Getting Started
Installation
- With git installed, run
git clone https://github.com/sonastream/core.git
cd
in tocore
- Run
make install
Commands
To see all commands that can be run with make
, check out the makefile command table
Headers
- Install https://github.com/transmissions11/headers
- Run
headers <insert-header>
- Paste from your clipboard
Testing
To run tests, run the command make test
. To change the logs verbosity, update the makefile' command with less or more v
Coverage
To get the test coverage, run make cover
Environment
Fill in your .env
at your root with:
MNEMONIC=
ETHERSCAN_KEY=
TREASURY=
REDISTRIBUTION=
AUTHORIZER=
RPC_URL_GOERLI=
RPC_URL_SEPOLIA=
Deploying
| Command | Environment | | ------------------- | ----------------------------------- | | make deploy_local | Local anvil (http://localhost:8546) | | make deploy_sepolia | Sepolia |
Foundry and type definitions
When updating foundry modules, commit your changes locally and run forge install <package-name>
. Then, update the remappings across the following files to allow builds, security scanning and goto definitions to work properly:
- slitherConfig.json
- .vscode/settings.json
- remappings.txt
Analyzers
The repo comes with two static analyzers for checking for security vulnerabiltiies and gas optimizations
| Command | Environment |
| ------------ | ---------------------------------------------------------------- |
| make analyze | Runs solstat and outputs a report to reports/solstat_report.md
|
| make sec | Runs slither and outputs a report to stdout |