Skip to content

Commit

Permalink
FORTA-1057: Update delegation fee effectiveness (#240)
Browse files Browse the repository at this point in the history
* Update delegation fee - live after two epochs

* Update registries of deployed addresses

* Update to create proposal for DEV

* Update registries of deployed addresses

* Update rewards test to not skip some tests

* Create another PROD proposal

* Comment out steps on workflow

* Add test case for updating delegation params

* Update release to call setter for delegation fee delay

* Update update.json to not redeploy Rewards contract

* Revert name change; need to update, but wont redeploy

* Update index.yml to create DEV proposal

* Revert name of upgrade.json

* Comment out workflow steps

* Enable code coverage workflow step

---------

Co-authored-by: RCantu92 <[email protected]>
  • Loading branch information
RCantu92 and RCantu92 authored Nov 9, 2023
1 parent bbb2cea commit 3211fd3
Show file tree
Hide file tree
Showing 12 changed files with 799 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
name: Test release
if: startsWith(github.head_ref, 'release/')
runs-on: ubuntu-22.04
# timeout-minutes: 20
# timeout-minutes: 20
needs: build
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
# name: Prepare release
# if: startsWith(github.head_ref, 'release/')
# runs-on: ubuntu-22.04
# needs: test
# needs: coverage
# outputs:
# release_version: ${{ steps.parse.outputs.release_version }}
# release_path: ${{ steps.parse.outputs.release_path }}
Expand Down
334 changes: 334 additions & 0 deletions .openzeppelin/polygon-mumbai.json
Original file line number Diff line number Diff line change
Expand Up @@ -25722,6 +25722,340 @@
}
}
}
},
"ee056803b5a4e87acdb3b4a55599aa7a202ed955d094e623f22b477059d0bb27": {
"address": "0xaFd709C47646aDf5A098532b50880077465F3235",
"txHash": "0x025bc1a95a93f618e61562475e2577b05f1e5c0a2506e01b907323d0efe6c3e8",
"layout": {
"solcVersion": "0.8.9",
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "__gap",
"offset": 0,
"slot": "1",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_accessControl",
"offset": 0,
"slot": "51",
"type": "t_contract(IAccessControl)15000",
"contract": "AccessManagedUpgradeable",
"src": "contracts/components/utils/AccessManaged.sol:16"
},
{
"label": "__gap",
"offset": 0,
"slot": "52",
"type": "t_array(t_uint256)49_storage",
"contract": "AccessManagedUpgradeable",
"src": "contracts/components/utils/AccessManaged.sol:68"
},
{
"label": "_deprecated_router",
"offset": 0,
"slot": "101",
"type": "t_address",
"contract": "RoutedUpgradeable",
"src": "contracts/components/utils/Routed.sol:16",
"retypedFrom": "contract IRouter",
"renamedFrom": "_router"
},
{
"label": "__gap",
"offset": 0,
"slot": "102",
"type": "t_array(t_uint256)49_storage",
"contract": "RoutedUpgradeable",
"src": "contracts/components/utils/Routed.sol:35"
},
{
"label": "__gap",
"offset": 0,
"slot": "151",
"type": "t_array(t_uint256)50_storage",
"contract": "ERC1967UpgradeUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211"
},
{
"label": "__gap",
"offset": 0,
"slot": "201",
"type": "t_array(t_uint256)50_storage",
"contract": "UUPSUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107"
},
{
"label": "__gap",
"offset": 0,
"slot": "251",
"type": "t_array(t_uint256)50_storage",
"contract": "BaseComponentUpgradeable",
"src": "contracts/components/BaseComponentUpgradeable.sol:62"
},
{
"label": "unclaimedRewards",
"offset": 0,
"slot": "301",
"type": "t_uint256",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:36"
},
{
"label": "_rewardsAccumulators",
"offset": 0,
"slot": "302",
"type": "t_mapping(t_uint256,t_struct(DelegatedAccRewards)128442_storage)",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:38"
},
{
"label": "rewardsPerEpoch",
"offset": 0,
"slot": "303",
"type": "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:40"
},
{
"label": "rewardedEpochs",
"offset": 0,
"slot": "304",
"type": "t_mapping(t_uint256,t_mapping(t_uint256,t_bool))",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:42"
},
{
"label": "claimedRewardsPerEpoch",
"offset": 0,
"slot": "305",
"type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:44"
},
{
"label": "delegationFees",
"offset": 0,
"slot": "306",
"type": "t_mapping(t_uint256,t_array(t_struct(DelegationFee)128474_storage)2_storage)",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:51"
},
{
"label": "delegationParamsEpochDelay",
"offset": 0,
"slot": "307",
"type": "t_uint256",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:53"
},
{
"label": "defaultFeeBps",
"offset": 0,
"slot": "308",
"type": "t_uint256",
"contract": "RewardsDistributor",
"src": "contracts/components/staking/rewards/RewardsDistributor.sol:54"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_struct(DelegationFee)128474_storage)2_storage": {
"label": "struct RewardsDistributor.DelegationFee[2]",
"numberOfBytes": "64"
},
"t_array(t_struct(EpochCheckpoint)127855_storage)dyn_storage": {
"label": "struct Accumulators.EpochCheckpoint[]",
"numberOfBytes": "32"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_contract(IAccessControl)15000": {
"label": "contract IAccessControl",
"numberOfBytes": "20"
},
"t_mapping(t_address,t_bool)": {
"label": "mapping(address => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_struct(Accumulator)127860_storage)": {
"label": "mapping(address => struct Accumulators.Accumulator)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_array(t_struct(DelegationFee)128474_storage)2_storage)": {
"label": "mapping(uint256 => struct RewardsDistributor.DelegationFee[2])",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_bool)": {
"label": "mapping(uint256 => bool)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_mapping(t_address,t_bool))": {
"label": "mapping(uint256 => mapping(address => bool))",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_mapping(t_uint256,t_bool))": {
"label": "mapping(uint256 => mapping(uint256 => bool))",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": {
"label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))": {
"label": "mapping(uint256 => mapping(uint256 => uint256))",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_struct(DelegatedAccRewards)128442_storage)": {
"label": "mapping(uint256 => struct RewardsDistributor.DelegatedAccRewards)",
"numberOfBytes": "32"
},
"t_mapping(t_uint256,t_uint256)": {
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32"
},
"t_struct(Accumulator)127860_storage": {
"label": "struct Accumulators.Accumulator",
"members": [
{
"label": "checkpoints",
"type": "t_array(t_struct(EpochCheckpoint)127855_storage)dyn_storage",
"offset": 0,
"slot": "0"
}
],
"numberOfBytes": "32"
},
"t_struct(DelegatedAccRewards)128442_storage": {
"label": "struct RewardsDistributor.DelegatedAccRewards",
"members": [
{
"label": "delegated",
"type": "t_struct(Accumulator)127860_storage",
"offset": 0,
"slot": "0"
},
{
"label": "delegators",
"type": "t_struct(Accumulator)127860_storage",
"offset": 0,
"slot": "1"
},
{
"label": "delegatorsTotal",
"type": "t_struct(Accumulator)127860_storage",
"offset": 0,
"slot": "2"
},
{
"label": "delegatorsPortions",
"type": "t_mapping(t_address,t_struct(Accumulator)127860_storage)",
"offset": 0,
"slot": "3"
}
],
"numberOfBytes": "128"
},
"t_struct(DelegationFee)128474_storage": {
"label": "struct RewardsDistributor.DelegationFee",
"members": [
{
"label": "feeBps",
"type": "t_uint16",
"offset": 0,
"slot": "0"
},
{
"label": "sinceEpoch",
"type": "t_uint240",
"offset": 2,
"slot": "0"
}
],
"numberOfBytes": "32"
},
"t_struct(EpochCheckpoint)127855_storage": {
"label": "struct Accumulators.EpochCheckpoint",
"members": [
{
"label": "timestamp",
"type": "t_uint32",
"offset": 0,
"slot": "0"
},
{
"label": "rate",
"type": "t_uint224",
"offset": 4,
"slot": "0"
},
{
"label": "value",
"type": "t_uint256",
"offset": 0,
"slot": "1"
}
],
"numberOfBytes": "64"
},
"t_uint16": {
"label": "uint16",
"numberOfBytes": "2"
},
"t_uint224": {
"label": "uint224",
"numberOfBytes": "28"
},
"t_uint240": {
"label": "uint240",
"numberOfBytes": "30"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint32": {
"label": "uint32",
"numberOfBytes": "4"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
Loading

0 comments on commit 3211fd3

Please sign in to comment.