From a05c8deadc721706cb2865eb28a4d9ed25ebc819 Mon Sep 17 00:00:00 2001 From: synthetix-team Date: Wed, 12 Jun 2024 02:15:08 +0000 Subject: [PATCH] [NEXT] 42161-main DO NOT MERGE! --- 42161-main/AllErrors.json | 28 +- 42161-main/AllErrors.readable.json | 2 +- 42161-main/PerpsMarketProxy.json | 47 +- 42161-main/PerpsMarketProxy.readable.json | 3 +- 42161-main/cannon.json | 566 +++++++++++++++++++--- 42161-main/meta.json | 6 +- 6 files changed, 539 insertions(+), 113 deletions(-) diff --git a/42161-main/AllErrors.json b/42161-main/AllErrors.json index 88f9fd239c..cf1419c540 100644 --- a/42161-main/AllErrors.json +++ b/42161-main/AllErrors.json @@ -1372,20 +1372,6 @@ } ] }, - { - "type": "error", - "name": "AcceptablePriceExceeded", - "inputs": [ - { - "type": "uint256", - "name": "fillPrice" - }, - { - "type": "uint256", - "name": "acceptablePrice" - } - ] - }, { "type": "error", "name": "InsufficientMargin", @@ -1455,6 +1441,20 @@ "name": "ZeroSizeOrder", "inputs": [] }, + { + "type": "error", + "name": "AcceptablePriceExceeded", + "inputs": [ + { + "type": "uint256", + "name": "fillPrice" + }, + { + "type": "uint256", + "name": "acceptablePrice" + } + ] + }, { "type": "error", "name": "InsufficientAccountMargin", diff --git a/42161-main/AllErrors.readable.json b/42161-main/AllErrors.readable.json index 9de288166e..ab151b9daa 100644 --- a/42161-main/AllErrors.readable.json +++ b/42161-main/AllErrors.readable.json @@ -132,12 +132,12 @@ "error PendingOrderExists()", "error PriceFeedNotSet(uint128 marketId)", "error SynthNotEnabledForCollateral(uint128 synthMarketId)", - "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientMargin(int256 availableMargin, uint256 minMargin)", "error MaxOpenInterestReached(uint128 marketId, uint256 maxMarketSize, int256 newSideSize)", "error MaxPositionsPerAccountReached(uint128 maxPositionsPerAccount)", "error MaxUSDOpenInterestReached(uint128 marketId, uint256 maxMarketValue, int256 newSideSize, uint256 price)", "error ZeroSizeOrder()", + "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientAccountMargin(uint256 leftover)", "error OrderNotValid()", "error SettlementWindowExpired(uint256 timestamp, uint256 settlementTime, uint256 settlementExpiration)", diff --git a/42161-main/PerpsMarketProxy.json b/42161-main/PerpsMarketProxy.json index 6807700ab6..84425f3661 100644 --- a/42161-main/PerpsMarketProxy.json +++ b/42161-main/PerpsMarketProxy.json @@ -1600,20 +1600,6 @@ } ] }, - { - "type": "error", - "name": "AcceptablePriceExceeded", - "inputs": [ - { - "type": "uint256", - "name": "fillPrice" - }, - { - "type": "uint256", - "name": "acceptablePrice" - } - ] - }, { "type": "error", "name": "InsufficientMargin", @@ -2086,6 +2072,20 @@ } ] }, + { + "type": "error", + "name": "AcceptablePriceExceeded", + "inputs": [ + { + "type": "uint256", + "name": "fillPrice" + }, + { + "type": "uint256", + "name": "acceptablePrice" + } + ] + }, { "type": "error", "name": "InsufficientAccountMargin", @@ -4091,6 +4091,25 @@ } ] }, + { + "type": "function", + "name": "globalCollateralValue", + "constant": true, + "stateMutability": "view", + "payable": false, + "inputs": [ + { + "type": "uint128", + "name": "collateralId" + } + ], + "outputs": [ + { + "type": "uint256", + "name": "collateralValue" + } + ] + }, { "type": "function", "name": "setCollateralConfiguration", diff --git a/42161-main/PerpsMarketProxy.readable.json b/42161-main/PerpsMarketProxy.readable.json index 43acadb795..b5703c57a2 100644 --- a/42161-main/PerpsMarketProxy.readable.json +++ b/42161-main/PerpsMarketProxy.readable.json @@ -100,7 +100,6 @@ "function metadata(uint128 marketId) view returns (string name, string symbol)", "function size(uint128 marketId) view returns (uint256)", "function skew(uint128 marketId) view returns (int256)", - "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientMargin(int256 availableMargin, uint256 minMargin)", "error InvalidSettlementStrategy(uint256 settlementStrategyId)", "error MaxOpenInterestReached(uint128 marketId, uint256 maxMarketSize, int256 newSideSize)", @@ -117,6 +116,7 @@ "function getSettlementRewardCost(uint128 marketId, uint128 settlementStrategyId) view returns (uint256)", "function requiredMarginForOrder(uint128 accountId, uint128 marketId, int128 sizeDelta) view returns (uint256 requiredMargin)", "function requiredMarginForOrderWithPrice(uint128 accountId, uint128 marketId, int128 sizeDelta, uint256 price) view returns (uint256 requiredMargin)", + "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientAccountMargin(uint256 leftover)", "error OrderNotValid()", "error OverflowInt128ToUint128()", @@ -210,6 +210,7 @@ "function getReferrerShare(address referrer) view returns (uint256 shareRatioD18)", "function getSupportedCollaterals() view returns (uint256[] supportedCollaterals)", "function getSynthDeductionPriority() view returns (uint128[])", + "function globalCollateralValue(uint128 collateralId) view returns (uint256 collateralValue)", "function setCollateralConfiguration(uint128 synthMarketId, uint256 maxCollateralAmount)", "function setFeeCollector(address feeCollector)", "function setInterestRateParameters(uint128 lowUtilizationInterestRateGradient, uint128 interestRateGradientBreakpoint, uint128 highUtilizationInterestRateGradient)", diff --git a/42161-main/cannon.json b/42161-main/cannon.json index 63c8631e57..6107573c7a 100644 --- a/42161-main/cannon.json +++ b/42161-main/cannon.json @@ -1,6 +1,6 @@ { - "generator": "cannon cli 2.13.3", - "timestamp": 1717503313, + "generator": "cannon cli 2.15.0", + "timestamp": 1718158504, "def": { "setting": { "snx_package": { @@ -179,12 +179,7 @@ "synthetixPreset": "<%= settings.target_preset %>" }, "depends": [ - "provision.system", - "setting.owner", - "setting.salt", - "setting.snx_package", - "setting.spot_market_package", - "setting.target_preset" + "provision.system" ] }, "perpsFactory": { @@ -198,13 +193,7 @@ "spotMarketPackage": "<%= settings.spot_market_package %>@<%= settings.target_preset %>" }, "depends": [ - "provision.spotFactory", - "setting.owner", - "setting.perps_market_package", - "setting.salt", - "setting.snx_package", - "setting.spot_market_package", - "setting.target_preset" + "provision.spotFactory" ] }, "pyth_erc7412_wrapper": { @@ -214,6 +203,45 @@ "salt": "<%= settings.salt %>", "pythAddress": "<%= settings.pyth_price_verification_address %>" } + }, + "RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp": { + "source": "synthetix-rewards-distributor:0.0.2", + "targetPreset": "<%= settings.target_preset %>", + "options": { + "salt": "<%= settings.salt %>", + "rewardManager": "<%= imports.system.contracts.CoreProxy.address %>", + "poolId": "<%= extras.spartan_council_pool_id %>", + "collateralType": "<%= settings.arb_address %>", + "payoutToken": "<%= settings.arb_address %>", + "payoutTokenDecimals": "18", + "name": "Spartan Council Pool ARB Rewards for ARB LP" + } + }, + "RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp": { + "source": "synthetix-rewards-distributor:0.0.2", + "targetPreset": "<%= settings.target_preset %>", + "options": { + "salt": "<%= settings.salt %>", + "rewardManager": "<%= imports.system.contracts.CoreProxy.address %>", + "poolId": "<%= extras.spartan_council_pool_id %>", + "collateralType": "<%= settings.usdc_address %>", + "payoutToken": "<%= settings.arb_address %>", + "payoutTokenDecimals": "18", + "name": "Spartan Council Pool ARB Rewards for USDC LP" + } + }, + "RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp": { + "source": "synthetix-rewards-distributor:0.0.2", + "targetPreset": "<%= settings.target_preset %>", + "options": { + "salt": "<%= settings.salt %>", + "rewardManager": "<%= imports.system.contracts.CoreProxy.address %>", + "poolId": "<%= extras.spartan_council_pool_id %>", + "collateralType": "<%= settings.weth_address %>", + "payoutToken": "<%= settings.arb_address %>", + "payoutTokenDecimals": "18", + "name": "Spartan Council Pool ARB Rewards for WETH LP" + } } }, "invoke": { @@ -508,11 +536,7 @@ } }, "depends": [ - "invoke.CoreProxy_addToFeatureFlagAllowlist_createPool_deployer", - "provision.system", - "setting.deployer", - "setting.pool_owner", - "setting.spartan_council_pool_id_setting" + "invoke.CoreProxy_addToFeatureFlagAllowlist_createPool_deployer" ] }, "CoreProxy_setPoolName_SpartanCouncil": { @@ -1069,10 +1093,61 @@ 18, "<%= imports.system.contracts.USDRouter.address %>" ] + }, + "CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp": { + "target": [ + "system.CoreProxy" + ], + "fromCall": { + "func": "getPoolOwner", + "args": [ + "<%= extras.spartan_council_pool_id %>" + ] + }, + "func": "registerRewardsDistributor", + "args": [ + "<%= extras.spartan_council_pool_id %>", + "<%= settings.arb_address %>", + "<%= imports.RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp.contracts.RewardsDistributor.address %>" + ] + }, + "CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp": { + "target": [ + "system.CoreProxy" + ], + "fromCall": { + "func": "getPoolOwner", + "args": [ + "<%= extras.spartan_council_pool_id %>" + ] + }, + "func": "registerRewardsDistributor", + "args": [ + "<%= extras.spartan_council_pool_id %>", + "<%= settings.usdc_address %>", + "<%= imports.RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp.contracts.RewardsDistributor.address %>" + ] + }, + "CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp": { + "target": [ + "system.CoreProxy" + ], + "fromCall": { + "func": "getPoolOwner", + "args": [ + "<%= extras.spartan_council_pool_id %>" + ] + }, + "func": "registerRewardsDistributor", + "args": [ + "<%= extras.spartan_council_pool_id %>", + "<%= settings.weth_address %>", + "<%= imports.RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp.contracts.RewardsDistributor.address %>" + ] } }, "name": "synthetix-omnibus", - "version": "1", + "version": "2", "description": "Includes the full synthetix system with configurations applied", "preset": "main" }, @@ -1555,16 +1630,18 @@ } } }, + "hash": null, "version": 7 }, "provision.system": { "artifacts": { "imports": { "system": { - "url": "ipfs://QmezoFmwuLYEsh8oueyUq3312S5kPXjMFr78fwo4yanENh", + "url": "ipfs://QmXJuRdzxm936Xszze8MHWzs58odFtr8uBuNK3QZSzZoew", "tags": [ "latest" ], + "target": "synthetix:3.3.18@main", "preset": "main", "contracts": { "AccountModule": { @@ -3127,10 +3204,11 @@ } }, "oracle_manager": { - "url": "ipfs://QmWLst9QCAXxmA4mX7YukDuWfs7oXgciNos6GXDkdpxmZF", + "url": "ipfs://QmY3jkdR6v3qhswKPvUhuNFvhvGpSGiJiutUqtzKgGULbR", "tags": [ "latest" ], + "target": "oracle-manager:latest@with-synthetix", "preset": "with-synthetix", "contracts": { "NodeModule": { @@ -3793,16 +3871,18 @@ } } }, + "hash": null, "version": 7 }, "provision.spotFactory": { "artifacts": { "imports": { "spotFactory": { - "url": "ipfs://QmeVY3DL3bVDYS1dXPwLHM3kXRhsySmLUJRAUTK5433veW", + "url": "ipfs://QmZt7TxqDXY648HZKmkHHVgDr4HMVkTmQM4BRzqxDWvzMG", "tags": [ "latest" ], + "target": "synthetix-spot-market:3.3.15@main", "preset": "main", "contracts": { "AsyncOrderConfigurationModule": { @@ -4581,7 +4661,7 @@ }, "imports": { "synthetix": { - "url": "ipfs://QmezoFmwuLYEsh8oueyUq3312S5kPXjMFr78fwo4yanENh", + "url": "ipfs://QmXJuRdzxm936Xszze8MHWzs58odFtr8uBuNK3QZSzZoew", "contracts": { "AccountModule": { "address": "0xbc92917D9794D94BBc67A353D95E4FA5a8bCAB2F", @@ -6143,10 +6223,11 @@ } }, "oracle_manager": { - "url": "ipfs://QmWLst9QCAXxmA4mX7YukDuWfs7oXgciNos6GXDkdpxmZF", + "url": "ipfs://QmY3jkdR6v3qhswKPvUhuNFvhvGpSGiJiutUqtzKgGULbR", "tags": [ "latest" ], + "target": "oracle-manager:latest@with-synthetix", "preset": "with-synthetix", "contracts": { "NodeModule": { @@ -6909,20 +6990,22 @@ } } }, + "hash": null, "version": 7 }, "provision.perpsFactory": { "artifacts": { "imports": { "perpsFactory": { - "url": "ipfs://Qmd5KnJsLM75LmXdkUDWZD9kCKGyVEdF4tkvegd7kgAKHb", + "url": "ipfs://QmWTn48shpyPt9HxSA219K2mwN9zYMEkZtkCZQGtsYAWX3", "tags": [ "latest" ], + "target": "synthetix-perps-market:3.3.19@main", "preset": "main", "contracts": { "AsyncOrderCancelModule": { - "address": "0x72099c8F9F56BB79787DD25055e181Bf60d7144e", + "address": "0x11bc7C1e163A67a7ED7AFa6FC8F4dDCc25426de1", "abi": [ "error AcceptablePriceNotExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error AccountLiquidatable(uint128 accountId)", @@ -6945,17 +7028,16 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x9f3f94bf9f17d7d89ee526ae09db47d86ec40f114031015b62c7605dc4b0aa27", + "deployTxnHash": "0x5673614654c940f88b69fd5d6626a5a4c8090ddf2e76a0978221961798944298", "sourceName": "contracts/modules/AsyncOrderCancelModule.sol", "contractName": "AsyncOrderCancelModule", "deployedOn": "contract.AsyncOrderCancelModule", - "gasUsed": 2572600, - "gasCost": "10000000" + "gasUsed": 1461342, + "gasCost": "1008750001" }, "AsyncOrderModule": { - "address": "0x929689e6C93bF092A7D218248b3F26d4D2EE692A", + "address": "0x3533e5ac68CeE7F2B579f662D3A9610C3E29B6E2", "abi": [ - "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error AccountLiquidatable(uint128 accountId)", "error AccountNotFound(uint128 accountId)", "error FeatureUnavailable(bytes32 which)", @@ -6988,15 +7070,15 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x43119204890a12d8b6dd326bb078ef35e13de61644b224df7c693859676ebb73", + "deployTxnHash": "0x199806f6532805dc56b590982c43508c6c508502c465ebf659422acc6c73d702", "sourceName": "contracts/modules/AsyncOrderModule.sol", "contractName": "AsyncOrderModule", "deployedOn": "contract.AsyncOrderModule", - "gasUsed": 5076660, - "gasCost": "10000000" + "gasUsed": 2854862, + "gasCost": "1007656251" }, "AsyncOrderSettlementPythModule": { - "address": "0xC9CB6535B668fB055dDb402AAdf29D7c8a62C1Bf", + "address": "0xF8Cb2FC7b170A2A7a00c29e38f17e987973c10d1", "abi": [ "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error AccountLiquidatable(uint128 accountId)", @@ -7032,12 +7114,12 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0xfb863c9407d211ffd37053492e03b6b9cd1823775a8474894c7e736e6dfda394", + "deployTxnHash": "0x8eb458194c2fa8897806ae2fcd04721a7dac5e754841028cfd9d29dcaf665d56", "sourceName": "contracts/modules/AsyncOrderSettlementPythModule.sol", "contractName": "AsyncOrderSettlementPythModule", "deployedOn": "contract.AsyncOrderSettlementPythModule", - "gasUsed": 6567145, - "gasCost": "10000000" + "gasUsed": 3802256, + "gasCost": "1006699220" }, "CoreModule": { "address": "0xB4a75B4F362c8304DA36e4A30D3179e17A4BD85a", @@ -7102,7 +7184,7 @@ "gasCost": "10000000" }, "GlobalPerpsMarketModule": { - "address": "0x6a3A82eB4BC47E396F036D5231373a15e089A02e", + "address": "0x962032811FD13CfA6fF3C47fF2C25471861362c1", "abi": [ "error InvalidFeeCollectorInterface(address invalidFeeCollector)", "error InvalidInterestRateParameters(uint128 lowUtilizationInterestRateGradient, uint128 highUtilizationInterestRateGradient)", @@ -7135,6 +7217,7 @@ "function getReferrerShare(address referrer) view returns (uint256 shareRatioD18)", "function getSupportedCollaterals() view returns (uint256[] supportedCollaterals)", "function getSynthDeductionPriority() view returns (uint128[])", + "function globalCollateralValue(uint128 collateralId) view returns (uint256 collateralValue)", "function setCollateralConfiguration(uint128 synthMarketId, uint256 maxCollateralAmount)", "function setFeeCollector(address feeCollector)", "function setInterestRateParameters(uint128 lowUtilizationInterestRateGradient, uint128 interestRateGradientBreakpoint, uint128 highUtilizationInterestRateGradient)", @@ -7148,15 +7231,15 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x2eb0af01c8ffb1f5c2b6d23b16040a2b1d986ef0552648e5ad526d1e610441ff", + "deployTxnHash": "0x6d8b0d4c221bcc606b8e18c6326430c1adeea5a9b64c7d855346b6b8e90fa40c", "sourceName": "contracts/modules/GlobalPerpsMarketModule.sol", "contractName": "GlobalPerpsMarketModule", "deployedOn": "contract.GlobalPerpsMarketModule", - "gasUsed": 3351373, - "gasCost": "10000000" + "gasUsed": 1885483, + "gasCost": "1005861818" }, "LiquidationModule": { - "address": "0x6Cee97B9e3E79c8F3FE10bbcbd15441494e6B62f", + "address": "0x701F8f09FD8Ab9c585afFC269726a53Ad57aE61B", "abi": [ "error FeatureUnavailable(bytes32 which)", "error NotEligibleForLiquidation(uint128 accountId)", @@ -7183,15 +7266,15 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0xe838205f30ea5b80f66ccec361e5ff27432ff0038f42bf3ce52cddd4186f9656", + "deployTxnHash": "0x5e0b60ecd8d0df5dff971ea60235d5a6663709d6573895b82898f33041125cfb", "sourceName": "contracts/modules/LiquidationModule.sol", "contractName": "LiquidationModule", "deployedOn": "contract.LiquidationModule", - "gasUsed": 5732466, - "gasCost": "10000000" + "gasUsed": 3264467, + "gasCost": "1005129091" }, "MarketConfigurationModule": { - "address": "0x43d514c2E051440672330a9409Bef7a84Ca54D83", + "address": "0x6A732F4545a462778BD9DF935C8f2f7d5B2F4eB1", "abi": [ "error InvalidSettlementStrategy(uint256 settlementStrategyId)", "error InvalidSettlementWindowDuration(uint256 duration)", @@ -7229,15 +7312,15 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x260fb6c5048fd955add6d965141650d9043554de3dc969bcca33d398b15e758b", + "deployTxnHash": "0x0db07d6be73dfcc61146e3a76c66f26a11f680e46626efef48b487e59fc1afcc", "sourceName": "contracts/modules/MarketConfigurationModule.sol", "contractName": "MarketConfigurationModule", "deployedOn": "contract.MarketConfigurationModule", - "gasUsed": 1939111, - "gasCost": "10000000" + "gasUsed": 1064187, + "gasCost": "1004487955" }, "PerpsAccountModule": { - "address": "0x0076DED7E470Ab1deCF6c3b0013b5B40794635db", + "address": "0xc5b7205454Ef2e4DDe093442bC1b1457E46B0352", "abi": [ "error AccountLiquidatable(uint128 accountId)", "error AccountNotFound(uint128 accountId)", @@ -7276,15 +7359,15 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x7c720e8382467b1226e047af8a72b71c81729c706ce5e21f23619aff6724153a", + "deployTxnHash": "0x2c66422ef529a5976056a6d35a2c30bd33be56170875eab81e118de8aeee6ad5", "sourceName": "contracts/modules/PerpsAccountModule.sol", "contractName": "PerpsAccountModule", "deployedOn": "contract.PerpsAccountModule", - "gasUsed": 4747726, - "gasCost": "10000000" + "gasUsed": 2747070, + "gasCost": "1003926961" }, "PerpsMarketFactoryModule": { - "address": "0x72775F7ca1d062f4DA2c46aA37D983a508044050", + "address": "0xD2c912fb68382DbDacc979c06DF2DD00ce40aE69", "abi": [ "error FeatureUnavailable(bytes32 which)", "error InvalidMarket(uint128 marketId)", @@ -7311,15 +7394,15 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x3a6b30d23ae87619255e29b2813b00e1315d3c3f90d2ade3ddbdc648f99e4e53", + "deployTxnHash": "0xf19cc48066666646365e207095a1d9605d61109bd1dc48c0747d5bd22c661e19", "sourceName": "contracts/modules/PerpsMarketFactoryModule.sol", "contractName": "PerpsMarketFactoryModule", "deployedOn": "contract.PerpsMarketFactoryModule", - "gasUsed": 3050717, - "gasCost": "10000000" + "gasUsed": 1712590, + "gasCost": "1003436091" }, "PerpsMarketModule": { - "address": "0x2d7b30D7D0Df26D8aD8522B697Aa0294F55b3DD9", + "address": "0x52c4D2EfB536a2b5EF5Bb24D20fC9732d5d27ebc", "abi": [ "error OverflowInt256ToUint256()", "error OverflowUint256ToInt256()", @@ -7335,12 +7418,12 @@ ], "constructorArgs": [], "linkedLibraries": {}, - "deployTxnHash": "0x781bddebf94f740319a91b884fcb6a765731a338e082a59bdf7dab8ba04fe467", + "deployTxnHash": "0x16bd1ecc21cca039625b91d4b2a954ffdb477c6d025640f8f63fcf528778baf6", "sourceName": "contracts/modules/PerpsMarketModule.sol", "contractName": "PerpsMarketModule", "deployedOn": "contract.PerpsMarketModule", - "gasUsed": 1567432, - "gasCost": "10000000" + "gasUsed": 896870, + "gasCost": "1003006580" }, "InitialProxy": { "address": "0xd762960c31210Cf1bDf75b06A5192d395EEDC659", @@ -7377,7 +7460,7 @@ "gasCost": "10000000" }, "PerpsMarketRouter": { - "address": "0x91a6cf02655362a935a54bfc926fc00f1b516e59", + "address": "0x3648f04cd862191231da03fe725ee088c208f248", "abi": [ "error FeatureUnavailable(bytes32 which)", "error InvalidAccountId(uint128 accountId)", @@ -7480,7 +7563,6 @@ "function metadata(uint128 marketId) view returns (string name, string symbol)", "function size(uint128 marketId) view returns (uint256)", "function skew(uint128 marketId) view returns (int256)", - "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientMargin(int256 availableMargin, uint256 minMargin)", "error InvalidSettlementStrategy(uint256 settlementStrategyId)", "error MaxOpenInterestReached(uint128 marketId, uint256 maxMarketSize, int256 newSideSize)", @@ -7497,6 +7579,7 @@ "function getSettlementRewardCost(uint128 marketId, uint128 settlementStrategyId) view returns (uint256)", "function requiredMarginForOrder(uint128 accountId, uint128 marketId, int128 sizeDelta) view returns (uint256 requiredMargin)", "function requiredMarginForOrderWithPrice(uint128 accountId, uint128 marketId, int128 sizeDelta, uint256 price) view returns (uint256 requiredMargin)", + "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientAccountMargin(uint256 leftover)", "error OrderNotValid()", "error OverflowInt128ToUint128()", @@ -7590,6 +7673,7 @@ "function getReferrerShare(address referrer) view returns (uint256 shareRatioD18)", "function getSupportedCollaterals() view returns (uint256[] supportedCollaterals)", "function getSynthDeductionPriority() view returns (uint128[])", + "function globalCollateralValue(uint128 collateralId) view returns (uint256 collateralValue)", "function setCollateralConfiguration(uint128 synthMarketId, uint256 maxCollateralAmount)", "function setFeeCollector(address feeCollector)", "function setInterestRateParameters(uint128 lowUtilizationInterestRateGradient, uint128 interestRateGradientBreakpoint, uint128 highUtilizationInterestRateGradient)", @@ -7602,11 +7686,11 @@ "function updateReferrerShare(address referrer, uint256 shareRatioD18)" ], "deployedOn": "router.PerpsMarketRouter", - "deployTxnHash": "0x0490cd6ddbda8ff17b35f85d7bee26da16765991ae364970b28b80c3d783019c", + "deployTxnHash": "0xc5e8735b193a936fc6449f8b3c4f2c63a994efb67fed2d6a70981e2fd17a7356", "contractName": "PerpsMarketRouter", "sourceName": "PerpsMarketRouter.sol", - "gasUsed": 1679705, - "gasCost": "10000000" + "gasUsed": 1200250, + "gasCost": "1002630758" }, "PerpsMarketProxy": { "address": "0xd762960c31210Cf1bDf75b06A5192d395EEDC659", @@ -7712,7 +7796,6 @@ "function metadata(uint128 marketId) view returns (string name, string symbol)", "function size(uint128 marketId) view returns (uint256)", "function skew(uint128 marketId) view returns (int256)", - "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientMargin(int256 availableMargin, uint256 minMargin)", "error InvalidSettlementStrategy(uint256 settlementStrategyId)", "error MaxOpenInterestReached(uint128 marketId, uint256 maxMarketSize, int256 newSideSize)", @@ -7729,6 +7812,7 @@ "function getSettlementRewardCost(uint128 marketId, uint128 settlementStrategyId) view returns (uint256)", "function requiredMarginForOrder(uint128 accountId, uint128 marketId, int128 sizeDelta) view returns (uint256 requiredMargin)", "function requiredMarginForOrderWithPrice(uint128 accountId, uint128 marketId, int128 sizeDelta, uint256 price) view returns (uint256 requiredMargin)", + "error AcceptablePriceExceeded(uint256 fillPrice, uint256 acceptablePrice)", "error InsufficientAccountMargin(uint256 leftover)", "error OrderNotValid()", "error OverflowInt128ToUint128()", @@ -7822,6 +7906,7 @@ "function getReferrerShare(address referrer) view returns (uint256 shareRatioD18)", "function getSupportedCollaterals() view returns (uint256[] supportedCollaterals)", "function getSynthDeductionPriority() view returns (uint128[])", + "function globalCollateralValue(uint128 collateralId) view returns (uint256 collateralValue)", "function setCollateralConfiguration(uint128 synthMarketId, uint256 maxCollateralAmount)", "function setFeeCollector(address feeCollector)", "function setInterestRateParameters(uint128 lowUtilizationInterestRateGradient, uint128 interestRateGradientBreakpoint, uint128 highUtilizationInterestRateGradient)", @@ -7919,7 +8004,7 @@ }, "imports": { "spotMarket": { - "url": "ipfs://QmeVY3DL3bVDYS1dXPwLHM3kXRhsySmLUJRAUTK5433veW", + "url": "ipfs://QmZt7TxqDXY648HZKmkHHVgDr4HMVkTmQM4BRzqxDWvzMG", "contracts": { "AsyncOrderConfigurationModule": { "address": "0x72ed2071E76BC6Dbc412609eDa87646f032BECD2", @@ -8697,7 +8782,7 @@ }, "imports": { "synthetix": { - "url": "ipfs://QmezoFmwuLYEsh8oueyUq3312S5kPXjMFr78fwo4yanENh", + "url": "ipfs://QmXJuRdzxm936Xszze8MHWzs58odFtr8uBuNK3QZSzZoew", "contracts": { "AccountModule": { "address": "0xbc92917D9794D94BBc67A353D95E4FA5a8bCAB2F", @@ -10259,10 +10344,11 @@ } }, "oracle_manager": { - "url": "ipfs://QmWLst9QCAXxmA4mX7YukDuWfs7oXgciNos6GXDkdpxmZF", + "url": "ipfs://QmY3jkdR6v3qhswKPvUhuNFvhvGpSGiJiutUqtzKgGULbR", "tags": [ "latest" ], + "target": "oracle-manager:latest@with-synthetix", "preset": "with-synthetix", "contracts": { "NodeModule": { @@ -11024,7 +11110,7 @@ } }, "synthetix": { - "url": "ipfs://QmezoFmwuLYEsh8oueyUq3312S5kPXjMFr78fwo4yanENh", + "url": "ipfs://QmXJuRdzxm936Xszze8MHWzs58odFtr8uBuNK3QZSzZoew", "contracts": { "AccountModule": { "address": "0xbc92917D9794D94BBc67A353D95E4FA5a8bCAB2F", @@ -12586,10 +12672,11 @@ } }, "oracle_manager": { - "url": "ipfs://QmWLst9QCAXxmA4mX7YukDuWfs7oXgciNos6GXDkdpxmZF", + "url": "ipfs://QmY3jkdR6v3qhswKPvUhuNFvhvGpSGiJiutUqtzKgGULbR", "tags": [ "latest" ], + "target": "oracle-manager:latest@with-synthetix", "preset": "with-synthetix", "contracts": { "NodeModule": { @@ -13253,22 +13340,22 @@ }, "txns": { "upgrade_proxy": { - "hash": "0xed176e48d6892fbaff8e0898748e3f685777014e244fe21c8faf78791bd9fa1b", + "hash": "0xe95f62e55bcc879476fcfb8d9a927329e69370adc2c8fe371d56320e6b9619a5", "events": { "Upgraded": [ { "name": "Upgraded", "args": [ "0xd762960c31210Cf1bDf75b06A5192d395EEDC659", - "0x91A6Cf02655362A935a54bfC926fc00f1b516e59" + "0x3648F04cd862191231DA03FE725eE088c208f248" ] } ] }, "deployedOn": "invoke.upgrade_proxy", - "gasUsed": 83287, - "gasCost": "10000000", - "signer": "0xe2163dd599067919d1e9108929b568Bf41D3A420" + "gasUsed": 55631, + "gasCost": "1002301914", + "signer": "0xD3DFa13CDc7c133b1700c243f03A8C6Df513A93b" }, "addCreateMarketToFeatureFlag": { "hash": "0xa2cb9c9d5b6e4aa97101180f9778ed23635c4b7aaec4839210d00d12eb9f773e", @@ -13375,6 +13462,7 @@ } } }, + "hash": null, "version": 7 }, "invoke.CoreProxy_addToFeatureFlagAllowlist_createPool_deployer": { @@ -14819,6 +14907,324 @@ }, "hash": "5bd7298564e2d6d4d0954baf81552efd", "version": 7 + }, + "provision.RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp": { + "artifacts": { + "imports": { + "RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp": { + "url": "ipfs://QmUfpaLrod4RccfeUUEXwNWwXiBekvoojnjZHdXhJzteTH", + "tags": [ + "latest" + ], + "target": "synthetix-rewards-distributor:0.0.2@main", + "preset": "main", + "settings": { + "collateralType": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "name": "Rewards Distributor V3", + "payoutToken": "0x22e6966B799c4D5B13BE962E1D117b56327FDa66", + "payoutTokenDecimals": "18", + "poolId": "1", + "rewardManager": "0x32C222A9A159782aFD7529c87FA34b96CA72C696", + "salt": "rewards" + }, + "contracts": { + "RewardsDistributor": { + "address": "0x57130A8a07646C135f6813Dd7F3292658a828E1E", + "abi": [ + "constructor(address rewardManager_, uint128 poolId_, address collateralType_, address payoutToken_, uint8 payoutTokenDecimals_, string name_)", + "function SYSTEM_PRECISION() view returns (uint256)", + "function collateralType() view returns (address)", + "function distributeRewards(uint128 poolId_, address collateralType_, uint256 amount_, uint64 start_, uint32 duration_)", + "function name() view returns (string)", + "function onPositionUpdated(uint128, uint128, address, uint256)", + "function payout(uint128, uint128 poolId_, address collateralType_, address payoutTarget_, uint256 payoutAmount_) returns (bool)", + "function payoutToken() view returns (address)", + "function poolId() view returns (uint128)", + "function precision() view returns (uint256)", + "function rewardManager() view returns (address)", + "function rewardsAmount() view returns (uint256)", + "function setShouldFailPayout(bool shouldFailPayout_)", + "function shouldFailPayout() view returns (bool)", + "function supportsInterface(bytes4 interfaceId) view returns (bool)", + "function token() view returns (address)", + "error FailedTransfer(address from, address to, uint256 value)", + "error InvalidParameter(string parameter, string reason)", + "error NotEnoughBalance(uint256 amountRequested, uint256 currentBalance)", + "error NotEnoughRewardsLeft(uint256 amountRequested, uint256 amountLeft)", + "error Unauthorized(address addr)" + ], + "constructorArgs": [ + "0xffffffaEff0B96Ea8e4f94b2253f31abdD875847", + "1", + "0x912CE59144191C1204E64559FE8253a0e49E6548", + "0x912CE59144191C1204E64559FE8253a0e49E6548", + "18", + "Spartan Council Pool ARB Rewards for ARB LP" + ], + "linkedLibraries": {}, + "deployTxnHash": "0x75da4355aa1e28ab5855a0dae23ab351652ce9f1f5eb9737a10dcbbfec5d49e6", + "sourceName": "src/RewardsDistributor.sol", + "contractName": "RewardsDistributor", + "deployedOn": "contract.RewardsDistributor", + "gasUsed": 975551, + "gasCost": "1002014175" + } + }, + "extras": { + "collateralType": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "name": "Rewards Distributor V3", + "payoutToken": "0x22e6966B799c4D5B13BE962E1D117b56327FDa66", + "payoutTokenDecimals": "18", + "poolId": "1", + "rewardManager": "0x32C222A9A159782aFD7529c87FA34b96CA72C696", + "salt": "rewards" + } + } + } + }, + "hash": null, + "version": 7 + }, + "provision.RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp": { + "artifacts": { + "imports": { + "RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp": { + "url": "ipfs://QmekraySfXUL731sz6nz4Dbt23VB8KiHUPV1BVxMZNSuGn", + "tags": [ + "latest" + ], + "target": "synthetix-rewards-distributor:0.0.2@main", + "preset": "main", + "settings": { + "collateralType": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "name": "Rewards Distributor V3", + "payoutToken": "0x22e6966B799c4D5B13BE962E1D117b56327FDa66", + "payoutTokenDecimals": "18", + "poolId": "1", + "rewardManager": "0x32C222A9A159782aFD7529c87FA34b96CA72C696", + "salt": "rewards" + }, + "contracts": { + "RewardsDistributor": { + "address": "0xB6b14C427cA0AC44FE9a41332e8fE9BB4Ef244Ce", + "abi": [ + "constructor(address rewardManager_, uint128 poolId_, address collateralType_, address payoutToken_, uint8 payoutTokenDecimals_, string name_)", + "function SYSTEM_PRECISION() view returns (uint256)", + "function collateralType() view returns (address)", + "function distributeRewards(uint128 poolId_, address collateralType_, uint256 amount_, uint64 start_, uint32 duration_)", + "function name() view returns (string)", + "function onPositionUpdated(uint128, uint128, address, uint256)", + "function payout(uint128, uint128 poolId_, address collateralType_, address payoutTarget_, uint256 payoutAmount_) returns (bool)", + "function payoutToken() view returns (address)", + "function poolId() view returns (uint128)", + "function precision() view returns (uint256)", + "function rewardManager() view returns (address)", + "function rewardsAmount() view returns (uint256)", + "function setShouldFailPayout(bool shouldFailPayout_)", + "function shouldFailPayout() view returns (bool)", + "function supportsInterface(bytes4 interfaceId) view returns (bool)", + "function token() view returns (address)", + "error FailedTransfer(address from, address to, uint256 value)", + "error InvalidParameter(string parameter, string reason)", + "error NotEnoughBalance(uint256 amountRequested, uint256 currentBalance)", + "error NotEnoughRewardsLeft(uint256 amountRequested, uint256 amountLeft)", + "error Unauthorized(address addr)" + ], + "constructorArgs": [ + "0xffffffaEff0B96Ea8e4f94b2253f31abdD875847", + "1", + "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "0x912CE59144191C1204E64559FE8253a0e49E6548", + "18", + "Spartan Council Pool ARB Rewards for USDC LP" + ], + "linkedLibraries": {}, + "deployTxnHash": "0xc8a2da06584850eae2141921f018a48f22709dd886324fbe0137100b879330a7", + "sourceName": "src/RewardsDistributor.sol", + "contractName": "RewardsDistributor", + "deployedOn": "contract.RewardsDistributor", + "gasUsed": 975563, + "gasCost": "1001762404" + } + }, + "extras": { + "collateralType": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "name": "Rewards Distributor V3", + "payoutToken": "0x22e6966B799c4D5B13BE962E1D117b56327FDa66", + "payoutTokenDecimals": "18", + "poolId": "1", + "rewardManager": "0x32C222A9A159782aFD7529c87FA34b96CA72C696", + "salt": "rewards" + } + } + } + }, + "hash": null, + "version": 7 + }, + "provision.RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp": { + "artifacts": { + "imports": { + "RewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp": { + "url": "ipfs://QmTz3WNk8VK14bh4mZECg9A6eNrgevUfU8AU4r5uuEtdBz", + "tags": [ + "latest" + ], + "target": "synthetix-rewards-distributor:0.0.2@main", + "preset": "main", + "settings": { + "collateralType": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "name": "Rewards Distributor V3", + "payoutToken": "0x22e6966B799c4D5B13BE962E1D117b56327FDa66", + "payoutTokenDecimals": "18", + "poolId": "1", + "rewardManager": "0x32C222A9A159782aFD7529c87FA34b96CA72C696", + "salt": "rewards" + }, + "contracts": { + "RewardsDistributor": { + "address": "0x3e548c93eB2F35B44958C90697AD8254b875ba01", + "abi": [ + "constructor(address rewardManager_, uint128 poolId_, address collateralType_, address payoutToken_, uint8 payoutTokenDecimals_, string name_)", + "function SYSTEM_PRECISION() view returns (uint256)", + "function collateralType() view returns (address)", + "function distributeRewards(uint128 poolId_, address collateralType_, uint256 amount_, uint64 start_, uint32 duration_)", + "function name() view returns (string)", + "function onPositionUpdated(uint128, uint128, address, uint256)", + "function payout(uint128, uint128 poolId_, address collateralType_, address payoutTarget_, uint256 payoutAmount_) returns (bool)", + "function payoutToken() view returns (address)", + "function poolId() view returns (uint128)", + "function precision() view returns (uint256)", + "function rewardManager() view returns (address)", + "function rewardsAmount() view returns (uint256)", + "function setShouldFailPayout(bool shouldFailPayout_)", + "function shouldFailPayout() view returns (bool)", + "function supportsInterface(bytes4 interfaceId) view returns (bool)", + "function token() view returns (address)", + "error FailedTransfer(address from, address to, uint256 value)", + "error InvalidParameter(string parameter, string reason)", + "error NotEnoughBalance(uint256 amountRequested, uint256 currentBalance)", + "error NotEnoughRewardsLeft(uint256 amountRequested, uint256 amountLeft)", + "error Unauthorized(address addr)" + ], + "constructorArgs": [ + "0xffffffaEff0B96Ea8e4f94b2253f31abdD875847", + "1", + "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "0x912CE59144191C1204E64559FE8253a0e49E6548", + "18", + "Spartan Council Pool ARB Rewards for WETH LP" + ], + "linkedLibraries": {}, + "deployTxnHash": "0x34634982ef43b633ff6589fb2e9b46fe53bc261cbaf363ade04765a7a07d7e4e", + "sourceName": "src/RewardsDistributor.sol", + "contractName": "RewardsDistributor", + "deployedOn": "contract.RewardsDistributor", + "gasUsed": 975563, + "gasCost": "1001542104" + } + }, + "extras": { + "collateralType": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", + "name": "Rewards Distributor V3", + "payoutToken": "0x22e6966B799c4D5B13BE962E1D117b56327FDa66", + "payoutTokenDecimals": "18", + "poolId": "1", + "rewardManager": "0x32C222A9A159782aFD7529c87FA34b96CA72C696", + "salt": "rewards" + } + } + } + }, + "hash": null, + "version": 7 + }, + "invoke.CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp": { + "artifacts": { + "contracts": {}, + "txns": { + "CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp": { + "hash": "0x1ae4d7455b10124cf33b72c857373de0248fd65355c67b50d3960be6b5a80056", + "events": { + "RewardsDistributorRegistered": [ + { + "name": "RewardsDistributorRegistered", + "args": [ + "1", + "0x912CE59144191C1204E64559FE8253a0e49E6548", + "0x57130A8a07646C135f6813Dd7F3292658a828E1E" + ] + } + ] + }, + "deployedOn": "invoke.CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_ARB_lp", + "gasUsed": 129016, + "gasCost": "1001349342", + "signer": "0xD3DFa13CDc7c133b1700c243f03A8C6Df513A93b" + } + }, + "settings": {} + }, + "hash": "03b8f6a5c5019dc9716fbc9418d004e4", + "version": 7 + }, + "invoke.CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp": { + "artifacts": { + "contracts": {}, + "txns": { + "CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp": { + "hash": "0x9923234a63455eb36636b0cebb6f49a4916d0eacef71e057dd26e9321a4d715d", + "events": { + "RewardsDistributorRegistered": [ + { + "name": "RewardsDistributorRegistered", + "args": [ + "1", + "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", + "0xB6b14C427cA0AC44FE9a41332e8fE9BB4Ef244Ce" + ] + } + ] + }, + "deployedOn": "invoke.CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_USDC_lp", + "gasUsed": 129016, + "gasCost": "1001180675", + "signer": "0xD3DFa13CDc7c133b1700c243f03A8C6Df513A93b" + } + }, + "settings": {} + }, + "hash": "f9e94cec3bdf6b37682f7831e066fe2c", + "version": 7 + }, + "invoke.CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp": { + "artifacts": { + "contracts": {}, + "txns": { + "CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp": { + "hash": "0x3e5a32158e8bc4b4f19d30fdeb75261539ec8d7e7330d755afe99e045141e696", + "events": { + "RewardsDistributorRegistered": [ + { + "name": "RewardsDistributorRegistered", + "args": [ + "1", + "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "0x3e548c93eB2F35B44958C90697AD8254b875ba01" + ] + } + ] + }, + "deployedOn": "invoke.CoreProxy_registerRewardsDistributor_SpartanCouncilPool_ARB_rewards_for_WETH_lp", + "gasUsed": 129016, + "gasCost": "1001033091", + "signer": "0xD3DFa13CDc7c133b1700c243f03A8C6Df513A93b" + } + }, + "settings": {} + }, + "hash": "f65ce8a6494ad862dce756ec9a1cd6e7", + "version": 7 } }, "options": {}, diff --git a/42161-main/meta.json b/42161-main/meta.json index 298d41e24c..c692bd0556 100644 --- a/42161-main/meta.json +++ b/42161-main/meta.json @@ -2,9 +2,9 @@ "chainId": 42161, "name": "synthetix-omnibus", "preset": "main", - "version": "1", - "generator": "cannon cli 2.13.3", - "timestamp": 1717503313, + "version": "2", + "generator": "cannon cli 2.15.0", + "timestamp": 1718158504, "miscUrl": "ipfs://QmeSt2mnJKE8qmRhLyYbHQQxDKpsFbcWnw5e7JF4xVbN6k", "contracts": { "CoreProxy": "0xffffffaEff0B96Ea8e4f94b2253f31abdD875847",