Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewards V2 implementation #843

Open
wants to merge 55 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2e26fd5
Stage version of Rewards V2
dmitriy-woof-software Apr 10, 2024
1acffe7
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Oct 9, 2024
401582d
feat: post audit fixes
MishaShWoof Oct 11, 2024
c3a511d
fix: types
MishaShWoof Oct 11, 2024
8291a94
fix: sort
MishaShWoof Oct 11, 2024
456f208
create logic to generate and save merkle tree for rewards V2
dmitriy-woof-software Oct 29, 2024
bc5fabf
add chunks into multicall. add generated example
dmitriy-woof-software Oct 29, 2024
fc0cab9
fix: fixes after reaudit
MishaShWoof Nov 1, 2024
c459bbd
add workflow for CometRewardsV2
vitalii-woof-software Nov 4, 2024
efe84f9
Merge branch 'compound-finance:main' into woof-software/rewards-v2-me…
vitalii-woof-software Nov 4, 2024
e4f8021
Update create-rewards-v2-campaign.yaml
vitalii-woof-software Nov 5, 2024
2bead50
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Nov 6, 2024
2a10126
Merge branch 'woof-software/rewards-v2-merkle-tree-generation-script'…
MishaShWoof Nov 6, 2024
5e965e5
wip: scenarios
MishaShWoof Nov 12, 2024
a7c3bca
wip
MishaShWoof Nov 12, 2024
271bb21
wip: add new scenario
MishaShWoof Nov 14, 2024
3f8aff1
wip: cover finish root
MishaShWoof Nov 15, 2024
1b5f6ae
feat: scenarios
MishaShWoof Nov 18, 2024
0eef681
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
MishaShWoof Nov 18, 2024
007f201
fix: first review
MishaShWoof Nov 20, 2024
48d7010
fix: typos
MishaShWoof Nov 21, 2024
d8127e9
feat: workflow and script for multiplier
MishaShWoof Nov 21, 2024
9b21c64
add migration for CometRewardsV2
vitalii-woof-software Nov 22, 2024
8988638
Merge branch 'woof-software/rewards-v2-multiple-rewards' of github.co…
vitalii-woof-software Nov 22, 2024
efd072e
fix: scenario and script fixes
MishaShWoof Nov 22, 2024
350ad27
Merge branch 'woof-software/rewards-v2-multiple-rewards' of https://g…
MishaShWoof Nov 22, 2024
d732422
Merge branch 'main' of github.com:woof-software/comet into woof-softw…
dmitriy-woof-software Nov 22, 2024
d1dd7f7
Merge branch 'woof-software/rewards-v2-multiple-rewards' of github.co…
dmitriy-woof-software Nov 22, 2024
1bded73
feat: migrations and multicall fix
MishaShWoof Nov 22, 2024
a8efe60
Merge branch 'woof-software/rewards-v2-multiple-rewards' of https://g…
MishaShWoof Nov 22, 2024
1001039
feat: update generation script
dmitriy-woof-software Nov 22, 2024
e1b9003
Merge branch 'woof-software/rewards-v2-multiple-rewards' of github.co…
dmitriy-woof-software Nov 22, 2024
bcec7f6
feat: add smart contract and script documentation
dmitriy-woof-software Nov 22, 2024
e826973
update script documentation
dmitriy-woof-software Nov 22, 2024
df9d19f
update script documentation
dmitriy-woof-software Nov 22, 2024
cb59418
feat: add user in campaign verification script
dmitriy-woof-software Nov 23, 2024
e42384c
feat: add retry for tree generation script
dmitriy-woof-software Nov 23, 2024
39cf898
remove comment
dmitriy-woof-software Nov 23, 2024
5358d33
run linter
dmitriy-woof-software Nov 23, 2024
b028b11
fix: update migrations
MishaShWoof Nov 24, 2024
5f26422
fix: update scenario and migrations
MishaShWoof Nov 25, 2024
79ec998
fix: clean up
MishaShWoof Nov 25, 2024
1897e53
fix
MishaShWoof Nov 26, 2024
bba83b2
feat: update docs
MishaShWoof Nov 26, 2024
c0cc701
feat: new docs
MishaShWoof Nov 27, 2024
58eb0ff
feat: add test deployment to the doc
MishaShWoof Nov 27, 2024
bc45eb8
fix: noNetwork and scenario fix
MishaShWoof Nov 28, 2024
eb740ca
fix: retry fix
MishaShWoof Nov 29, 2024
e1c4e4d
fix: scenario fixes
MishaShWoof Dec 1, 2024
6d28fdf
feat: new campaigns
MishaShWoof Dec 1, 2024
ac242a8
fix
MishaShWoof Dec 2, 2024
e641f95
fix: no network issue resolved
MishaShWoof Dec 13, 2024
0f26863
Merge branch 'woof-software/fix-to-no-network' of github.com:woof-sof…
MishaShWoof Dec 14, 2024
bf64a5a
fix: tsc
MishaShWoof Dec 17, 2024
27443c2
fix: linter
MishaShWoof Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
plugins/scenario/worker/BootstrapWorker.js
plugins/deployment_manager/test/SolcList.json
scripts/build-spec.js
scripts/build-spec.js
*.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Calculate multiplier for RewardsV2 Campaign
on:
workflow_dispatch:
inputs:
network:
type: choice
description: Network
options:
- fuji
- mainnet
- goerli
- sepolia
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
- base
- base-goerli
- linea-goerli
- optimism
- scroll-goerli
- scroll
required: true
deployment:
description: Deployment Name (e.g. "usdc", "weth")
required: true
duration:
description: Duration in seconds
required: true
amount:
description: Amount in tokens (e.g. 1, 100, 1000)
required: true
jobs:
calculate-multiplier-for-rewards-v2-campaign:
name: Calculate multiplier for RewardsV2 Campaign
runs-on: ubuntu-latest
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
QUICKNODE_KEY: ${{ secrets.QUICKNODE_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
BASESCAN_KEY: ${{ secrets.BASESCAN_KEY }}
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '16'

- name: Install packages
run: yarn install --non-interactive --frozen-lockfile

- name: Compile
run: yarn hardhat compile

- name: Check types
run: yarn tsc

- name: Run Calculate Multiplier for RewardsV2 Campaign
run: yarn hardhat calculateMultiplier --network ${{ github.event.inputs.network }} --deployment ${{ github.event.inputs.deployment }} --duration ${{ github.event.inputs.duration }} --amount ${{ github.event.inputs.amount }}
73 changes: 73 additions & 0 deletions .github/workflows/create-rewards-v2-campaign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Create RewardsV2 Campaign
on:
workflow_dispatch:
inputs:
network:
type: choice
description: Network
options:
- fuji
- mainnet
- goerli
- sepolia
- mumbai
- polygon
- arbitrum
- arbitrum-goerli
- base
- base-goerli
- linea-goerli
- optimism
- scroll-goerli
- scroll
deployment:
description: Deployment Name (e.g. "usdc")
required: true
root_type:
type: choice
description: Root type
options:
- start
- finish
block_number:
description: Enter block number or current block will be used
jobs:
create-rewards-v2-campaign:
name: Create RewardsV2 Campaign
runs-on: ubuntu-latest
env:
ETHERSCAN_KEY: ${{ secrets.ETHERSCAN_KEY }}
SNOWTRACE_KEY: ${{ secrets.SNOWTRACE_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
QUICKNODE_KEY: ${{ secrets.QUICKNODE_KEY }}
POLYGONSCAN_KEY: ${{ secrets.POLYGONSCAN_KEY }}
ARBISCAN_KEY: ${{ secrets.ARBISCAN_KEY }}
BASESCAN_KEY: ${{ secrets.BASESCAN_KEY }}
LINEASCAN_KEY: ${{ secrets.LINEASCAN_KEY }}
OPTIMISMSCAN_KEY: ${{ secrets.OPTIMISMSCAN_KEY }}
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '16'

- name: Install packages
run: yarn install --non-interactive --frozen-lockfile

- name: Compile
run: yarn hardhat compile

- name: Check types
run: yarn tsc

- name: Run rewards-v2 script
run: yarn hardhat generateMerkleTree --network ${{ github.event.inputs.network }} --deployment ${{ github.event.inputs.deployment }} --type ${{ github.event.inputs.root_type }} --blocknumber ${{ github.event.inputs.block_number }}
- name: Commit changes
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add campaigns/
git commit -m "Generated Merkle tree for ${{ github.event.inputs.root_type }} of campaign with deployment: ${{ github.event.inputs.network }}-${{ github.event.inputs.deployment }}" || echo "No changes to commit"
git push origin
9 changes: 7 additions & 2 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
skipFiles: ['test/', 'vendor/', 'ERC20.sol']
};
configureYulOptimizer: true, // (Experimental). Should resolve 'stack too deep' in projects using ABIEncoderV2.
skipFiles: ['test/', 'vendor/', 'ERC20.col'],
mocha: {
fgrep: '[skip-on-coverage]',
invert: true
}
};
Loading