haikukoten / sona-core

Sona Protocol

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sona Protocol Solidity Version

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 to core
  • Run make install

Commands

To see all commands that can be run with make, check out the makefile command table

Headers

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

Maintainers

About

Sona Protocol


Languages

Language:Solidity 63.5%Language:JavaScript 34.2%Language:Ruby 1.5%Language:Shell 0.4%Language:Julia 0.3%Language:Makefile 0.1%Language:TypeScript 0.1%Language:Nix 0.0%Language:Python 0.0%Language:Dockerfile 0.0%