IGToken

Interface for GToken contract

GnsPriceProvider

struct GnsPriceProvider {
  address addr;
  bytes signature;
}

LockedDeposit

struct LockedDeposit {
  address owner;
  uint256 shares;
  uint256 assetsDeposited;
  uint256 assetsDiscount;
  uint256 atTimestamp;
  uint256 lockDuration;
}

ContractAddresses

struct ContractAddresses {
  address asset;
  address owner;
  address manager;
  address admin;
  address gnsToken;
  address lockedDepositNft;
  address pnlHandler;
  address openTradesPnlFeed;
  struct IGToken.GnsPriceProvider gnsPriceProvider;
}

Meta

struct Meta {
  string name;
  string symbol;
}

manager

function manager() external view returns (address)

admin

function admin() external view returns (address)

currentEpoch

function currentEpoch() external view returns (uint256)

currentEpochStart

function currentEpochStart() external view returns (uint256)

currentEpochPositiveOpenPnl

function currentEpochPositiveOpenPnl() external view returns (uint256)

updateAccPnlPerTokenUsed

function updateAccPnlPerTokenUsed(uint256 prevPositiveOpenPnl, uint256 newPositiveOpenPnl) external returns (uint256)

getLockedDeposit

function getLockedDeposit(uint256 depositId) external view returns (struct IGToken.LockedDeposit)

sendAssets

function sendAssets(uint256 assets, address receiver) external

receiveAssets

function receiveAssets(uint256 assets, address user) external

distributeReward

function distributeReward(uint256 assets) external

tvl

function tvl() external view returns (uint256)

marketCap

function marketCap() external view returns (uint256)

ManagerUpdated

event ManagerUpdated(address newValue)

AdminUpdated

event AdminUpdated(address newValue)

PnlHandlerUpdated

event PnlHandlerUpdated(address newValue)

OpenTradesPnlFeedUpdated

event OpenTradesPnlFeedUpdated(address newValue)

GnsPriceProviderUpdated

event GnsPriceProviderUpdated(struct IGToken.GnsPriceProvider newValue)

WithdrawLockThresholdsPUpdated

event WithdrawLockThresholdsPUpdated(uint256[2] newValue)

MaxAccOpenPnlDeltaUpdated

event MaxAccOpenPnlDeltaUpdated(uint256 newValue)

MaxDailyAccPnlDeltaUpdated

event MaxDailyAccPnlDeltaUpdated(uint256 newValue)

MaxSupplyIncreaseDailyPUpdated

event MaxSupplyIncreaseDailyPUpdated(uint256 newValue)

LossesBurnPUpdated

event LossesBurnPUpdated(uint256 newValue)

MaxGnsSupplyMintDailyPUpdated

event MaxGnsSupplyMintDailyPUpdated(uint256 newValue)

MaxDiscountPUpdated

event MaxDiscountPUpdated(uint256 newValue)

MaxDiscountThresholdPUpdated

event MaxDiscountThresholdPUpdated(uint256 newValue)

CurrentMaxSupplyUpdated

event CurrentMaxSupplyUpdated(uint256 newValue)

DailyAccPnlDeltaReset

event DailyAccPnlDeltaReset()

ShareToAssetsPriceUpdated

event ShareToAssetsPriceUpdated(uint256 newValue)

OpenTradesPnlFeedCallFailed

event OpenTradesPnlFeedCallFailed()

WithdrawRequested

event WithdrawRequested(address sender, address owner, uint256 shares, uint256 currEpoch, uint256 unlockEpoch)

WithdrawCanceled

event WithdrawCanceled(address sender, address owner, uint256 shares, uint256 currEpoch, uint256 unlockEpoch)

DepositLocked

event DepositLocked(address sender, address owner, uint256 depositId, struct IGToken.LockedDeposit d)

DepositUnlocked

event DepositUnlocked(address sender, address receiver, address owner, uint256 depositId, struct IGToken.LockedDeposit d)

RewardDistributed

event RewardDistributed(address sender, uint256 assets)

AssetsSent

event AssetsSent(address sender, address receiver, uint256 assets)

AssetsReceived

event AssetsReceived(address sender, address user, uint256 assets, uint256 assetsLessDeplete)

Depleted

event Depleted(address sender, uint256 assets, uint256 amountGns)

Refilled

event Refilled(address sender, uint256 assets, uint256 amountGns)

AccPnlPerTokenUsedUpdated

event AccPnlPerTokenUsedUpdated(address sender, uint256 newEpoch, uint256 prevPositiveOpenPnl, uint256 newPositiveOpenPnl, uint256 newEpochPositiveOpenPnl, int256 newAccPnlPerTokenUsed)

OnlyManager

error OnlyManager()

OnlyTradingPnlHandler

error OnlyTradingPnlHandler()

OnlyPnlFeed

error OnlyPnlFeed()

AddressZero

error AddressZero()

PriceZero

error PriceZero()

ValueZero

error ValueZero()

BytesZero

error BytesZero()

NoActiveDiscount

error NoActiveDiscount()

BelowMin

error BelowMin()

AboveMax

error AboveMax()

WrongValue

error WrongValue()

WrongValues

error WrongValues()

GnsPriceCallFailed

error GnsPriceCallFailed()

GnsTokenPriceZero

error GnsTokenPriceZero()

PendingWithdrawal

error PendingWithdrawal()

EndOfEpoch

error EndOfEpoch()

NotAllowed

error NotAllowed()

NoDiscount

error NoDiscount()

NotUnlocked

error NotUnlocked()

NotEnoughAssets

error NotEnoughAssets()

MaxDailyPnl

error MaxDailyPnl()

NotUnderCollateralized

error NotUnderCollateralized()

AboveInflationLimit

error AboveInflationLimit()

OwnableInvalidOwner

error OwnableInvalidOwner(address owner)

ERC4626ExceededMaxDeposit

error ERC4626ExceededMaxDeposit()

ERC4626ExceededMaxMint

error ERC4626ExceededMaxMint()

ERC4626ExceededMaxWithdraw

error ERC4626ExceededMaxWithdraw()

ERC4626ExceededMaxRedeem

error ERC4626ExceededMaxRedeem()