Skip to content

Commit

Permalink
Apply prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
noisekit committed Sep 8, 2023
1 parent 933e4be commit 6d2bf7e
Show file tree
Hide file tree
Showing 51 changed files with 398 additions and 410 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ This is a GitOps repo for deployment of the [Synthetix](https://www.github.com/s

### Specify Upgrade

- After [publishing any new versions of the provisioned packages](https://github.com/synthetixio/synthetix-v3#deployment-guide) (`oracle-manager`, `synthetix` and `spot-market`), bump the versions throughout the cannonfiles to match.
- After [publishing any new versions of the provisioned packages](https://github.com/synthetixio/synthetix-v3#deployment-guide) (`oracle-manager`, `synthetix`
and `spot-market`), bump the versions throughout the cannonfiles to match.
- Add new settings and invoke actions as necessary.
- Increment the version number and update the values in the network-specific omnibus cannonfiles as desired.

Expand All @@ -35,7 +36,11 @@ _The --provider-url and --private-key parameters are unnecessary if using [Frame

### Finalize Release

- If you've updated the provisioned packages, verify your new contracts on Etherscan: `cannon verify synthetix-omnibus:<VERSION_NUMBER> --api-key <ETHERSCAN_API_KEY> --chain-id <CHAIN_ID>`
- Publish your new packages on the Cannon registry: `cannon publish synthetix-omnibus:<VERSION_NUMBER> --private-key <KEY_THAT_HAS_ETH_ON_MAINNET> --tags latest,3` (_The --private-key parameter is unnecessary if using [Frame](https://frame.sh/)_)
- If you've updated the provisioned packages, verify your new contracts on
Etherscan: `cannon verify synthetix-omnibus:<VERSION_NUMBER> --api-key <ETHERSCAN_API_KEY> --chain-id <CHAIN_ID>`
- Publish your new packages on the Cannon
registry: `cannon publish synthetix-omnibus:<VERSION_NUMBER> --private-key <KEY_THAT_HAS_ETH_ON_MAINNET> --tags latest,3` (
_The --private-key parameter is unnecessary if using [Frame](https://frame.sh/)_)
- Commit and merge the change to this repository.
- Run the [**Export ABIs** action](https://github.com/Synthetixio/v3-abi-exporter/actions/workflows/main.yml) in the `v3-abi-exporter` repository.
- Run the [**Export ABIs** action](https://github.com/Synthetixio/v3-abi-exporter/actions/workflows/main.yml) in
the `v3-abi-exporter` repository.
41 changes: 19 additions & 22 deletions omnibus-base-goerli-competition.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,36 @@ include = [
"tomls/core.toml",
"tomls/permissions.toml",
"tomls/collaterals/weth.toml",
"tomls/collaterals/wbtc.toml",
"tomls/collaterals/op.toml",
"tomls/collaterals/wbtc.toml",
"tomls/collaterals/op.toml",
"tomls/pools/spartan-council.toml",
"tomls/pools/passive-snx.toml",
"tomls/permit-all-createPool.toml",
"tomls/permit-all-registerMarket.toml",
"tomls/permit-all-transferCrossChain.toml",
"tomls/markets/spot/eth.toml",
"tomls/markets/spot/btc.toml",
"tomls/markets/spot/snx.toml",
"tomls/markets/spot/link.toml",
"tomls/markets/spot/op.toml",
"tomls/markets/perps/eth.toml",
"tomls/markets/perps/btc.toml",
"tomls/markets/perps/snx.toml",
"tomls/markets/perps/link.toml",
"tomls/markets/perps/op.toml",

# overrides for the oracles (will replace imports from above modules to use pyth instead of chainlink)
"tomls/oracles/pyth-eth.toml",
"tomls/oracles/pyth-btc.toml",
"tomls/oracles/pyth-snx.toml",
"tomls/oracles/pyth-link.toml",
"tomls/oracles/pyth-op.toml",

"tomls/markets/spot/eth.toml",
"tomls/markets/spot/btc.toml",
"tomls/markets/spot/snx.toml",
"tomls/markets/spot/link.toml",
"tomls/markets/spot/op.toml",
"tomls/markets/perps/eth.toml",
"tomls/markets/perps/btc.toml",
"tomls/markets/perps/snx.toml",
"tomls/markets/perps/link.toml",
"tomls/markets/perps/op.toml",
# overrides for the oracles (will replace imports from above modules to use pyth instead of chainlink)
"tomls/oracles/pyth-eth.toml",
"tomls/oracles/pyth-btc.toml",
"tomls/oracles/pyth-snx.toml",
"tomls/oracles/pyth-link.toml",
"tomls/oracles/pyth-op.toml",
# overrides for perp markets
"tomls/omnibus-base-goerli-competition/perps/global.toml",
"tomls/omnibus-base-goerli-competition/perps/btc.toml",
"tomls/omnibus-base-goerli-competition/perps/eth.toml",
"tomls/omnibus-base-goerli-competition/perps/op.toml",
"tomls/omnibus-base-goerli-competition/perps/link.toml",
"tomls/omnibus-base-goerli-competition/perps/snx.toml",

# overrides for synth markets
"tomls/omnibus-base-goerli-competition/synths/btc.toml",
"tomls/omnibus-base-goerli-competition/synths/eth.toml",
Expand Down Expand Up @@ -143,4 +140,4 @@ args = [
],
]

depends=["invoke.createScPool", "invoke.createEthSynth", "invoke.createBtcSynth", "invoke.createSnxSynth", "invoke.createLinkSynth", "invoke.createOpSynth", "provision.perpsFactory"]
depends = ["invoke.createScPool", "invoke.createEthSynth", "invoke.createBtcSynth", "invoke.createSnxSynth", "invoke.createLinkSynth", "invoke.createOpSynth", "provision.perpsFactory"]
2 changes: 1 addition & 1 deletion omnibus-base-goerli.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ args = [
{ marketId = "<%= extras.synth_eth_market_id %>", weightD18 = 1, maxDebtShareValueD18 = "<%= parseEther('1') %>" }
],
]
depends=["invoke.createScPool", "invoke.createEthSynth"]
depends = ["invoke.createScPool", "invoke.createEthSynth"]
21 changes: 7 additions & 14 deletions omnibus-optimism-goerli.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,30 @@ include = [
"tomls/settings-testnet.toml",
"tomls/core.toml",
"tomls/permissions.toml",

"tomls/collaterals/snx.toml",
"tomls/collaterals/weth.toml",

"tomls/pools/spartan-council.toml",
"tomls/pools/passive-snx.toml",

"tomls/permit-all-createPool.toml",
"tomls/permit-all-registerMarket.toml",
"tomls/permit-all-perps-createAccount.toml",
"tomls/permit-all-transferCrossChain.toml",

"tomls/markets/spot/eth.toml",
"tomls/markets/spot/btc.toml",
"tomls/markets/spot/link.toml",

"tomls/markets/perps/eth.toml",
"tomls/markets/perps/btc.toml",

# overrides for the oracles (will replace imports from above modules to use pyth instead of chainlink)
# "tomls/oracles/pyth-eth.toml",
# "tomls/oracles/pyth-btc.toml",
# "tomls/oracles/pyth-snx.toml",
# "tomls/oracles/pyth-link.toml",
# "tomls/oracles/pyth-op.toml",
# overrides for the oracles (will replace imports from above modules to use pyth instead of chainlink)
# "tomls/oracles/pyth-eth.toml",
# "tomls/oracles/pyth-btc.toml",
# "tomls/oracles/pyth-snx.toml",
# "tomls/oracles/pyth-link.toml",
# "tomls/oracles/pyth-op.toml",

# overrides for perp markets
"tomls/omnibus-optimism-goerli/perps/global.toml",
"tomls/omnibus-optimism-goerli/perps/btc.toml",
"tomls/omnibus-optimism-goerli/perps/eth.toml",

# overrides for synth markets
"tomls/omnibus-optimism-goerli/synths/btc.toml",
"tomls/omnibus-optimism-goerli/synths/eth.toml",
Expand Down Expand Up @@ -139,4 +132,4 @@ args = [
],
]

depends=["invoke.createScPool", "invoke.createEthSynth", "invoke.createBtcSynth", "invoke.createLinkSynth", "provision.perpsFactory"]
depends = ["invoke.createScPool", "invoke.createEthSynth", "invoke.createBtcSynth", "invoke.createLinkSynth", "provision.perpsFactory"]
4 changes: 2 additions & 2 deletions omnibus-optimism-mainnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include = [
"tomls/core.toml",
"tomls/permissions.toml",
"tomls/collaterals/snx.toml",
# eth collateral is not enabled/set up on v3
# eth collateral is not enabled/set up on v3
#"tomls/collaterals/weth.toml",
"tomls/pools/spartan-council.toml",
"tomls/pools/passive-snx.toml",
Expand Down Expand Up @@ -112,4 +112,4 @@ args = [
{ marketId = "<%= extras.synth_eth_market_id %>", weightD18 = 1, maxDebtShareValueD18 = "<%= parseEther('1') %>" }
],
]
depends=["invoke.createScPool", "invoke.createEthSynth"]
depends = ["invoke.createScPool", "invoke.createEthSynth"]
6 changes: 3 additions & 3 deletions tomls/collaterals/op.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include = [
"../oracles/pyth-op.toml"
"../oracles/pyth-op.toml"
]

[setting.op_address]
Expand All @@ -9,9 +9,9 @@ target = ["system.CoreProxy"]
fromCall.func = "owner"
func = "configureCollateral"
args = [
{ tokenAddress = "<%= settings.op_address %>", oracleNodeId = "<%= extras.op_oracle_id %>", issuanceRatioD18 = "<%= parseEther('3') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= parseEther('0.01') %>", minDelegationD18 = "<%= parseEther('0.01') %>", depositingEnabled = true }
{ tokenAddress = "<%= settings.op_address %>", oracleNodeId = "<%= extras.op_oracle_id %>", issuanceRatioD18 = "<%= parseEther('3') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= parseEther('0.01') %>", minDelegationD18 = "<%= parseEther('0.01') %>", depositingEnabled = true }
]

depends = [
"invoke.registerOpOracleNode"
"invoke.registerOpOracleNode"
]
8 changes: 4 additions & 4 deletions tomls/collaterals/snx.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include = [
"../oracles/snx.toml"
"../oracles/snx.toml"
]

[setting.snx_address]
Expand All @@ -11,9 +11,9 @@ target = ["system.CoreProxy"]
fromCall.func = "owner"
func = "configureCollateral"
args = [
{ tokenAddress = "<%= settings.snx_address %>", oracleNodeId = "<%= extras.snx_oracle_id %>", issuanceRatioD18 = "<%= parseEther('4') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= settings.snx_liquidation_reward %>", minDelegationD18 = "<%= settings.snx_liquidation_reward %>", depositingEnabled = true }
{ tokenAddress = "<%= settings.snx_address %>", oracleNodeId = "<%= extras.snx_oracle_id %>", issuanceRatioD18 = "<%= parseEther('4') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= settings.snx_liquidation_reward %>", minDelegationD18 = "<%= settings.snx_liquidation_reward %>", depositingEnabled = true }
]

depends = [
"invoke.registerSnxOracleManager"
]
"invoke.registerSnxOracleManager"
]
6 changes: 3 additions & 3 deletions tomls/collaterals/wbtc.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include = [
"../oracles/btc.toml"
"../oracles/btc.toml"
]

[setting.wbtc_address]
Expand All @@ -9,9 +9,9 @@ target = ["system.CoreProxy"]
fromCall.func = "owner"
func = "configureCollateral"
args = [
{ tokenAddress = "<%= settings.wbtc_address %>", oracleNodeId = "<%= extras.btc_oracle_id %>", issuanceRatioD18 = "<%= parseEther('3') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= parseEther('0.01') %>", minDelegationD18 = "<%= parseEther('0.01') %>", depositingEnabled = true }
{ tokenAddress = "<%= settings.wbtc_address %>", oracleNodeId = "<%= extras.btc_oracle_id %>", issuanceRatioD18 = "<%= parseEther('3') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= parseEther('0.01') %>", minDelegationD18 = "<%= parseEther('0.01') %>", depositingEnabled = true }
]

depends = [
"invoke.registerBtcOracleNode"
"invoke.registerBtcOracleNode"
]
6 changes: 3 additions & 3 deletions tomls/collaterals/weth.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include = [
"../oracles/eth.toml"
"../oracles/eth.toml"
]

[setting.weth_address]
Expand All @@ -9,9 +9,9 @@ target = ["system.CoreProxy"]
fromCall.func = "owner"
func = "configureCollateral"
args = [
{ tokenAddress = "<%= settings.weth_address %>", oracleNodeId = "<%= extras.eth_oracle_id %>", issuanceRatioD18 = "<%= parseEther('3') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= parseEther('0.01') %>", minDelegationD18 = "<%= parseEther('0.01') %>", depositingEnabled = true }
{ tokenAddress = "<%= settings.weth_address %>", oracleNodeId = "<%= extras.eth_oracle_id %>", issuanceRatioD18 = "<%= parseEther('3') %>", liquidationRatioD18 = "<%= parseEther('1.5') %>", liquidationRewardD18 = "<%= parseEther('0.01') %>", minDelegationD18 = "<%= parseEther('0.01') %>", depositingEnabled = true }
]

depends = [
"invoke.registerEthOracleNode"
"invoke.registerEthOracleNode"
]
3 changes: 1 addition & 2 deletions tomls/markets/common/bigcap-settings.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include = [
"./settlement-settings.toml",
"./settlement-settings.toml",
]

[setting.bigCapSettlementDelay]
Expand All @@ -13,4 +13,3 @@ defaultValue = "600"

[setting.bigCapSettlementDeviationTolerance]
defaultValue = "0.05"

2 changes: 1 addition & 1 deletion tomls/markets/perps-factory.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include = [
"./spot-factory.toml"
"./spot-factory.toml"
]

[setting.perps_market_package]
Expand Down
62 changes: 31 additions & 31 deletions tomls/markets/perps/btc.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include = [
"../perps-factory.toml",
"../../oracles/btc.toml",
"../common/bigcap-settings.toml",
"../perps-factory.toml",
"../../oracles/btc.toml",
"../common/bigcap-settings.toml",
]

[setting.pythBtcFeedId]
Expand Down Expand Up @@ -44,8 +44,8 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "updatePriceData"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= extras.btc_oracle_id %>"
"<%= settings.btcPerpsMarketId %>",
"<%= extras.btc_oracle_id %>"
]
depends = ["invoke.createBtcPerpsMarket", "invoke.registerBtcOracleNode"]

Expand All @@ -54,9 +54,9 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "addSettlementStrategy"
args = [
"<%= settings.btcPerpsMarketId %>",
# strategyType = 0 (pyth)
{ strategyType = "0", settlementDelay = "<%= settings.bigCapSettlementDelay %>", settlementWindowDuration = "<%= settings.bigCapSettlementWindowDuration %>", priceWindowDuration = "<%= settings.bigCapPriceWindowDuration %>", priceVerificationContract = "<%= settings.pythPriceVerificationAddress %>", feedId = "<%= settings.pythBtcFeedId %>", url = "<%= settings.pythFeedUrl %>", settlementReward = "<%= settings.settlementReward %>", priceDeviationTolerance = "<%= parseEther(settings.bigCapSettlementDeviationTolerance) %>", disabled = false }
"<%= settings.btcPerpsMarketId %>",
# strategyType = 0 (pyth)
{ strategyType = "0", settlementDelay = "<%= settings.bigCapSettlementDelay %>", settlementWindowDuration = "<%= settings.bigCapSettlementWindowDuration %>", priceWindowDuration = "<%= settings.bigCapPriceWindowDuration %>", priceVerificationContract = "<%= settings.pythPriceVerificationAddress %>", feedId = "<%= settings.pythBtcFeedId %>", url = "<%= settings.pythFeedUrl %>", settlementReward = "<%= settings.settlementReward %>", priceDeviationTolerance = "<%= parseEther(settings.bigCapSettlementDeviationTolerance) %>", disabled = false }
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -65,9 +65,9 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setFundingParameters"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcSkewScale) %>",
"<%= parseEther(settings.perpsBtcMaxFundingVelocity) %>"
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcSkewScale) %>",
"<%= parseEther(settings.perpsBtcMaxFundingVelocity) %>"
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -76,9 +76,9 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setOrderFees"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcMakerFeeRatio) %>",
"<%= parseEther(settings.perpsBtcTakerFeeRatio) %>"
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcMakerFeeRatio) %>",
"<%= parseEther(settings.perpsBtcTakerFeeRatio) %>"
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -87,8 +87,8 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxMarketSize"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcMaxMarketSize) %>"
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcMaxMarketSize) %>"
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -97,11 +97,11 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxLiquidationParameters"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcMaxLiquidationLimitAccumulationMultiplier) %>",
"<%= parseEther(settings.perpsBtcMaxSecondsInLiquidationWindow) %>",
"<%= parseEther(settings.perpsBtcMaxLiquidationPd) %>",
"<%= settings.perpsBtcEndorsedLiquidator %>"
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcMaxLiquidationLimitAccumulationMultiplier) %>",
"<%= parseEther(settings.perpsBtcMaxSecondsInLiquidationWindow) %>",
"<%= parseEther(settings.perpsBtcMaxLiquidationPd) %>",
"<%= settings.perpsBtcEndorsedLiquidator %>"
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -110,12 +110,12 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setLiquidationParameters"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcInitialMarginRatio) %>",
"<%= parseEther(settings.perpsBtcMinimumInitialMarginRatio) %>",
"<%= parseEther(settings.perpsBtcMaintenanceMarginScalar) %>",
"<%= parseEther(settings.perpsBtcLiquidationRewardRatioD18) %>",
"<%= parseEther(settings.perpsBtcMinimumPositionMargin) %>"
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcInitialMarginRatio) %>",
"<%= parseEther(settings.perpsBtcMinimumInitialMarginRatio) %>",
"<%= parseEther(settings.perpsBtcMaintenanceMarginScalar) %>",
"<%= parseEther(settings.perpsBtcLiquidationRewardRatioD18) %>",
"<%= parseEther(settings.perpsBtcMinimumPositionMargin) %>"
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -124,8 +124,8 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setLockedOiRatio"
args = [
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcLockedOiRatio) %>"
"<%= settings.btcPerpsMarketId %>",
"<%= parseEther(settings.perpsBtcLockedOiRatio) %>"
]
depends = ["invoke.createBtcPerpsMarket"]

Expand All @@ -134,7 +134,7 @@ target = ["perpsFactory.PerpsMarketProxy"]
fromCall.func = "owner"
func = "setMaxCollateralAmount"
args = [
"<%= extras.synth_btc_market_id %>",
"<%= settings.perpsBtcSynthMaxCollateralAmount %>",
"<%= extras.synth_btc_market_id %>",
"<%= settings.perpsBtcSynthMaxCollateralAmount %>",
]
depends = ["invoke.createBtcSynth", "provision.perpsFactory"]
Loading

0 comments on commit 6d2bf7e

Please sign in to comment.