Skip to content

Commit

Permalink
Set Onix vars
Browse files Browse the repository at this point in the history
  • Loading branch information
xavikh committed Dec 10, 2024
1 parent 5216ab3 commit f2a985d
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
29 changes: 27 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,33 @@ ft-sepolia-fork :; forge test --match-contract TestE2EV2 \
deploy-preview-mode-sepolia :; forge script script/Deploy.s.sol:Deploy \
--rpc-url https://sepolia.mode.network \
--private-key $(DEPLOYMENT_PRIVATE_KEY) \
-vvvvv
-vvvvv

deploy-preview-sepolia :; forge script script/Deploy.s.sol:Deploy \
--rpc-url https://eth-sepolia.g.alchemy.com/v2/KqUmJvu1tiJqOdy6lopFGzVa5MfPVn2J \
--private-key $(DEPLOYMENT_PRIVATE_KEY) \
-vvvvv

deploy-preview-holesky :; forge script script/Deploy.s.sol:Deploy \
--rpc-url https://eth-holesky.g.alchemy.com/v2/KqUmJvu1tiJqOdy6lopFGzVa5MfPVn2J \
--private-key $(DEPLOYMENT_PRIVATE_KEY) \
-vvvvv

deploy-holesky :; forge script script/Deploy.s.sol:Deploy \
--rpc-url https://eth-holesky.g.alchemy.com/v2/KqUmJvu1tiJqOdy6lopFGzVa5MfPVn2J \
--private-key $(DEPLOYMENT_PRIVATE_KEY) \
--broadcast \
--verify \
--etherscan-api-key $(ETHERSCAN_API_KEY) \
-vvvvv

deploy-sepolia :; forge script script/Deploy.s.sol:Deploy \
--rpc-url https://eth-sepolia.g.alchemy.com/v2/KqUmJvu1tiJqOdy6lopFGzVa5MfPVn2J \
--private-key $(DEPLOYMENT_PRIVATE_KEY) \
--broadcast \
--verify \
--etherscan-api-key $(ETHERSCAN_API_KEY) \
-vvvvv

deploy-mode-sepolia :; forge script script/Deploy.s.sol:Deploy \
--rpc-url https://sepolia.mode.network \
Expand All @@ -68,4 +94,3 @@ deploy-preview-mode :; forge script script/Deploy.s.sol:Deploy \
--verifier blockscout \
--verifier-url https://explorer.mode.network/api\? \
-vvv

7 changes: 6 additions & 1 deletion script/multisig-members.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"members": ["0x7771c1510509C0dA515BDD12a57dbDd8C58E5363"]
"members": [
"0x35911Cc89aaBe7Af6726046823D5b678B6A1498d",
"0x2A4a8ab4B34D588AAF7504f398203C05CD124Dda",
"0x249eD03175f3C86c1A7efa40cFa1f5e75d902a42",
"0x80058a30B84F339beFb7ABcB25B1412ff0f88Ec3"
]
}
6 changes: 3 additions & 3 deletions src/libs/CurveConstantLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ pragma solidity ^0.8.0;
library CurveConstantLib {
int256 internal constant SHARED_CONSTANT_COEFFICIENT = 1e18;
/// @dev 2 / (7 * 2_weeks) - expressed in fixed point
int256 internal constant SHARED_LINEAR_COEFFICIENT = 236205593348;
int256 internal constant SHARED_LINEAR_COEFFICIENT = 482253086419;
/// @dev 1 / (7 * (2_weeks)^2) - expressed in fixed point
int256 internal constant SHARED_QUADRATIC_COEFFICIENT = 97637;
int256 internal constant SHARED_QUADRATIC_COEFFICIENT = 0;

/// @dev the maxiumum number of epochs the cure can keep increasing
uint256 internal constant MAX_EPOCHS = 5;
uint256 internal constant MAX_EPOCHS = 12;
}
14 changes: 7 additions & 7 deletions test/escrow/curve/QuadraticCurveMath.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase {
// solmate (optimized): 449.206254284606635135
assertEq(
curve.votingPowerAt(tokenIdFirst, block.timestamp),
449206254284606635135,
473276452878968806921,
"Balance incorrect after warmup"
);
assertEq(curve.isWarm(tokenIdFirst), true, "Still warming up");
Expand All @@ -117,7 +117,7 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase {
// solmate: 1067784483312193385000000000
assertEq(
curve.votingPowerAt(tokenIdSecond, block.timestamp),
1067784483312193385000000000,
1125000482252891219000000000,
"Balance incorrect after warmup II"
);

Expand All @@ -130,17 +130,17 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase {
// solmate2: 600.985163959347101952
assertEq(
curve.votingPowerAt(tokenIdFirst, block.timestamp),
600985163959347101952,
666092499999616779456,
"Balance incorrect after p1"
);

uint256 expectedMaxI = 2524126241845405205760;
uint256 expectedMaxII = 5999967296216704000000000000;
uint256 expectedMaxI = 3365519999995401353472;
uint256 expectedMaxII = 7999999999989068800000000000;

// warp to the final period
// TECHNICALLY, this should finish at exactly 5 periodd and 6 * voting power
// TECHNICALLY, this should finish at exactly 5 periods and 6 * voting power
// but FP arithmetic has a small rounding error
vm.warp(start + clock.epochDuration() * 5);
vm.warp(start + clock.epochDuration() * 12);
assertEq(
curve.votingPowerAt(tokenIdFirst, block.timestamp),
expectedMaxI,
Expand Down

0 comments on commit f2a985d

Please sign in to comment.