mirror of https://github.com/logos-co/staking.git
chore: update project description and author information, update README.md
This commit is contained in:
parent
474e7cacf5
commit
653fe5a542
18
.gas-report
18
.gas-report
|
@ -8,14 +8,14 @@
|
|||
| MAX_LOCKUP_PERIOD | 361 | 361 | 361 | 361 | 4 |
|
||||
| MIN_LOCKUP_PERIOD | 287 | 287 | 287 | 287 | 12 |
|
||||
| YEAR | 263 | 263 | 263 | 263 | 1 |
|
||||
| accounts | 1597 | 1597 | 1597 | 1597 | 12704 |
|
||||
| accounts | 1597 | 1597 | 1597 | 1597 | 12050 |
|
||||
| calculateMPToMint | 740 | 740 | 740 | 740 | 4 |
|
||||
| currentEpoch | 406 | 1691 | 2406 | 2406 | 28 |
|
||||
| epochEnd | 627 | 643 | 627 | 4627 | 480 |
|
||||
| epochReward | 1403 | 2903 | 1403 | 5903 | 3 |
|
||||
| executeAccount | 28897 | 95856 | 95004 | 171987 | 10265 |
|
||||
| executeAccount | 28897 | 95914 | 95004 | 171987 | 9611 |
|
||||
| executeEpoch | 23436 | 170888 | 187183 | 204283 | 419 |
|
||||
| isVault | 540 | 572 | 540 | 2540 | 7762 |
|
||||
| isVault | 540 | 575 | 540 | 2540 | 7108 |
|
||||
| lock | 23840 | 23840 | 23840 | 23840 | 1 |
|
||||
| migrateTo | 23869 | 23875 | 23875 | 23881 | 2 |
|
||||
| migration | 439 | 1439 | 1439 | 2439 | 4 |
|
||||
|
@ -27,7 +27,7 @@
|
|||
| setVault | 46239 | 46239 | 46239 | 46239 | 125 |
|
||||
| stake | 23983 | 23983 | 23983 | 23983 | 1 |
|
||||
| stakeRewardEstimate | 436 | 2269 | 2436 | 2436 | 12 |
|
||||
| stakedToken | 273 | 273 | 273 | 273 | 7778 |
|
||||
| stakedToken | 273 | 273 | 273 | 273 | 7124 |
|
||||
| startMigration | 108037 | 108045 | 108049 | 108049 | 3 |
|
||||
| totalSupply | 740 | 1921 | 2740 | 2740 | 22 |
|
||||
| totalSupplyBalance | 385 | 1785 | 2385 | 2385 | 20 |
|
||||
|
@ -52,8 +52,8 @@
|
|||
| acceptMigration | 35258 | 35258 | 35258 | 35258 | 2 |
|
||||
| leave | 35244 | 35244 | 35244 | 35244 | 1 |
|
||||
| lock | 45192 | 73900 | 66395 | 158442 | 7 |
|
||||
| owner | 362 | 362 | 362 | 362 | 7761 |
|
||||
| stake | 27265 | 268815 | 267631 | 353862 | 7766 |
|
||||
| owner | 362 | 362 | 362 | 362 | 7107 |
|
||||
| stake | 27265 | 268924 | 267631 | 353862 | 7112 |
|
||||
| stakedToken | 212 | 212 | 212 | 212 | 2 |
|
||||
| unstake | 42163 | 92598 | 80285 | 207456 | 11 |
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
| Deployment Cost | Deployment Size | | | | |
|
||||
| 0 | 0 | | | | |
|
||||
| Function Name | min | avg | median | max | # calls |
|
||||
| createVault | 696531 | 696531 | 696531 | 696531 | 7765 |
|
||||
| createVault | 696531 | 696531 | 696531 | 696531 | 7111 |
|
||||
| setStakeManager | 23710 | 26669 | 26076 | 30222 | 3 |
|
||||
| stakeManager | 368 | 1868 | 2368 | 2368 | 4 |
|
||||
|
||||
|
@ -73,8 +73,8 @@
|
|||
| Deployment Cost | Deployment Size | | | | |
|
||||
| 0 | 0 | | | | |
|
||||
| Function Name | min | avg | median | max | # calls |
|
||||
| approve | 46175 | 46198 | 46199 | 46211 | 7761 |
|
||||
| balanceOf | 561 | 617 | 561 | 2561 | 21747 |
|
||||
| approve | 46175 | 46198 | 46199 | 46211 | 7107 |
|
||||
| balanceOf | 561 | 621 | 561 | 2561 | 20439 |
|
||||
|
||||
|
||||
| script/Deploy.s.sol:Deploy contract | | | | | |
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
CreateVaultTest:testDeployment() (gas: 9774)
|
||||
CreateVaultTest:test_createVault() (gas: 692936)
|
||||
CreateVaultTest:test_createVault() (gas: 714000)
|
||||
ExecuteAccountTest:testDeployment() (gas: 28742)
|
||||
ExecuteAccountTest:test_ExecuteAccountLimit() (gas: 1318328)
|
||||
ExecuteAccountTest:test_ExecuteAccountMintMP() (gas: 3861122)
|
||||
ExecuteAccountTest:test_RevertWhen_InvalidLimitEpoch() (gas: 1154383)
|
||||
ExecuteAccountTest:test_ShouldNotMintMoreThanCap() (gas: 110701476)
|
||||
ExecuteAccountTest:test_ExecuteAccountLimit() (gas: 1624826)
|
||||
ExecuteAccountTest:test_ExecuteAccountMintMP() (gas: 5410346)
|
||||
ExecuteAccountTest:test_RevertWhen_InvalidLimitEpoch() (gas: 1292635)
|
||||
ExecuteAccountTest:test_ShouldNotMintMoreThanCap() (gas: 338282264)
|
||||
ExecuteEpochTest:testDeployment() (gas: 28720)
|
||||
ExecuteEpochTest:testNewDeployment() (gas: 30815)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldIncreaseEpoch() (gas: 94810)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldIncreasePendingReward() (gas: 253041)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldNotIncreaseEpochBeforeEnd() (gas: 17972)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldNotIncreaseEpochInMigration() (gas: 105698)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldIncreaseEpoch() (gas: 119862)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldIncreasePendingReward() (gas: 278283)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldNotIncreaseEpochBeforeEnd() (gas: 43024)
|
||||
ExecuteEpochTest:test_ExecuteEpochShouldNotIncreaseEpochInMigration() (gas: 154182)
|
||||
LeaveTest:testDeployment() (gas: 28720)
|
||||
LeaveTest:test_RevertWhen_NoPendingMigration() (gas: 1154639)
|
||||
LeaveTest:test_RevertWhen_SenderIsNotVault() (gas: 10750)
|
||||
LeaveTest:test_RevertWhen_NoPendingMigration() (gas: 1329923)
|
||||
LeaveTest:test_RevertWhen_SenderIsNotVault() (gas: 31942)
|
||||
LockTest:testDeployment() (gas: 28720)
|
||||
LockTest:test_NewLockupPeriod() (gas: 1143197)
|
||||
LockTest:test_RevertWhen_InvalidNewLockupPeriod() (gas: 1134814)
|
||||
LockTest:test_RevertWhen_InvalidUpdateLockupPeriod() (gas: 1229677)
|
||||
LockTest:test_RevertWhen_SenderIsNotVault() (gas: 10630)
|
||||
LockTest:test_ShouldIncreaseBonusMP() (gas: 1123297)
|
||||
LockTest:test_UpdateLockupPeriod() (gas: 1260010)
|
||||
LockTest:test_NewLockupPeriod() (gas: 1332993)
|
||||
LockTest:test_RevertWhen_InvalidNewLockupPeriod() (gas: 1305322)
|
||||
LockTest:test_RevertWhen_InvalidUpdateLockupPeriod() (gas: 1444177)
|
||||
LockTest:test_RevertWhen_SenderIsNotVault() (gas: 31834)
|
||||
LockTest:test_ShouldIncreaseBonusMP() (gas: 1315569)
|
||||
LockTest:test_UpdateLockupPeriod() (gas: 1588106)
|
||||
MigrateTest:testDeployment() (gas: 28720)
|
||||
MigrateTest:test_RevertWhen_NoPendingMigration() (gas: 1152278)
|
||||
MigrateTest:test_RevertWhen_SenderIsNotVault() (gas: 10750)
|
||||
MigrateTest:test_RevertWhen_NoPendingMigration() (gas: 1293998)
|
||||
MigrateTest:test_RevertWhen_SenderIsNotVault() (gas: 31954)
|
||||
MigrationInitializeTest:testDeployment() (gas: 28720)
|
||||
MigrationInitializeTest:test_RevertWhen_MigrationPending() (gas: 5506950)
|
||||
MigrationInitializeTest:test_RevertWhen_MigrationPending() (gas: 6117874)
|
||||
MigrationStakeManagerTest:testDeployment() (gas: 28720)
|
||||
MigrationStakeManagerTest:testNewDeployment() (gas: 30859)
|
||||
MigrationStakeManagerTest:test_ExecuteEpochShouldNotIncreaseEpochInMigration() (gas: 105686)
|
||||
MigrationStakeManagerTest:test_ExecuteEpochShouldNotIncreaseEpochInMigration() (gas: 154170)
|
||||
SetStakeManagerTest:testDeployment() (gas: 9774)
|
||||
SetStakeManagerTest:test_RevertWhen_InvalidStakeManagerAddress() (gas: 20481)
|
||||
SetStakeManagerTest:test_SetStakeManager() (gas: 19869)
|
||||
SetStakeManagerTest:test_RevertWhen_InvalidStakeManagerAddress() (gas: 63105)
|
||||
SetStakeManagerTest:test_SetStakeManager() (gas: 41301)
|
||||
StakeManagerTest:testDeployment() (gas: 28492)
|
||||
StakeTest:testDeployment() (gas: 28698)
|
||||
StakeTest:test_RevertWhen_InvalidLockupPeriod() (gas: 892168)
|
||||
StakeTest:test_RevertWhen_Restake() (gas: 1157929)
|
||||
StakeTest:test_RevertWhen_RestakeWithLock() (gas: 1159442)
|
||||
StakeTest:test_RevertWhen_SenderIsNotVault() (gas: 10674)
|
||||
StakeTest:test_RevertWhen_StakeIsTooLow() (gas: 745276)
|
||||
StakeTest:test_RevertWhen_StakeTokenTransferFails() (gas: 175040)
|
||||
StakeTest:test_StakeWithLockBonusMP() (gas: 2023009)
|
||||
StakeTest:test_StakeWithoutLockUpTimeMintsMultiplierPoints() (gas: 1028803)
|
||||
StakeTest:test_RevertWhen_InvalidLockupPeriod() (gas: 1084628)
|
||||
StakeTest:test_RevertWhen_Restake() (gas: 1320817)
|
||||
StakeTest:test_RevertWhen_RestakeWithLock() (gas: 1324854)
|
||||
StakeTest:test_RevertWhen_SenderIsNotVault() (gas: 32018)
|
||||
StakeTest:test_RevertWhen_StakeIsTooLow() (gas: 819736)
|
||||
StakeTest:test_RevertWhen_StakeTokenTransferFails() (gas: 211363)
|
||||
StakeTest:test_StakeWithLockBonusMP() (gas: 2363509)
|
||||
StakeTest:test_StakeWithoutLockUpTimeMintsMultiplierPoints() (gas: 1325221)
|
||||
StakedTokenTest:testStakeToken() (gas: 7616)
|
||||
UnstakeTest:testDeployment() (gas: 28742)
|
||||
UnstakeTest:test_RevertWhen_AmountMoreThanBalance() (gas: 1132893)
|
||||
UnstakeTest:test_RevertWhen_FundsLocked() (gas: 1158045)
|
||||
UnstakeTest:test_RevertWhen_SenderIsNotVault() (gas: 10653)
|
||||
UnstakeTest:test_UnstakeShouldBurnMultiplierPoints() (gas: 5535329)
|
||||
UnstakeTest:test_UnstakeShouldReturnFund_NoLockUp() (gas: 1026305)
|
||||
UnstakeTest:test_UnstakeShouldReturnFund_WithLockUp() (gas: 1113953)
|
||||
UnstakeTest:test_RevertWhen_AmountMoreThanBalance() (gas: 1301377)
|
||||
UnstakeTest:test_RevertWhen_FundsLocked() (gas: 1348133)
|
||||
UnstakeTest:test_RevertWhen_SenderIsNotVault() (gas: 31857)
|
||||
UnstakeTest:test_UnstakeShouldBurnMultiplierPoints() (gas: 7409934)
|
||||
UnstakeTest:test_UnstakeShouldReturnFund_NoLockUp() (gas: 1322723)
|
||||
UnstakeTest:test_UnstakeShouldReturnFund_WithLockUp() (gas: 1422611)
|
||||
UserFlowsTest:testDeployment() (gas: 28720)
|
||||
UserFlowsTest:test_PendingMPToBeMintedCannotBeGreaterThanTotalSupplyMP(uint8) (runs: 101, μ: 65588077, ~: 26417145)
|
||||
UserFlowsTest:test_StakeWithLockUpTimeLocksStake() (gas: 1114841)
|
||||
UserFlowsTest:test_StakedSupplyShouldIncreaseAndDecreaseAgain() (gas: 1950367)
|
||||
UserFlowsTest:test_PendingMPToBeMintedCannotBeGreaterThanTotalSupplyMP(uint8) (runs: 101, μ: 80806306, ~: 32532337)
|
||||
UserFlowsTest:test_StakeWithLockUpTimeLocksStake() (gas: 1465703)
|
||||
UserFlowsTest:test_StakedSupplyShouldIncreaseAndDecreaseAgain() (gas: 2501869)
|
||||
VaultFactoryTest:testDeployment() (gas: 9774)
|
135
README.md
135
README.md
|
@ -1,4 +1,4 @@
|
|||
# SNT Staking contracts [![Github Actions][gha-badge]][gha] [![Codecov][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry]
|
||||
# @logos-co/staking[![Github Actions][gha-badge]][gha] [![Codecov][codecov-badge]][codecov] [![Foundry][foundry-badge]][foundry]
|
||||
|
||||
[gha]: https://github.com/logos-co/staking/actions
|
||||
[gha-badge]: https://github.com/logos-co/staking/actions/workflows/ci.yml/badge.svg
|
||||
|
@ -7,96 +7,50 @@
|
|||
[foundry]: https://getfoundry.sh/
|
||||
[foundry-badge]: https://img.shields.io/badge/Built%20with-Foundry-FFDB1C.svg
|
||||
|
||||
A Foundry-based template for developing Solidity smart contracts, with sensible defaults.
|
||||
## Overview
|
||||
|
||||
This is a fork of [PaulRBerg's template](https://github.com/PaulRBerg/foundry-template) and adjusted to Vac's smart
|
||||
contracts unit's needs. See [Upstream differences](#upstream-differences) to learn more about how this template differs
|
||||
from Paul's.
|
||||
This project is a smart contract system built for secure token staking and reward management on the Ethereum blockchain. It provides essential components for handling staking operations, managing rewards, and ensuring the security of staked assets. The system is designed to be robust, leveraging mathematical precision for reward calculations and secure vaults for asset protection.
|
||||
|
||||
## What's Inside
|
||||
### Key Components
|
||||
|
||||
- [Forge](https://github.com/foundry-rs/foundry/blob/master/forge): compile, test, fuzz, format, and deploy smart
|
||||
contracts
|
||||
- [Forge Std](https://github.com/foundry-rs/forge-std): collection of helpful contracts and cheatcodes for testing
|
||||
- [Solhint Community](https://github.com/solhint-community/solhint-community): linter for Solidity code
|
||||
|
||||
## Getting Started
|
||||
|
||||
Click the [`Use this template`](https://github.com/vacp2p/foundry-template/generate) button at the top of the page to
|
||||
create a new repository with this repo as the initial state.
|
||||
|
||||
Or, if you prefer to install the template manually:
|
||||
|
||||
```sh
|
||||
$ mkdir my-project
|
||||
$ cd my-project
|
||||
$ forge init --template vacp2p/foundry-template
|
||||
$ pnpm install # install Solhint, Prettier, and other Node.js deps
|
||||
```
|
||||
|
||||
If this is your first time with Foundry, check out the
|
||||
[installation](https://github.com/foundry-rs/foundry#installation) instructions.
|
||||
- **StakeManager**: This contract handles the core staking operations. It is responsible for managing the staking process, calculating rewards, and tracking expired staking periods using advanced mathematical calculations. The contract utilizes OpenZeppelin’s ERC20 and math utilities to ensure accuracy and security.
|
||||
- **StakeVault**: This contract is responsible for securing user stakes. It facilitates the interactions between users and the staking system by ensuring that staked tokens are properly managed. The vault communicates with StakeManager to handle staking and unstaking operations while ensuring the safety of funds.
|
||||
|
||||
## Features
|
||||
|
||||
This template builds upon the frameworks and libraries mentioned above, so for details about their specific features,
|
||||
please consult their respective documentation.
|
||||
- **Secure Staking**: Users can stake tokens securely, with all interactions governed by the StakeVault and managed by StakeManager. StakeVault is actually owned by the user, and is the only account allowed to perform actions on it, where it store the staked tokens. StakeVault recognizes the validity of the StakeVault codehash to allow interacting with it, knowing that the code actually holds the tokens when it should.
|
||||
- **Reward Estimation**: The system provides accurate reward estimation, using mathematical formulas to calculate earnings based on staking time and amount.
|
||||
- **Management of Expired Stakes**: StakeManager tracks and manages expired staking periods, allowing for the efficient handling of staking cycles.
|
||||
- **Integration with ERC20 Tokens**: Built on top of the OpenZeppelin ERC20 token standard, the system ensures compatibility with any ERC20-compliant token.
|
||||
|
||||
For example, if you're interested in exploring Foundry in more detail, you should look at the
|
||||
[Foundry Book](https://book.getfoundry.sh/). In particular, you may be interested in reading the
|
||||
[Writing Tests](https://book.getfoundry.sh/forge/writing-tests.html) tutorial.
|
||||
## Installation
|
||||
|
||||
### Upstream differences
|
||||
To install the dependencies for this project, run the following command:
|
||||
|
||||
As mentioned above, this template is a fork with adjustments specific to the needs of Vac's smart contract service unit.
|
||||
These differences are:
|
||||
|
||||
- **Removal of [PRBTest](https://github.com/PaulRBerg/prb-test)** - In an attempt to keep dependence on third-party code
|
||||
low, we've decided to remove this library as a standard dependency of every project within Vac. If we do see a need
|
||||
for it, we might bring it back in the future.
|
||||
- \*\*`PROPERTIES.md` - For invariant testing and formal verification, we've introduced a `PROPERTIES.md` to document
|
||||
all protocol properties that must hold true.
|
||||
|
||||
### Sensible Defaults
|
||||
|
||||
This template comes with a set of sensible default configurations for you to use. These defaults can be found in the
|
||||
following files:
|
||||
|
||||
```text
|
||||
├── .editorconfig
|
||||
├── .gitignore
|
||||
├── .prettierignore
|
||||
├── .prettierrc.yml
|
||||
├── .solhint.json
|
||||
├── foundry.toml
|
||||
├── remappings.txt
|
||||
└── slither.config.json
|
||||
```bash
|
||||
pnpm install
|
||||
```
|
||||
|
||||
### VSCode Integration
|
||||
|
||||
This template is IDE agnostic, but for the best user experience, you may want to use it in VSCode alongside Nomic
|
||||
Foundation's [Solidity extension](https://marketplace.visualstudio.com/items?itemName=NomicFoundation.hardhat-solidity).
|
||||
|
||||
For guidance on how to integrate a Foundry project in VSCode, please refer to this
|
||||
[guide](https://book.getfoundry.sh/config/vscode).
|
||||
|
||||
### GitHub Actions
|
||||
|
||||
This template comes with GitHub Actions pre-configured. Your contracts will be linted and tested on every push and pull
|
||||
request made to the `main` branch.
|
||||
|
||||
You can edit the CI script in [.github/workflows/ci.yml](./.github/workflows/ci.yml).
|
||||
|
||||
## Writing Tests
|
||||
|
||||
If you would like to view the logs in the terminal output you can add the `-vvv` flag and use
|
||||
[console.log](https://book.getfoundry.sh/faq?highlight=console.log#how-do-i-use-consolelog).
|
||||
|
||||
This template comes with an example test contract [Foo.t.sol](./test/Foo.t.sol)
|
||||
|
||||
## Usage
|
||||
|
||||
### Staking Tokens
|
||||
|
||||
To stake tokens, the `StakeVault` contract interacts with the `StakeManager`. You can call the `stake` function from StakeVault with the desired amount and duration.
|
||||
|
||||
```solidity
|
||||
function stake(uint256 _amount, uint256 _time) external onlyOwner;
|
||||
```
|
||||
|
||||
### Managing Rewards
|
||||
|
||||
Rewards are calculated based on the staking period and amount. `StakeManager` provides functions to manage and track the reward process.
|
||||
|
||||
### Security
|
||||
|
||||
The system is designed to protect staked tokens and ensure users’ assets remain safe throughout the staking process.
|
||||
|
||||
## Development
|
||||
|
||||
This is a list of the most frequently needed commands.
|
||||
|
||||
### Build
|
||||
|
@ -158,7 +112,13 @@ $ forge fmt
|
|||
Get a gas report:
|
||||
|
||||
```sh
|
||||
$ forge test --gas-report
|
||||
pnpm gas-report
|
||||
```
|
||||
|
||||
Get a gas snapshot:
|
||||
|
||||
```bash
|
||||
forge snapshot
|
||||
```
|
||||
|
||||
### Lint
|
||||
|
@ -177,20 +137,13 @@ Run the tests:
|
|||
$ forge test
|
||||
```
|
||||
|
||||
## Notes
|
||||
#### Prepare to commit
|
||||
|
||||
1. Foundry uses [git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) to manage dependencies. For
|
||||
detailed instructions on working with dependencies, please refer to the
|
||||
[guide](https://book.getfoundry.sh/projects/dependencies.html) in the book
|
||||
2. You don't have to create a `.env` file, but filling in the environment variables may be useful when debugging and
|
||||
testing against a fork.
|
||||
Formats, generates snapshot and gas report:
|
||||
|
||||
## Related Efforts
|
||||
|
||||
- [abigger87/femplate](https://github.com/abigger87/femplate)
|
||||
- [cleanunicorn/ethereum-smartcontract-template](https://github.com/cleanunicorn/ethereum-smartcontract-template)
|
||||
- [foundry-rs/forge-template](https://github.com/foundry-rs/forge-template)
|
||||
- [FrankieIsLost/forge-template](https://github.com/FrankieIsLost/forge-template)
|
||||
```sh
|
||||
pnpm run adorno
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
|
|
23
package.json
23
package.json
|
@ -1,8 +1,15 @@
|
|||
{
|
||||
"name": "@logos-co/staking",
|
||||
"description": "SNT staking contracts",
|
||||
"description": "Smart contract system for secure token staking, reward estimation, and stake management on the Ethereum blockchain.",
|
||||
"version": "0.1.0",
|
||||
"author": {},
|
||||
"author": {
|
||||
"name": "Institute of Free Technology",
|
||||
"url": "https://free.technology/",
|
||||
"email": "info@free.technology"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.0.0",
|
||||
"solhint-community": "^3.6.0",
|
||||
|
@ -11,6 +18,7 @@
|
|||
"keywords": [
|
||||
"blockchain",
|
||||
"ethereum",
|
||||
"staking",
|
||||
"forge",
|
||||
"foundry",
|
||||
"smart-contracts",
|
||||
|
@ -25,12 +33,19 @@
|
|||
"lint:sol": "forge fmt --check && pnpm solhint {script,src,test,certora}/**/*.sol",
|
||||
"prettier:check": "prettier --check **/*.{json,md,yml} --ignore-path=.prettierignore",
|
||||
"prettier:write": "prettier --write **/*.{json,md,yml} --ignore-path=.prettierignore",
|
||||
"gas-report": "forge test --gas-report 2>&1 | (tee /dev/tty | awk '/Suite result:/ {found=1; buffer=\"\"; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf \"%s\", buffer}' > .gas-report)",
|
||||
"gas-report": "forge snapshot --gas-report 2>&1 | (tee /dev/stderr | awk '/Suite result:/ {found=1; buffer=\"\"; next} found && !/Ran/ {buffer=buffer $0 ORS} /Ran/ {found=0} END {printf \"%s\", buffer}' > .gas-report)",
|
||||
"verify:stake_vault": "certoraRun certora/confs/StakeVault.conf",
|
||||
"verify:stake_manager": "certoraRun certora/confs/StakeManager.conf",
|
||||
"verify:stake_manager_start_migration": "certoraRun certora/confs/StakeManagerStartMigration.conf",
|
||||
"verify:stake_manager_process": "certoraRun certora/confs/StakeManagerProcess.conf",
|
||||
"release": "commit-and-tag-version",
|
||||
"adorno": "pnpm prettier:write && forge fmt && forge snapshot && pnpm gas-report"
|
||||
"adorno": "pnpm prettier:write && forge fmt && pnpm gas-report"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/logos-co/staking.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/logos-co/staking/issues"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue