-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update StakingContractMainnet to support vault tokens (#11)
* add incentive flag for rounding down rewards * move reward rounding logic to claim handler * add unit test * preserve reward delta * add comments * update deploy script * feat: add batch subscription (#12) * feat: add NftVaultManager (#13) * feat: add NftVaultManager * add NftVaultManager deploy script * feat: add depositBatch to NftVaultManager --------- Co-authored-by: Alec Ananian <[email protected]> * rerun fmt after rebase * fix unit tests failing with too many rejects * run ci * add `isRewardRounded` to `IncentiveCreated` event --------- Co-authored-by: crisis <[email protected]> Co-authored-by: Mark Vujevits <[email protected]>
- Loading branch information
1 parent
489fbf5
commit 0be154f
Showing
12 changed files
with
510 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: test | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
||
jobs: | ||
foundry: | ||
strategy: | ||
fail-fast: true | ||
|
||
name: Foundry project | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test -vvv | ||
id: forge-test | ||
|
||
- name: Forge style | ||
run: | | ||
forge fmt --check |
49 changes: 49 additions & 0 deletions
49
broadcast/StakingContract.s.sol/421614/run-1728531911.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity >=0.8.13; | ||
|
||
import "forge-std/Script.sol"; | ||
import "../src/Vault/NftVaultManager.sol"; | ||
|
||
contract NftVaultManagerScript is Script { | ||
function run() public { | ||
vm.startBroadcast(); | ||
|
||
new NftVaultManager(); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.