-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add tomls for SIP-363 base-sepolia #171
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
9628a26
Add tomls for SIP-363 base-sepolia
leomassazza 3a76e2d
fix name
leomassazza 91509bc
update version
sunnyvempati 3040794
up the wrapper limit
sunnyvempati 3cc452f
fix tests
sunnyvempati 8300449
add mroe price updates
sunnyvempati d14d5d7
remove only
sunnyvempati File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,6 +133,21 @@ describe(require('path').basename(__filename, '.e2e.js'), function () { | |
marketId: 200, | ||
settlementStrategyId: require('../../deployments/extras.json').btc_pyth_settlement_strategy, | ||
}); | ||
await doPriceUpdate({ | ||
wallet, | ||
marketId: 300, | ||
settlementStrategyId: require('../../deployments/extras.json').snx_pyth_settlement_strategy, | ||
}); | ||
await doPriceUpdate({ | ||
wallet, | ||
marketId: 400, | ||
settlementStrategyId: require('../../deployments/extras.json').sol_pyth_settlement_strategy, | ||
}); | ||
await doPriceUpdate({ | ||
wallet, | ||
marketId: 500, | ||
settlementStrategyId: require('../../deployments/extras.json').wif_pyth_settlement_strategy, | ||
}); | ||
}); | ||
|
||
it('should increase max collateral for the test to 1_000_000_000_000', async () => { | ||
|
@@ -230,6 +245,11 @@ describe(require('path').basename(__filename, '.e2e.js'), function () { | |
settlementStrategyId, | ||
}); | ||
|
||
const PerpsMarketProxy = new ethers.Contract( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unused? |
||
require('../../deployments/PerpsMarketProxy.json').address, | ||
require('../../deployments/PerpsMarketProxy.json').abi, | ||
provider | ||
); | ||
// Wait for commitment price/settlement delay | ||
await wait(2000); | ||
|
||
|
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 | ||||
---|---|---|---|---|---|---|
|
@@ -40,7 +40,7 @@ const { | |||||
}, | ||||||
} = require('../../deployments/meta.json'); | ||||||
|
||||||
describe(require('path').basename(__filename, '.e2e.js'), function () { | ||||||
describe.only(require('path').basename(__filename, '.e2e.js'), function () { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
const accountId = parseInt(`1337${crypto.randomInt(1000)}`); | ||||||
const provider = new ethers.providers.JsonRpcProvider( | ||||||
process.env.RPC_URL || 'http://127.0.0.1:8545' | ||||||
|
@@ -222,6 +222,21 @@ describe(require('path').basename(__filename, '.e2e.js'), function () { | |||||
marketId: 200, | ||||||
settlementStrategyId: require('../../deployments/extras.json').btc_pyth_settlement_strategy, | ||||||
}); | ||||||
await doPriceUpdate({ | ||||||
wallet, | ||||||
marketId: 300, | ||||||
settlementStrategyId: require('../../deployments/extras.json').snx_pyth_settlement_strategy, | ||||||
}); | ||||||
await doPriceUpdate({ | ||||||
wallet, | ||||||
marketId: 400, | ||||||
settlementStrategyId: require('../../deployments/extras.json').sol_pyth_settlement_strategy, | ||||||
}); | ||||||
await doPriceUpdate({ | ||||||
wallet, | ||||||
marketId: 500, | ||||||
settlementStrategyId: require('../../deployments/extras.json').wif_pyth_settlement_strategy, | ||||||
}); | ||||||
}); | ||||||
|
||||||
it(`should delegate 1_000 sUSDC into the Spartan Council pool`, async () => { | ||||||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
include = [ | ||
# TODO: this is a funny necessary dependency because the oracle manager is registering the same node twice | ||
# however, it will not emit "NodeRegistered" the second time because its an unnecessary call | ||
"../../oracles/pyth-sol.toml", | ||
"../common/bigcap-settings.toml", | ||
] | ||
|
||
[setting.perpsSolMarketId] | ||
|
||
[setting.perpsSolSkewScale] | ||
|
||
[setting.perpsSolMaxFundingVelocity] | ||
|
||
[setting.perpsSolMakerFeeRatio] | ||
|
||
[setting.perpsSolTakerFeeRatio] | ||
|
||
[setting.perpsSolMaxMarketSize] | ||
|
||
[setting.perpsSolInitialMarginRatio] | ||
|
||
[setting.perpsSolMaintenanceMarginFraction] | ||
|
||
[setting.perpsSolFlagRewardRatioD18] | ||
|
||
[setting.perpsSolMaxLiquidationLimitAccumulationMultiplier] | ||
|
||
[setting.perpsSolMaxSecondsInLiquidationWindow] | ||
|
||
[setting.perpsSolMaxLiquidationPd] | ||
|
||
[setting.perpsSolEndorsedLiquidator] | ||
|
||
[setting.perpsSolMinimumPositionMargin] | ||
|
||
[setting.perpsSolLockedOiRatio] | ||
|
||
[invoke.createSolPerpsMarket] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "createMarket" | ||
args = ["<%= settings.perpsSolMarketId %>", "Solana", "SOL"] | ||
|
||
[invoke.setPerpsPriceSol] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "updatePriceData" | ||
args = [ | ||
"<%= settings.perpsSolMarketId %>", | ||
"<%= extras.sol_oracle_id %>", | ||
"<%= settings.bigCapStrictStalenessTolerance %>", | ||
] | ||
|
||
[invoke.setPerpsSolSettlementStrategy] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setSettlementStrategy" | ||
args = [ | ||
"<%= settings.perpsSolMarketId %>", | ||
"0", # Settlement Strategy ID | ||
{ strategyType = "0", settlementDelay = "<%= settings.bigCapSettlementDelay %>", settlementWindowDuration = "<%= settings.bigCapSettlementWindowDuration %>", priceVerificationContract = "<%= imports.pyth_erc7412_wrapper.contracts.PythERC7412Wrapper.address %>", feedId = "<%= settings.pythSolFeedId %>", settlementReward = "<%= parseEther(settings.settlementReward) %>", disabled = false, commitmentPriceDelay = "<%= settings.commitmentPriceDelay %>" }, | ||
] | ||
|
||
[invoke.setPerpsSolFundingParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setFundingParameters" | ||
args = [ | ||
"<%= settings.perpsSolMarketId %>", | ||
"<%= parseEther(settings.perpsSolSkewScale) %>", | ||
"<%= parseEther(settings.perpsSolMaxFundingVelocity) %>", | ||
] | ||
|
||
[invoke.setPerpsSolOrderFees] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setOrderFees" | ||
args = [ | ||
"<%= settings.perpsSolMarketId %>", | ||
"<%= parseEther(settings.perpsSolMakerFeeRatio) %>", | ||
"<%= parseEther(settings.perpsSolTakerFeeRatio) %>", | ||
] | ||
|
||
[invoke.setPerpsSolMaxMarketSize] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxMarketSize" | ||
args = ["<%= settings.perpsSolMarketId %>", "<%= parseEther(settings.perpsSolMaxMarketSize) %>"] | ||
|
||
[invoke.setPerpsSolMaxLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setMaxLiquidationParameters" | ||
args = [ | ||
"<%= settings.perpsSolMarketId %>", | ||
"<%= parseEther(settings.perpsSolMaxLiquidationLimitAccumulationMultiplier) %>", | ||
"<%= settings.perpsSolMaxSecondsInLiquidationWindow %>", | ||
"<%= parseEther(settings.perpsSolMaxLiquidationPd) %>", | ||
"<%= settings.perpsSolEndorsedLiquidator %>", | ||
] | ||
|
||
[invoke.setPerpsSolLiquidationParameters] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLiquidationParameters" | ||
args = [ | ||
"<%= settings.perpsSolMarketId %>", | ||
"<%= parseEther(settings.perpsSolInitialMarginRatio) %>", | ||
"<%= parseEther(settings.perpsSolMinimumInitialMarginRatio) %>", | ||
"<%= parseEther(settings.perpsSolMaintenanceMarginScalar) %>", | ||
"<%= parseEther(settings.perpsSolFlagRewardRatioD18) %>", | ||
"<%= parseEther(settings.perpsSolMinimumPositionMargin) %>", | ||
] | ||
|
||
[invoke.setPerpsSolLockedOiRatio] | ||
target = ["perpsFactory.PerpsMarketProxy"] | ||
fromCall.func = "owner" | ||
func = "setLockedOiRatio" | ||
args = ["<%= settings.perpsSolMarketId %>", "<%= parseEther(settings.perpsSolLockedOiRatio) %>"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When people managed to fill up 10mil wrapper? I thought we did not have free mint to avoid this...