-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from aboutcircles/rc-v0.3.6
Rc v0.3.6
- Loading branch information
Showing
34 changed files
with
280 additions
and
123 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
...3.6-alpha-6641047-240829-201137/chiado-artefacts-rc-0.3.6-alpha-6641047-240829-201137.txt
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,9 @@ | ||
{"contractName":"Hub","deployedAddress":"0xb80feeDfEce647dDc709777D5094fACD157BA001","sourcePath":"src/hub/Hub.sol:Hub","constructor-args":"0xdbF22D4e8962Db3b2F1d9Ff55be728A887e47710 0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E 0x12E815963A0b910288C7256CAD0d345c8F5db08E 0xBD2D6Fbb6A702B04B750Bc9942fBaAE81187355E 0xC06ADED7950429FdF2023e139B076f6BaFf9Fe1C 1675209600 31540000 https://gateway.aboutcircles.com/v1/circles/{id}.json","argumentsFile":"constructorArgs_Hub.txt"} | ||
{"contractName":"Migration","deployedAddress":"0x12E815963A0b910288C7256CAD0d345c8F5db08E","sourcePath":"src/migration/Migration.sol:Migration","constructor-args":"0xdbF22D4e8962Db3b2F1d9Ff55be728A887e47710 0xb80feeDfEce647dDc709777D5094fACD157BA001 1675209600","argumentsFile":"constructorArgs_Migration.txt"} | ||
{"contractName":"NameRegistry","deployedAddress":"0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E","sourcePath":"src/names/NameRegistry.sol:NameRegistry","constructor-args":"0xb80feeDfEce647dDc709777D5094fACD157BA001","argumentsFile":"constructorArgs_NameRegistry.txt"} | ||
{"contractName":"ERC20Lift","deployedAddress":"0xBD2D6Fbb6A702B04B750Bc9942fBaAE81187355E","sourcePath":"src/lift/ERC20Lift.sol:ERC20Lift","constructor-args":"0xb80feeDfEce647dDc709777D5094fACD157BA001 0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E 0xe7ef9F22107C5A55033c4C73595e64c9b3155b46 0x4b5bF5436dA471BECF73a7832481431AE257c6bF","argumentsFile":"constructorArgs_ERC20Lift.txt"} | ||
{"contractName":"StandardTreasury","deployedAddress":"0xC06ADED7950429FdF2023e139B076f6BaFf9Fe1C","sourcePath":"src/treasury/StandardTreasury.sol:StandardTreasury","constructor-args":"0xb80feeDfEce647dDc709777D5094fACD157BA001 0x1be5E03E44CeD1018977510d6Ad55f8D1259a039","argumentsFile":"constructorArgs_StandardTreasury.txt"} | ||
{"contractName":"BaseGroupMintPolicy","deployedAddress":"0xE35c66531aF28660a1CdfA3dd0b1C1C0245D2F67","sourcePath":"src/groups/BaseMintPolicy.sol:MintPolicy","constructor-args":"","argumentsFile":"constructorArgs_BaseGroupMintPolicy.txt"} | ||
{"contractName":"MastercopyDemurrageERC20","deployedAddress":"0xe7ef9F22107C5A55033c4C73595e64c9b3155b46","sourcePath":"src/lift/DemurrageCircles.sol:DemurrageCircles","constructor-args":"","argumentsFile":"constructorArgs_MastercopyDemurrageERC20.txt"} | ||
{"contractName":"MastercopyInflationaryERC20","deployedAddress":"0x4b5bF5436dA471BECF73a7832481431AE257c6bF","sourcePath":"src/lift/InflationaryCircles.sol:InflationaryCircles","constructor-args":"","argumentsFile":"constructorArgs_MastercopyInflationaryERC20.txt"} | ||
{"contractName":"MastercopyStandardVault","deployedAddress":"0x1be5E03E44CeD1018977510d6Ad55f8D1259a039","sourcePath":"src/treasury/StandardVault.sol:StandardVault","constructor-args":"","argumentsFile":"constructorArgs_MastercopyStandardVault.txt"} |
18 changes: 18 additions & 0 deletions
18
...iado-rc-0.3.6-alpha-6641047-240829-201137/chiado-rc-0.3.6-alpha-6641047-240829-201137.log
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,18 @@ | ||
Chiado deployment | ||
================= | ||
Deployment Date: 2024-08-29 20:11:37 | ||
Version: rc-0.3.6-alpha | ||
Git Commit: 6641047a5751e46cf2129b6fbabc625ddc1eba72 | ||
Deployer Address: 0x7619F26728Ced663E50E578EB6ff42430931564c, Intitial nonce: 176 | ||
Compiler Version: v0.8.23+commit.f704f362 | ||
|
||
Deployed Contracts: | ||
Hub: 0xb80feeDfEce647dDc709777D5094fACD157BA001 | ||
Migration: 0x12E815963A0b910288C7256CAD0d345c8F5db08E | ||
NameRegistry: 0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E | ||
ERC20Lift: 0xBD2D6Fbb6A702B04B750Bc9942fBaAE81187355E | ||
StandardTreasury: 0xC06ADED7950429FdF2023e139B076f6BaFf9Fe1C | ||
BaseGroupMintPolicy: 0xE35c66531aF28660a1CdfA3dd0b1C1C0245D2F67 | ||
MastercopyDemurrageERC20: 0xe7ef9F22107C5A55033c4C73595e64c9b3155b46 | ||
MastercopyInflationaryERC20: 0x4b5bF5436dA471BECF73a7832481431AE257c6bF | ||
MastercopyStandardVault: 0x1be5E03E44CeD1018977510d6Ad55f8D1259a039 |
1 change: 1 addition & 0 deletions
1
...ments/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_BaseGroupMintPolicy.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
script/deployments/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_ERC20Lift.txt
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 @@ | ||
0xb80feeDfEce647dDc709777D5094fACD157BA001 0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E 0xe7ef9F22107C5A55033c4C73595e64c9b3155b46 0x4b5bF5436dA471BECF73a7832481431AE257c6bF |
1 change: 1 addition & 0 deletions
1
script/deployments/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_Hub.txt
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 @@ | ||
0xdbF22D4e8962Db3b2F1d9Ff55be728A887e47710 0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E 0x12E815963A0b910288C7256CAD0d345c8F5db08E 0xBD2D6Fbb6A702B04B750Bc9942fBaAE81187355E 0xC06ADED7950429FdF2023e139B076f6BaFf9Fe1C 1675209600 31540000 https://gateway.aboutcircles.com/v1/circles/{id}.json |
1 change: 1 addition & 0 deletions
1
.../chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_MastercopyDemurrageERC20.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...iado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_MastercopyInflationaryERC20.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...s/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_MastercopyStandardVault.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
script/deployments/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_Migration.txt
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 @@ | ||
0xdbF22D4e8962Db3b2F1d9Ff55be728A887e47710 0xb80feeDfEce647dDc709777D5094fACD157BA001 1675209600 |
1 change: 1 addition & 0 deletions
1
.../deployments/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_NameRegistry.txt
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 @@ | ||
0xb80feeDfEce647dDc709777D5094fACD157BA001 |
1 change: 1 addition & 0 deletions
1
...loyments/chiado-rc-0.3.6-alpha-6641047-240829-201137/constructorArgs_StandardTreasury.txt
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 @@ | ||
0xb80feeDfEce647dDc709777D5094fACD157BA001 0x1be5E03E44CeD1018977510d6Ad55f8D1259a039 |
1 change: 1 addition & 0 deletions
1
.../gnosischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_BaseGroupMintPolicy.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...eployments/gnosischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_ERC20Lift.txt
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 @@ | ||
0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da 0x738fFee24770d0DE1f912adf2B48b0194780E9AD 0x26fA0d8A877E6A6170E4613fA7Cb0359efdb985d 0x38A8d2A38A788A388D20210ff18847EF7e13eda5 |
1 change: 1 addition & 0 deletions
1
script/deployments/gnosischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_Hub.txt
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 @@ | ||
0x29b9a7fBb8995b2423a71cC17cf9810798F6C543 0x738fFee24770d0DE1f912adf2B48b0194780E9AD 0xe1dCE89512bE1AeDf94faAb7115A1Ba6AEff4201 0xB6B79BeEfd58cf33b298A456934554cf440354aD 0xbb76CF35ec106c5c7a447246257dcfCB7244cA04 1602720000 31540000 https://gateway.aboutcircles.com/v1/circles/{id}.json |
1 change: 1 addition & 0 deletions
1
...ischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_MastercopyDemurrageERC20.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...hain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_MastercopyInflationaryERC20.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...sischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_MastercopyStandardVault.txt
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 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...eployments/gnosischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_Migration.txt
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 @@ | ||
0x29b9a7fBb8995b2423a71cC17cf9810798F6C543 0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da 1602720000 |
1 change: 1 addition & 0 deletions
1
...oyments/gnosischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_NameRegistry.txt
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 @@ | ||
0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da |
1 change: 1 addition & 0 deletions
1
...nts/gnosischain-rc-0.3.6-alpha-6641047-240829-202221/constructorArgs_StandardTreasury.txt
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 @@ | ||
0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da 0x570E9D5472994543C5032c83538B41983cF4F90E |
9 changes: 9 additions & 0 deletions
9
...lpha-6641047-240829-202221/gnosischain-artefacts-rc-0.3.6-alpha-6641047-240829-202221.txt
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,9 @@ | ||
{"contractName":"Hub","deployedAddress":"0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da","sourcePath":"src/hub/Hub.sol:Hub","constructor-args":"0x29b9a7fBb8995b2423a71cC17cf9810798F6C543 0x738fFee24770d0DE1f912adf2B48b0194780E9AD 0xe1dCE89512bE1AeDf94faAb7115A1Ba6AEff4201 0xB6B79BeEfd58cf33b298A456934554cf440354aD 0xbb76CF35ec106c5c7a447246257dcfCB7244cA04 1602720000 31540000 https://gateway.aboutcircles.com/v1/circles/{id}.json","argumentsFile":"constructorArgs_Hub.txt"} | ||
{"contractName":"Migration","deployedAddress":"0xe1dCE89512bE1AeDf94faAb7115A1Ba6AEff4201","sourcePath":"src/migration/Migration.sol:Migration","constructor-args":"0x29b9a7fBb8995b2423a71cC17cf9810798F6C543 0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da 1602720000","argumentsFile":"constructorArgs_Migration.txt"} | ||
{"contractName":"NameRegistry","deployedAddress":"0x738fFee24770d0DE1f912adf2B48b0194780E9AD","sourcePath":"src/names/NameRegistry.sol:NameRegistry","constructor-args":"0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da","argumentsFile":"constructorArgs_NameRegistry.txt"} | ||
{"contractName":"ERC20Lift","deployedAddress":"0xB6B79BeEfd58cf33b298A456934554cf440354aD","sourcePath":"src/lift/ERC20Lift.sol:ERC20Lift","constructor-args":"0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da 0x738fFee24770d0DE1f912adf2B48b0194780E9AD 0x26fA0d8A877E6A6170E4613fA7Cb0359efdb985d 0x38A8d2A38A788A388D20210ff18847EF7e13eda5","argumentsFile":"constructorArgs_ERC20Lift.txt"} | ||
{"contractName":"StandardTreasury","deployedAddress":"0xbb76CF35ec106c5c7a447246257dcfCB7244cA04","sourcePath":"src/treasury/StandardTreasury.sol:StandardTreasury","constructor-args":"0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da 0x570E9D5472994543C5032c83538B41983cF4F90E","argumentsFile":"constructorArgs_StandardTreasury.txt"} | ||
{"contractName":"BaseGroupMintPolicy","deployedAddress":"0x5Ea08c967C69255d82a4d26e36823a720E7D0317","sourcePath":"src/groups/BaseMintPolicy.sol:MintPolicy","constructor-args":"","argumentsFile":"constructorArgs_BaseGroupMintPolicy.txt"} | ||
{"contractName":"MastercopyDemurrageERC20","deployedAddress":"0x26fA0d8A877E6A6170E4613fA7Cb0359efdb985d","sourcePath":"src/lift/DemurrageCircles.sol:DemurrageCircles","constructor-args":"","argumentsFile":"constructorArgs_MastercopyDemurrageERC20.txt"} | ||
{"contractName":"MastercopyInflationaryERC20","deployedAddress":"0x38A8d2A38A788A388D20210ff18847EF7e13eda5","sourcePath":"src/lift/InflationaryCircles.sol:InflationaryCircles","constructor-args":"","argumentsFile":"constructorArgs_MastercopyInflationaryERC20.txt"} | ||
{"contractName":"MastercopyStandardVault","deployedAddress":"0x570E9D5472994543C5032c83538B41983cF4F90E","sourcePath":"src/treasury/StandardVault.sol:StandardVault","constructor-args":"","argumentsFile":"constructorArgs_MastercopyStandardVault.txt"} |
18 changes: 18 additions & 0 deletions
18
...rc-0.3.6-alpha-6641047-240829-202221/gnosischain-rc-0.3.6-alpha-6641047-240829-202221.log
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,18 @@ | ||
Gnosis Chain deployment | ||
================= | ||
Deployment Date: 2024-08-29 20:22:21 | ||
Version: rc-0.3.6-alpha | ||
Git Commit: 6641047a5751e46cf2129b6fbabc625ddc1eba72 | ||
Deployer Address: 0x7619F26728Ced663E50E578EB6ff42430931564c, Initial nonce: 74 | ||
Compiler Version: v0.8.23+commit.f704f362 | ||
|
||
Deployed Contracts: | ||
Hub: 0xa5c7ADAE2fd3844f12D52266Cb7926f8649869Da | ||
Migration: 0xe1dCE89512bE1AeDf94faAb7115A1Ba6AEff4201 | ||
NameRegistry: 0x738fFee24770d0DE1f912adf2B48b0194780E9AD | ||
ERC20Lift: 0xB6B79BeEfd58cf33b298A456934554cf440354aD | ||
StandardTreasury: 0xbb76CF35ec106c5c7a447246257dcfCB7244cA04 | ||
BaseGroupMintPolicy: 0x5Ea08c967C69255d82a4d26e36823a720E7D0317 | ||
MastercopyDemurrageERC20: 0x26fA0d8A877E6A6170E4613fA7Cb0359efdb985d | ||
MastercopyInflationaryERC20: 0x38A8d2A38A788A388D20210ff18847EF7e13eda5 | ||
MastercopyStandardVault: 0x570E9D5472994543C5032c83538B41983cF4F90E |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
pragma solidity >=0.8.24; | ||
|
||
import "./Demurrage.sol"; | ||
|
||
contract BatchedDemurrage is Demurrage { | ||
/** | ||
* @notice Converts a batch of inflationary values to demurrage values for a given day since inflation_day_zero. | ||
* @param _inflationaryValues Batch of inflationary values to convert to demurrage values. | ||
* @param _day Day since inflation_day_zero to convert the inflationary values to demurrage values. | ||
*/ | ||
function convertBatchInflationaryToDemurrageValues(uint256[] memory _inflationaryValues, uint64 _day) | ||
public | ||
pure | ||
returns (uint256[] memory) | ||
{ | ||
// calculate the demurrage value by multiplying the value by GAMMA^days | ||
// note: same remark on precision as in convertInflationaryToDemurrageValue | ||
int128 r = Math64x64.pow(GAMMA_64x64, uint256(_day)); | ||
uint256[] memory demurrageValues = new uint256[](_inflationaryValues.length); | ||
for (uint256 i = 0; i < _inflationaryValues.length; i++) { | ||
demurrageValues[i] = Math64x64.mulu(r, _inflationaryValues[i]); | ||
} | ||
return demurrageValues; | ||
} | ||
|
||
/** | ||
* @notice Converts a batch of demurrage values to inflationary values for a given day since inflation_day_zero. | ||
* @param _demurrageValues Batch of demurrage values to convert to inflationary values. | ||
* @param _dayUpdated Day since inflation_day_zero to convert the demurrage values to inflationary values. | ||
*/ | ||
function convertBatchDemurrageToInflationaryValues(uint256[] memory _demurrageValues, uint64 _dayUpdated) | ||
public | ||
pure | ||
returns (uint256[] memory) | ||
{ | ||
// calculate the inflationary value by dividing the value by GAMMA^days | ||
// note: GAMMA < 1, so dividing by a power of it, returns a bigger number, | ||
// so the numerical imprecision is introduced the least significant bits. | ||
int128 f = Math64x64.pow(BETA_64x64, uint256(_dayUpdated)); | ||
uint256[] memory inflationaryValues = new uint256[](_demurrageValues.length); | ||
for (uint256 i = 0; i < _demurrageValues.length; i++) { | ||
inflationaryValues[i] = Math64x64.mulu(f, _demurrageValues[i]); | ||
} | ||
return inflationaryValues; | ||
} | ||
} |
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.