├── .circleci └── config.yml ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc.js ├── .vscode └── launch.json ├── LICENSE ├── README.md ├── content ├── addresses.md ├── contracts │ ├── audits.md │ ├── index.md │ ├── publisher.md │ ├── source │ │ ├── contracts │ │ │ ├── AddressResolver.md │ │ │ ├── BaseDebtCache.md │ │ │ ├── BaseDebtMigrator.md │ │ │ ├── BaseMigration.md │ │ │ ├── BaseOneNetAggregator.md │ │ │ ├── BaseRewardEscrowV2.md │ │ │ ├── BaseRewardEscrowV2Frozen.md │ │ │ ├── BaseSingleNetworkAggregator.md │ │ │ ├── BaseSynthetix.md │ │ │ ├── BaseSynthetixBridge.md │ │ │ ├── BinaryOption.md │ │ │ ├── BinaryOptionMarket.md │ │ │ ├── BinaryOptionMarketData.md │ │ │ ├── BinaryOptionMarketFactory.md │ │ │ ├── BinaryOptionMarketManager.md │ │ │ ├── BridgeMigrator.md │ │ │ ├── CircuitBreaker.md │ │ │ ├── Collateral.md │ │ │ ├── CollateralErc20.md │ │ │ ├── CollateralEth.md │ │ │ ├── CollateralManager.md │ │ │ ├── CollateralManagerState.md │ │ │ ├── CollateralShort.md │ │ │ ├── CollateralState.md │ │ │ ├── CollateralUtil.md │ │ │ ├── ContractStorage.md │ │ │ ├── DappMaintenance.md │ │ │ ├── DebtCache.md │ │ │ ├── DebtMigratorOnEthereum.md │ │ │ ├── DebtMigratorOnOptimism.md │ │ │ ├── DelegateApprovals.md │ │ │ ├── Depot.md │ │ │ ├── DirectIntegrationManager.md │ │ │ ├── DynamicSynthRedeemer.md │ │ │ ├── EmptyCollateralManager.md │ │ │ ├── EmptyEtherCollateral.md │ │ │ ├── EmptyEtherWrapper.md │ │ │ ├── EmptyFuturesMarketManager.md │ │ │ ├── EscrowChecker.md │ │ │ ├── EternalStorage.md │ │ │ ├── EtherCollateral.md │ │ │ ├── EtherCollateralsUSD.md │ │ │ ├── EtherWrapper.md │ │ │ ├── ExchangeCircuitBreaker.md │ │ │ ├── ExchangeRates.md │ │ │ ├── ExchangeRatesWithDexPricing.md │ │ │ ├── ExchangeRatesWithoutInvPricing.md │ │ │ ├── ExchangeState.md │ │ │ ├── Exchanger.md │ │ │ ├── ExchangerWithFeeRecAlternatives.md │ │ │ ├── ExchangerWithVirtualSynth.md │ │ │ ├── ExternStateToken.md │ │ │ ├── FeePool.md │ │ │ ├── FeePoolEternalStorage.md │ │ │ ├── FeePoolState.md │ │ │ ├── FixedSupplySchedule.md │ │ │ ├── FlexibleStorage.md │ │ │ ├── FuturesMarket.md │ │ │ ├── FuturesMarketBase.md │ │ │ ├── FuturesMarketData.md │ │ │ ├── FuturesMarketManager.md │ │ │ ├── FuturesMarketSettings.md │ │ │ ├── IEtherWrapper.md │ │ │ ├── ImmutableReadProxy.md │ │ │ ├── ImportableRewardEscrowV2.md │ │ │ ├── ImportableRewardEscrowV2Frozen.md │ │ │ ├── IssuanceEternalStorage.md │ │ │ ├── Issuer.md │ │ │ ├── IssuerWithoutLiquidations.md │ │ │ ├── IssuerWithoutUpdatableCache.md │ │ │ ├── LegacyOwned.md │ │ │ ├── LegacyTokenState.md │ │ │ ├── LimitedSetup.md │ │ │ ├── Liquidations.md │ │ │ ├── Liquidator.md │ │ │ ├── LiquidatorRewards.md │ │ │ ├── Migration_Acrab.md │ │ │ ├── Migration_AcrabOptimism.md │ │ │ ├── Migration_AcrabOptimismPatch1.md │ │ │ ├── Migration_AcrabPatch1.md │ │ │ ├── Migration_Algol.md │ │ │ ├── Migration_AlgolOptimism.md │ │ │ ├── Migration_Aljanah.md │ │ │ ├── Migration_AljanahOptimism.md │ │ │ ├── Migration_Alkaid.md │ │ │ ├── Migration_AlmachOptimism.md │ │ │ ├── Migration_Alnitak.md │ │ │ ├── Migration_Alphard.md │ │ │ ├── Migration_AlphardOptimism.md │ │ │ ├── Migration_Alphecca.md │ │ │ ├── Migration_AlpheccaOptimism.md │ │ │ ├── Migration_Alpheratz.md │ │ │ ├── Migration_AlpheratzOptimism.md │ │ │ ├── Migration_Alsephina.md │ │ │ ├── Migration_AlsephinaOptimism.md │ │ │ ├── Migration_AludraOptimismStep1.md │ │ │ ├── Migration_AludraOptimismStep2.md │ │ │ ├── Migration_AnkaaOptimismStep1.md │ │ │ ├── Migration_AnkaaOptimismStep2.md │ │ │ ├── Migration_Aspidiske.md │ │ │ ├── Migration_AspidiskeOptimism.md │ │ │ ├── Migration_Caph.md │ │ │ ├── Migration_CaphOptimismStep1.md │ │ │ ├── Migration_CaphOptimismStep10.md │ │ │ ├── Migration_CaphOptimismStep11.md │ │ │ ├── Migration_CaphOptimismStep12.md │ │ │ ├── Migration_CaphOptimismStep13.md │ │ │ ├── Migration_CaphOptimismStep14.md │ │ │ ├── Migration_CaphOptimismStep2.md │ │ │ ├── Migration_CaphOptimismStep3.md │ │ │ ├── Migration_CaphOptimismStep4.md │ │ │ ├── Migration_CaphOptimismStep5.md │ │ │ ├── Migration_CaphOptimismStep6.md │ │ │ ├── Migration_CaphOptimismStep7.md │ │ │ ├── Migration_CaphOptimismStep8.md │ │ │ ├── Migration_CaphOptimismStep9.md │ │ │ ├── Migration_Diphda.md │ │ │ ├── Migration_DiphdaOptimism.md │ │ │ ├── Migration_DiphdaOptimism_part1.md │ │ │ ├── Migration_DiphdaOptimism_part2.md │ │ │ ├── Migration_Diphda_part1.md │ │ │ ├── Migration_Diphda_part2.md │ │ │ ├── Migration_DschubbaOptimismStep1.md │ │ │ ├── Migration_DschubbaOptimismStep2.md │ │ │ ├── Migration_DschubbaOptimismStep3.md │ │ │ ├── Migration_EltaninOptimism.md │ │ │ ├── Migration_EnifOptimismStep1.md │ │ │ ├── Migration_Hamal.md │ │ │ ├── Migration_Han.md │ │ │ ├── Migration_HanOptimism.md │ │ │ ├── Migration_IzarOptimismStep1.md │ │ │ ├── Migration_IzarOptimismStep2.md │ │ │ ├── Migration_IzarOptimismStep3.md │ │ │ ├── Migration_IzarOptimismStep4.md │ │ │ ├── Migration_Kaus.md │ │ │ ├── Migration_KochabOptimism.md │ │ │ ├── Migration_LarawagOptimismStep1.md │ │ │ ├── Migration_LarawagOptimismStep2.md │ │ │ ├── Migration_MarkabOptimismStep1.md │ │ │ ├── Migration_MarkebOptimismStep1.md │ │ │ ├── Migration_MenkentOptimism.md │ │ │ ├── Migration_MerakOptimismStep1.md │ │ │ ├── Migration_Mintaka.md │ │ │ ├── Migration_MintakaOptimism.md │ │ │ ├── Migration_Mirach.md │ │ │ ├── Migration_MirachOptimism.md │ │ │ ├── Migration_Mirfak.md │ │ │ ├── Migration_Mirzam.md │ │ │ ├── Migration_MirzamOptimism.md │ │ │ ├── Migration_Mizar.md │ │ │ ├── Migration_MizarOptimism.md │ │ │ ├── Migration_Muhlifain.md │ │ │ ├── Migration_MuhlifainOptimism.md │ │ │ ├── Migration_Naos.md │ │ │ ├── Migration_NaosOptimism.md │ │ │ ├── Migration_NunkiOptimism.md │ │ │ ├── Migration_Peacock.md │ │ │ ├── Migration_PeacockOptimism.md │ │ │ ├── Migration_Phecda.md │ │ │ ├── Migration_Rasalhague.md │ │ │ ├── Migration_RasalhagueOptimism.md │ │ │ ├── Migration_SabikOptimismStep1.md │ │ │ ├── Migration_SabikOptimismStep2.md │ │ │ ├── Migration_SabikOptimismStep3.md │ │ │ ├── Migration_SabikOptimismStep4.md │ │ │ ├── Migration_SabikOptimismStep5.md │ │ │ ├── Migration_Saiph.md │ │ │ ├── Migration_SaiphOptimism.md │ │ │ ├── Migration_ScheatOptimismStep1.md │ │ │ ├── Migration_Schedar.md │ │ │ ├── Migration_SchedarOptimism.md │ │ │ ├── Migration_Suhail.md │ │ │ ├── Migration_SuhailOptimism.md │ │ │ ├── Migration_Tiaki.md │ │ │ ├── MinimalProxyFactory.md │ │ │ ├── MintableSynthetix.md │ │ │ ├── MixinFuturesMarketSettings.md │ │ │ ├── MixinFuturesNextPriceOrders.md │ │ │ ├── MixinFuturesViews.md │ │ │ ├── MixinPerpsV2MarketNextPrice.md │ │ │ ├── MixinPerpsV2MarketSettings.md │ │ │ ├── MixinPerpsV2MarketViews.md │ │ │ ├── MixinResolver.md │ │ │ ├── MixinSystemSettings.md │ │ │ ├── MultiCollateralSynth.md │ │ │ ├── NativeEtherWrapper.md │ │ │ ├── OneNetAggregatorDebtRatio.md │ │ │ ├── OneNetAggregatorIssuedSynths.md │ │ │ ├── OneNetAggregatorsDEFI.md │ │ │ ├── Owned.md │ │ │ ├── OwnerRelayOnEthereum.md │ │ │ ├── OwnerRelayOnOptimism.md │ │ │ ├── Pausable.md │ │ │ ├── PerpsV2ExchangeRate.md │ │ │ ├── PerpsV2Market.md │ │ │ ├── PerpsV2MarketBase.md │ │ │ ├── PerpsV2MarketData.md │ │ │ ├── PerpsV2MarketDelayedExecution.md │ │ │ ├── PerpsV2MarketDelayedIntent.md │ │ │ ├── PerpsV2MarketDelayedOrders.md │ │ │ ├── PerpsV2MarketDelayedOrdersBase.md │ │ │ ├── PerpsV2MarketDelayedOrdersOffchain.md │ │ │ ├── PerpsV2MarketLiquidate.md │ │ │ ├── PerpsV2MarketProxyable.md │ │ │ ├── PerpsV2MarketSettings.md │ │ │ ├── PerpsV2MarketState.md │ │ │ ├── PerpsV2MarketStateLegacyR1.md │ │ │ ├── PerpsV2MarketViews.md │ │ │ ├── PerpsV2NextPriceMixin.md │ │ │ ├── PerpsV2Settings.md │ │ │ ├── PerpsV2SettingsMixin.md │ │ │ ├── PerpsV2ViewsMixin.md │ │ │ ├── Proxy.md │ │ │ ├── ProxyERC20.md │ │ │ ├── ProxyPerpsV2.md │ │ │ ├── Proxyable.md │ │ │ ├── PurgeableSynth.md │ │ │ ├── PythStructs.md │ │ │ ├── ReadProxy.md │ │ │ ├── RealtimeDebtCache.md │ │ │ ├── RewardEscrow.md │ │ │ ├── RewardEscrowV2.md │ │ │ ├── RewardEscrowV2Frozen.md │ │ │ ├── RewardEscrowV2Storage.md │ │ │ ├── RewardsDistribution.md │ │ │ ├── RewardsDistributionRecipient.md │ │ │ ├── SecondaryDeposit.md │ │ │ ├── SelfDestructible.md │ │ │ ├── ShortingRewards.md │ │ │ ├── SingleNetworkAggregatorDebtRatio.md │ │ │ ├── SingleNetworkAggregatorIssuedSynths.md │ │ │ ├── StakingRewardUpdater.md │ │ │ ├── StakingRewards.md │ │ │ ├── State.md │ │ │ ├── StateShared.md │ │ │ ├── SupplySchedule.md │ │ │ ├── Synth.md │ │ │ ├── SynthRedeemer.md │ │ │ ├── SynthUtil.md │ │ │ ├── Synthetix.md │ │ │ ├── SynthetixBridgeEscrow.md │ │ │ ├── SynthetixBridgeToBase.md │ │ │ ├── SynthetixBridgeToOptimism.md │ │ │ ├── SynthetixDebtShare.md │ │ │ ├── SynthetixEscrow.md │ │ │ ├── SynthetixState.md │ │ │ ├── SynthetixStateWithLimitedSetup.md │ │ │ ├── SystemSettings.md │ │ │ ├── SystemStatus.md │ │ │ ├── TemporarilyOwned.md │ │ │ ├── TokenState.md │ │ │ ├── TradingRewards.md │ │ │ ├── VirtualSynth.md │ │ │ ├── VirtualSynthMastercopy.md │ │ │ ├── Wrapper.md │ │ │ └── WrapperFactory.md │ │ ├── interfaces │ │ │ ├── AggregatorV2V3Interface.md │ │ │ ├── IAddressResolver.md │ │ │ ├── IBaseSynthetixBridge.md │ │ │ ├── IBinaryOption.md │ │ │ ├── IBinaryOptionMarket.md │ │ │ ├── IBinaryOptionMarketManager.md │ │ │ ├── ICircuitBreaker.md │ │ │ ├── ICollateralErc20.md │ │ │ ├── ICollateralEth.md │ │ │ ├── ICollateralLoan.md │ │ │ ├── ICollateralManager.md │ │ │ ├── ICollateralUtil.md │ │ │ ├── IDebtCache.md │ │ │ ├── IDebtMigrator.md │ │ │ ├── IDelegateApprovals.md │ │ │ ├── IDepot.md │ │ │ ├── IDexPriceAggregator.md │ │ │ ├── IDirectIntegrationManager.md │ │ │ ├── IDynamicSynthRedeemer.md │ │ │ ├── IERC20.md │ │ │ ├── IEtherCollateral.md │ │ │ ├── IEtherCollateralsUSD.md │ │ │ ├── IExchangeCircuitBreaker.md │ │ │ ├── IExchangeRates.md │ │ │ ├── IExchangeState.md │ │ │ ├── IExchanger.md │ │ │ ├── IExchangerInternalDebtCache.md │ │ │ ├── IFeePool.md │ │ │ ├── IFlexibleStorage.md │ │ │ ├── IFuturesMarket.md │ │ │ ├── IFuturesMarketBaseTypes.md │ │ │ ├── IFuturesMarketManager.md │ │ │ ├── IFuturesMarketManagerInternal.md │ │ │ ├── IFuturesMarketSettings.md │ │ │ ├── IHasBalance.md │ │ │ ├── IIssuer.md │ │ │ ├── IIssuerInternal.md │ │ │ ├── IIssuerInternalDebtCache.md │ │ │ ├── ILiquidations.md │ │ │ ├── ILiquidator.md │ │ │ ├── ILiquidatorRewards.md │ │ │ ├── IMarketViews.md │ │ │ ├── IOldSynthetixBridgeToOptimism.md │ │ │ ├── IOwned.md │ │ │ ├── IOwnerRelayOnOptimism.md │ │ │ ├── IPerpsV2BaseTypes.md │ │ │ ├── IPerpsV2ExchangeRate.md │ │ │ ├── IPerpsV2Market.md │ │ │ ├── IPerpsV2MarketBaseTypes.md │ │ │ ├── IPerpsV2MarketBaseTypesLegacyR1.md │ │ │ ├── IPerpsV2MarketConsolidated.md │ │ │ ├── IPerpsV2MarketDelayedExecution.md │ │ │ ├── IPerpsV2MarketDelayedIntent.md │ │ │ ├── IPerpsV2MarketDelayedOrders.md │ │ │ ├── IPerpsV2MarketLiquidate.md │ │ │ ├── IPerpsV2MarketOffchainOrders.md │ │ │ ├── IPerpsV2MarketSettings.md │ │ │ ├── IPerpsV2MarketState.md │ │ │ ├── IPerpsV2MarketViews.md │ │ │ ├── IPerpsV2Settings.md │ │ │ ├── IProxy.md │ │ │ ├── IPyth.md │ │ │ ├── IRewardEscrow.md │ │ │ ├── IRewardEscrowV2.md │ │ │ ├── IRewardEscrowV2Frozen.md │ │ │ ├── IRewardEscrowV2Storage.md │ │ │ ├── IRewardsDistribution.md │ │ │ ├── ISecondaryDeposit.md │ │ │ ├── IShortingRewards.md │ │ │ ├── IStakingRewards.md │ │ │ ├── ISupplySchedule.md │ │ │ ├── ISynth.md │ │ │ ├── ISynthRedeemer.md │ │ │ ├── ISynthetix.md │ │ │ ├── ISynthetixBridgeEscrow.md │ │ │ ├── ISynthetixBridgeToBase.md │ │ │ ├── ISynthetixBridgeToOptimism.md │ │ │ ├── ISynthetixDebtShare.md │ │ │ ├── ISynthetixEscrow.md │ │ │ ├── ISynthetixInternal.md │ │ │ ├── ISynthetixNamedContract.md │ │ │ ├── ISynthetixState.md │ │ │ ├── ISystemSettings.md │ │ │ ├── ISystemStatus.md │ │ │ ├── ITradingRewards.md │ │ │ ├── IVirtualSynth.md │ │ │ ├── IVirtualSynthInternal.md │ │ │ ├── IWETH.md │ │ │ ├── IWrapper.md │ │ │ └── IWrapperFactory.md │ │ └── libraries │ │ │ ├── AddressListLib.md │ │ │ ├── AddressSetLib.md │ │ │ ├── Bytes32SetLib.md │ │ │ ├── ExchangeSettlementLib.md │ │ │ ├── Math.md │ │ │ ├── MigrationLib_Diphda.md │ │ │ ├── MigrationLib_DiphdaOptimism.md │ │ │ ├── Migration_Alkaid_Supplemental.md │ │ │ ├── SafeCast.md │ │ │ ├── SafeDecimalMath.md │ │ │ ├── SafeMath.md │ │ │ ├── SignedSafeDecimalMath.md │ │ │ ├── SignedSafeMath.md │ │ │ ├── SystemSettingsLib.md │ │ │ └── VestingEntries.md │ ├── testing.md │ └── transactions.md ├── extra.css ├── governance.md ├── img │ ├── Favicon.png │ ├── graphs │ │ ├── AddressResolver.svg │ │ ├── DelegateApprovals-architecture.svg │ │ ├── DelegateApprovals.svg │ │ ├── Depot.svg │ │ ├── EscrowChecker.svg │ │ ├── EternalStorage.svg │ │ ├── ExchangeRates-architecture.svg │ │ ├── ExchangeRates.svg │ │ ├── Exchanger-architecture.svg │ │ ├── Exchanger.svg │ │ ├── ExternStateToken.svg │ │ ├── FeePool-architecture.svg │ │ ├── FeePool.svg │ │ ├── FeePoolEternalStorage.svg │ │ ├── FeePoolState.svg │ │ ├── Issuer-architecture.svg │ │ ├── Issuer.svg │ │ ├── LimitedSetup.svg │ │ ├── MixinResolver.svg │ │ ├── Owned.svg │ │ ├── Pausable.svg │ │ ├── Proxy-architecture.svg │ │ ├── Proxy.svg │ │ ├── ProxyERC20.svg │ │ ├── Proxyable.svg │ │ ├── PurgeableSynth.svg │ │ ├── ReentrancyPreventer.svg │ │ ├── RewardEscrow.svg │ │ ├── RewardsDistribution.svg │ │ ├── SafeDecimalMath.svg │ │ ├── SelfDestructible.svg │ │ ├── State.svg │ │ ├── SupplySchedule.svg │ │ ├── Synth.svg │ │ ├── Synthetix-architecture.svg │ │ ├── Synthetix.svg │ │ ├── SynthetixEscrow.svg │ │ ├── SynthetixState.svg │ │ ├── TokenFallbackCaller.svg │ │ ├── TokenState.svg │ │ ├── contract-architecture.svg │ │ └── synthetix-docs-graphs.drawio │ ├── logos │ │ ├── ARAW_logo_dark.svg │ │ ├── Hero.svg │ │ ├── data-integration-header.png │ │ ├── integrate_data.png │ │ ├── integrate_staking.png │ │ ├── integrate_trading.png │ │ ├── staking-integration-header.png │ │ ├── synthetix-docs-graphs.drawio │ │ ├── synthetix_blue_logo.png │ │ ├── synthetix_icon_blue.svg │ │ ├── synthetix_logo.svg │ │ ├── synthetix_logo_light.png │ │ ├── synthetix_logo_light.svg │ │ ├── synthetix_text_logo.png │ │ ├── synthetix_text_logo_white.png │ │ └── synths-integration-header.png │ └── misc │ │ ├── Staking Button.png │ │ ├── Synthetix Data.png │ │ ├── Synths Button.png │ │ ├── circleci.png │ │ ├── delphi_digital_debt_example.png │ │ ├── events-burn.png │ │ ├── events-claim.png │ │ ├── events-delegate.png │ │ ├── events-depot.png │ │ ├── events-exchange.png │ │ ├── events-mint.png │ │ ├── events-trade.png │ │ ├── kovan-depot.gif │ │ └── travis.png ├── incentives.md ├── index.md ├── integrations │ ├── claiming.md │ ├── current-integrations.md │ ├── data.md │ ├── delegating.md │ ├── depot.md │ ├── ens.md │ ├── ether-wrapper.md │ ├── index.md │ ├── settlement.md │ ├── staking.md │ ├── testnets.md │ ├── trading.md │ ├── unstaking.md │ ├── virtual-synths.md │ └── volume-program.md ├── js │ ├── .eslintrc.js │ └── sectionSeparators.js ├── libraries │ ├── examples.md │ ├── index.md │ ├── js-monorepo.md │ ├── synthetix-assets.md │ ├── synthetix-cli.md │ ├── synthetix-data.md │ ├── synthetix-js.md │ ├── synthetix.md │ └── versioning.md ├── litepaper │ ├── chinese.md │ ├── index.md │ ├── korean.md │ └── russian.md ├── releases.md ├── synopsis.md └── tokens │ ├── index.md │ └── list.md ├── mkdocs.yml ├── netlify.toml ├── overrides └── partials │ └── integrations │ └── analytics │ └── matomo.html ├── package-lock.json ├── package.json ├── requirements.txt ├── runtime.txt └── scripts ├── build-addresses.js ├── build-contracts-ast-docs.js ├── build-releases.js ├── build-repo-readmes.js ├── build-tokens.js ├── build.js ├── md-2-json.js └── utils.js /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | env_defaults: 2 | docker: &ref_0 3 | - image: circleci/node:16.13 4 | auth: 5 | username: $DOCKERHUB_USERNAME 6 | password: $DOCKERHUB_TOKEN 7 | 8 | version: 2.1 9 | jobs: 10 | prepare: 11 | docker: *ref_0 12 | steps: 13 | - checkout 14 | - restore_cache: 15 | keys: 16 | - 'v1.4-dependencies-{{ checksum "package.json" }}' 17 | - v1.4-dependencies- 18 | - run: npm install 19 | - save_cache: 20 | paths: 21 | - node_modules 22 | key: 'v1.4-dependencies-{{ checksum "package.json" }}' 23 | - persist_to_workspace: 24 | root: . 25 | paths: 26 | - node_modules 27 | lint: 28 | docker: *ref_0 29 | steps: 30 | - checkout 31 | - attach_workspace: 32 | at: . 33 | - run: npm run lint 34 | 35 | build: 36 | docker: *ref_0 37 | steps: 38 | - checkout 39 | - attach_workspace: 40 | at: . 41 | - run: 42 | name: 'Ensure no changes after running a build' 43 | command: npm run build && git diff --exit-code 44 | 45 | workflows: 46 | version: 2 47 | verify: 48 | jobs: 49 | - prepare: 50 | context: 51 | - Docker Auth 52 | - lint: 53 | requires: 54 | - prepare 55 | context: 56 | - Docker Auth 57 | - build: 58 | requires: 59 | - prepare 60 | context: 61 | - Docker Auth 62 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | site 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | env: { 5 | es6: true, 6 | // jest: true, 7 | node: true, 8 | }, 9 | extends: 'eslint:recommended', 10 | plugins: ['import'], 11 | parserOptions: { 12 | ecmaVersion: 9, 13 | }, 14 | rules: { 15 | 'no-console': 'off', 16 | indent: ['error', 'tab', { ignoredNodes: ['TemplateLiteral > *'], SwitchCase: 1 }], 17 | 'prettier/prettier': 'off', 18 | 'import/no-unresolved': ['error', { commonjs: true }], 19 | 'linebreak-style': ['error', 'unix'], 20 | quotes: ['error', 'single'], 21 | strict: ['error', 'global'], 22 | semi: ['error', 'always'], 23 | }, 24 | }; 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | node_modules 132 | 133 | # Preview files 134 | *.preview 135 | 136 | *.DS_Store 137 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: true, 3 | trailingComma: 'all', 4 | singleQuote: true, 5 | printWidth: 120, 6 | arrowParens: 'avoid', 7 | useTabs: true, 8 | overrides: [ 9 | { 10 | files: '*.md', 11 | options: { 12 | useTabs: false, 13 | }, 14 | }, 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "skipFiles": ["/**"], 12 | "program": "${file}" 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Synthetix 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Synthetix System Documentation 2 | 3 | [![Netlify Status](https://api.netlify.com/api/v1/badges/355e519f-2ca3-43c5-9b02-0ba8e724a62e/deploy-status)](https://app.netlify.com/sites/snxdocs/deploys) 4 | 5 | These pages are built with MkDocs; for full documentation visit [mkdocs.org](https://mkdocs.org). 6 | 7 | This instantiation also uses [PyMDown Extensions](https://github.com/facelessuser/pymdown-extensions/) and and [Mkdocs Material](https://github.com/squidfunk/mkdocs-material). 8 | See [`mkdocs.yml`](../mkdocs.yml) for further information about extension settings. 9 | 10 | Run the following to get all the required dependencies: 11 | 12 | `pip install -r requirements.txt` 13 | 14 | ## Commands 15 | 16 | - `npm run build` - Builds out markdown files for mkdocs (with a .preview extension) 17 | - `npm run build --overwrite` - Builds out markdown files for mkdocs in-place 18 | - `mkdocs serve` - Start the live-reloading docs server. 19 | - `mkdocs build` - Build the documentation site. 20 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/BaseMigration.md: -------------------------------------------------------------------------------- 1 | # BaseMigration 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/BaseMigration.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/BaseMigration.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/BaseMigration.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner)` 18 | 19 | **Visibility** 20 | 21 | `internal` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## External Functions 28 | 29 | ### `returnOwnership` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/BaseMigration.sol#L9) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `returnOwnership(address forContract)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/CollateralState.md: -------------------------------------------------------------------------------- 1 | # CollateralState 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/CollateralState.sol](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol) 6 | 7 | ## Variables 8 | 9 | ### `loans` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol#L17) 12 | 13 | **Type:** `mapping(address => struct ICollateralLoan.Loan[])` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol#L19) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor(address _owner, address _associatedContract)` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | 35 | ## Views 36 | 37 | ### `getLoan` 38 | 39 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol#L23) 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `getLoan(address account, uint256 loanID) view returns (struct ICollateralLoan.Loan)` 46 | 47 | **Visibility** 48 | 49 | `external` 50 | 51 | **State Mutability** 52 | 53 | `view` 54 | 55 | ### `getNumLoans` 56 | 57 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol#L32) 58 | 59 | ??? example "Details" 60 | 61 | **Signature** 62 | 63 | `getNumLoans(address account) view returns (uint256 numLoans)` 64 | 65 | **Visibility** 66 | 67 | `external` 68 | 69 | **State Mutability** 70 | 71 | `view` 72 | 73 | ## Restricted Functions 74 | 75 | ### `createLoan` 76 | 77 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol#L38) 78 | 79 | ??? example "Details" 80 | 81 | **Signature** 82 | 83 | `createLoan(struct ICollateralLoan.Loan loan)` 84 | 85 | **Visibility** 86 | 87 | `public` 88 | 89 | **State Mutability** 90 | 91 | `` 92 | 93 | **Modifiers** 94 | 95 | * [onlyAssociatedContract](#onlyassociatedcontract) 96 | 97 | ### `updateLoan` 98 | 99 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.49.0/contracts/CollateralState.sol#L42) 100 | 101 | ??? example "Details" 102 | 103 | **Signature** 104 | 105 | `updateLoan(struct ICollateralLoan.Loan loan)` 106 | 107 | **Visibility** 108 | 109 | `public` 110 | 111 | **State Mutability** 112 | 113 | `` 114 | 115 | **Modifiers** 116 | 117 | * [onlyAssociatedContract](#onlyassociatedcontract) 118 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/ContractStorage.md: -------------------------------------------------------------------------------- 1 | # ContractStorage 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/ContractStorage.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol) 6 | 7 | ## Variables 8 | 9 | ### `hashes` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L10) 12 | 13 | **Type:** `mapping(bytes32 => bytes32)` 14 | 15 | ### `resolverProxy` 16 | 17 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L8) 18 | 19 | **Type:** `contract IAddressResolver` 20 | 21 | ## Constructor 22 | 23 | ### `constructor` 24 | 25 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L12) 26 | 27 | ??? example "Details" 28 | 29 | **Signature** 30 | 31 | `constructor(address _resolver)` 32 | 33 | **Visibility** 34 | 35 | `internal` 36 | 37 | **State Mutability** 38 | 39 | `` 40 | 41 | ## Restricted Functions 42 | 43 | ### `migrateContractKey` 44 | 45 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L33) 46 | 47 | ??? example "Details" 48 | 49 | **Signature** 50 | 51 | `migrateContractKey(bytes32 fromContractName, bytes32 toContractName, bool removeAccessFromPreviousContract)` 52 | 53 | **Visibility** 54 | 55 | `external` 56 | 57 | **State Mutability** 58 | 59 | `` 60 | 61 | **Requires** 62 | 63 | * [require(..., "Cannot migrate empty contract")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L38) 64 | 65 | **Modifiers** 66 | 67 | * [onlyContract](#onlycontract) 68 | 69 | **Emits** 70 | 71 | * [KeyMigrated](#keymigrated) 72 | 73 | ## Internal Functions 74 | 75 | ### `_memoizeHash` 76 | 77 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L19) 78 | 79 | ??? example "Details" 80 | 81 | **Signature** 82 | 83 | `_memoizeHash(bytes32 contractName) returns (bytes32)` 84 | 85 | **Visibility** 86 | 87 | `internal` 88 | 89 | **State Mutability** 90 | 91 | `` 92 | 93 | ## Modifiers 94 | 95 | ### `onlyContract` 96 | 97 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L51) 98 | 99 | **Signature**: `onlyContract(bytes32 contractName)` 100 | 101 | ## Events 102 | 103 | ### `KeyMigrated` 104 | 105 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ContractStorage.sol#L60) 106 | 107 | **Signature**: `KeyMigrated(bytes32 fromContractName, bytes32 toContractName, bool removeAccessFromPreviousContract)` 108 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/DirectIntegrationManager.md: -------------------------------------------------------------------------------- 1 | # DirectIntegrationManager 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/DirectIntegrationManager.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol#L34) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner, address _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `getExchangeParameters` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol#L44) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `getExchangeParameters(address integration, bytes32 currencyKey) view returns (struct IDirectIntegrationManager.ParameterIntegrationSettings overrides)` 38 | 39 | **Visibility** 40 | 41 | `external` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | 47 | ## Restricted Functions 48 | 49 | ### `setExchangeParameters` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol#L102) 52 | 53 | ??? example "Details" 54 | 55 | **Signature** 56 | 57 | `setExchangeParameters(address integration, bytes32[] currencyKeys, struct IDirectIntegrationManager.ParameterIntegrationSettings settings)` 58 | 59 | **Visibility** 60 | 61 | `external` 62 | 63 | **State Mutability** 64 | 65 | `` 66 | 67 | **Modifiers** 68 | 69 | * [onlyOwner](#onlyowner) 70 | 71 | ## Internal Functions 72 | 73 | ### `_setExchangeParameters` 74 | 75 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol#L114) 76 | 77 | ??? example "Details" 78 | 79 | **Signature** 80 | 81 | `_setExchangeParameters(address integration, bytes32 currencyKey, struct IDirectIntegrationManager.ParameterIntegrationSettings settings)` 82 | 83 | **Visibility** 84 | 85 | `internal` 86 | 87 | **State Mutability** 88 | 89 | `` 90 | 91 | **Requires** 92 | 93 | * [require(..., "Address cannot be 0")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol#L119) 94 | 95 | **Emits** 96 | 97 | * [IntegrationParametersSet](#integrationparametersset) 98 | 99 | ## Events 100 | 101 | ### `IntegrationParametersSet` 102 | 103 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/DirectIntegrationManager.sol#L127) 104 | 105 | **Signature**: `IntegrationParametersSet(address integration, bytes32 currencyKey, struct IDirectIntegrationManager.ParameterIntegrationSettings overrides)` 106 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/EmptyEtherCollateral.md: -------------------------------------------------------------------------------- 1 | # EmptyEtherCollateral 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/EmptyEtherCollateral.sol](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/EmptyEtherCollateral.sol) 6 | 7 | ## Views 8 | 9 | ### `totalIssuedSynths` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/EmptyEtherCollateral.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `totalIssuedSynths() pure returns (uint256)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `pure` 26 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/EmptyEtherWrapper.md: -------------------------------------------------------------------------------- 1 | # EmptyEtherWrapper 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/EmptyEtherWrapper.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EmptyEtherWrapper.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EmptyEtherWrapper.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor()` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `totalIssuedSynths` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EmptyEtherWrapper.sol#L10) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `totalIssuedSynths() view returns (uint256)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | 47 | ## External Functions 48 | 49 | ### `distributeFees` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EmptyEtherWrapper.sol#L14) 52 | 53 | ??? example "Details" 54 | 55 | **Signature** 56 | 57 | `distributeFees()` 58 | 59 | **Visibility** 60 | 61 | `external` 62 | 63 | **State Mutability** 64 | 65 | `` 66 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/EscrowChecker.md: -------------------------------------------------------------------------------- 1 | # EscrowChecker 2 | 3 | ## Description 4 | 5 | A small utility contract that augments the SNX escrow contract to allow extracting a user's schedule as an array rather than as individual entries. 6 | 7 | **Source:** [contracts/EscrowChecker.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol) 8 | 9 | ## Architecture 10 | 11 | ### Related Contracts 12 | 13 | - [SynthetixEscrow](SynthetixEscrow.md) 14 | 15 | ## Variables 16 | 17 | ### `synthetix_escrow` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol#L11) 20 | 21 | The [SNX escrow contract](SynthetixEscrow.md). 22 | 23 | **Type:** `contract ISynthetixEscrow` 24 | 25 | ## Constructor 26 | 27 | ### `constructor` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol#L13) 30 | 31 | Initialises the [synthetix escrow address](#synthetix_escrow). 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `constructor(contract ISynthetixEscrow _esc)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | ## Views 48 | 49 | ### `checkAccountSchedule` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol#L17) 52 | 53 | Returns the given address's vesting schedule as up to 16 `uints`, composed of an alternating sequence of up to 8 `(timestamp, quantity)` pairs, as per [`SynthetixEscrow.getVestingScheduleEntry`](SynthetixEscrow.md#getVestingScheduleEntry). 54 | 55 | Vested entries are not skipped, and appear as a leading sequence of zeroes. 56 | 57 | ??? example "Details" 58 | 59 | **Signature** 60 | 61 | `checkAccountSchedule(address account) view returns (uint256[16])` 62 | 63 | **Visibility** 64 | 65 | `public` 66 | 67 | **State Mutability** 68 | 69 | `view` 70 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/ExchangeCircuitBreaker.md: -------------------------------------------------------------------------------- 1 | # ExchangeCircuitBreaker 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/ExchangeCircuitBreaker.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol) 6 | 7 | ## Variables 8 | 9 | ### `CIRCUIT_BREAKER_SUSPENSION_REASON` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L36) 12 | 13 | **Type:** `uint256` 14 | 15 | ### `CONTRACT_NAME` 16 | 17 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L33) 18 | 19 | **Type:** `bytes32` 20 | 21 | ## Constructor 22 | 23 | ### `constructor` 24 | 25 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L41) 26 | 27 | ??? example "Details" 28 | 29 | **Signature** 30 | 31 | `constructor(address _owner, address _resolver)` 32 | 33 | **Visibility** 34 | 35 | `public` 36 | 37 | **State Mutability** 38 | 39 | `` 40 | 41 | ## Views 42 | 43 | ### `exchangeRates` 44 | 45 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L52) 46 | 47 | ??? example "Details" 48 | 49 | **Signature** 50 | 51 | `exchangeRates() view returns (contract IExchangeRates)` 52 | 53 | **Visibility** 54 | 55 | `public` 56 | 57 | **State Mutability** 58 | 59 | `view` 60 | 61 | ### `rateWithInvalid` 62 | 63 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L61) 64 | 65 | ??? example "Details" 66 | 67 | **Signature** 68 | 69 | `rateWithInvalid(bytes32 currencyKey) view returns (uint256 rate, bool invalid)` 70 | 71 | **Visibility** 72 | 73 | `external` 74 | 75 | **State Mutability** 76 | 77 | `view` 78 | 79 | ### `resolverAddressesRequired` 80 | 81 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L45) 82 | 83 | ??? example "Details" 84 | 85 | **Signature** 86 | 87 | `resolverAddressesRequired() view returns (bytes32[] addresses)` 88 | 89 | **Visibility** 90 | 91 | `public` 92 | 93 | **State Mutability** 94 | 95 | `view` 96 | 97 | ## External Functions 98 | 99 | ### `rateWithBreakCircuit` 100 | 101 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangeCircuitBreaker.sol#L71) 102 | 103 | ??? example "Details" 104 | 105 | **Signature** 106 | 107 | `rateWithBreakCircuit(bytes32 currencyKey) returns (uint256 lastValidRate, bool invalid)` 108 | 109 | **Visibility** 110 | 111 | `external` 112 | 113 | **State Mutability** 114 | 115 | `` 116 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/ExchangerWithVirtualSynth.md: -------------------------------------------------------------------------------- 1 | # ExchangerWithVirtualSynth 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/ExchangerWithVirtualSynth.sol](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol) 6 | 7 | ## Variables 8 | 9 | ### `CONTRACT_NAME` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L23) 12 | 13 | **Type:** `bytes32` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L25) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor(address _owner, address _resolver)` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | 35 | ## Views 36 | 37 | ### `resolverAddressesRequired` 38 | 39 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L31) 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `resolverAddressesRequired() view returns (bytes32[] addresses)` 46 | 47 | **Visibility** 48 | 49 | `public` 50 | 51 | **State Mutability** 52 | 53 | `view` 54 | 55 | ## Internal Functions 56 | 57 | ### `_createVirtualSynth` 58 | 59 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L44) 60 | 61 | ??? example "Details" 62 | 63 | **Signature** 64 | 65 | `_createVirtualSynth(contract IERC20 synth, address recipient, uint256 amount, bytes32 currencyKey) returns (contract IVirtualSynth)` 66 | 67 | **Visibility** 68 | 69 | `internal` 70 | 71 | **State Mutability** 72 | 73 | `` 74 | 75 | **Requires** 76 | 77 | * [require(..., "Cannot virtualize this synth")](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L51) 78 | 79 | **Emits** 80 | 81 | * [VirtualSynthCreated](#virtualsynthcreated) 82 | 83 | ### `_virtualSynthMastercopy` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L40) 86 | 87 | ??? example "Details" 88 | 89 | **Signature** 90 | 91 | `_virtualSynthMastercopy() view returns (address)` 92 | 93 | **Visibility** 94 | 95 | `internal` 96 | 97 | **State Mutability** 98 | 99 | `view` 100 | 101 | ## Events 102 | 103 | ### `VirtualSynthCreated` 104 | 105 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.52.1-ovm/contracts/ExchangerWithVirtualSynth.sol#L61) 106 | 107 | **Signature**: `VirtualSynthCreated(address synth, address recipient, address vSynth, bytes32 currencyKey, uint256 amount)` 108 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/FeePoolEternalStorage.md: -------------------------------------------------------------------------------- 1 | # FeePoolEternalStorage 2 | 3 | ## Description 4 | 5 | FeePoolEternalStorage is currently used only to store the last fee withdrawal timestamp for each address. See [`FeePool._claimFees`](FeePool.md#_claimFees) and [`FeePool.feesByPeriod`](FeePool.md#feesbyperiod) for details of what this information is used for. 6 | 7 | This contract is just wrapper around [EternalStorage](EternalStorage.md) with a limited setup period and a setup function that sets each account's last fee withdrawal times. 8 | 9 | **Source:** [contracts/FeePoolEternalStorage.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/FeePoolEternalStorage.sol) 10 | 11 | ## Constructor 12 | 13 | ### `constructor` 14 | 15 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/FeePoolEternalStorage.sol#L11) 16 | 17 | Initialises the inherited [`EternalStorage`](EternalStorage.md) instance, and sets a [limited setup period](LimitedSetup.md) of six weeks. 18 | 19 | ??? example "Details" 20 | 21 | **Signature** 22 | 23 | `constructor(address _owner, address _feePool)` 24 | 25 | **Visibility** 26 | 27 | `public` 28 | 29 | **State Mutability** 30 | 31 | `` 32 | 33 | ## Restricted Functions 34 | 35 | ### `importFeeWithdrawalData` 36 | 37 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/FeePoolEternalStorage.sol#L13) 38 | 39 | This is a helper to import fee withdrawal information from a previous version of the system during the setup period. 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `importFeeWithdrawalData(address[] accounts, uint256[] feePeriodIDs)` 46 | 47 | **Visibility** 48 | 49 | `external` 50 | 51 | **State Mutability** 52 | 53 | `` 54 | 55 | **Requires** 56 | 57 | * [require(..., "Length mismatch")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/FeePoolEternalStorage.sol#L18) 58 | 59 | **Modifiers** 60 | 61 | * [onlyOwner](#onlyowner) 62 | 63 | * [onlyDuringSetup](#onlyduringsetup) 64 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/FuturesMarket.md: -------------------------------------------------------------------------------- 1 | # FuturesMarket 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/frozen/FuturesMarket.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/frozen/FuturesMarket.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/frozen/FuturesMarket.sol#L59) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _resolver, bytes32 _baseAsset, bytes32 _marketKey)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/ImmutableReadProxy.md: -------------------------------------------------------------------------------- 1 | # ImmutableReadProxy 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/ImmutableReadProxy.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImmutableReadProxy.sol) 6 | 7 | ## Variables 8 | 9 | ### `target` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImmutableReadProxy.sol#L9) 12 | 13 | **Type:** `address` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImmutableReadProxy.sol#L11) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor(address _target)` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/ImportableRewardEscrowV2.md: -------------------------------------------------------------------------------- 1 | # ImportableRewardEscrowV2 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/ImportableRewardEscrowV2.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol#L14) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner, address _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `resolverAddressesRequired` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol#L18) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `resolverAddressesRequired() view returns (bytes32[] addresses)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | 47 | ## Restricted Functions 48 | 49 | ### `importVestingEntries` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol#L31) 52 | 53 | ??? example "Details" 54 | 55 | **Signature** 56 | 57 | `importVestingEntries(address account, uint256 escrowedAmount, struct VestingEntries.VestingEntry[] vestingEntries)` 58 | 59 | **Visibility** 60 | 61 | `external` 62 | 63 | **State Mutability** 64 | 65 | `` 66 | 67 | **Requires** 68 | 69 | * [require(..., "Insufficient balance in the contract to provide for escrowed balance")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol#L40) 70 | 71 | **Modifiers** 72 | 73 | * [onlySynthetixBridge](#onlysynthetixbridge) 74 | 75 | ## Internal Functions 76 | 77 | ### `synthetixBridgeToBase` 78 | 79 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol#L25) 80 | 81 | ??? example "Details" 82 | 83 | **Signature** 84 | 85 | `synthetixBridgeToBase() view returns (address)` 86 | 87 | **Visibility** 88 | 89 | `internal` 90 | 91 | **State Mutability** 92 | 93 | `view` 94 | 95 | ## Modifiers 96 | 97 | ### `onlySynthetixBridge` 98 | 99 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ImportableRewardEscrowV2.sol#L50) 100 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/IssuanceEternalStorage.md: -------------------------------------------------------------------------------- 1 | # IssuanceEternalStorage 2 | 3 | ## Description 4 | 5 | !!! Warning "Deprecated" 6 | 7 | This contract is an empty implementation of [`EternalStorage`](EternalStorage.md) and will be removed in an upcoming release. 8 | 9 | **Source:** [contracts/IssuanceEternalStorage.sol](https://github.com/Synthetixio/synthetix/tree/v2.26.2/contracts/IssuanceEternalStorage.sol) 10 | 11 | ## Architecture 12 | 13 | ### Inheritance Graph 14 | 15 | ```mermaid 16 | graph TD 17 | IssuanceEternalStorage[IssuanceEternalStorage] --> EternalStorage[EternalStorage] 18 | EternalStorage[EternalStorage] --> State[State] 19 | State[State] --> Owned[Owned] 20 | 21 | ``` 22 | 23 | ## Constructor 24 | 25 | ### `constructor` 26 | 27 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.26.2/contracts/IssuanceEternalStorage.sol#L11) 28 | 29 | ??? example "Details" 30 | 31 | **Signature** 32 | 33 | `(address _owner, address _issuer)` 34 | 35 | **Visibility** 36 | 37 | `public` 38 | 39 | **State Mutability** 40 | 41 | `nonpayable` 42 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/IssuerWithoutLiquidations.md: -------------------------------------------------------------------------------- 1 | # IssuerWithoutLiquidations 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/IssuerWithoutLiquidations.sol](https://github.com/Synthetixio/synthetix/tree/v2.53.0/contracts/IssuerWithoutLiquidations.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.53.0/contracts/IssuerWithoutLiquidations.sol#L8) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner, address _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Restricted Functions 28 | 29 | ### `liquidateDelinquentAccount` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.53.0/contracts/IssuerWithoutLiquidations.sol#L10) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `liquidateDelinquentAccount(address account, uint256 susdAmount, address liquidator) returns (uint256 totalRedeemed, uint256 amountToLiquidate)` 38 | 39 | **Visibility** 40 | 41 | `external` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | **Modifiers** 48 | 49 | * [onlySynthetix](#onlysynthetix) 50 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/IssuerWithoutUpdatableCache.md: -------------------------------------------------------------------------------- 1 | # IssuerWithoutUpdatableCache 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/IssuerWithoutUpdatableCache.sol](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/IssuerWithoutUpdatableCache.sol) 6 | 7 | ## Architecture 8 | 9 | ### Inheritance Graph 10 | 11 | ```mermaid 12 | graph TD 13 | IssuerWithoutUpdatableCache[IssuerWithoutUpdatableCache] --> Issuer[Issuer] 14 | Issuer[Issuer] --> MixinSystemSettings[MixinSystemSettings] 15 | MixinSystemSettings[MixinSystemSettings] --> MixinResolver[MixinResolver] 16 | MixinResolver[MixinResolver] --> Owned[Owned] 17 | 18 | ``` 19 | 20 | ## Constructor 21 | 22 | ### `constructor` 23 | 24 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/IssuerWithoutUpdatableCache.sol#L7) 25 | 26 | ??? example "Details" 27 | 28 | **Signature** 29 | 30 | `(address _owner, address _resolver)` 31 | 32 | **Visibility** 33 | 34 | `public` 35 | 36 | **State Mutability** 37 | 38 | `nonpayable` 39 | 40 | ## External Functions 41 | 42 | ### `cacheSNXIssuedDebt` 43 | 44 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/IssuerWithoutUpdatableCache.sol#L13) 45 | 46 | ??? example "Details" 47 | 48 | **Signature** 49 | 50 | `cacheSNXIssuedDebt()` 51 | 52 | **Visibility** 53 | 54 | `external` 55 | 56 | **State Mutability** 57 | 58 | `nonpayable` 59 | 60 | **Modifiers** 61 | 62 | * [requireSystemActiveIfNotOwner](#requiresystemactiveifnotowner) 63 | 64 | ### `updateSNXIssuedDebtForCurrencies` 65 | 66 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/IssuerWithoutUpdatableCache.sol#L11) 67 | 68 | ??? example "Details" 69 | 70 | **Signature** 71 | 72 | `updateSNXIssuedDebtForCurrencies(bytes32[] currencyKeys)` 73 | 74 | **Visibility** 75 | 76 | `external` 77 | 78 | **State Mutability** 79 | 80 | `nonpayable` 81 | 82 | ### `updateSNXIssuedDebtOnExchange` 83 | 84 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/IssuerWithoutUpdatableCache.sol#L9) 85 | 86 | ??? example "Details" 87 | 88 | **Signature** 89 | 90 | `updateSNXIssuedDebtOnExchange(bytes32[2] currencyKeys, uint256[2] currencyRates)` 91 | 92 | **Visibility** 93 | 94 | `external` 95 | 96 | **State Mutability** 97 | 98 | `nonpayable` 99 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/LegacyOwned.md: -------------------------------------------------------------------------------- 1 | # LegacyOwned 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/legacy/LegacyOwned.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol) 6 | 7 | ## Variables 8 | 9 | ### `nominatedOwner` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L5) 12 | 13 | **Type:** `address` 14 | 15 | ### `owner` 16 | 17 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L4) 18 | 19 | **Type:** `address` 20 | 21 | ## Constructor 22 | 23 | ### `constructor` 24 | 25 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L7) 26 | 27 | ??? example "Details" 28 | 29 | **Signature** 30 | 31 | `constructor(address _owner)` 32 | 33 | **Visibility** 34 | 35 | `public` 36 | 37 | **State Mutability** 38 | 39 | `` 40 | 41 | ## Restricted Functions 42 | 43 | ### `nominateOwner` 44 | 45 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L11) 46 | 47 | ??? example "Details" 48 | 49 | **Signature** 50 | 51 | `nominateOwner(address _owner)` 52 | 53 | **Visibility** 54 | 55 | `external` 56 | 57 | **State Mutability** 58 | 59 | `` 60 | 61 | **Modifiers** 62 | 63 | * [onlyOwner](#onlyowner) 64 | 65 | **Emits** 66 | 67 | * [OwnerNominated](#ownernominated) 68 | 69 | ## External Functions 70 | 71 | ### `acceptOwnership` 72 | 73 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L16) 74 | 75 | ??? example "Details" 76 | 77 | **Signature** 78 | 79 | `acceptOwnership()` 80 | 81 | **Visibility** 82 | 83 | `external` 84 | 85 | **State Mutability** 86 | 87 | `` 88 | 89 | **Requires** 90 | 91 | * [require(..., "bool")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L17) 92 | 93 | **Emits** 94 | 95 | * [OwnerChanged](#ownerchanged) 96 | 97 | ## Modifiers 98 | 99 | ### `onlyOwner` 100 | 101 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L23) 102 | 103 | ## Events 104 | 105 | ### `OwnerChanged` 106 | 107 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L29) 108 | 109 | **Signature**: `OwnerChanged(address oldOwner, address newOwner)` 110 | 111 | ### `OwnerNominated` 112 | 113 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/LegacyOwned.sol#L28) 114 | 115 | **Signature**: `OwnerNominated(address newOwner)` 116 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/LimitedSetup.md: -------------------------------------------------------------------------------- 1 | # LimitedSetup 2 | 3 | ## Description 4 | 5 | This contract allows certain functions within inheriting contracts to only operate during a specific limited setup period. After this period elapses, any functions with the [`onlyDuringSetup`](#onlyduringsetup) modifier no longer operate. 6 | 7 | **Source:** [contracts/LimitedSetup.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/LimitedSetup.sol) 8 | 9 | ## Variables 10 | 11 | ### `setupExpiryTime` 12 | 13 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/LimitedSetup.sol#L5) 14 | 15 | The timestamp at which functions which have the [`onlyDuringSetup`](#onlyduringsetup) modifier will cease operating. This is determined by the `setupDuration` parameter passed into the contract [constructor](#constructor). 16 | 17 | **Type:** `uint256` 18 | 19 | ## Constructor 20 | 21 | ### `constructor` 22 | 23 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/LimitedSetup.sol#L11) 24 | 25 | ??? example "Details" 26 | 27 | **Signature** 28 | 29 | `constructor(uint256 setupDuration)` 30 | 31 | **Visibility** 32 | 33 | `internal` 34 | 35 | **State Mutability** 36 | 37 | `` 38 | 39 | ## Modifiers 40 | 41 | ### `onlyDuringSetup` 42 | 43 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/LimitedSetup.sol#L15) 44 | 45 | Reverts the transaction if the current timestamp is not before [`setupExpiryTime`](#setupexpirytime). 46 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/MinimalProxyFactory.md: -------------------------------------------------------------------------------- 1 | # MinimalProxyFactory 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/MinimalProxyFactory.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/MinimalProxyFactory.sol) 6 | 7 | ## Internal Functions 8 | 9 | ### `_cloneAsMinimalProxy` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/MinimalProxyFactory.sol#L5) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `_cloneAsMinimalProxy(address _base, string _revertMsg) returns (address clone)` 18 | 19 | **Visibility** 20 | 21 | `internal` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | **Requires** 28 | 29 | * [require(..., "string memory")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/MinimalProxyFactory.sol#L17) 30 | 31 | ### `_generateMinimalProxyCreateData` 32 | 33 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/MinimalProxyFactory.sol#L20) 34 | 35 | ??? example "Details" 36 | 37 | **Signature** 38 | 39 | `_generateMinimalProxyCreateData(address _base) pure returns (bytes)` 40 | 41 | **Visibility** 42 | 43 | `internal` 44 | 45 | **State Mutability** 46 | 47 | `pure` 48 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/OneNetAggregatorDebtRatio.md: -------------------------------------------------------------------------------- 1 | # OneNetAggregatorDebtRatio 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/OneNetAggregatorDebtRatio.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorDebtRatio.sol) 6 | 7 | ## Variables 8 | 9 | ### `CONTRACT_NAME` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorDebtRatio.sol#L6) 12 | 13 | **Type:** `bytes32` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorDebtRatio.sol#L8) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor(contract AddressResolver _resolver)` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | 35 | ## Views 36 | 37 | ### `getRoundData` 38 | 39 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorDebtRatio.sol#L10) 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `getRoundData(uint80) view returns (uint80, int256, uint256, uint256, uint80)` 46 | 47 | **Visibility** 48 | 49 | `public` 50 | 51 | **State Mutability** 52 | 53 | `view` 54 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/OneNetAggregatorIssuedSynths.md: -------------------------------------------------------------------------------- 1 | # OneNetAggregatorIssuedSynths 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/OneNetAggregatorIssuedSynths.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorIssuedSynths.sol) 6 | 7 | ## Variables 8 | 9 | ### `CONTRACT_NAME` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorIssuedSynths.sol#L6) 12 | 13 | **Type:** `bytes32` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorIssuedSynths.sol#L8) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor(contract AddressResolver _resolver)` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | 35 | ## Views 36 | 37 | ### `getRoundData` 38 | 39 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OneNetAggregatorIssuedSynths.sol#L10) 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `getRoundData(uint80) view returns (uint80, int256, uint256, uint256, uint80)` 46 | 47 | **Visibility** 48 | 49 | `public` 50 | 51 | **State Mutability** 52 | 53 | `view` 54 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/OneNetAggregatorsDEFI.md: -------------------------------------------------------------------------------- 1 | # OneNetAggregatorsDEFI 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/legacy/OneNetAggregatorsDEFI.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/OneNetAggregatorsDEFI.sol) 6 | 7 | ## Variables 8 | 9 | ### `CONTRACT_NAME` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/OneNetAggregatorsDEFI.sol#L6) 12 | 13 | **Type:** `bytes32` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/OneNetAggregatorsDEFI.sol#L8) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor(contract AddressResolver _resolver)` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | 35 | ## Views 36 | 37 | ### `decimals` 38 | 39 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/OneNetAggregatorsDEFI.sol#L10) 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `decimals() view returns (uint8)` 46 | 47 | **Visibility** 48 | 49 | `external` 50 | 51 | **State Mutability** 52 | 53 | `view` 54 | 55 | ### `getRoundData` 56 | 57 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/legacy/OneNetAggregatorsDEFI.sol#L14) 58 | 59 | ??? example "Details" 60 | 61 | **Signature** 62 | 63 | `getRoundData(uint80) view returns (uint80, int256, uint256, uint256, uint80)` 64 | 65 | **Visibility** 66 | 67 | `public` 68 | 69 | **State Mutability** 70 | 71 | `view` 72 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/OwnerRelayOnEthereum.md: -------------------------------------------------------------------------------- 1 | # OwnerRelayOnEthereum 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/OwnerRelayOnEthereum.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L20) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner, address _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `resolverAddressesRequired` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L43) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `resolverAddressesRequired() view returns (bytes32[] addresses)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | 47 | ## Restricted Functions 48 | 49 | ### `initiateRelay` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L53) 52 | 53 | ??? example "Details" 54 | 55 | **Signature** 56 | 57 | `initiateRelay(address target, bytes payload, uint32 crossDomainGasLimit)` 58 | 59 | **Visibility** 60 | 61 | `external` 62 | 63 | **State Mutability** 64 | 65 | `` 66 | 67 | **Modifiers** 68 | 69 | * [onlyOwner](#onlyowner) 70 | 71 | **Emits** 72 | 73 | * [RelayInitiated](#relayinitiated) 74 | 75 | ### `initiateRelayBatch` 76 | 77 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L66) 78 | 79 | ??? example "Details" 80 | 81 | **Signature** 82 | 83 | `initiateRelayBatch(address[] targets, bytes[] payloads, uint32 crossDomainGasLimit)` 84 | 85 | **Visibility** 86 | 87 | `external` 88 | 89 | **State Mutability** 90 | 91 | `` 92 | 93 | **Requires** 94 | 95 | * [require(..., "Argument length mismatch")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L72) 96 | 97 | **Modifiers** 98 | 99 | * [onlyOwner](#onlyowner) 100 | 101 | **Emits** 102 | 103 | * [RelayBatchInitiated](#relaybatchinitiated) 104 | 105 | ## Events 106 | 107 | ### `RelayBatchInitiated` 108 | 109 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L86) 110 | 111 | **Signature**: `RelayBatchInitiated(address[] targets, bytes[] payloads)` 112 | 113 | ### `RelayInitiated` 114 | 115 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/OwnerRelayOnEthereum.sol#L85) 116 | 117 | **Signature**: `RelayInitiated(address target, bytes payload)` 118 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/Pausable.md: -------------------------------------------------------------------------------- 1 | # Pausable 2 | 3 | ## Description 4 | 5 | Allows an inheriting contract to be paused and resumed, providing a modifier that will allow modified functions to operate only if the contract is not paused. 6 | 7 | **Source:** [contracts/Pausable.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol) 8 | 9 | ## Variables 10 | 11 | ### `lastPauseTime` 12 | 13 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L8) 14 | 15 | The UNIX timestamp in seconds at which the contract was last paused. 16 | 17 | **Type:** `uint256` 18 | 19 | ### `paused` 20 | 21 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L9) 22 | 23 | **Type:** `bool` 24 | 25 | ## Constructor 26 | 27 | ### `constructor` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L11) 30 | 31 | The owner this constructor initialises has the exclusive right to pause the contract. The contract begins unpaused. 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `constructor()` 38 | 39 | **Visibility** 40 | 41 | `internal` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | **Requires** 48 | 49 | * [require(..., "Owner must be set")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L13) 50 | 51 | ## Restricted Functions 52 | 53 | ### `setPaused` 54 | 55 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L21) 56 | 57 | Pauses or unpauses the contract. Sets [`lastPauseTime`](#lastPauseTime) to the current timestamp if the contract is newly paused. 58 | 59 | ??? example "Details" 60 | 61 | **Signature** 62 | 63 | `setPaused(bool _paused)` 64 | 65 | **Visibility** 66 | 67 | `external` 68 | 69 | **State Mutability** 70 | 71 | `` 72 | 73 | **Modifiers** 74 | 75 | * [onlyOwner](#onlyowner) 76 | 77 | **Emits** 78 | 79 | * [PauseChanged](#pausechanged) 80 | 81 | ## Modifiers 82 | 83 | ### `notPaused` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L41) 86 | 87 | Reverts the transaction the contract is [`paused`](#paused). Provided for use by inheriting contracts. 88 | 89 | ## Events 90 | 91 | ### `PauseChanged` 92 | 93 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Pausable.sol#L39) 94 | 95 | The contract has gone from paused to unpaused or vice versa. This event reports the new state. 96 | 97 | **Signature**: `PauseChanged(bool isPaused)` 98 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/PythStructs.md: -------------------------------------------------------------------------------- 1 | # PythStructs 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/PythStructs.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/PythStructs.sol) 6 | 7 | ## Structs 8 | 9 | ### `Price` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/PythStructs.sol#L14) 12 | 13 | | Field | Type | Description | 14 | | ------------- | --------- | ----------- | 15 | | `price` | `int64` | TBA | 16 | | `conf` | `uint64` | TBA | 17 | | `expo` | `int32` | TBA | 18 | | `publishTime` | `uint256` | TBA | 19 | 20 | ### `PriceFeed` 21 | 22 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/PythStructs.sol#L26) 23 | 24 | | Field | Type | Description | 25 | | ---------- | -------------------------- | ----------- | 26 | | `id` | `bytes32` | TBA | 27 | | `price` | `struct PythStructs.Price` | TBA | 28 | | `emaPrice` | `struct PythStructs.Price` | TBA | 29 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/ReadProxy.md: -------------------------------------------------------------------------------- 1 | # ReadProxy 2 | 3 | ## Description 4 | 5 | The ReadProxy is a simple proxy for readonly views. If any mutative function is attempted on the underlying the EVM will revert. 6 | 7 | **Source:** [contracts/ReadProxy.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ReadProxy.sol) 8 | 9 | ## Variables 10 | 11 | ### `target` 12 | 13 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ReadProxy.sol#L9) 14 | 15 | **Type:** `address` 16 | 17 | ## Constructor 18 | 19 | ### `constructor` 20 | 21 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ReadProxy.sol#L11) 22 | 23 | ??? example "Details" 24 | 25 | **Signature** 26 | 27 | `constructor(address _owner)` 28 | 29 | **Visibility** 30 | 31 | `public` 32 | 33 | **State Mutability** 34 | 35 | `` 36 | 37 | ## Restricted Functions 38 | 39 | ### `setTarget` 40 | 41 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ReadProxy.sol#L13) 42 | 43 | ??? example "Details" 44 | 45 | **Signature** 46 | 47 | `setTarget(address _target)` 48 | 49 | **Visibility** 50 | 51 | `external` 52 | 53 | **State Mutability** 54 | 55 | `` 56 | 57 | **Modifiers** 58 | 59 | * [onlyOwner](#onlyowner) 60 | 61 | **Emits** 62 | 63 | * [TargetUpdated](#targetupdated) 64 | 65 | ## Events 66 | 67 | ### `TargetUpdated` 68 | 69 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ReadProxy.sol#L35) 70 | 71 | **Signature**: `TargetUpdated(address newTarget)` 72 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/RewardEscrowV2.md: -------------------------------------------------------------------------------- 1 | # RewardEscrowV2 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/RewardEscrowV2.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L18) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner, address _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `resolverAddressesRequired` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L22) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `resolverAddressesRequired() view returns (bytes32[] addresses)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | 47 | ## Restricted Functions 48 | 49 | ### `burnForMigration` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L35) 52 | 53 | ??? example "Details" 54 | 55 | **Signature** 56 | 57 | `burnForMigration(address account, uint256[] entryIDs) returns (uint256 escrowedAccountBalance, struct VestingEntries.VestingEntry[] vestingEntries)` 58 | 59 | **Visibility** 60 | 61 | `external` 62 | 63 | **State Mutability** 64 | 65 | `` 66 | 67 | **Requires** 68 | 69 | * [require(..., "Entry IDs required")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L40) 70 | 71 | **Modifiers** 72 | 73 | * [onlySynthetixBridge](#onlysynthetixbridge) 74 | 75 | **Emits** 76 | 77 | * [BurnedForMigrationToL2](#burnedformigrationtol2) 78 | 79 | ## Internal Functions 80 | 81 | ### `synthetixBridgeToOptimism` 82 | 83 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L29) 84 | 85 | ??? example "Details" 86 | 87 | **Signature** 88 | 89 | `synthetixBridgeToOptimism() view returns (address)` 90 | 91 | **Visibility** 92 | 93 | `internal` 94 | 95 | **State Mutability** 96 | 97 | `view` 98 | 99 | ## Modifiers 100 | 101 | ### `onlySynthetixBridge` 102 | 103 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L75) 104 | 105 | ## Events 106 | 107 | ### `BurnedForMigrationToL2` 108 | 109 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2.sol#L81) 110 | 111 | **Signature**: `BurnedForMigrationToL2(address account, uint256[] entryIDs, uint256 escrowedAmountMigrated, uint256 time)` 112 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/RewardsDistributionRecipient.md: -------------------------------------------------------------------------------- 1 | # RewardsDistributionRecipient 2 | 3 | ## Description 4 | 5 | !!! Info "Documentation Pending" 6 | 7 | This contract documentation is missing some descriptions. 8 | 9 | **Source:** [contracts/RewardsDistributionRecipient.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardsDistributionRecipient.sol) 10 | 11 | ## Variables 12 | 13 | ### `rewardsDistribution` 14 | 15 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardsDistributionRecipient.sol#L8) 16 | 17 | **Type:** `address` 18 | 19 | ## Restricted Functions 20 | 21 | ### `setRewardsDistribution` 22 | 23 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardsDistributionRecipient.sol#L17) 24 | 25 | ??? example "Details" 26 | 27 | **Signature** 28 | 29 | `setRewardsDistribution(address _rewardsDistribution)` 30 | 31 | **Visibility** 32 | 33 | `external` 34 | 35 | **State Mutability** 36 | 37 | `` 38 | 39 | **Modifiers** 40 | 41 | * [onlyOwner](#onlyowner) 42 | 43 | ## External Functions 44 | 45 | ### `notifyRewardAmount` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardsDistributionRecipient.sol#L10) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `notifyRewardAmount(uint256 reward)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | 63 | ## Modifiers 64 | 65 | ### `onlyRewardsDistribution` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardsDistributionRecipient.sol#L12) 68 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/SingleNetworkAggregatorDebtRatio.md: -------------------------------------------------------------------------------- 1 | # SingleNetworkAggregatorDebtRatio 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/SingleNetworkAggregatorDebtRatio.sol](https://github.com/Synthetixio/synthetix/tree/v2.64.0-alpha/contracts/SingleNetworkAggregatorDebtRatio.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.64.0-alpha/contracts/SingleNetworkAggregatorDebtRatio.sol#L7) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(contract AddressResolver _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `getRoundData` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.64.0-alpha/contracts/SingleNetworkAggregatorDebtRatio.sol#L9) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `getRoundData(uint80) view returns (uint80, int256, uint256, uint256, uint80)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/SingleNetworkAggregatorIssuedSynths.md: -------------------------------------------------------------------------------- 1 | # SingleNetworkAggregatorIssuedSynths 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/SingleNetworkAggregatorIssuedSynths.sol](https://github.com/Synthetixio/synthetix/tree/v2.64.0-alpha/contracts/SingleNetworkAggregatorIssuedSynths.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.64.0-alpha/contracts/SingleNetworkAggregatorIssuedSynths.sol#L7) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(contract AddressResolver _resolver)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Views 28 | 29 | ### `getRoundData` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.64.0-alpha/contracts/SingleNetworkAggregatorIssuedSynths.sol#L9) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `getRoundData(uint80) view returns (uint80, int256, uint256, uint256, uint80)` 38 | 39 | **Visibility** 40 | 41 | `public` 42 | 43 | **State Mutability** 44 | 45 | `view` 46 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/StakingRewardUpdater.md: -------------------------------------------------------------------------------- 1 | # StakingRewardUpdater 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/migrations/StakingRewardUpdater.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/StakingRewardUpdater.sol) 6 | 7 | ## Variables 8 | 9 | ### `deployer` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/StakingRewardUpdater.sol#L6) 12 | 13 | **Type:** `address` 14 | 15 | ## Constructor 16 | 17 | ### `constructor` 18 | 19 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/StakingRewardUpdater.sol#L8) 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `constructor()` 26 | 27 | **Visibility** 28 | 29 | `public` 30 | 31 | **State Mutability** 32 | 33 | `` 34 | 35 | ## External Functions 36 | 37 | ### `execute` 38 | 39 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/StakingRewardUpdater.sol#L15) 40 | 41 | ??? example "Details" 42 | 43 | **Signature** 44 | 45 | `execute(contract StakingRewards[] rewardContracts, uint256 rewardsPerContract, uint256 duration)` 46 | 47 | **Visibility** 48 | 49 | `external` 50 | 51 | **State Mutability** 52 | 53 | `` 54 | 55 | **Requires** 56 | 57 | * [require(..., "Only the deployer can invoke this")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/StakingRewardUpdater.sol#L20) 58 | 59 | ### `returnFunds` 60 | 61 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/StakingRewardUpdater.sol#L51) 62 | 63 | ??? example "Details" 64 | 65 | **Signature** 66 | 67 | `returnFunds(contract IERC20 token)` 68 | 69 | **Visibility** 70 | 71 | `external` 72 | 73 | **State Mutability** 74 | 75 | `` 76 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/State.md: -------------------------------------------------------------------------------- 1 | # State 2 | 3 | ## Description 4 | 5 | An external state contract whose functions can only be called by an [associated controller](#associatedcontract) if modified with [`onlyAssociatedContract`](#onlyassociatedcontract). 6 | 7 | This is designed to allow behaviour to be decoupled from storage so that upgrades can be made without losing data. 8 | 9 | **Source:** [contracts/State.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol) 10 | 11 | ## Variables 12 | 13 | ### `associatedContract` 14 | 15 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol#L10) 16 | 17 | The address (presumably a contract) which is permitted to use functions on this contract which have the [`onlyAssociatedContract`](#onlyassociatedcontract) modifier. 18 | 19 | **Type:** `address` 20 | 21 | ## Constructor 22 | 23 | ### `constructor` 24 | 25 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol#L12) 26 | 27 | Initialises the associated contract and the owner, who has the exclusive right to switch the associated contract. 28 | 29 | ??? example "Details" 30 | 31 | **Signature** 32 | 33 | `constructor(address _associatedContract)` 34 | 35 | **Visibility** 36 | 37 | `internal` 38 | 39 | **State Mutability** 40 | 41 | `` 42 | 43 | **Requires** 44 | 45 | * [require(..., "Owner must be set")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol#L14) 46 | 47 | **Emits** 48 | 49 | * [AssociatedContractUpdated](#associatedcontractupdated) 50 | 51 | ## Restricted Functions 52 | 53 | ### `setAssociatedContract` 54 | 55 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol#L23) 56 | 57 | Allows the contract's owner to update the [associated contract](#associatedContract). 58 | 59 | ??? example "Details" 60 | 61 | **Signature** 62 | 63 | `setAssociatedContract(address _associatedContract)` 64 | 65 | **Visibility** 66 | 67 | `external` 68 | 69 | **State Mutability** 70 | 71 | `` 72 | 73 | **Modifiers** 74 | 75 | * [onlyOwner](#onlyowner) 76 | 77 | **Emits** 78 | 79 | * [AssociatedContractUpdated](#associatedcontractupdated) 80 | 81 | ## Modifiers 82 | 83 | ### `onlyAssociatedContract` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol#L30) 86 | 87 | Reverts the transaction if the `msg.sender` is not the [associated contract](#associatedcontract). Provided for use by inheriting contracts. 88 | 89 | ## Events 90 | 91 | ### `AssociatedContractUpdated` 92 | 93 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/State.sol#L37) 94 | 95 | The associated contract was updated by the owner. This event reports the new associated contract. 96 | 97 | **Signature**: `AssociatedContractUpdated(address associatedContract)` 98 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/SynthetixBridgeEscrow.md: -------------------------------------------------------------------------------- 1 | # SynthetixBridgeEscrow 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/SynthetixBridgeEscrow.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SynthetixBridgeEscrow.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SynthetixBridgeEscrow.sol#L14) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor(address _owner)` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ## Restricted Functions 28 | 29 | ### `approveBridge` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SynthetixBridgeEscrow.sol#L16) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `approveBridge(address _token, address _bridge, uint256 _amount)` 38 | 39 | **Visibility** 40 | 41 | `external` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | **Modifiers** 48 | 49 | * [onlyOwner](#onlyowner) 50 | 51 | **Emits** 52 | 53 | * [BridgeApproval](#bridgeapproval) 54 | 55 | ## Events 56 | 57 | ### `BridgeApproval` 58 | 59 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SynthetixBridgeEscrow.sol#L26) 60 | 61 | **Signature**: `BridgeApproval(address _token, address spender, uint256 value)` 62 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/TokenState.md: -------------------------------------------------------------------------------- 1 | # TokenState 2 | 3 | ## Description 4 | 5 | An external state contract to hold ERC20 balances and allowances. This operates as an adjunct to [`ExternStateToken`](ExternStateToken.md), so that important token information can persist while the token contract itself can be switched out to upgrade its functionality. 6 | 7 | **Source:** [contracts/TokenState.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/TokenState.sol) 8 | 9 | ## Variables 10 | 11 | ### `allowance` 12 | 13 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/TokenState.sol#L11) 14 | 15 | ERC20 allowances. Also generates an ERC20 accessor in the same way as the `balanceOf` member. 16 | 17 | **Type:** `mapping(address => mapping(address => uint256))` 18 | 19 | ### `balanceOf` 20 | 21 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/TokenState.sol#L10) 22 | 23 | ERC20 balances, note that as a public variable, this synthesises an accessor which is itself ERC20 compliant, so balances can be queried by dApps directly from the state contract. 24 | 25 | **Type:** `mapping(address => uint256)` 26 | 27 | ## Constructor 28 | 29 | ### `constructor` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/TokenState.sol#L13) 32 | 33 | Initialises the inherited [`State`](State.md) instance. 34 | 35 | ??? example "Details" 36 | 37 | **Signature** 38 | 39 | `constructor(address _owner, address _associatedContract)` 40 | 41 | **Visibility** 42 | 43 | `public` 44 | 45 | **State Mutability** 46 | 47 | `` 48 | 49 | ## Restricted Functions 50 | 51 | ### `setAllowance` 52 | 53 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/TokenState.sol#L25) 54 | 55 | Sets the token allowance granted to the `spender` by the `tokenOwner`. 56 | 57 | ??? example "Details" 58 | 59 | **Signature** 60 | 61 | `setAllowance(address tokenOwner, address spender, uint256 value)` 62 | 63 | **Visibility** 64 | 65 | `external` 66 | 67 | **State Mutability** 68 | 69 | `` 70 | 71 | **Modifiers** 72 | 73 | * [onlyAssociatedContract](#onlyassociatedcontract) 74 | 75 | ### `setBalanceOf` 76 | 77 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/TokenState.sol#L39) 78 | 79 | Sets the balance of the specified account. 80 | 81 | ??? example "Details" 82 | 83 | **Signature** 84 | 85 | `setBalanceOf(address account, uint256 value)` 86 | 87 | **Visibility** 88 | 89 | `external` 90 | 91 | **State Mutability** 92 | 93 | `` 94 | 95 | **Modifiers** 96 | 97 | * [onlyAssociatedContract](#onlyassociatedcontract) 98 | -------------------------------------------------------------------------------- /content/contracts/source/contracts/VirtualSynthMastercopy.md: -------------------------------------------------------------------------------- 1 | # VirtualSynthMastercopy 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/VirtualSynthMastercopy.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/VirtualSynthMastercopy.sol) 6 | 7 | ## Constructor 8 | 9 | ### `constructor` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/VirtualSynthMastercopy.sol#L9) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `constructor()` 18 | 19 | **Visibility** 20 | 21 | `public` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/AggregatorV2V3Interface.md: -------------------------------------------------------------------------------- 1 | # AggregatorV2V3Interface 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/AggregatorV2V3Interface.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol) 6 | 7 | ## Views 8 | 9 | ### `decimals` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol#L8) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `decimals() view returns (uint8)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `getAnswer` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol#L10) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `getAnswer(uint256 roundId) view returns (int256)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ### `getRoundData` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol#L14) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `getRoundData(uint80 _roundId) view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `view` 62 | 63 | ### `getTimestamp` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol#L12) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `getTimestamp(uint256 roundId) view returns (uint256)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `view` 80 | 81 | ### `latestRound` 82 | 83 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol#L6) 84 | 85 | ??? example "Details" 86 | 87 | **Signature** 88 | 89 | `latestRound() view returns (uint256)` 90 | 91 | **Visibility** 92 | 93 | `external` 94 | 95 | **State Mutability** 96 | 97 | `view` 98 | 99 | ### `latestRoundData` 100 | 101 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/AggregatorV2V3Interface.sol#L25) 102 | 103 | ??? example "Details" 104 | 105 | **Signature** 106 | 107 | `latestRoundData() view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)` 108 | 109 | **Visibility** 110 | 111 | `external` 112 | 113 | **State Mutability** 114 | 115 | `view` 116 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IAddressResolver.md: -------------------------------------------------------------------------------- 1 | # IAddressResolver 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IAddressResolver.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IAddressResolver.sol) 6 | 7 | ## Views 8 | 9 | ### `getAddress` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IAddressResolver.sol#L5) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `getAddress(bytes32 name) view returns (address)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `getSynth` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IAddressResolver.sol#L7) 30 | 31 | !!! Warning "Not yet on mainnet" 32 | 33 | This view, while in source, is not yet on mainnet. It is planned in the `v2.23` Acrux release. As a workaround you can use `IAddressResolver.getAddress("Synthetix").synths(key)` 34 | 35 | ??? example "Details" 36 | 37 | **Signature** 38 | 39 | `getSynth(bytes32 key) view returns (address)` 40 | 41 | **Visibility** 42 | 43 | `external` 44 | 45 | **State Mutability** 46 | 47 | `view` 48 | 49 | ### `requireAndGetAddress` 50 | 51 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IAddressResolver.sol#L9) 52 | 53 | ??? example "Details" 54 | 55 | **Signature** 56 | 57 | `requireAndGetAddress(bytes32 name, string reason) view returns (address)` 58 | 59 | **Visibility** 60 | 61 | `external` 62 | 63 | **State Mutability** 64 | 65 | `view` 66 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IBaseSynthetixBridge.md: -------------------------------------------------------------------------------- 1 | # IBaseSynthetixBridge 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IBaseSynthetixBridge.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IBaseSynthetixBridge.sol) 6 | 7 | ## External Functions 8 | 9 | ### `resumeInitiation` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IBaseSynthetixBridge.sol#L7) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `resumeInitiation()` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `suspendInitiation` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IBaseSynthetixBridge.sol#L5) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `suspendInitiation()` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ICollateralLoan.md: -------------------------------------------------------------------------------- 1 | # ICollateralLoan 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ICollateralLoan.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralLoan.sol) 6 | 7 | ## Structs 8 | 9 | ### `Loan` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralLoan.sol#L6) 12 | 13 | | Field | Type | Description | 14 | | ----------------- | ----------------- | ----------- | 15 | | `id` | `uint256` | TBA | 16 | | `account` | `address payable` | TBA | 17 | | `collateral` | `uint256` | TBA | 18 | | `currency` | `bytes32` | TBA | 19 | | `amount` | `uint256` | TBA | 20 | | `short` | `bool` | TBA | 21 | | `accruedInterest` | `uint256` | TBA | 22 | | `interestIndex` | `uint256` | TBA | 23 | | `lastInteraction` | `uint256` | TBA | 24 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ICollateralUtil.md: -------------------------------------------------------------------------------- 1 | # ICollateralUtil 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ICollateralUtil.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralUtil.sol) 6 | 7 | ## Views 8 | 9 | ### `collateralRedeemed` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralUtil.sol#L26) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `collateralRedeemed(bytes32 currency, uint256 amount, bytes32 collateralKey) view returns (uint256 collateral)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `getCollateralRatio` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralUtil.sol#L8) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `getCollateralRatio(struct ICollateralLoan.Loan loan, bytes32 collateralKey) view returns (uint256 cratio)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ### `liquidationAmount` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralUtil.sol#L20) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `liquidationAmount(struct ICollateralLoan.Loan loan, uint256 minCratio, bytes32 collateralKey) view returns (uint256 amount)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `view` 62 | 63 | ### `maxLoan` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ICollateralUtil.sol#L13) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `maxLoan(uint256 amount, bytes32 currency, uint256 minCratio, bytes32 collateralKey) view returns (uint256 max)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `view` 80 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IDebtMigrator.md: -------------------------------------------------------------------------------- 1 | # IDebtMigrator 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IDebtMigrator.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDebtMigrator.sol) 6 | 7 | ## External Functions 8 | 9 | ### `finalizeDebtMigration` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDebtMigrator.sol#L5) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `finalizeDebtMigration(address account, uint256 debtSharesMigrated, uint256 escrowMigrated, uint256 liquidSnxMigrated, bytes debtPayload)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IDexPriceAggregator.md: -------------------------------------------------------------------------------- 1 | # IDexPriceAggregator 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IDexPriceAggregator.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDexPriceAggregator.sol) 6 | 7 | ## Views 8 | 9 | ### `assetToAsset` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDexPriceAggregator.sol#L9) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `assetToAsset(address tokenIn, uint256 amountIn, address tokenOut, uint256 twapPeriod) view returns (uint256 amountOut)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IDirectIntegrationManager.md: -------------------------------------------------------------------------------- 1 | # IDirectIntegrationManager 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IDirectIntegrationManager.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDirectIntegrationManager.sol) 6 | 7 | ## Structs 8 | 9 | ### `ParameterIntegrationSettings` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDirectIntegrationManager.sol#L6) 12 | 13 | | Field | Type | Description | 14 | | ------------------------------------- | --------- | ----------- | 15 | | `currencyKey` | `bytes32` | TBA | 16 | | `dexPriceAggregator` | `address` | TBA | 17 | | `atomicEquivalentForDexPricing` | `address` | TBA | 18 | | `atomicExchangeFeeRate` | `uint256` | TBA | 19 | | `atomicTwapWindow` | `uint256` | TBA | 20 | | `atomicMaxVolumePerBlock` | `uint256` | TBA | 21 | | `atomicVolatilityConsiderationWindow` | `uint256` | TBA | 22 | | `atomicVolatilityUpdateThreshold` | `uint256` | TBA | 23 | | `exchangeFeeRate` | `uint256` | TBA | 24 | | `exchangeMaxDynamicFee` | `uint256` | TBA | 25 | | `exchangeDynamicFeeRounds` | `uint256` | TBA | 26 | | `exchangeDynamicFeeThreshold` | `uint256` | TBA | 27 | | `exchangeDynamicFeeWeightDecay` | `uint256` | TBA | 28 | 29 | ## Views 30 | 31 | ### `getExchangeParameters` 32 | 33 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDirectIntegrationManager.sol#L22) 34 | 35 | ??? example "Details" 36 | 37 | **Signature** 38 | 39 | `getExchangeParameters(address integration, bytes32 key) view returns (struct IDirectIntegrationManager.ParameterIntegrationSettings settings)` 40 | 41 | **Visibility** 42 | 43 | `external` 44 | 45 | **State Mutability** 46 | 47 | `view` 48 | 49 | ## External Functions 50 | 51 | ### `setExchangeParameters` 52 | 53 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDirectIntegrationManager.sol#L27) 54 | 55 | ??? example "Details" 56 | 57 | **Signature** 58 | 59 | `setExchangeParameters(address integration, bytes32[] currencyKeys, struct IDirectIntegrationManager.ParameterIntegrationSettings params)` 60 | 61 | **Visibility** 62 | 63 | `external` 64 | 65 | **State Mutability** 66 | 67 | `` 68 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IDynamicSynthRedeemer.md: -------------------------------------------------------------------------------- 1 | # IDynamicSynthRedeemer 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IDynamicSynthRedeemer.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol) 6 | 7 | ## Views 8 | 9 | ### `getDiscountRate` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol#L11) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `getDiscountRate() view returns (uint256)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ## External Functions 28 | 29 | ### `redeem` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol#L13) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `redeem(bytes32 currencyKey)` 38 | 39 | **Visibility** 40 | 41 | `external` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | ### `redeemAll` 48 | 49 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol#L15) 50 | 51 | ??? example "Details" 52 | 53 | **Signature** 54 | 55 | `redeemAll(bytes32[] currencyKeys)` 56 | 57 | **Visibility** 58 | 59 | `external` 60 | 61 | **State Mutability** 62 | 63 | `` 64 | 65 | ### `redeemPartial` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol#L17) 68 | 69 | ??? example "Details" 70 | 71 | **Signature** 72 | 73 | `redeemPartial(bytes32 currencyKey, uint256 amountOfSynth)` 74 | 75 | **Visibility** 76 | 77 | `external` 78 | 79 | **State Mutability** 80 | 81 | `` 82 | 83 | ### `resumeRedemption` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol#L8) 86 | 87 | ??? example "Details" 88 | 89 | **Signature** 90 | 91 | `resumeRedemption()` 92 | 93 | **Visibility** 94 | 95 | `external` 96 | 97 | **State Mutability** 98 | 99 | `` 100 | 101 | ### `suspendRedemption` 102 | 103 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IDynamicSynthRedeemer.sol#L6) 104 | 105 | ??? example "Details" 106 | 107 | **Signature** 108 | 109 | `suspendRedemption()` 110 | 111 | **Visibility** 112 | 113 | `external` 114 | 115 | **State Mutability** 116 | 117 | `` 118 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IEtherCollateral.md: -------------------------------------------------------------------------------- 1 | # IEtherCollateral 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IEtherCollateral.sol](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol) 6 | 7 | ## Views 8 | 9 | ### `totalIssuedSynths` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `totalIssuedSynths() view returns (uint256)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `totalLoansCreated` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol#L8) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `totalLoansCreated() view returns (uint256)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ### `totalOpenLoanCount` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol#L10) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `totalOpenLoanCount() view returns (uint256)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `view` 62 | 63 | ## External Functions 64 | 65 | ### `closeLoan` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol#L15) 68 | 69 | ??? example "Details" 70 | 71 | **Signature** 72 | 73 | `closeLoan(uint256 loanID)` 74 | 75 | **Visibility** 76 | 77 | `external` 78 | 79 | **State Mutability** 80 | 81 | `` 82 | 83 | ### `liquidateUnclosedLoan` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol#L17) 86 | 87 | ??? example "Details" 88 | 89 | **Signature** 90 | 91 | `liquidateUnclosedLoan(address _loanCreatorsAddress, uint256 _loanID)` 92 | 93 | **Visibility** 94 | 95 | `external` 96 | 97 | **State Mutability** 98 | 99 | `` 100 | 101 | ### `openLoan` 102 | 103 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.47.0-ovm/contracts/interfaces/IEtherCollateral.sol#L13) 104 | 105 | ??? example "Details" 106 | 107 | **Signature** 108 | 109 | `openLoan() payable returns (uint256 loanID)` 110 | 111 | **Visibility** 112 | 113 | `external` 114 | 115 | **State Mutability** 116 | 117 | `payable` 118 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IExchangeCircuitBreaker.md: -------------------------------------------------------------------------------- 1 | # IExchangeCircuitBreaker 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IExchangeCircuitBreaker.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchangeCircuitBreaker.sol) 6 | 7 | ## Views 8 | 9 | ### `exchangeRates` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchangeCircuitBreaker.sol#L9) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `exchangeRates() view returns (contract IExchangeRates)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `rateWithInvalid` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchangeCircuitBreaker.sol#L11) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `rateWithInvalid(bytes32 currencyKey) view returns (uint256, bool)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ## External Functions 46 | 47 | ### `rateWithBreakCircuit` 48 | 49 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchangeCircuitBreaker.sol#L13) 50 | 51 | ??? example "Details" 52 | 53 | **Signature** 54 | 55 | `rateWithBreakCircuit(bytes32 currencyKey) returns (uint256 lastValidRate, bool circuitBroken)` 56 | 57 | **Visibility** 58 | 59 | `external` 60 | 61 | **State Mutability** 62 | 63 | `` 64 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IExchangerInternalDebtCache.md: -------------------------------------------------------------------------------- 1 | # IExchangerInternalDebtCache 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IExchanger.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol) 6 | 7 | ## External Functions 8 | 9 | ### `updateCachedSynthDebts` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L153) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `updateCachedSynthDebts(bytes32[] currencyKeys)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `updateCachedSynthDebtsWithRates` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L151) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `updateCachedSynthDebtsWithRates(bytes32[] currencyKeys, uint256[] currencyRates)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IFuturesMarketBaseTypes.md: -------------------------------------------------------------------------------- 1 | # IFuturesMarketBaseTypes 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IFuturesMarketBaseTypes.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IFuturesMarketBaseTypes.sol) 6 | 7 | ## Structs 8 | 9 | ### `NextPriceOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IFuturesMarketBaseTypes.sol#L31) 12 | 13 | | Field | Type | Description | 14 | | --------------- | --------- | ----------- | 15 | | `sizeDelta` | `int128` | TBA | 16 | | `targetRoundId` | `uint128` | TBA | 17 | | `commitDeposit` | `uint128` | TBA | 18 | | `keeperDeposit` | `uint128` | TBA | 19 | | `trackingCode` | `bytes32` | TBA | 20 | 21 | ### `Position` 22 | 23 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IFuturesMarketBaseTypes.sol#L22) 24 | 25 | | Field | Type | Description | 26 | | ------------------ | --------- | ----------- | 27 | | `id` | `uint64` | TBA | 28 | | `lastFundingIndex` | `uint64` | TBA | 29 | | `margin` | `uint128` | TBA | 30 | | `lastPrice` | `uint128` | TBA | 31 | | `size` | `int128` | TBA | 32 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IFuturesMarketManagerInternal.md: -------------------------------------------------------------------------------- 1 | # IFuturesMarketManagerInternal 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/frozen/FuturesMarketBase.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/frozen/FuturesMarketBase.sol) 6 | 7 | ## External Functions 8 | 9 | ### `burnSUSD` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/frozen/FuturesMarketBase.sol#L75) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `burnSUSD(address account, uint256 amount) returns (uint256 postReclamationAmount)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `issueSUSD` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/frozen/FuturesMarketBase.sol#L73) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `issueSUSD(address account, uint256 amount)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `payFee` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/frozen/FuturesMarketBase.sol#L77) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `payFee(uint256 amount)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IHasBalance.md: -------------------------------------------------------------------------------- 1 | # IHasBalance 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IHasBalance.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IHasBalance.sol) 6 | 7 | ## Views 8 | 9 | ### `balanceOf` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IHasBalance.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `balanceOf(address account) view returns (uint256)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IIssuerInternal.md: -------------------------------------------------------------------------------- 1 | # IIssuerInternal 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/Exchanger.sol](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/Exchanger.sol) 6 | 7 | ## External Functions 8 | 9 | ### `updateSNXIssuedDebtOnExchange` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/Exchanger.sol#L56) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `updateSNXIssuedDebtOnExchange(bytes32[2] currencyKeys, uint256[2] currencyRates)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `nonpayable` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IIssuerInternalDebtCache.md: -------------------------------------------------------------------------------- 1 | # IIssuerInternalDebtCache 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/Issuer.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol) 6 | 7 | ## Views 8 | 9 | ### `cacheInfo` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L43) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `cacheInfo() view returns (uint256 cachedDebt, uint256 timestamp, bool isInvalid, bool isStale)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `totalNonSnxBackedDebt` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L41) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `totalNonSnxBackedDebt() view returns (uint256 excludedDebt, bool isInvalid)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ## External Functions 46 | 47 | ### `updateCachedSynthDebtWithRate` 48 | 49 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L35) 50 | 51 | ??? example "Details" 52 | 53 | **Signature** 54 | 55 | `updateCachedSynthDebtWithRate(bytes32 currencyKey, uint256 currencyRate)` 56 | 57 | **Visibility** 58 | 59 | `external` 60 | 61 | **State Mutability** 62 | 63 | `` 64 | 65 | ### `updateCachedSynthDebtsWithRates` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L37) 68 | 69 | ??? example "Details" 70 | 71 | **Signature** 72 | 73 | `updateCachedSynthDebtsWithRates(bytes32[] currencyKeys, uint256[] currencyRates)` 74 | 75 | **Visibility** 76 | 77 | `external` 78 | 79 | **State Mutability** 80 | 81 | `` 82 | 83 | ### `updateCachedsUSDDebt` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L53) 86 | 87 | ??? example "Details" 88 | 89 | **Signature** 90 | 91 | `updateCachedsUSDDebt(int256 amount)` 92 | 93 | **Visibility** 94 | 95 | `external` 96 | 97 | **State Mutability** 98 | 99 | `` 100 | 101 | ### `updateDebtCacheValidity` 102 | 103 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L39) 104 | 105 | ??? example "Details" 106 | 107 | **Signature** 108 | 109 | `updateDebtCacheValidity(bool currentlyInvalid)` 110 | 111 | **Visibility** 112 | 113 | `external` 114 | 115 | **State Mutability** 116 | 117 | `` 118 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ILiquidatorRewards.md: -------------------------------------------------------------------------------- 1 | # ILiquidatorRewards 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ILiquidatorRewards.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ILiquidatorRewards.sol) 6 | 7 | ## Views 8 | 9 | ### `earned` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ILiquidatorRewards.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `earned(address account) view returns (uint256)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ## External Functions 28 | 29 | ### `getReward` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ILiquidatorRewards.sol#L10) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `getReward(address account)` 38 | 39 | **Visibility** 40 | 41 | `external` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | ### `notifyRewardAmount` 48 | 49 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ILiquidatorRewards.sol#L12) 50 | 51 | ??? example "Details" 52 | 53 | **Signature** 54 | 55 | `notifyRewardAmount(uint256 reward)` 56 | 57 | **Visibility** 58 | 59 | `external` 60 | 61 | **State Mutability** 62 | 63 | `` 64 | 65 | ### `updateEntry` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ILiquidatorRewards.sol#L14) 68 | 69 | ??? example "Details" 70 | 71 | **Signature** 72 | 73 | `updateEntry(address account)` 74 | 75 | **Visibility** 76 | 77 | `external` 78 | 79 | **State Mutability** 80 | 81 | `` 82 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IOldSynthetixBridgeToOptimism.md: -------------------------------------------------------------------------------- 1 | # IOldSynthetixBridgeToOptimism 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/BridgeMigrator.sol](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol) 6 | 7 | ## External Functions 8 | 9 | ### `activated` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol#L18) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `activated() view returns (bool)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `undefined` 26 | 27 | ### `migrateBridge` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol#L20) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `migrateBridge(address newBridge)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `undefined` 44 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IOwned.md: -------------------------------------------------------------------------------- 1 | # IOwned 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/BridgeMigrator.sol](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol) 6 | 7 | ## External Functions 8 | 9 | ### `acceptOwnership` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol#L14) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `acceptOwnership()` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `undefined` 26 | 27 | ### `nominateNewOwner` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol#L12) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `nominateNewOwner(address _owner)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `undefined` 44 | 45 | ### `nominatedOwner` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol#L10) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `nominatedOwner() view returns (address)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `undefined` 62 | 63 | ### `owner` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.44.0/contracts/BridgeMigrator.sol#L8) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `owner() view returns (address)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `undefined` 80 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IOwnerRelayOnOptimism.md: -------------------------------------------------------------------------------- 1 | # IOwnerRelayOnOptimism 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IOwnerRelayOnOptimism.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IOwnerRelayOnOptimism.sol) 6 | 7 | ## External Functions 8 | 9 | ### `finalizeRelay` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IOwnerRelayOnOptimism.sol#L5) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `finalizeRelay(address target, bytes payload)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `finalizeRelayBatch` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IOwnerRelayOnOptimism.sol#L7) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `finalizeRelayBatch(address[] target, bytes[] payloads)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2BaseTypes.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2BaseTypes 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2Market.sol](https://github.com/Synthetixio/synthetix/tree/v2.79.1/contracts/interfaces/IPerpsV2Market.sol) 6 | 7 | ## Structs 8 | 9 | ### `NextPriceOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.79.1/contracts/interfaces/IPerpsV2Market.sol#L29) 12 | 13 | | Field | Type | Description | 14 | | --------------- | --------- | ----------- | 15 | | `sizeDelta` | `int128` | TBA | 16 | | `targetRoundId` | `uint128` | TBA | 17 | | `commitDeposit` | `uint128` | TBA | 18 | | `keeperDeposit` | `uint128` | TBA | 19 | | `trackingCode` | `bytes32` | TBA | 20 | 21 | ### `Position` 22 | 23 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.79.1/contracts/interfaces/IPerpsV2Market.sol#L20) 24 | 25 | | Field | Type | Description | 26 | | ------------------ | --------- | ----------- | 27 | | `id` | `uint64` | TBA | 28 | | `lastFundingIndex` | `uint64` | TBA | 29 | | `margin` | `uint128` | TBA | 30 | | `lastPrice` | `uint128` | TBA | 31 | | `size` | `int128` | TBA | 32 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2MarketBaseTypes.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2MarketBaseTypes 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2MarketBaseTypes.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketBaseTypes.sol) 6 | 7 | ## Structs 8 | 9 | ### `DelayedOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketBaseTypes.sol#L37) 12 | 13 | | Field | Type | Description | 14 | | ------------------ | --------- | ----------- | 15 | | `isOffchain` | `bool` | TBA | 16 | | `sizeDelta` | `int128` | TBA | 17 | | `desiredFillPrice` | `uint128` | TBA | 18 | | `targetRoundId` | `uint128` | TBA | 19 | | `commitDeposit` | `uint128` | TBA | 20 | | `keeperDeposit` | `uint128` | TBA | 21 | | `executableAtTime` | `uint256` | TBA | 22 | | `intentionTime` | `uint256` | TBA | 23 | | `trackingCode` | `bytes32` | TBA | 24 | 25 | ### `Position` 26 | 27 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketBaseTypes.sol#L28) 28 | 29 | | Field | Type | Description | 30 | | ------------------ | --------- | ----------- | 31 | | `id` | `uint64` | TBA | 32 | | `lastFundingIndex` | `uint64` | TBA | 33 | | `margin` | `uint128` | TBA | 34 | | `lastPrice` | `uint128` | TBA | 35 | | `size` | `int128` | TBA | 36 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2MarketBaseTypesLegacyR1.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2MarketBaseTypesLegacyR1 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2MarketBaseTypesLegacyR1.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketBaseTypesLegacyR1.sol) 6 | 7 | ## Structs 8 | 9 | ### `DelayedOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketBaseTypesLegacyR1.sol#L37) 12 | 13 | | Field | Type | Description | 14 | | ------------------ | --------- | ----------- | 15 | | `isOffchain` | `bool` | TBA | 16 | | `sizeDelta` | `int128` | TBA | 17 | | `priceImpactDelta` | `uint128` | TBA | 18 | | `targetRoundId` | `uint128` | TBA | 19 | | `commitDeposit` | `uint128` | TBA | 20 | | `keeperDeposit` | `uint128` | TBA | 21 | | `executableAtTime` | `uint256` | TBA | 22 | | `intentionTime` | `uint256` | TBA | 23 | | `trackingCode` | `bytes32` | TBA | 24 | 25 | ### `Position` 26 | 27 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketBaseTypesLegacyR1.sol#L28) 28 | 29 | | Field | Type | Description | 30 | | ------------------ | --------- | ----------- | 31 | | `id` | `uint64` | TBA | 32 | | `lastFundingIndex` | `uint64` | TBA | 33 | | `margin` | `uint128` | TBA | 34 | | `lastPrice` | `uint128` | TBA | 35 | | `size` | `int128` | TBA | 36 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2MarketDelayedExecution.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2MarketDelayedExecution 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2MarketDelayedExecution.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketDelayedExecution.sol) 6 | 7 | ## External Functions 8 | 9 | ### `cancelDelayedOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketDelayedExecution.sol#L11) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `cancelDelayedOrder(address account)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `cancelOffchainDelayedOrder` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketDelayedExecution.sol#L13) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `cancelOffchainDelayedOrder(address account)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `executeDelayedOrder` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketDelayedExecution.sol#L7) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `executeDelayedOrder(address account)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | 63 | ### `executeOffchainDelayedOrder` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketDelayedExecution.sol#L9) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `executeOffchainDelayedOrder(address account, bytes[] priceUpdateData) payable` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `payable` 80 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2MarketDelayedOrders.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2MarketDelayedOrders 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2MarketDelayedOrders.sol](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketDelayedOrders.sol) 6 | 7 | ## External Functions 8 | 9 | ### `cancelDelayedOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketDelayedOrders.sol#L17) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `cancelDelayedOrder(address account)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `executeDelayedOrder` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketDelayedOrders.sol#L19) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `executeDelayedOrder(address account)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `submitDelayedOrder` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketDelayedOrders.sol#L4) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `submitDelayedOrder(int256 sizeDelta, uint256 priceImpactDelta, uint256 desiredTimeDelta)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | 63 | ### `submitDelayedOrderWithTracking` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketDelayedOrders.sol#L10) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `submitDelayedOrderWithTracking(int256 sizeDelta, uint256 priceImpactDelta, uint256 desiredTimeDelta, bytes32 trackingCode)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `` 80 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2MarketLiquidate.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2MarketLiquidate 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2MarketLiquidate.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketLiquidate.sol) 6 | 7 | ## External Functions 8 | 9 | ### `flagPosition` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketLiquidate.sol#L10) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `flagPosition(address account)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `forceLiquidatePosition` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketLiquidate.sol#L14) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `forceLiquidatePosition(address account)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `liquidatePosition` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IPerpsV2MarketLiquidate.sol#L12) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `liquidatePosition(address account)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IPerpsV2MarketOffchainOrders.md: -------------------------------------------------------------------------------- 1 | # IPerpsV2MarketOffchainOrders 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IPerpsV2MarketOffchainOrders.sol](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketOffchainOrders.sol) 6 | 7 | ## External Functions 8 | 9 | ### `cancelOffchainDelayedOrder` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketOffchainOrders.sol#L13) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `cancelOffchainDelayedOrder(address account)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `executeOffchainDelayedOrder` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketOffchainOrders.sol#L15) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `executeOffchainDelayedOrder(address account, bytes[] priceUpdateData) payable` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `payable` 44 | 45 | ### `submitOffchainDelayedOrder` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketOffchainOrders.sol#L5) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `submitOffchainDelayedOrder(int256 sizeDelta, uint256 priceImpactDelta)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | 63 | ### `submitOffchainDelayedOrderWithTracking` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.85.0/contracts/interfaces/IPerpsV2MarketOffchainOrders.sol#L7) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `submitOffchainDelayedOrderWithTracking(int256 sizeDelta, uint256 priceImpactDelta, bytes32 trackingCode)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `` 80 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IProxy.md: -------------------------------------------------------------------------------- 1 | # IProxy 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/Issuer.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol) 6 | 7 | ## Views 8 | 9 | ### `target` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Issuer.sol#L31) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `target() view returns (address)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IRewardsDistribution.md: -------------------------------------------------------------------------------- 1 | # IRewardsDistribution 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IRewardsDistribution.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IRewardsDistribution.sol) 6 | 7 | ## Structs 8 | 9 | ### `DistributionData` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IRewardsDistribution.sol#L6) 12 | 13 | | Field | Type | Description | 14 | | ------------- | --------- | ----------- | 15 | | `destination` | `address` | TBA | 16 | | `amount` | `uint256` | TBA | 17 | 18 | ## Views 19 | 20 | ### `authority` 21 | 22 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IRewardsDistribution.sol#L12) 23 | 24 | ??? example "Details" 25 | 26 | **Signature** 27 | 28 | `authority() view returns (address)` 29 | 30 | **Visibility** 31 | 32 | `external` 33 | 34 | **State Mutability** 35 | 36 | `view` 37 | 38 | ### `distributions` 39 | 40 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IRewardsDistribution.sol#L14) 41 | 42 | ??? example "Details" 43 | 44 | **Signature** 45 | 46 | `distributions(uint256 index) view returns (address destination, uint256 amount)` 47 | 48 | **Visibility** 49 | 50 | `external` 51 | 52 | **State Mutability** 53 | 54 | `view` 55 | 56 | ### `distributionsLength` 57 | 58 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IRewardsDistribution.sol#L16) 59 | 60 | ??? example "Details" 61 | 62 | **Signature** 63 | 64 | `distributionsLength() view returns (uint256)` 65 | 66 | **Visibility** 67 | 68 | `external` 69 | 70 | **State Mutability** 71 | 72 | `view` 73 | 74 | ## External Functions 75 | 76 | ### `distributeRewards` 77 | 78 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IRewardsDistribution.sol#L19) 79 | 80 | ??? example "Details" 81 | 82 | **Signature** 83 | 84 | `distributeRewards(uint256 amount) returns (bool)` 85 | 86 | **Visibility** 87 | 88 | `external` 89 | 90 | **State Mutability** 91 | 92 | `` 93 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISecondaryDeposit.md: -------------------------------------------------------------------------------- 1 | # ISecondaryDeposit 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ISecondaryDeposit.sol](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/interfaces/ISecondaryDeposit.sol) 6 | 7 | ## External Functions 8 | 9 | ### `completeWithdrawal` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/interfaces/ISecondaryDeposit.sol#L15) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `completeWithdrawal(address account, uint256 amount)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `nonpayable` 26 | 27 | ### `deposit` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/interfaces/ISecondaryDeposit.sol#L6) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `deposit(uint256 amount)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `nonpayable` 44 | 45 | ### `initiateWithdrawal` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/interfaces/ISecondaryDeposit.sol#L9) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `initiateWithdrawal(uint256 amount)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `nonpayable` 62 | 63 | ### `mintSecondaryFromDeposit` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.30.2-ovm/contracts/interfaces/ISecondaryDeposit.sol#L12) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `mintSecondaryFromDeposit(address account, uint256 amount)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `nonpayable` 80 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISupplySchedule.md: -------------------------------------------------------------------------------- 1 | # ISupplySchedule 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ISupplySchedule.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISupplySchedule.sol) 6 | 7 | ## Views 8 | 9 | ### `isMintable` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISupplySchedule.sol#L8) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `isMintable() view returns (bool)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `mintableSupply` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISupplySchedule.sol#L6) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `mintableSupply() view returns (uint256)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ### `minterReward` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISupplySchedule.sol#L10) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `minterReward() view returns (uint256)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `view` 62 | 63 | ## External Functions 64 | 65 | ### `recordMintEvent` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISupplySchedule.sol#L13) 68 | 69 | ??? example "Details" 70 | 71 | **Signature** 72 | 73 | `recordMintEvent(uint256 supplyMinted) returns (uint256)` 74 | 75 | **Visibility** 76 | 77 | `external` 78 | 79 | **State Mutability** 80 | 81 | `` 82 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynth.md: -------------------------------------------------------------------------------- 1 | # ISynth 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ISynth.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol) 6 | 7 | ## Views 8 | 9 | ### `currencyKey` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `currencyKey() view returns (bytes32)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `transferableSynths` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol#L8) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `transferableSynths(address account) view returns (uint256)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | 45 | ## External Functions 46 | 47 | ### `burn` 48 | 49 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol#L20) 50 | 51 | ??? example "Details" 52 | 53 | **Signature** 54 | 55 | `burn(address account, uint256 amount)` 56 | 57 | **Visibility** 58 | 59 | `external` 60 | 61 | **State Mutability** 62 | 63 | `` 64 | 65 | ### `issue` 66 | 67 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol#L22) 68 | 69 | ??? example "Details" 70 | 71 | **Signature** 72 | 73 | `issue(address account, uint256 amount)` 74 | 75 | **Visibility** 76 | 77 | `external` 78 | 79 | **State Mutability** 80 | 81 | `` 82 | 83 | ### `transferAndSettle` 84 | 85 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol#L11) 86 | 87 | ??? example "Details" 88 | 89 | **Signature** 90 | 91 | `transferAndSettle(address to, uint256 value) returns (bool)` 92 | 93 | **Visibility** 94 | 95 | `external` 96 | 97 | **State Mutability** 98 | 99 | `` 100 | 101 | ### `transferFromAndSettle` 102 | 103 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynth.sol#L13) 104 | 105 | ??? example "Details" 106 | 107 | **Signature** 108 | 109 | `transferFromAndSettle(address from, address to, uint256 value) returns (bool)` 110 | 111 | **Visibility** 112 | 113 | `external` 114 | 115 | **State Mutability** 116 | 117 | `` 118 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynthetixBridgeEscrow.md: -------------------------------------------------------------------------------- 1 | # ISynthetixBridgeEscrow 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ISynthetixBridgeEscrow.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeEscrow.sol) 6 | 7 | ## External Functions 8 | 9 | ### `approveBridge` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeEscrow.sol#L4) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `approveBridge(address _token, address _bridge, uint256 _amount)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynthetixBridgeToBase.md: -------------------------------------------------------------------------------- 1 | # ISynthetixBridgeToBase 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ISynthetixBridgeToBase.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToBase.sol) 6 | 7 | ## External Functions 8 | 9 | ### `finalizeEscrowMigration` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToBase.sol#L8) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `finalizeEscrowMigration(address account, uint256 escrowedAmount, struct VestingEntries.VestingEntry[] vestingEntries)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `finalizeFeePeriodClose` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToBase.sol#L17) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `finalizeFeePeriodClose(uint256 snxBackedDebt, uint256 debtSharesSupply)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `finalizeRewardDeposit` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToBase.sol#L15) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `finalizeRewardDeposit(address from, uint256 amount)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynthetixBridgeToOptimism.md: -------------------------------------------------------------------------------- 1 | # ISynthetixBridgeToOptimism 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/ISynthetixBridgeToOptimism.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToOptimism.sol) 6 | 7 | ## External Functions 8 | 9 | ### `closeFeePeriod` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToOptimism.sol#L5) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `closeFeePeriod(uint256 snxBackedDebt, uint256 debtSharesSupply)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `depositAndMigrateEscrow` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToOptimism.sol#L13) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `depositAndMigrateEscrow(uint256 depositAmount, uint256[][] entryIDs)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `depositReward` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToOptimism.sol#L11) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `depositReward(uint256 amount)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | 63 | ### `depositTo` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToOptimism.sol#L9) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `depositTo(address to, uint256 amount)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `` 80 | 81 | ### `migrateEscrow` 82 | 83 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/ISynthetixBridgeToOptimism.sol#L7) 84 | 85 | ??? example "Details" 86 | 87 | **Signature** 88 | 89 | `migrateEscrow(uint256[][] entryIDs)` 90 | 91 | **Visibility** 92 | 93 | `external` 94 | 95 | **State Mutability** 96 | 97 | `` 98 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynthetixEscrow.md: -------------------------------------------------------------------------------- 1 | # ISynthetixEscrow 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/EscrowChecker.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol) 6 | 7 | ## Views 8 | 9 | ### `getVestingScheduleEntry` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol#L6) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `getVestingScheduleEntry(address account, uint256 index) view returns (uint256[2])` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ### `numVestingEntries` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/EscrowChecker.sol#L4) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `numVestingEntries(address account) view returns (uint256)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `view` 44 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynthetixInternal.md: -------------------------------------------------------------------------------- 1 | # ISynthetixInternal 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IExchanger.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol) 6 | 7 | ## External Functions 8 | 9 | ### `emitAtomicSynthExchange` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L128) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `emitAtomicSynthExchange(address account, bytes32 fromCurrencyKey, uint256 fromAmount, bytes32 toCurrencyKey, uint256 toAmount, address toAddress)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | 27 | ### `emitExchangeRebate` 28 | 29 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L143) 30 | 31 | ??? example "Details" 32 | 33 | **Signature** 34 | 35 | `emitExchangeRebate(address account, bytes32 currencyKey, uint256 amount)` 36 | 37 | **Visibility** 38 | 39 | `external` 40 | 41 | **State Mutability** 42 | 43 | `` 44 | 45 | ### `emitExchangeReclaim` 46 | 47 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L137) 48 | 49 | ??? example "Details" 50 | 51 | **Signature** 52 | 53 | `emitExchangeReclaim(address account, bytes32 currencyKey, uint256 amount)` 54 | 55 | **Visibility** 56 | 57 | `external` 58 | 59 | **State Mutability** 60 | 61 | `` 62 | 63 | ### `emitExchangeTracking` 64 | 65 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L112) 66 | 67 | ??? example "Details" 68 | 69 | **Signature** 70 | 71 | `emitExchangeTracking(bytes32 trackingCode, bytes32 toCurrencyKey, uint256 toAmount, uint256 fee)` 72 | 73 | **Visibility** 74 | 75 | `external` 76 | 77 | **State Mutability** 78 | 79 | `` 80 | 81 | ### `emitSynthExchange` 82 | 83 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IExchanger.sol#L119) 84 | 85 | ??? example "Details" 86 | 87 | **Signature** 88 | 89 | `emitSynthExchange(address account, bytes32 fromCurrencyKey, uint256 fromAmount, bytes32 toCurrencyKey, uint256 toAmount, address toAddress)` 90 | 91 | **Visibility** 92 | 93 | `external` 94 | 95 | **State Mutability** 96 | 97 | `` 98 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/ISynthetixNamedContract.md: -------------------------------------------------------------------------------- 1 | # ISynthetixNamedContract 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/migrations/Migration_HanOptimism.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/Migration_HanOptimism.sol) 6 | 7 | ## Views 8 | 9 | ### `CONTRACT_NAME` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/migrations/Migration_HanOptimism.sol#L10) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `CONTRACT_NAME() view returns (bytes32)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IVirtualSynthInternal.md: -------------------------------------------------------------------------------- 1 | # IVirtualSynthInternal 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/ExchangerWithFeeRecAlternatives.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangerWithFeeRecAlternatives.sol) 6 | 7 | ## External Functions 8 | 9 | ### `initialize` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/ExchangerWithFeeRecAlternatives.sol#L13) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `initialize(contract IERC20 _synth, contract IAddressResolver _resolver, address _recipient, uint256 _amount, bytes32 _currencyKey)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `` 26 | -------------------------------------------------------------------------------- /content/contracts/source/interfaces/IWrapperFactory.md: -------------------------------------------------------------------------------- 1 | # IWrapperFactory 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/interfaces/IWrapperFactory.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IWrapperFactory.sol) 6 | 7 | ## Views 8 | 9 | ### `isWrapper` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IWrapperFactory.sol#L7) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `isWrapper(address possibleWrapper) view returns (bool)` 18 | 19 | **Visibility** 20 | 21 | `external` 22 | 23 | **State Mutability** 24 | 25 | `view` 26 | 27 | ## External Functions 28 | 29 | ### `createWrapper` 30 | 31 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IWrapperFactory.sol#L9) 32 | 33 | ??? example "Details" 34 | 35 | **Signature** 36 | 37 | `createWrapper(contract IERC20 token, bytes32 currencyKey, bytes32 synthContractName) returns (address)` 38 | 39 | **Visibility** 40 | 41 | `external` 42 | 43 | **State Mutability** 44 | 45 | `` 46 | 47 | ### `distributeFees` 48 | 49 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/interfaces/IWrapperFactory.sol#L15) 50 | 51 | ??? example "Details" 52 | 53 | **Signature** 54 | 55 | `distributeFees()` 56 | 57 | **Visibility** 58 | 59 | `external` 60 | 61 | **State Mutability** 62 | 63 | `` 64 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/AddressListLib.md: -------------------------------------------------------------------------------- 1 | # AddressListLib 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/AddressListLib.sol](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol) 6 | 7 | ## Structs 8 | 9 | ### `AddressList` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol#L6) 12 | 13 | | Field | Type | Description | 14 | | ---------- | ----------------------------- | ----------- | 15 | | `elements` | `address[]` | TBA | 16 | | `indices` | `mapping(address => uint256)` | TBA | 17 | 18 | ## Internal Functions 19 | 20 | ### `contains` 21 | 22 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol#L11) 23 | 24 | ??? example "Details" 25 | 26 | **Signature** 27 | 28 | `contains(struct AddressListLib.AddressList list, address candidate) returns (bool)` 29 | 30 | **Visibility** 31 | 32 | `internal` 33 | 34 | **State Mutability** 35 | 36 | `view` 37 | 38 | ### `getPage` 39 | 40 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol#L19) 41 | 42 | ??? example "Details" 43 | 44 | **Signature** 45 | 46 | `getPage(struct AddressListLib.AddressList list, uint256 index, uint256 pageSize) returns (address[])` 47 | 48 | **Visibility** 49 | 50 | `internal` 51 | 52 | **State Mutability** 53 | 54 | `view` 55 | 56 | ### `push` 57 | 58 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol#L43) 59 | 60 | ??? example "Details" 61 | 62 | **Signature** 63 | 64 | `push(struct AddressListLib.AddressList list, address element)` 65 | 66 | **Visibility** 67 | 68 | `internal` 69 | 70 | **State Mutability** 71 | 72 | `nonpayable` 73 | 74 | ### `remove` 75 | 76 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol#L48) 77 | 78 | ??? example "Details" 79 | 80 | **Signature** 81 | 82 | `remove(struct AddressListLib.AddressList list, address element)` 83 | 84 | **Visibility** 85 | 86 | `internal` 87 | 88 | **State Mutability** 89 | 90 | `nonpayable` 91 | 92 | **Requires** 93 | 94 | * [require(..., Element not in list.)](https://github.com/Synthetixio/synthetix/tree/v2.34.2/contracts/AddressListLib.sol#L49) 95 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/AddressSetLib.md: -------------------------------------------------------------------------------- 1 | # AddressSetLib 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/AddressSetLib.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol) 6 | 7 | ## Structs 8 | 9 | ### `AddressSet` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol#L5) 12 | 13 | | Field | Type | Description | 14 | | ---------- | ----------------------------- | ----------- | 15 | | `elements` | `address[]` | TBA | 16 | | `indices` | `mapping(address => uint256)` | TBA | 17 | 18 | ## Internal Functions 19 | 20 | ### `add` 21 | 22 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol#L42) 23 | 24 | ??? example "Details" 25 | 26 | **Signature** 27 | 28 | `add(struct AddressSetLib.AddressSet set, address element)` 29 | 30 | **Visibility** 31 | 32 | `internal` 33 | 34 | **State Mutability** 35 | 36 | `` 37 | 38 | ### `contains` 39 | 40 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol#L10) 41 | 42 | ??? example "Details" 43 | 44 | **Signature** 45 | 46 | `contains(struct AddressSetLib.AddressSet set, address candidate) view returns (bool)` 47 | 48 | **Visibility** 49 | 50 | `internal` 51 | 52 | **State Mutability** 53 | 54 | `view` 55 | 56 | ### `getPage` 57 | 58 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol#L18) 59 | 60 | ??? example "Details" 61 | 62 | **Signature** 63 | 64 | `getPage(struct AddressSetLib.AddressSet set, uint256 index, uint256 pageSize) view returns (address[])` 65 | 66 | **Visibility** 67 | 68 | `internal` 69 | 70 | **State Mutability** 71 | 72 | `view` 73 | 74 | ### `remove` 75 | 76 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol#L50) 77 | 78 | ??? example "Details" 79 | 80 | **Signature** 81 | 82 | `remove(struct AddressSetLib.AddressSet set, address element)` 83 | 84 | **Visibility** 85 | 86 | `internal` 87 | 88 | **State Mutability** 89 | 90 | `` 91 | 92 | **Requires** 93 | 94 | * [require(..., "Element not in set.")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/AddressSetLib.sol#L51) 95 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/Bytes32SetLib.md: -------------------------------------------------------------------------------- 1 | # Bytes32SetLib 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/Bytes32SetLib.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol) 6 | 7 | ## Structs 8 | 9 | ### `Bytes32Set` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol#L5) 12 | 13 | | Field | Type | Description | 14 | | ---------- | ----------------------------- | ----------- | 15 | | `elements` | `bytes32[]` | TBA | 16 | | `indices` | `mapping(bytes32 => uint256)` | TBA | 17 | 18 | ## Internal Functions 19 | 20 | ### `add` 21 | 22 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol#L42) 23 | 24 | ??? example "Details" 25 | 26 | **Signature** 27 | 28 | `add(struct Bytes32SetLib.Bytes32Set set, bytes32 element)` 29 | 30 | **Visibility** 31 | 32 | `internal` 33 | 34 | **State Mutability** 35 | 36 | `` 37 | 38 | ### `contains` 39 | 40 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol#L10) 41 | 42 | ??? example "Details" 43 | 44 | **Signature** 45 | 46 | `contains(struct Bytes32SetLib.Bytes32Set set, bytes32 candidate) view returns (bool)` 47 | 48 | **Visibility** 49 | 50 | `internal` 51 | 52 | **State Mutability** 53 | 54 | `view` 55 | 56 | ### `getPage` 57 | 58 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol#L18) 59 | 60 | ??? example "Details" 61 | 62 | **Signature** 63 | 64 | `getPage(struct Bytes32SetLib.Bytes32Set set, uint256 index, uint256 pageSize) view returns (bytes32[])` 65 | 66 | **Visibility** 67 | 68 | `internal` 69 | 70 | **State Mutability** 71 | 72 | `view` 73 | 74 | ### `remove` 75 | 76 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol#L50) 77 | 78 | ??? example "Details" 79 | 80 | **Signature** 81 | 82 | `remove(struct Bytes32SetLib.Bytes32Set set, bytes32 element)` 83 | 84 | **Visibility** 85 | 86 | `internal` 87 | 88 | **State Mutability** 89 | 90 | `` 91 | 92 | **Requires** 93 | 94 | * [require(..., "Element not in set.")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Bytes32SetLib.sol#L51) 95 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/Math.md: -------------------------------------------------------------------------------- 1 | # Math 2 | 3 | ## Description 4 | 5 | This is a library contract that provides math functions on fractional numbers, performing arithmetic with unsigned [fixed-point decimals](https://en.wikipedia.org/wiki/Fixed-point_arithmetic). 6 | 7 | [^1]: Math currently provides a `power` function for calculating the exponentiation of a decimal number to 18 decimal places. 8 | 9 | Math uses OpenZeppelin's [SafeMath](SafeMath.md) library and SafeDecimalMath library for most of its basic arithmetic operations in order to protect from arithmetic overflows and zero divisions. 10 | 11 | **Source:** [contracts/Math.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Math.sol) 12 | 13 | ## Internal Functions 14 | 15 | ### `powDecimal` 16 | 17 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/Math.sol#L17) 18 | 19 | Returns the exponentiation of the base (x) integer by the n^th power to precision of 18 decimals. Function calculates the result using exponentiation by squaring, handling preciison loss by truncation and removes the order of magnitude introduced with integer arithmetics each time the base is squared. 20 | 21 | ??? example "Details" 22 | 23 | **Signature** 24 | 25 | `powDecimal(uint256 x, uint256 n) pure returns (uint256)` 26 | 27 | **Visibility** 28 | 29 | `internal` 30 | 31 | **State Mutability** 32 | 33 | `pure` 34 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/SafeMath.md: -------------------------------------------------------------------------------- 1 | # SafeMath 2 | 3 | Synthetix uses OpenZeppelin's [SafeMath](https://docs.openzeppelin.com/contracts/2.x/api/math#SafeMath) library to ensure that, in basic arithmetic operations, overflows and zero division revert the transactions they occur in. 4 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/SignedSafeMath.md: -------------------------------------------------------------------------------- 1 | # SignedSafeMath 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/SignedSafeMath.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol) 6 | 7 | ## Internal Functions 8 | 9 | ### `add` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L117) 12 | 13 | ??? example "Details" 14 | 15 | **Signature** 16 | 17 | `add(int256 a, int256 b) pure returns (int256)` 18 | 19 | **Visibility** 20 | 21 | `internal` 22 | 23 | **State Mutability** 24 | 25 | `pure` 26 | 27 | **Requires** 28 | 29 | * [require(..., "SignedSafeMath: addition overflow")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L119) 30 | 31 | ### `div` 32 | 33 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L81) 34 | 35 | ??? example "Details" 36 | 37 | **Signature** 38 | 39 | `div(int256 a, int256 b) pure returns (int256)` 40 | 41 | **Visibility** 42 | 43 | `internal` 44 | 45 | **State Mutability** 46 | 47 | `pure` 48 | 49 | **Requires** 50 | 51 | * [require(..., "SignedSafeMath: division by zero")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L82) 52 | 53 | * [require(..., "SignedSafeMath: division overflow")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L83) 54 | 55 | ### `mul` 56 | 57 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L53) 58 | 59 | ??? example "Details" 60 | 61 | **Signature** 62 | 63 | `mul(int256 a, int256 b) pure returns (int256)` 64 | 65 | **Visibility** 66 | 67 | `internal` 68 | 69 | **State Mutability** 70 | 71 | `pure` 72 | 73 | **Requires** 74 | 75 | * [require(..., "SignedSafeMath: multiplication overflow")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L61) 76 | 77 | * [require(..., "SignedSafeMath: multiplication overflow")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L64) 78 | 79 | ### `sub` 80 | 81 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L100) 82 | 83 | ??? example "Details" 84 | 85 | **Signature** 86 | 87 | `sub(int256 a, int256 b) pure returns (int256)` 88 | 89 | **Visibility** 90 | 91 | `internal` 92 | 93 | **State Mutability** 94 | 95 | `pure` 96 | 97 | **Requires** 98 | 99 | * [require(..., "SignedSafeMath: subtraction overflow")](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/SignedSafeMath.sol#L102) 100 | -------------------------------------------------------------------------------- /content/contracts/source/libraries/VestingEntries.md: -------------------------------------------------------------------------------- 1 | # VestingEntries 2 | 3 | ## Description 4 | 5 | **Source:** [contracts/RewardEscrowV2Frozen/IRewardEscrowV2Frozen.sol](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2Frozen/IRewardEscrowV2Frozen.sol) 6 | 7 | ## Structs 8 | 9 | ### `VestingEntry` 10 | 11 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2Frozen/IRewardEscrowV2Frozen.sol#L5) 12 | 13 | | Field | Type | Description | 14 | | -------------- | --------- | ----------- | 15 | | `endTime` | `uint64` | TBA | 16 | | `escrowAmount` | `uint256` | TBA | 17 | 18 | ### `VestingEntryWithID` 19 | 20 | [Source](https://github.com/Synthetixio/synthetix/tree/v2.102.0/contracts/RewardEscrowV2Frozen/IRewardEscrowV2Frozen.sol#L9) 21 | 22 | | Field | Type | Description | 23 | | -------------- | --------- | ----------- | 24 | | `endTime` | `uint64` | TBA | 25 | | `escrowAmount` | `uint256` | TBA | 26 | | `entryID` | `uint256` | TBA | 27 | -------------------------------------------------------------------------------- /content/extra.css: -------------------------------------------------------------------------------- 1 | centered-image { 2 | display: block; 3 | text-align: center; 4 | padding: 40px 0 60px 0; 5 | } 6 | 7 | article { 8 | padding-bottom: 3rem; 9 | } 10 | 11 | .md-typeset h2 { 12 | font-weight: 500; 13 | font-size: 1.5rem; 14 | margin-top: 3rem; 15 | } 16 | 17 | .md-typeset h3 { 18 | font-weight: 900; 19 | } 20 | 21 | .md-typeset code { 22 | word-break: normal; 23 | } 24 | 25 | .md-typeset details.example { 26 | border-left-color: rgb(66, 51, 125); 27 | } 28 | 29 | .md-typeset details.example > summary { 30 | background-color: rgba(66, 51, 125, 0.1); 31 | } 32 | 33 | .md-typeset details.example > summary:before { 34 | color: rgb(66, 51, 125); 35 | } 36 | 37 | .rounded-image { 38 | border-radius: 5px; 39 | width: 180px; 40 | } 41 | 42 | ul.tight { 43 | padding: 0; 44 | margin: 0; 45 | } 46 | 47 | ul.tight > li { 48 | margin: 0; 49 | } 50 | -------------------------------------------------------------------------------- /content/img/Favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/Favicon.png -------------------------------------------------------------------------------- /content/img/graphs/DelegateApprovals-architecture.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
DelegateApprovals
DelegateApprovals
FeePool
FeePool
-------------------------------------------------------------------------------- /content/img/graphs/EscrowChecker.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
EscrowChecker
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/LimitedSetup.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
LimitedSetup
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/Owned.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/Pausable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
Pausable
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/Proxy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
Proxy
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/Proxyable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
Proxyable
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/ReentrancyPreventer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
ReentrancyPreventer
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/RewardEscrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
RewardEscrow
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/RewardsDistribution.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
RewardsDistribution
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/SafeDecimalMath.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
SafeDecimalMath
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/SelfDestructible.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
SelfDestructible
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/State.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
State
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/SupplySchedule.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
SupplySchedule
[Not supported by viewer]
Owned
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/graphs/TokenFallbackCaller.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 |
TokenFallbackCaller
[Not supported by viewer]
ReentrancyPreventer
[Not supported by viewer]
-------------------------------------------------------------------------------- /content/img/logos/ARAW_logo_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Asset 1 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /content/img/logos/data-integration-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/data-integration-header.png -------------------------------------------------------------------------------- /content/img/logos/integrate_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/integrate_data.png -------------------------------------------------------------------------------- /content/img/logos/integrate_staking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/integrate_staking.png -------------------------------------------------------------------------------- /content/img/logos/integrate_trading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/integrate_trading.png -------------------------------------------------------------------------------- /content/img/logos/staking-integration-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/staking-integration-header.png -------------------------------------------------------------------------------- /content/img/logos/synthetix-docs-graphs.drawio: -------------------------------------------------------------------------------- 1 | 7VvRcqs2EP0aP6YDko3xox0nbaf3TjLj3mnvowIKKJGRK0Rs9+srjATCJJjUwQHHeTFarUDsnj1arcgAXi83v3K0Cr8zH9MBsPzNAM4HANi268ifVLLNJOOxmwkCTnylVAgW5F+shJaSJsTHcUlRMEYFWZWFHosi7ImSDHHO1mW1R0bLT12hAFcECw/RqvQv4oswk7ojq5D/hkkQ6ifblupZIq2sBHGIfLY2RPBmAK85YyK7Wm6uMU2Np+2Sjbt9ozefGMeRaDJgOnUmT3d49sP57vwOFlcRXf9xpbwTi61+YezL91dNxkXIAhYhelNIZ5wlkY/Tu9qyVeh8Y2ylhE9YiK1yJkoEk6JQLKnqxRsi/pbX1i8j1fqZttT1fGM2troRCb41BqXNn/p+aaMYtmvpcbHg7Dl3nTT6DHFPzczO1P1pihPZfqDMe/4zJFEmviVUzzizUmqaN42vRDFLuIdrLK5BjHiARY0eyCEiYwuzJZZvJcdxTJEgL+V5IAXyINcrcCAvFBTeAQsb9gUXvfXv8Ej/7obKN0NbQ2HFSCRi4873qUAqKD4Gw1F2R8XG0NrjjD19OLHq9OVFNoMCafmrHAG+4QV8LYNv1Afw5UvpScGXPfIF0USZYQAcKm05e2S7yXmMMr7rcf5J0rVb+g/e7v5MkROkv7cY38tsRd9Czii7S9ZbgXkZxOuQCLxYoZ3H1zK9KgP2USLoOp8MHAIIx/MclLonYhEu4XIoWwFHPpHg2lNSr465wJt6KFahowe4ez7W2c+6SJ5sLQuNxMmxWlrKxn0hk7PJcEBDEoLtZDg/YszvHp7SzQCwKHrA9Pg4vudss0UPEhx1kUxJ9Jw9y9AHhwBqJnoK0B9ECRayXHvcjBJaiH3QYuzLpuHn1vx+t46k7Zv5XOke9Dc8V3/bp/V3M/qf9IX+O0fjw27TuE9eikj8/xG+wPRxjqXxE0+QOoLPxaUHlymgerODbGBuA3vNBhCWs/UTs3/D7F7X4i508F46GHWbDlTsF47VgZ52XMU7w02lgg1WG5MF3scW38hShqC/wCJZNUwLykMO8oG5M+81Hwz7QAeq/G3s9u9REheJu2F6aQlRtu+rdjSNrk1LSSBDc+5Jy2Epn6V2JR6iU9WxJL6/Y5rXHFq43FJoVn4C9sc4ytnzlFN11PAVP4G2Nuz2uOKUvIzyVXwCwKhbPnH7sm6eTRXFnjRccI3DxO7XUXJ2rVk765E4aW2BfE8F9SN41/rUFbIv5ZISvHudEe07vJP1EvD2AYix8a3ZNVe2x19hvbbz4O3Igg3tivEvC3a7CzZsfO5x7NH/ccgAbwZ4q/Uz8HG83ZGjTtvdO5/+9LNO2JvPds4n6huXyY/95uKEafpCINH0qFPpHj72OptKdyXwL5n7YcSfl8c7mbrDy8e8J2f/cVP2dz8156uWVNtdHs4q0XPHp6P73nC7iedec/u+d7tJ7ZNKABt511eosEzsUxVYZLP4p5zss+LiX5vgzX8= -------------------------------------------------------------------------------- /content/img/logos/synthetix_blue_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/synthetix_blue_logo.png -------------------------------------------------------------------------------- /content/img/logos/synthetix_icon_blue.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /content/img/logos/synthetix_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | logo 5 | Created with Sketch. 6 | 7 | 8 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /content/img/logos/synthetix_logo_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/synthetix_logo_light.png -------------------------------------------------------------------------------- /content/img/logos/synthetix_logo_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | logo 5 | Created with Sketch. 6 | 7 | 8 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /content/img/logos/synthetix_text_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/synthetix_text_logo.png -------------------------------------------------------------------------------- /content/img/logos/synthetix_text_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/synthetix_text_logo_white.png -------------------------------------------------------------------------------- /content/img/logos/synths-integration-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/logos/synths-integration-header.png -------------------------------------------------------------------------------- /content/img/misc/Staking Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/Staking Button.png -------------------------------------------------------------------------------- /content/img/misc/Synthetix Data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/Synthetix Data.png -------------------------------------------------------------------------------- /content/img/misc/Synths Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/Synths Button.png -------------------------------------------------------------------------------- /content/img/misc/circleci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/circleci.png -------------------------------------------------------------------------------- /content/img/misc/delphi_digital_debt_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/delphi_digital_debt_example.png -------------------------------------------------------------------------------- /content/img/misc/events-burn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-burn.png -------------------------------------------------------------------------------- /content/img/misc/events-claim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-claim.png -------------------------------------------------------------------------------- /content/img/misc/events-delegate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-delegate.png -------------------------------------------------------------------------------- /content/img/misc/events-depot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-depot.png -------------------------------------------------------------------------------- /content/img/misc/events-exchange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-exchange.png -------------------------------------------------------------------------------- /content/img/misc/events-mint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-mint.png -------------------------------------------------------------------------------- /content/img/misc/events-trade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/events-trade.png -------------------------------------------------------------------------------- /content/img/misc/kovan-depot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/kovan-depot.gif -------------------------------------------------------------------------------- /content/img/misc/travis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Synthetixio/synthetix-docs/c8ef7507bd1e97960335c95bfbe237490c08ab7f/content/img/misc/travis.png -------------------------------------------------------------------------------- /content/integrations/testnets.md: -------------------------------------------------------------------------------- 1 | # Working with Testnets 2 | 3 | !!! Tip "Getting help with testnets" 4 | 5 | If you notice anything wrong with the testnets, please ask in the [`#dev-portal`](https://discord.gg/DSgQRHG) channel of our Discord. 6 | 7 | The Synthetix protocol is available on the following testnets: 8 | 9 | 1. `sepolia` 10 | 2. `sepolia-ovm` 11 | 12 | All of the latest addresses can be found via [our addresses](../addresses.md) section. 13 | 14 | We strive to ensure our testing environments is as close as possible to mainnet. All testnets use both the centralized Synthetix oracle and decentralized Chainlink aggregators. These oracles are supplied with testnet ETH and run consistently. 15 | 16 | You can use the `synthetix` npm module with the `network` above to get targets (addresses), sources (ABIs) and synths. 17 | 18 | In the interests of dogfooding our own tools, if you require testnet SNX or sUSD, please use our `Depot` contract. 19 | 20 | For `sepolia` it's https://contracts.synthetix.io/sepolia/Depot 21 | 22 | To get testnet `SNX`, simply invoke the function `Depot.exchangeEtherForSNX()` with some testnet `ETH`. To get testnet `sUSD`, either stake some testnet `SNX` using [mintr](//mintr.synthetix.io), or you can use `Depot.exchangeEtherForSynths()` if any is available. 23 | 24 | To get testnet `ETH`, search for your friendly testnet faucet. 25 | 26 | 27 | 28 | > For example on sepolia, navigate to https://contracts.synthetix.io/sepolia/Depot#writeContract and execute `exchangeEtherForSNX()` with some amount of testnet ETH. 29 | 30 | ## Optimism 31 | 32 | For `sepolia-ovm` please use the Depot above for layer 1 and then use the staking dapp to deposit sepolia `SNX` to L2. Likewise you can use https://gateway.optimism.io to deposit sepolia ETH to L2. 33 | -------------------------------------------------------------------------------- /content/js/.eslintrc.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | env: { 5 | browser: true, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /content/js/sectionSeparators.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Replaces all instances of the section-sep tag with a small, 4 | // centered 5% opacity Synthetix logo with some top margin. 5 | //const separator = '' 6 | const separator = ''; 7 | const separators = document.getElementsByTagName('section-sep'); 8 | for (let sep of separators) { 9 | sep.innerHTML = separator; 10 | } 11 | -------------------------------------------------------------------------------- /content/libraries/examples.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | Here are a collection of Codepens for reading Synthetix state using `synthetix-js` and `synthetix-data` which you can fork an modify as you need. 4 | 5 | ### Last 24hrs of Exchanges 6 | 7 |

8 | See the Pen 9 | Get exchange volume by justin j. moses (@justinjmoses) 10 | on CodePen. 11 |

12 | 13 | 14 | ### Distribution of Synths 15 | 16 |

17 | See the Pen 18 | Synthetix synth distribution by justin j. moses (@justinjmoses) 19 | on CodePen. 20 |

21 | 22 | 23 | ### Lookup SNX Holder 24 | 25 |

26 | See the Pen 27 | Synthetix get collateralized state by justin j. moses (@justinjmoses) 28 | on CodePen. 29 |

30 | 31 | 32 | ### Top Holders Lock Status 33 | 34 |

35 | See the Pen 36 | Synthetix top holders lock status by justin j. moses (@justinjmoses) 37 | on CodePen. 38 |

39 | 40 | -------------------------------------------------------------------------------- /content/libraries/synthetix-assets.md: -------------------------------------------------------------------------------- 1 | !!! info "Notice" 2 | 3 | Imported from https://github.com/Synthetixio/synthetix-assets/ 4 | 5 | # Synthetix Assets 6 | 7 | A repository for reusable assets from the synthetix ecosystem. 8 | 9 | ## Install 10 | 11 | ``` 12 | $ npm install @synthetixio/assets 13 | ``` 14 | 15 | ## Use 16 | 17 | ``` 18 | // import sBTC synth 19 | import sBTC from '@synthetixio/assets/synths/sBTC.svg'; 20 | ``` 21 | -------------------------------------------------------------------------------- /content/libraries/synthetix-cli.md: -------------------------------------------------------------------------------- 1 | !!! info "Notice" 2 | 3 | Imported from https://github.com/Synthetixio/synthetix-cli/ 4 | 5 | # synthetix-cli 6 | 7 | A set of non-official scripts to run against the Synthetix protocol 8 | 9 | ## Installation 10 | 11 | Clone repo and install npm. 12 | 13 | ## Usage 14 | 15 | `node src/commands/ --help` 16 | 17 | ## Ethereum provider 18 | 19 | By default, uses Ethers default Ethereum provider, but this provider is most likely saturated at any time. To specify your own infura provider, copy `.env.example` as `.env` and set PROVIDER_URL. Note that "network" will be replaced by the network a command is run in. 20 | -------------------------------------------------------------------------------- /content/libraries/versioning.md: -------------------------------------------------------------------------------- 1 | # Versioning 2 | 3 | Synthetix versions are denoted as follows 4 | 5 | `..[-environment]` 6 | 7 | Where `environment` is either omitted for `mainnet` or is one of the following: 8 | 9 | - `alpha` is for the newest version of contracts, and is reserved for deploys to `sepolia` 10 | 11 | When a new version of the contracts makes its way through all testnets, it eventually becomes promoted in `master`, with [semver](https://semver.org/) reflecting contract changes in the `major` or `minor` portion of the version (depending on backwards compatibility). `patch` changes are simply for changes to the JavaScript interface. 12 | 13 | E.g. `v2.19.3-alpha` denotes a build deployed to `sepolia`. 14 | 15 | !!! info 16 | 17 | There are occasions when builds skip and enviroment on the way to mainnet, but in those instances the Synthetix team will endeavour to backport changes to testnets promptly. 18 | -------------------------------------------------------------------------------- /content/synopsis.md: -------------------------------------------------------------------------------- 1 | # System Synopsis 2 | 3 | Synthetix is a protocol for issuing and trading synthetic assets on [Ethereum](https://www.ethereum.org/). Each synthetic asset (or [Synth](/tokens#synthetic-assets-synths)) is an [ERC20 token](https://theethereum.wiki/w/index.php/ERC20_Token_Standard) which tracks the price of an external asset; for example each [sUSD](https://etherscan.io/token/0x57ab1ec28d129707052df4df418d58a2d46d5f51) token tracks the price of the US dollar (and unlike the other synthetic assets, is fixed at `1`). A wide variety of Synths exists within Synthetix, including [fiat currencies](/tokens/#forex), [cryptocurrencies](/tokens/#crypto), [commodities](/tokens/#commodity), and [inverse indexes](/tokens#inverse-isynths). In principle the system can support any asset with a clear price, and provides on-chain exposure to an unlimited range of real-world assets. 4 | 5 | Synthetix is otherwise composed of [a smart contract infrastructure](contracts/index.md) and [a set of incentives](incentives.md) which maintains Synth prices. It is underpinned by the value of the [Synthetix Network Token](/tokens#snx) (SNX). SNX acts as collateral; staking a proportional value of SNX is required to mint Synths. Stakers are rewarded for supporting the system with a pro-rata share of the fees generated by activity in the system. The value of SNX is thus directly connected with the usage of the network it collateralises. 6 | 7 | This mechanism allows Synthetix to support instantaneous, near-frictionless conversion between different flavours of Synths without the liquidity and slippage issues experienced by other decentralised exchanges. The resulting network of tokens supports an extensive set of use cases including trading, loans, payments, remittance, eCommerce and many more. 8 | 9 | A more descriptive overview of the system is available in the [Synthetix Litepaper](/litepaper), and the explainers on [Synthetix.Exchange](https://www.synthetix.io/products/exchange) and [Mintr](https://www.synthetix.io/products/mintr). There is also a [community-run page](https://synthetix.community) full of helpful resources, and a snapshot of the current system status is always live at [dashboard.synthetix.io](https://dashboard.synthetix.io/). 10 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | # This netlify.toml file is for the documentation site living under /docs 2 | 3 | [build] 4 | publish = "site" 5 | command = "mkdocs build" 6 | 7 | [build.environment] 8 | # NODE_OPTIONS = "--max_old_space_size=4096" 9 | # NODE_VERSION = "10.16.3" 10 | # RUBY_VERSION = "2.6.2" 11 | -------------------------------------------------------------------------------- /overrides/partials/integrations/analytics/matomo.html: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "synthetix-docs", 3 | "version": "2.102.0", 4 | "description": "Synthetix docs builder", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "node scripts/build --overwrite && npm run format", 9 | "lint": "eslint .", 10 | "format": "prettier --write '**/*.js' '**/*.md' '**/*.yml'" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+ssh://git@github.com/Synthetixio/synthetix-docs.git" 15 | }, 16 | "author": "Synthetix", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/Synthetixio/synthetix-docs/issues" 20 | }, 21 | "husky": { 22 | "hooks": { 23 | "pre-commit": "npm run lint && npm run format" 24 | } 25 | }, 26 | "homepage": "https://github.com/Synthetixio/synthetix-docs#readme", 27 | "dependencies": { 28 | "axios": "~0.21.1", 29 | "marked": "^1.1.0", 30 | "moment": "~2.24.0", 31 | "numbro": "2.1.2", 32 | "synthetix": "2.102.0", 33 | "traverse": "^0.6.6", 34 | "yaml": "^1.10.0" 35 | }, 36 | "devDependencies": { 37 | "chalk": "4.0.0", 38 | "eslint": "7.1.0", 39 | "eslint-config-prettier": "6.11.0", 40 | "eslint-plugin-import": "2.20.2", 41 | "eslint-plugin-prettier": "3.1.3", 42 | "husky": "4.2.5", 43 | "prettier": "2.0.5" 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs==1.3.0 2 | markdown==3.2.1 3 | mkdocs-material==7.2.5 4 | mkdocs-minify-plugin==0.2.1 5 | pymdown-extensions==9.4 6 | mkdocs-redirects==1.0.1 7 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | 3.7 -------------------------------------------------------------------------------- /scripts/build-releases.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | 5 | const fs = require('fs'); 6 | const path = require('path'); 7 | 8 | const moment = require('moment'); 9 | 10 | console.log('Building releases page'); 11 | 12 | (async () => { 13 | const { data } = await axios.get('https://api.github.com/repos/Synthetixio/synthetix/releases?per_page=1000'); 14 | 15 | const content = data 16 | .sort((a, b) => (a.created_at < b.created_at ? 1 : -1)) 17 | .filter(({ prerelease }) => !prerelease) 18 | .map(({ name, tag_name, body, created_at }) => { 19 | const published = new Date(created_at); 20 | return `# ${name} (${tag_name})\n\n**Published**: ${moment 21 | .utc(published) 22 | .format( 23 | 'MMM D, YYYY', 24 | )}\n\n**Codebase**: [${tag_name}](https://github.com/Synthetixio/synthetix/tree/${tag_name})\n\n${ 25 | body ? '> ' + body : '' 26 | }\n\n-----\n`; 27 | }) 28 | .join('\n'); 29 | 30 | // readmes.forEach(([repo, path, content]) => 31 | fs.writeFileSync( 32 | path.join(__dirname, '..', 'content', 'releases.md'), 33 | `!!! tip "Notice"\n\n Imported from https://github.com/Synthetixio/synthetix/releases\n\n${content}`, 34 | ); 35 | // ); 36 | })(); 37 | -------------------------------------------------------------------------------- /scripts/build-repo-readmes.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const axios = require('axios'); 4 | 5 | const fs = require('fs'); 6 | const path = require('path'); 7 | 8 | console.log('Building library pages'); 9 | 10 | (async () => { 11 | const repoWorkspace = { 12 | 'js-monorepo': 'packages/contracts-interface/', 13 | }; 14 | 15 | const readmes = await Promise.all( 16 | ['synthetix', 'synthetix-data', 'js-monorepo', 'synthetix-cli', 'synthetix-assets'].map(repo => 17 | axios 18 | .get(`https://raw.githubusercontent.com/Synthetixio/${repo}/master/${repoWorkspace[repo] || ''}README.md`) 19 | .then(({ data }) => [ 20 | `https://github.com/Synthetixio/${repo}/${repoWorkspace[repo] ? 'tree/master/' + repoWorkspace[repo] : ''}`, 21 | path.join(__dirname, '..', 'content', 'libraries', `${repo}.md`), 22 | data, 23 | ]), 24 | ), 25 | ); 26 | 27 | readmes.forEach(([repo, path, content]) => 28 | fs.writeFileSync(path, `!!! info "Notice"\n\n Imported from ${repo}\n\n${content}`), 29 | ); 30 | 31 | // now do synthetix publish script 32 | await axios 33 | .get('https://raw.githubusercontent.com/Synthetixio/synthetix/master/publish/README.md') 34 | .then(({ data }) => 35 | fs.writeFileSync( 36 | path.join(__dirname, '..', 'content', 'contracts', 'publisher.md'), 37 | '!!! info "Notice"\n\n This details the `publish` script in the synthetix repository for building, deploying and verifying contracts.\n\n' + 38 | ' Imported from https://github.com/Synthetixio/synthetix/tree/master/publish\n\n' + 39 | data, 40 | ), 41 | ); 42 | })(); 43 | -------------------------------------------------------------------------------- /scripts/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const fs = require('fs'); 5 | 6 | const files = fs.readdirSync(__dirname).filter(file => /^build-/.test(file)); 7 | 8 | for (const file of files) { 9 | require(path.join(__dirname, file)); 10 | } 11 | -------------------------------------------------------------------------------- /scripts/utils.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | 6 | const snxPackageJSON = path.join(__dirname, '..', 'node_modules', 'synthetix', 'package.json'); 7 | 8 | module.exports = { 9 | version() { 10 | return JSON.parse(fs.readFileSync(snxPackageJSON)).version; 11 | }, 12 | 13 | date() { 14 | return fs.statSync(snxPackageJSON).mtime; 15 | }, 16 | }; 17 | --------------------------------------------------------------------------------