diff --git a/packages/hyperdrive/src/abis/IHyperdrive.sol/IHyperdrive.json b/packages/hyperdrive/src/abis/IHyperdrive.sol/IHyperdrive.json index 652e6e0946..1b05bb6ae9 100644 --- a/packages/hyperdrive/src/abis/IHyperdrive.sol/IHyperdrive.json +++ b/packages/hyperdrive/src/abis/IHyperdrive.sol/IHyperdrive.json @@ -1088,6 +1088,11 @@ "internalType": "uint256", "name": "withdrawalSharesProceeds", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lpSharePrice", + "type": "uint256" } ], "internalType": "struct IHyperdrive.PoolInfo", @@ -1754,7 +1759,7 @@ "transferFromBridge(uint256,address,address,uint256,address)": "e44808bc", "withdrawPool()": "5c42c733" }, - "rawMetadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyClosed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ApprovalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BaseBufferExceedsShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchInputLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BelowMinimumContribution\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BelowMinimumShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BondMatured\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BondNotMatured\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"underlyingError\",\"type\":\"bytes4\"}],\"name\":\"CallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpiredDeadline\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_AddOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_InvalidExponent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_NegativeInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_NegativeOrZeroInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_SubOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidApr\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBaseToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCheckpointDuration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCheckpointTime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidContribution\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidERC20Bridge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFeeAmounts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialSharePrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMaturityTime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMinimumShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPositionDuration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxFeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintPercentTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NegativeInterest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoAssetsToWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonPayableInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutputLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QueryOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RestrictedZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ReturnData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedAssetId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedSuccess\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroLpTotalSupply\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"AddLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"CloseLong\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"CloseShort\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"apr\",\"type\":\"uint256\"}],\"name\":\"Initialize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"OpenLong\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"OpenShort\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawalShareAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"RedeemWithdrawalShares\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawalShareAmount\",\"type\":\"uint256\"}],\"name\":\"RemoveLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_contribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minApr\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxApr\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpShares\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"batchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_checkpointTime\",\"type\":\"uint256\"}],\"name\":\"checkpoint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_bondAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"closeLong\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_bondAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"closeShort\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_checkpointId\",\"type\":\"uint256\"}],\"name\":\"getCheckpoint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sharePrice\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longSharePrice\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortBaseVolume\",\"type\":\"uint128\"}],\"internalType\":\"struct IHyperdrive.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMarketState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"shareReserves\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"bondReserves\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longsOutstanding\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortsOutstanding\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longAverageMaturityTime\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longOpenSharePrice\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortAverageMaturityTime\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortBaseVolume\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"isInitialized\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"internalType\":\"struct IHyperdrive.MarketState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"baseToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialSharePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimumShareReserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"checkpointDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeStretch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"governance\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeCollector\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"curve\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"flat\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"governance\",\"type\":\"uint256\"}],\"internalType\":\"struct IHyperdrive.Fees\",\"name\":\"fees\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"oracleSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updateGap\",\"type\":\"uint256\"}],\"internalType\":\"struct IHyperdrive.PoolConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"shareReserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bondReserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lpTotalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sharePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longsOutstanding\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longAverageMaturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortsOutstanding\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortAverageMaturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortBaseVolume\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalSharesReadyToWithdraw\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalSharesProceeds\",\"type\":\"uint256\"}],\"internalType\":\"struct IHyperdrive.PoolInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUncollectedGovernanceFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_contribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_apr\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpShares\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkerCodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_slots\",\"type\":\"uint256[]\"}],\"name\":\"load\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_baseAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"openLong\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bondProceeds\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_bondAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDeposit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"openShort\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"traderDeposit\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"perTokenApprovals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permitForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"redeemWithdrawalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"proceeds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sharesRedeemed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"baseProceeds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"setApprovalBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"setPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"transferFromBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawPool\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"readyToWithdraw\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"proceeds\",\"type\":\"uint128\"}],\"internalType\":\"struct IHyperdrive.WithdrawPool\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"errors\":{\"AlreadyClosed()\":[{\"notice\":\"##################### ### BondWrapper ### #####################\"}],\"BaseBufferExceedsShareReserves()\":[{\"notice\":\"################## ### Hyperdrive ### ##################\"}],\"BatchInputLengthMismatch()\":[{\"notice\":\"###################### ### ERC20Forwarder ### ######################\"}],\"FixedPointMath_AddOverflow()\":[{\"notice\":\"###################### ### FixedPointMath ### ######################\"}],\"InvalidTimestamp()\":[{\"notice\":\"############### ### AssetId ### ###############\"}],\"QueryOutOfRange()\":[{\"notice\":\"############ ### TWAP ### ############\"}],\"ReturnData(bytes)\":[{\"notice\":\"#################### ### DataProvider ### ####################\"}],\"Unauthorized()\":[{\"notice\":\"############### ### Factory ### ###############\"}]},\"events\":{\"Initialize(address,uint256,uint256,uint256)\":{\"notice\":\"Events ///\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/src/interfaces/IHyperdrive.sol\":\"IHyperdrive\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@aave/=lib/aave-v3-core/contracts/\",\":aave-v3-core/=lib/aave-v3-core/\",\":create3-factory/=lib/yield-daddy/lib/create3-factory/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":solmate/=lib/solmate/src/\",\":yield-daddy/=lib/yield-daddy/\",\"lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/\"]},\"sources\":{\"contracts/src/interfaces/IERC20.sol\":{\"keccak256\":\"0x4642a027efffb3aa6cdc85e31796fb3b1bc4fff4316e6390874e6f4add37b86c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3720a6c1c427dcfcbdeeec15cbdb682115e44e0a9136af7e0ad9e5af2ea40672\",\"dweb:/ipfs/QmP4bmaHw8MfX9MQLhhgnVQ9U9BTQAR3e5cCCE9RcoeX7w\"]},\"contracts/src/interfaces/IHyperdrive.sol\":{\"keccak256\":\"0x6100b32d3c99e1666314454e80f732f6c5461bc8ef73de6687bd786b8549779e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://64f59513a6d5cfa28d7c380bc16451095900b40228b5a58e8c44394dedd3c315\",\"dweb:/ipfs/QmcTrjEUKb8wvNJpQBYpq8cw25F6yVsrT87DpaxwT8MLFV\"]},\"contracts/src/interfaces/IHyperdriveRead.sol\":{\"keccak256\":\"0x3e811bd3514f64c697f8eccc63dc5a6e3660582216a774126643bd5bb8a4d110\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c56cdd6d55a35a359d342bcd622f242d373378ca9721a2be2ed5704a5d1c0386\",\"dweb:/ipfs/QmPUVwVW76QTVFmRQ9LHBEzQTbKgGkCKoWMZWxmLDqHw9F\"]},\"contracts/src/interfaces/IHyperdriveWrite.sol\":{\"keccak256\":\"0x89f13d9fd9368b51ffc1bf0a506e756728460982cdc3f3be62129eb28aa04615\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://6d0b2a66ae0d0c72b046bfde213069fe77bcd181a7348cbc9f28f93a824ae166\",\"dweb:/ipfs/QmR4TXHH6GFYQ4cTG7h9ixkoKZHgEV4wAByU5hVCuckZNG\"]},\"contracts/src/interfaces/IMultiToken.sol\":{\"keccak256\":\"0xe3d64871148bdae5a714107b8b1a55f39cd4ede601436d2777a165d20d768a1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://9ebc0bfda35e9b7299c43f0efff38012b8074fcca867b781c0cedeede10cf3d0\",\"dweb:/ipfs/QmbHRLezFhWavHakK5G26DB4ud5PueU6fNvZf3L3TwXnPb\"]},\"contracts/src/interfaces/IMultiTokenMetadata.sol\":{\"keccak256\":\"0xcdc60ba02194150741a78cb0c52c306f5f577c5c814c63e98a13d46c02d2d9cc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8f5866cb2c8c4342dba88c0e4d78296fef0e170b18b3613c796c29dc31a5ca87\",\"dweb:/ipfs/QmZcoDTYhhYSB5ds3cNPJpdZTxrz6cF8M2vNVeuAcT8gw6\"]},\"contracts/src/interfaces/IMultiTokenRead.sol\":{\"keccak256\":\"0x2e55fa961123a8bb7284c8388af9bd1302a7153441ffe641804ea79021bdca05\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c7dc03bbab02976609dec59c201e5b57a2998d1c626cef58d7a9fa7c2b06b939\",\"dweb:/ipfs/QmSifWr9cVWaUEmyKpGFcgpKCYdoBYgWtQBLgemtwo4a7x\"]},\"contracts/src/interfaces/IMultiTokenWrite.sol\":{\"keccak256\":\"0xa5ba8812e06fb6d38e1872603c8b80321cfd2f96cecbe7b67b92cb33e93b3fc8\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://73afa34919c7d457e925b4be83abb1b1ed2ed731a382ebffad95a3005c04bd5a\",\"dweb:/ipfs/QmauMxmgtYTS7RJQw1mS7Pwe5FUMDPHE2N1MBhFUjk6HPe\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x00c839ff53d07d19db2e7cfa1e5133f9ee90a8d64b0e2e57f50446a2d1a3a0e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3dac621d015a68a5251b1e5d41dda0faf252699bf6e8bcf46a958b29964d9dd1\",\"dweb:/ipfs/QmP9axjgZv4cezAhALoTemM62sdLtMDJ9MGTxECnNwHgSJ\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x35e258421ae206f3db37281cea70871b4c3553914734aa76139a41af60ac1abb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ef94b6bc4ee356db612a1849c615f7dd4b15542d6c8584c86bb9243a7913cf0\",\"dweb:/ipfs/QmaxFj5NFpAjjitZtHPNS9PPtCuBATaRz9ktDDRCQCQ83y\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x8a63ea9ec07788740e51046ca14c61f411aedb901e89749c9d55fa56ed43086a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3035ae3f172ed9e172e1ba4d83bdc70279f63be51ce9218c530132def66ff577\",\"dweb:/ipfs/QmTQ3zfC3YUNeY3KUVFiHgTWDuxfmcEMgpGC6HMoTpgZJL\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xa6dfb97ce947b7c846b054ee7d45d12383359778f4f3743654ae0a34fa421b26\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b97e7e5a77ea47c08ba422291df887eba76c80982f52a6e94a30106e9377a94f\",\"dweb:/ipfs/Qme7N2XRC7mcDxB8wZxNWPk6T8S2qsnmhAqXeUj4CNvsGD\"]}},\"version\":1}", + "rawMetadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"name\":\"AlreadyClosed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ApprovalFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BaseBufferExceedsShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BatchInputLengthMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BelowMinimumContribution\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BelowMinimumShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BondMatured\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BondNotMatured\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"underlyingError\",\"type\":\"bytes4\"}],\"name\":\"CallFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ExpiredDeadline\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_AddOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_InvalidExponent\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_NegativeInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_NegativeOrZeroInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FixedPointMath_SubOverflow\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidApr\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBaseToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCheckpointDuration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCheckpointTime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidContribution\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidERC20Bridge\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFeeAmounts\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialSharePrice\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMaturityTime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMinimumShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPositionDuration\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidShareReserves\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTimestamp\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxFeeTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MintPercentTooHigh\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NegativeInterest\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoAssetsToWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonPayableInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotPayable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutputLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Paused\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolAlreadyInitialized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"QueryOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RestrictedZeroAddress\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"ReturnData\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Unauthorized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedAssetId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedSender\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedSuccess\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnsupportedToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroLpTotalSupply\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"AddLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"CloseLong\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"CloseShort\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"apr\",\"type\":\"uint256\"}],\"name\":\"Initialize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"OpenLong\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"trader\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"assetId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"bondAmount\",\"type\":\"uint256\"}],\"name\":\"OpenShort\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawalShareAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"}],\"name\":\"RedeemWithdrawalShares\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"provider\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lpAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"baseAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawalShareAmount\",\"type\":\"uint256\"}],\"name\":\"RemoveLiquidity\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_contribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minApr\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxApr\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"addLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpShares\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"batchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_checkpointTime\",\"type\":\"uint256\"}],\"name\":\"checkpoint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_bondAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"closeLong\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_bondAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"closeShort\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_checkpointId\",\"type\":\"uint256\"}],\"name\":\"getCheckpoint\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"sharePrice\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longSharePrice\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortBaseVolume\",\"type\":\"uint128\"}],\"internalType\":\"struct IHyperdrive.Checkpoint\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMarketState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"shareReserves\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"bondReserves\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longsOutstanding\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortsOutstanding\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longAverageMaturityTime\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"longOpenSharePrice\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortAverageMaturityTime\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"shortBaseVolume\",\"type\":\"uint128\"},{\"internalType\":\"bool\",\"name\":\"isInitialized\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isPaused\",\"type\":\"bool\"}],\"internalType\":\"struct IHyperdrive.MarketState\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"contract IERC20\",\"name\":\"baseToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"initialSharePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minimumShareReserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"positionDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"checkpointDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timeStretch\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"governance\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"feeCollector\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"curve\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"flat\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"governance\",\"type\":\"uint256\"}],\"internalType\":\"struct IHyperdrive.Fees\",\"name\":\"fees\",\"type\":\"tuple\"},{\"internalType\":\"uint256\",\"name\":\"oracleSize\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"updateGap\",\"type\":\"uint256\"}],\"internalType\":\"struct IHyperdrive.PoolConfig\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"shareReserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bondReserves\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lpTotalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sharePrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longsOutstanding\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"longAverageMaturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortsOutstanding\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortAverageMaturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortBaseVolume\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalSharesReadyToWithdraw\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalSharesProceeds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lpSharePrice\",\"type\":\"uint256\"}],\"internalType\":\"struct IHyperdrive.PoolInfo\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUncollectedGovernanceFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_contribution\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_apr\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"initialize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"lpShares\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"linkerCodeHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_slots\",\"type\":\"uint256[]\"}],\"name\":\"load\",\"outputs\":[{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_baseAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"openLong\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"bondProceeds\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_bondAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxDeposit\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"openShort\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"maturityTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"traderDeposit\",\"type\":\"uint256\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"perTokenApprovals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_approved\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permitForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"redeemWithdrawalShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"proceeds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sharesRedeemed\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_shares\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minOutput\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_destination\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_asUnderlying\",\"type\":\"bool\"}],\"name\":\"removeLiquidity\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"baseProceeds\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalShares\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setApproval\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"setApprovalBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"}],\"name\":\"setGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"who\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"name\":\"setPauser\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenID\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"}],\"name\":\"transferFromBridge\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawPool\",\"outputs\":[{\"components\":[{\"internalType\":\"uint128\",\"name\":\"readyToWithdraw\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"proceeds\",\"type\":\"uint128\"}],\"internalType\":\"struct IHyperdrive.WithdrawPool\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"errors\":{\"AlreadyClosed()\":[{\"notice\":\"##################### ### BondWrapper ### #####################\"}],\"BaseBufferExceedsShareReserves()\":[{\"notice\":\"################## ### Hyperdrive ### ##################\"}],\"BatchInputLengthMismatch()\":[{\"notice\":\"###################### ### ERC20Forwarder ### ######################\"}],\"FixedPointMath_AddOverflow()\":[{\"notice\":\"###################### ### FixedPointMath ### ######################\"}],\"InvalidTimestamp()\":[{\"notice\":\"############### ### AssetId ### ###############\"}],\"QueryOutOfRange()\":[{\"notice\":\"############ ### TWAP ### ############\"}],\"ReturnData(bytes)\":[{\"notice\":\"#################### ### DataProvider ### ####################\"}],\"Unauthorized()\":[{\"notice\":\"############### ### Factory ### ###############\"}]},\"events\":{\"Initialize(address,uint256,uint256,uint256)\":{\"notice\":\"Events ///\"}},\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/src/interfaces/IHyperdrive.sol\":\"IHyperdrive\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[\":@aave/=lib/aave-v3-core/contracts/\",\":aave-v3-core/=lib/aave-v3-core/\",\":create3-factory/=lib/yield-daddy/lib/create3-factory/\",\":ds-test/=lib/forge-std/lib/ds-test/src/\",\":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/\",\":forge-std/=lib/forge-std/src/\",\":openzeppelin-contracts/=lib/openzeppelin-contracts/\",\":openzeppelin/=lib/openzeppelin-contracts/contracts/\",\":solmate/=lib/solmate/src/\",\":yield-daddy/=lib/yield-daddy/\"]},\"sources\":{\"contracts/src/interfaces/IERC20.sol\":{\"keccak256\":\"0x4642a027efffb3aa6cdc85e31796fb3b1bc4fff4316e6390874e6f4add37b86c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3720a6c1c427dcfcbdeeec15cbdb682115e44e0a9136af7e0ad9e5af2ea40672\",\"dweb:/ipfs/QmP4bmaHw8MfX9MQLhhgnVQ9U9BTQAR3e5cCCE9RcoeX7w\"]},\"contracts/src/interfaces/IHyperdrive.sol\":{\"keccak256\":\"0xc2297940a0a80d5fe458dec421b4bfdc4907bf20072e5811e2c43615318b2b7e\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://7e81f9fbefb15894d0b11d55a251d43e7bafe39a7364a83220fc4112275c252e\",\"dweb:/ipfs/QmVpi5wkKL2Un4UJs6WLYbQRp9fCUp6ZvvoZ4jECB4GCtJ\"]},\"contracts/src/interfaces/IHyperdriveRead.sol\":{\"keccak256\":\"0x3e811bd3514f64c697f8eccc63dc5a6e3660582216a774126643bd5bb8a4d110\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c56cdd6d55a35a359d342bcd622f242d373378ca9721a2be2ed5704a5d1c0386\",\"dweb:/ipfs/QmPUVwVW76QTVFmRQ9LHBEzQTbKgGkCKoWMZWxmLDqHw9F\"]},\"contracts/src/interfaces/IHyperdriveWrite.sol\":{\"keccak256\":\"0x89f13d9fd9368b51ffc1bf0a506e756728460982cdc3f3be62129eb28aa04615\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://6d0b2a66ae0d0c72b046bfde213069fe77bcd181a7348cbc9f28f93a824ae166\",\"dweb:/ipfs/QmR4TXHH6GFYQ4cTG7h9ixkoKZHgEV4wAByU5hVCuckZNG\"]},\"contracts/src/interfaces/IMultiToken.sol\":{\"keccak256\":\"0xe3d64871148bdae5a714107b8b1a55f39cd4ede601436d2777a165d20d768a1a\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://9ebc0bfda35e9b7299c43f0efff38012b8074fcca867b781c0cedeede10cf3d0\",\"dweb:/ipfs/QmbHRLezFhWavHakK5G26DB4ud5PueU6fNvZf3L3TwXnPb\"]},\"contracts/src/interfaces/IMultiTokenMetadata.sol\":{\"keccak256\":\"0xcdc60ba02194150741a78cb0c52c306f5f577c5c814c63e98a13d46c02d2d9cc\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://8f5866cb2c8c4342dba88c0e4d78296fef0e170b18b3613c796c29dc31a5ca87\",\"dweb:/ipfs/QmZcoDTYhhYSB5ds3cNPJpdZTxrz6cF8M2vNVeuAcT8gw6\"]},\"contracts/src/interfaces/IMultiTokenRead.sol\":{\"keccak256\":\"0x2e55fa961123a8bb7284c8388af9bd1302a7153441ffe641804ea79021bdca05\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://c7dc03bbab02976609dec59c201e5b57a2998d1c626cef58d7a9fa7c2b06b939\",\"dweb:/ipfs/QmSifWr9cVWaUEmyKpGFcgpKCYdoBYgWtQBLgemtwo4a7x\"]},\"contracts/src/interfaces/IMultiTokenWrite.sol\":{\"keccak256\":\"0xa5ba8812e06fb6d38e1872603c8b80321cfd2f96cecbe7b67b92cb33e93b3fc8\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://73afa34919c7d457e925b4be83abb1b1ed2ed731a382ebffad95a3005c04bd5a\",\"dweb:/ipfs/QmauMxmgtYTS7RJQw1mS7Pwe5FUMDPHE2N1MBhFUjk6HPe\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x00c839ff53d07d19db2e7cfa1e5133f9ee90a8d64b0e2e57f50446a2d1a3a0e0\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3dac621d015a68a5251b1e5d41dda0faf252699bf6e8bcf46a958b29964d9dd1\",\"dweb:/ipfs/QmP9axjgZv4cezAhALoTemM62sdLtMDJ9MGTxECnNwHgSJ\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol\":{\"keccak256\":\"0x35e258421ae206f3db37281cea70871b4c3553914734aa76139a41af60ac1abb\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2ef94b6bc4ee356db612a1849c615f7dd4b15542d6c8584c86bb9243a7913cf0\",\"dweb:/ipfs/QmaxFj5NFpAjjitZtHPNS9PPtCuBATaRz9ktDDRCQCQ83y\"]},\"lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol\":{\"keccak256\":\"0x8a63ea9ec07788740e51046ca14c61f411aedb901e89749c9d55fa56ed43086a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3035ae3f172ed9e172e1ba4d83bdc70279f63be51ce9218c530132def66ff577\",\"dweb:/ipfs/QmTQ3zfC3YUNeY3KUVFiHgTWDuxfmcEMgpGC6HMoTpgZJL\"]},\"lib/openzeppelin-contracts/contracts/utils/Address.sol\":{\"keccak256\":\"0xa6dfb97ce947b7c846b054ee7d45d12383359778f4f3743654ae0a34fa421b26\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b97e7e5a77ea47c08ba422291df887eba76c80982f52a6e94a30106e9377a94f\",\"dweb:/ipfs/Qme7N2XRC7mcDxB8wZxNWPk6T8S2qsnmhAqXeUj4CNvsGD\"]}},\"version\":1}", "metadata": { "compiler": { "version": "0.8.19+commit.7dd6d404" @@ -2853,6 +2858,11 @@ "internalType": "uint256", "name": "withdrawalSharesProceeds", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lpSharePrice", + "type": "uint256" } ] } @@ -3469,16 +3479,16 @@ }, "settings": { "remappings": [ - "@aave/=lib/aave-v3-core/contracts/", - "aave-v3-core/=lib/aave-v3-core/", - "create3-factory/=lib/yield-daddy/lib/create3-factory/", - "ds-test/=lib/forge-std/lib/ds-test/src/", - "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", - "forge-std/=lib/forge-std/src/", - "openzeppelin-contracts/=lib/openzeppelin-contracts/", - "solmate/=lib/solmate/src/", - "yield-daddy/=lib/yield-daddy/", - "lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/" + ":@aave/=lib/aave-v3-core/contracts/", + ":aave-v3-core/=lib/aave-v3-core/", + ":create3-factory/=lib/yield-daddy/lib/create3-factory/", + ":ds-test/=lib/forge-std/lib/ds-test/src/", + ":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", + ":forge-std/=lib/forge-std/src/", + ":openzeppelin-contracts/=lib/openzeppelin-contracts/", + ":openzeppelin/=lib/openzeppelin-contracts/contracts/", + ":solmate/=lib/solmate/src/", + ":yield-daddy/=lib/yield-daddy/" ], "optimizer": { "enabled": true, @@ -3502,10 +3512,10 @@ "license": "MIT" }, "contracts/src/interfaces/IHyperdrive.sol": { - "keccak256": "0x6100b32d3c99e1666314454e80f732f6c5461bc8ef73de6687bd786b8549779e", + "keccak256": "0xc2297940a0a80d5fe458dec421b4bfdc4907bf20072e5811e2c43615318b2b7e", "urls": [ - "bzz-raw://64f59513a6d5cfa28d7c380bc16451095900b40228b5a58e8c44394dedd3c315", - "dweb:/ipfs/QmcTrjEUKb8wvNJpQBYpq8cw25F6yVsrT87DpaxwT8MLFV" + "bzz-raw://7e81f9fbefb15894d0b11d55a251d43e7bafe39a7364a83220fc4112275c252e", + "dweb:/ipfs/QmVpi5wkKL2Un4UJs6WLYbQRp9fCUp6ZvvoZ4jECB4GCtJ" ], "license": "Apache-2.0" }, @@ -3594,31 +3604,31 @@ }, "ast": { "absolutePath": "contracts/src/interfaces/IHyperdrive.sol", - "id": 6387, + "id": 6371, "exportedSymbols": { "IERC20": [ - 5795 + 5835 ], "IHyperdrive": [ - 6386 + 6370 ], "IHyperdriveRead": [ - 6470 + 6454 ], "IHyperdriveWrite": [ - 6617 + 6601 ], "IMultiToken": [ - 6739 + 6661 ] }, "nodeType": "SourceUnit", - "src": "39:9009:19", + "src": "39:9149:17", "nodes": [ { - "id": 6035, + "id": 6016, "nodeType": "PragmaDirective", - "src": "39:23:19", + "src": "39:23:17", "nodes": [], "literals": [ "solidity", @@ -3627,24 +3637,24 @@ ] }, { - "id": 6037, + "id": 6018, "nodeType": "ImportDirective", - "src": "64:38:19", + "src": "64:38:17", "nodes": [], "absolutePath": "contracts/src/interfaces/IERC20.sol", "file": "./IERC20.sol", "nameLocation": "-1:-1:-1", - "scope": 6387, - "sourceUnit": 5796, + "scope": 6371, + "sourceUnit": 5836, "symbolAliases": [ { "foreign": { - "id": 6036, + "id": 6017, "name": "IERC20", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 5795, - "src": "73:6:19", + "referencedDeclaration": 5835, + "src": "73:6:17", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -3653,24 +3663,24 @@ "unitAlias": "" }, { - "id": 6039, + "id": 6020, "nodeType": "ImportDirective", - "src": "103:56:19", + "src": "103:56:17", "nodes": [], "absolutePath": "contracts/src/interfaces/IHyperdriveRead.sol", "file": "./IHyperdriveRead.sol", "nameLocation": "-1:-1:-1", - "scope": 6387, - "sourceUnit": 6471, + "scope": 6371, + "sourceUnit": 6455, "symbolAliases": [ { "foreign": { - "id": 6038, + "id": 6019, "name": "IHyperdriveRead", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6470, - "src": "112:15:19", + "referencedDeclaration": 6454, + "src": "112:15:17", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -3679,24 +3689,24 @@ "unitAlias": "" }, { - "id": 6041, + "id": 6022, "nodeType": "ImportDirective", - "src": "160:58:19", + "src": "160:58:17", "nodes": [], "absolutePath": "contracts/src/interfaces/IHyperdriveWrite.sol", "file": "./IHyperdriveWrite.sol", "nameLocation": "-1:-1:-1", - "scope": 6387, - "sourceUnit": 6618, + "scope": 6371, + "sourceUnit": 6602, "symbolAliases": [ { "foreign": { - "id": 6040, + "id": 6021, "name": "IHyperdriveWrite", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6617, - "src": "169:16:19", + "referencedDeclaration": 6601, + "src": "169:16:17", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -3705,24 +3715,24 @@ "unitAlias": "" }, { - "id": 6043, + "id": 6024, "nodeType": "ImportDirective", - "src": "219:48:19", + "src": "219:48:17", "nodes": [], "absolutePath": "contracts/src/interfaces/IMultiToken.sol", "file": "./IMultiToken.sol", "nameLocation": "-1:-1:-1", - "scope": 6387, - "sourceUnit": 6740, + "scope": 6371, + "sourceUnit": 6662, "symbolAliases": [ { "foreign": { - "id": 6042, + "id": 6023, "name": "IMultiToken", "nodeType": "Identifier", "overloadedDeclarations": [], - "referencedDeclaration": 6739, - "src": "228:11:19", + "referencedDeclaration": 6661, + "src": "228:11:17", "typeDescriptions": {} }, "nameLocation": "-1:-1:-1" @@ -3731,39 +3741,39 @@ "unitAlias": "" }, { - "id": 6386, + "id": 6370, "nodeType": "ContractDefinition", - "src": "269:8778:19", + "src": "269:8918:17", "nodes": [ { - "id": 6060, + "id": 6041, "nodeType": "EventDefinition", - "src": "367:132:19", + "src": "367:132:17", "nodes": [], "anonymous": false, "documentation": { - "id": 6050, + "id": 6031, "nodeType": "StructuredDocumentation", - "src": "347:15:19", + "src": "347:15:17", "text": "Events ///" }, "eventSelector": "60c26087830ee0ee6d86bdb3a10e19f3fd49af366c77421d7fe4596811d6274e", "name": "Initialize", - "nameLocation": "373:10:19", + "nameLocation": "373:10:17", "parameters": { - "id": 6059, + "id": 6040, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6052, + "id": 6033, "indexed": true, "mutability": "mutable", "name": "provider", - "nameLocation": "409:8:19", + "nameLocation": "409:8:17", "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "393:24:19", + "scope": 6041, + "src": "393:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3771,10 +3781,10 @@ "typeString": "address" }, "typeName": { - "id": 6051, + "id": 6032, "name": "address", "nodeType": "ElementaryTypeName", - "src": "393:7:19", + "src": "393:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3785,14 +3795,14 @@ }, { "constant": false, - "id": 6054, + "id": 6035, "indexed": false, "mutability": "mutable", "name": "lpAmount", - "nameLocation": "435:8:19", + "nameLocation": "435:8:17", "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "427:16:19", + "scope": 6041, + "src": "427:16:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3800,10 +3810,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6053, + "id": 6034, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "427:7:19", + "src": "427:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3813,14 +3823,14 @@ }, { "constant": false, - "id": 6056, + "id": 6037, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "461:10:19", + "nameLocation": "461:10:17", "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "453:18:19", + "scope": 6041, + "src": "453:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3828,10 +3838,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6055, + "id": 6036, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "453:7:19", + "src": "453:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3841,14 +3851,14 @@ }, { "constant": false, - "id": 6058, + "id": 6039, "indexed": false, "mutability": "mutable", "name": "apr", - "nameLocation": "489:3:19", + "nameLocation": "489:3:17", "nodeType": "VariableDeclaration", - "scope": 6060, - "src": "481:11:19", + "scope": 6041, + "src": "481:11:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3856,10 +3866,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6057, + "id": 6038, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "481:7:19", + "src": "481:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3868,32 +3878,32 @@ "visibility": "internal" } ], - "src": "383:115:19" + "src": "383:115:17" } }, { - "id": 6068, + "id": 6049, "nodeType": "EventDefinition", - "src": "505:113:19", + "src": "505:113:17", "nodes": [], "anonymous": false, "eventSelector": "06239653922ac7bea6aa2b19dc486b9361821d37712eb796adfd38d81de278ca", "name": "AddLiquidity", - "nameLocation": "511:12:19", + "nameLocation": "511:12:17", "parameters": { - "id": 6067, + "id": 6048, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6062, + "id": 6043, "indexed": true, "mutability": "mutable", "name": "provider", - "nameLocation": "549:8:19", + "nameLocation": "549:8:17", "nodeType": "VariableDeclaration", - "scope": 6068, - "src": "533:24:19", + "scope": 6049, + "src": "533:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3901,10 +3911,10 @@ "typeString": "address" }, "typeName": { - "id": 6061, + "id": 6042, "name": "address", "nodeType": "ElementaryTypeName", - "src": "533:7:19", + "src": "533:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -3915,14 +3925,14 @@ }, { "constant": false, - "id": 6064, + "id": 6045, "indexed": false, "mutability": "mutable", "name": "lpAmount", - "nameLocation": "575:8:19", + "nameLocation": "575:8:17", "nodeType": "VariableDeclaration", - "scope": 6068, - "src": "567:16:19", + "scope": 6049, + "src": "567:16:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3930,10 +3940,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6063, + "id": 6044, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "567:7:19", + "src": "567:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3943,14 +3953,14 @@ }, { "constant": false, - "id": 6066, + "id": 6047, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "601:10:19", + "nameLocation": "601:10:17", "nodeType": "VariableDeclaration", - "scope": 6068, - "src": "593:18:19", + "scope": 6049, + "src": "593:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3958,10 +3968,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6065, + "id": 6046, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "593:7:19", + "src": "593:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3970,32 +3980,32 @@ "visibility": "internal" } ], - "src": "523:94:19" + "src": "523:94:17" } }, { - "id": 6078, + "id": 6059, "nodeType": "EventDefinition", - "src": "624:155:19", + "src": "624:155:17", "nodes": [], "anonymous": false, "eventSelector": "59c3a0b60c6ab7deb62e1440c9e72441db6db7dfe514dba8cb18e60c0d896efa", "name": "RemoveLiquidity", - "nameLocation": "630:15:19", + "nameLocation": "630:15:17", "parameters": { - "id": 6077, + "id": 6058, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6070, + "id": 6051, "indexed": true, "mutability": "mutable", "name": "provider", - "nameLocation": "671:8:19", + "nameLocation": "671:8:17", "nodeType": "VariableDeclaration", - "scope": 6078, - "src": "655:24:19", + "scope": 6059, + "src": "655:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4003,10 +4013,10 @@ "typeString": "address" }, "typeName": { - "id": 6069, + "id": 6050, "name": "address", "nodeType": "ElementaryTypeName", - "src": "655:7:19", + "src": "655:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4017,14 +4027,14 @@ }, { "constant": false, - "id": 6072, + "id": 6053, "indexed": false, "mutability": "mutable", "name": "lpAmount", - "nameLocation": "697:8:19", + "nameLocation": "697:8:17", "nodeType": "VariableDeclaration", - "scope": 6078, - "src": "689:16:19", + "scope": 6059, + "src": "689:16:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4032,10 +4042,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6071, + "id": 6052, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "689:7:19", + "src": "689:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4045,14 +4055,14 @@ }, { "constant": false, - "id": 6074, + "id": 6055, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "723:10:19", + "nameLocation": "723:10:17", "nodeType": "VariableDeclaration", - "scope": 6078, - "src": "715:18:19", + "scope": 6059, + "src": "715:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4060,10 +4070,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6073, + "id": 6054, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "715:7:19", + "src": "715:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4073,14 +4083,14 @@ }, { "constant": false, - "id": 6076, + "id": 6057, "indexed": false, "mutability": "mutable", "name": "withdrawalShareAmount", - "nameLocation": "751:21:19", + "nameLocation": "751:21:17", "nodeType": "VariableDeclaration", - "scope": 6078, - "src": "743:29:19", + "scope": 6059, + "src": "743:29:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4088,10 +4098,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6075, + "id": 6056, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "743:7:19", + "src": "743:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4100,32 +4110,32 @@ "visibility": "internal" } ], - "src": "645:133:19" + "src": "645:133:17" } }, { - "id": 6086, + "id": 6067, "nodeType": "EventDefinition", - "src": "785:136:19", + "src": "785:136:17", "nodes": [], "anonymous": false, "eventSelector": "07cd0949bbc0d60ad35053a0459db413c148f758b7781aaf6b258018d18ad0ac", "name": "RedeemWithdrawalShares", - "nameLocation": "791:22:19", + "nameLocation": "791:22:17", "parameters": { - "id": 6085, + "id": 6066, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6080, + "id": 6061, "indexed": true, "mutability": "mutable", "name": "provider", - "nameLocation": "839:8:19", + "nameLocation": "839:8:17", "nodeType": "VariableDeclaration", - "scope": 6086, - "src": "823:24:19", + "scope": 6067, + "src": "823:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4133,10 +4143,10 @@ "typeString": "address" }, "typeName": { - "id": 6079, + "id": 6060, "name": "address", "nodeType": "ElementaryTypeName", - "src": "823:7:19", + "src": "823:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4147,14 +4157,14 @@ }, { "constant": false, - "id": 6082, + "id": 6063, "indexed": false, "mutability": "mutable", "name": "withdrawalShareAmount", - "nameLocation": "865:21:19", + "nameLocation": "865:21:17", "nodeType": "VariableDeclaration", - "scope": 6086, - "src": "857:29:19", + "scope": 6067, + "src": "857:29:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4162,10 +4172,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6081, + "id": 6062, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "857:7:19", + "src": "857:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4175,14 +4185,14 @@ }, { "constant": false, - "id": 6084, + "id": 6065, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "904:10:19", + "nameLocation": "904:10:17", "nodeType": "VariableDeclaration", - "scope": 6086, - "src": "896:18:19", + "scope": 6067, + "src": "896:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4190,10 +4200,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6083, + "id": 6064, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "896:7:19", + "src": "896:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4202,32 +4212,32 @@ "visibility": "internal" } ], - "src": "813:107:19" + "src": "813:107:17" } }, { - "id": 6098, + "id": 6079, "nodeType": "EventDefinition", - "src": "927:172:19", + "src": "927:172:17", "nodes": [], "anonymous": false, "eventSelector": "7b7d51ee23746cf6ef2078de2a5b53073226b516a1c892a1e882c581026bf4b3", "name": "OpenLong", - "nameLocation": "933:8:19", + "nameLocation": "933:8:17", "parameters": { - "id": 6097, + "id": 6078, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6088, + "id": 6069, "indexed": true, "mutability": "mutable", "name": "trader", - "nameLocation": "967:6:19", + "nameLocation": "967:6:17", "nodeType": "VariableDeclaration", - "scope": 6098, - "src": "951:22:19", + "scope": 6079, + "src": "951:22:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4235,10 +4245,10 @@ "typeString": "address" }, "typeName": { - "id": 6087, + "id": 6068, "name": "address", "nodeType": "ElementaryTypeName", - "src": "951:7:19", + "src": "951:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4249,14 +4259,14 @@ }, { "constant": false, - "id": 6090, + "id": 6071, "indexed": true, "mutability": "mutable", "name": "assetId", - "nameLocation": "999:7:19", + "nameLocation": "999:7:17", "nodeType": "VariableDeclaration", - "scope": 6098, - "src": "983:23:19", + "scope": 6079, + "src": "983:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4264,10 +4274,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6089, + "id": 6070, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "983:7:19", + "src": "983:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4277,14 +4287,14 @@ }, { "constant": false, - "id": 6092, + "id": 6073, "indexed": false, "mutability": "mutable", "name": "maturityTime", - "nameLocation": "1024:12:19", + "nameLocation": "1024:12:17", "nodeType": "VariableDeclaration", - "scope": 6098, - "src": "1016:20:19", + "scope": 6079, + "src": "1016:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4292,10 +4302,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6091, + "id": 6072, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1016:7:19", + "src": "1016:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4305,14 +4315,14 @@ }, { "constant": false, - "id": 6094, + "id": 6075, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "1054:10:19", + "nameLocation": "1054:10:17", "nodeType": "VariableDeclaration", - "scope": 6098, - "src": "1046:18:19", + "scope": 6079, + "src": "1046:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4320,10 +4330,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6093, + "id": 6074, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1046:7:19", + "src": "1046:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4333,14 +4343,14 @@ }, { "constant": false, - "id": 6096, + "id": 6077, "indexed": false, "mutability": "mutable", "name": "bondAmount", - "nameLocation": "1082:10:19", + "nameLocation": "1082:10:17", "nodeType": "VariableDeclaration", - "scope": 6098, - "src": "1074:18:19", + "scope": 6079, + "src": "1074:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4348,10 +4358,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6095, + "id": 6076, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1074:7:19", + "src": "1074:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4360,32 +4370,32 @@ "visibility": "internal" } ], - "src": "941:157:19" + "src": "941:157:17" } }, { - "id": 6110, + "id": 6091, "nodeType": "EventDefinition", - "src": "1105:173:19", + "src": "1105:173:17", "nodes": [], "anonymous": false, "eventSelector": "851bac68873b7adb346bcf4bff36324c6f322b58f9f0f50c1d3a8568242ca66b", "name": "OpenShort", - "nameLocation": "1111:9:19", + "nameLocation": "1111:9:17", "parameters": { - "id": 6109, + "id": 6090, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6100, + "id": 6081, "indexed": true, "mutability": "mutable", "name": "trader", - "nameLocation": "1146:6:19", + "nameLocation": "1146:6:17", "nodeType": "VariableDeclaration", - "scope": 6110, - "src": "1130:22:19", + "scope": 6091, + "src": "1130:22:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4393,10 +4403,10 @@ "typeString": "address" }, "typeName": { - "id": 6099, + "id": 6080, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1130:7:19", + "src": "1130:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4407,14 +4417,14 @@ }, { "constant": false, - "id": 6102, + "id": 6083, "indexed": true, "mutability": "mutable", "name": "assetId", - "nameLocation": "1178:7:19", + "nameLocation": "1178:7:17", "nodeType": "VariableDeclaration", - "scope": 6110, - "src": "1162:23:19", + "scope": 6091, + "src": "1162:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4422,10 +4432,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6101, + "id": 6082, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1162:7:19", + "src": "1162:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4435,14 +4445,14 @@ }, { "constant": false, - "id": 6104, + "id": 6085, "indexed": false, "mutability": "mutable", "name": "maturityTime", - "nameLocation": "1203:12:19", + "nameLocation": "1203:12:17", "nodeType": "VariableDeclaration", - "scope": 6110, - "src": "1195:20:19", + "scope": 6091, + "src": "1195:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4450,10 +4460,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6103, + "id": 6084, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1195:7:19", + "src": "1195:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4463,14 +4473,14 @@ }, { "constant": false, - "id": 6106, + "id": 6087, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "1233:10:19", + "nameLocation": "1233:10:17", "nodeType": "VariableDeclaration", - "scope": 6110, - "src": "1225:18:19", + "scope": 6091, + "src": "1225:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4478,10 +4488,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6105, + "id": 6086, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1225:7:19", + "src": "1225:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4491,14 +4501,14 @@ }, { "constant": false, - "id": 6108, + "id": 6089, "indexed": false, "mutability": "mutable", "name": "bondAmount", - "nameLocation": "1261:10:19", + "nameLocation": "1261:10:17", "nodeType": "VariableDeclaration", - "scope": 6110, - "src": "1253:18:19", + "scope": 6091, + "src": "1253:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4506,10 +4516,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6107, + "id": 6088, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1253:7:19", + "src": "1253:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4518,32 +4528,32 @@ "visibility": "internal" } ], - "src": "1120:157:19" + "src": "1120:157:17" } }, { - "id": 6122, + "id": 6103, "nodeType": "EventDefinition", - "src": "1284:173:19", + "src": "1284:173:17", "nodes": [], "anonymous": false, "eventSelector": "e8c2c201cc00307ad7ec0d92d7ee5f89a796b4b1134d1672b08939eaf504d68c", "name": "CloseLong", - "nameLocation": "1290:9:19", + "nameLocation": "1290:9:17", "parameters": { - "id": 6121, + "id": 6102, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6112, + "id": 6093, "indexed": true, "mutability": "mutable", "name": "trader", - "nameLocation": "1325:6:19", + "nameLocation": "1325:6:17", "nodeType": "VariableDeclaration", - "scope": 6122, - "src": "1309:22:19", + "scope": 6103, + "src": "1309:22:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4551,10 +4561,10 @@ "typeString": "address" }, "typeName": { - "id": 6111, + "id": 6092, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1309:7:19", + "src": "1309:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4565,14 +4575,14 @@ }, { "constant": false, - "id": 6114, + "id": 6095, "indexed": true, "mutability": "mutable", "name": "assetId", - "nameLocation": "1357:7:19", + "nameLocation": "1357:7:17", "nodeType": "VariableDeclaration", - "scope": 6122, - "src": "1341:23:19", + "scope": 6103, + "src": "1341:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4580,10 +4590,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6113, + "id": 6094, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1341:7:19", + "src": "1341:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4593,14 +4603,14 @@ }, { "constant": false, - "id": 6116, + "id": 6097, "indexed": false, "mutability": "mutable", "name": "maturityTime", - "nameLocation": "1382:12:19", + "nameLocation": "1382:12:17", "nodeType": "VariableDeclaration", - "scope": 6122, - "src": "1374:20:19", + "scope": 6103, + "src": "1374:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4608,10 +4618,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6115, + "id": 6096, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1374:7:19", + "src": "1374:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4621,14 +4631,14 @@ }, { "constant": false, - "id": 6118, + "id": 6099, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "1412:10:19", + "nameLocation": "1412:10:17", "nodeType": "VariableDeclaration", - "scope": 6122, - "src": "1404:18:19", + "scope": 6103, + "src": "1404:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4636,10 +4646,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6117, + "id": 6098, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1404:7:19", + "src": "1404:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4649,14 +4659,14 @@ }, { "constant": false, - "id": 6120, + "id": 6101, "indexed": false, "mutability": "mutable", "name": "bondAmount", - "nameLocation": "1440:10:19", + "nameLocation": "1440:10:17", "nodeType": "VariableDeclaration", - "scope": 6122, - "src": "1432:18:19", + "scope": 6103, + "src": "1432:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4664,10 +4674,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6119, + "id": 6100, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1432:7:19", + "src": "1432:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4676,32 +4686,32 @@ "visibility": "internal" } ], - "src": "1299:157:19" + "src": "1299:157:17" } }, { - "id": 6134, + "id": 6115, "nodeType": "EventDefinition", - "src": "1463:174:19", + "src": "1463:174:17", "nodes": [], "anonymous": false, "eventSelector": "39d1403e56c69205ef368007a55ee1304b0f388631dca237a1710d04e3e8950f", "name": "CloseShort", - "nameLocation": "1469:10:19", + "nameLocation": "1469:10:17", "parameters": { - "id": 6133, + "id": 6114, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6124, + "id": 6105, "indexed": true, "mutability": "mutable", "name": "trader", - "nameLocation": "1505:6:19", + "nameLocation": "1505:6:17", "nodeType": "VariableDeclaration", - "scope": 6134, - "src": "1489:22:19", + "scope": 6115, + "src": "1489:22:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4709,10 +4719,10 @@ "typeString": "address" }, "typeName": { - "id": 6123, + "id": 6104, "name": "address", "nodeType": "ElementaryTypeName", - "src": "1489:7:19", + "src": "1489:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -4723,14 +4733,14 @@ }, { "constant": false, - "id": 6126, + "id": 6107, "indexed": true, "mutability": "mutable", "name": "assetId", - "nameLocation": "1537:7:19", + "nameLocation": "1537:7:17", "nodeType": "VariableDeclaration", - "scope": 6134, - "src": "1521:23:19", + "scope": 6115, + "src": "1521:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4738,10 +4748,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6125, + "id": 6106, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1521:7:19", + "src": "1521:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4751,14 +4761,14 @@ }, { "constant": false, - "id": 6128, + "id": 6109, "indexed": false, "mutability": "mutable", "name": "maturityTime", - "nameLocation": "1562:12:19", + "nameLocation": "1562:12:17", "nodeType": "VariableDeclaration", - "scope": 6134, - "src": "1554:20:19", + "scope": 6115, + "src": "1554:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4766,10 +4776,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6127, + "id": 6108, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1554:7:19", + "src": "1554:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4779,14 +4789,14 @@ }, { "constant": false, - "id": 6130, + "id": 6111, "indexed": false, "mutability": "mutable", "name": "baseAmount", - "nameLocation": "1592:10:19", + "nameLocation": "1592:10:17", "nodeType": "VariableDeclaration", - "scope": 6134, - "src": "1584:18:19", + "scope": 6115, + "src": "1584:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4794,10 +4804,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6129, + "id": 6110, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1584:7:19", + "src": "1584:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4807,14 +4817,14 @@ }, { "constant": false, - "id": 6132, + "id": 6113, "indexed": false, "mutability": "mutable", "name": "bondAmount", - "nameLocation": "1620:10:19", + "nameLocation": "1620:10:17", "nodeType": "VariableDeclaration", - "scope": 6134, - "src": "1612:18:19", + "scope": 6115, + "src": "1612:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4822,10 +4832,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6131, + "id": 6112, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "1612:7:19", + "src": "1612:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4834,25 +4844,25 @@ "visibility": "internal" } ], - "src": "1479:157:19" + "src": "1479:157:17" } }, { - "id": 6165, + "id": 6146, "nodeType": "StructDefinition", - "src": "1664:1251:19", + "src": "1664:1251:17", "nodes": [], "canonicalName": "IHyperdrive.MarketState", "members": [ { "constant": false, - "id": 6137, + "id": 6118, "mutability": "mutable", "name": "shareReserves", - "nameLocation": "1745:13:19", + "nameLocation": "1745:13:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "1737:21:19", + "scope": 6146, + "src": "1737:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4860,10 +4870,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6136, + "id": 6117, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "1737:7:19", + "src": "1737:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -4873,13 +4883,13 @@ }, { "constant": false, - "id": 6140, + "id": 6121, "mutability": "mutable", "name": "bondReserves", - "nameLocation": "1819:12:19", + "nameLocation": "1819:12:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "1811:20:19", + "scope": 6146, + "src": "1811:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4887,10 +4897,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6139, + "id": 6120, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "1811:7:19", + "src": "1811:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -4900,13 +4910,13 @@ }, { "constant": false, - "id": 6143, + "id": 6124, "mutability": "mutable", "name": "longsOutstanding", - "nameLocation": "1907:16:19", + "nameLocation": "1907:16:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "1899:24:19", + "scope": 6146, + "src": "1899:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4914,10 +4924,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6142, + "id": 6123, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "1899:7:19", + "src": "1899:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -4927,13 +4937,13 @@ }, { "constant": false, - "id": 6146, + "id": 6127, "mutability": "mutable", "name": "shortsOutstanding", - "nameLocation": "2000:17:19", + "nameLocation": "2000:17:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "1992:25:19", + "scope": 6146, + "src": "1992:25:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4941,10 +4951,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6145, + "id": 6126, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "1992:7:19", + "src": "1992:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -4954,13 +4964,13 @@ }, { "constant": false, - "id": 6149, + "id": 6130, "mutability": "mutable", "name": "longAverageMaturityTime", - "nameLocation": "2104:23:19", + "nameLocation": "2104:23:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "2096:31:19", + "scope": 6146, + "src": "2096:31:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4968,10 +4978,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6148, + "id": 6129, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "2096:7:19", + "src": "2096:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -4981,13 +4991,13 @@ }, { "constant": false, - "id": 6152, + "id": 6133, "mutability": "mutable", "name": "longOpenSharePrice", - "nameLocation": "2201:18:19", + "nameLocation": "2201:18:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "2193:26:19", + "scope": 6146, + "src": "2193:26:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4995,10 +5005,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6151, + "id": 6132, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "2193:7:19", + "src": "2193:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5008,13 +5018,13 @@ }, { "constant": false, - "id": 6155, + "id": 6136, "mutability": "mutable", "name": "shortAverageMaturityTime", - "nameLocation": "2306:24:19", + "nameLocation": "2306:24:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "2298:32:19", + "scope": 6146, + "src": "2298:32:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5022,10 +5032,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6154, + "id": 6135, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "2298:7:19", + "src": "2298:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5035,13 +5045,13 @@ }, { "constant": false, - "id": 6158, + "id": 6139, "mutability": "mutable", "name": "shortBaseVolume", - "nameLocation": "2691:15:19", + "nameLocation": "2691:15:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "2683:23:19", + "scope": 6146, + "src": "2683:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5049,10 +5059,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6157, + "id": 6138, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "2683:7:19", + "src": "2683:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5062,13 +5072,13 @@ }, { "constant": false, - "id": 6161, + "id": 6142, "mutability": "mutable", "name": "isInitialized", - "nameLocation": "2802:13:19", + "nameLocation": "2802:13:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "2797:18:19", + "scope": 6146, + "src": "2797:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5076,10 +5086,10 @@ "typeString": "bool" }, "typeName": { - "id": 6160, + "id": 6141, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2797:4:19", + "src": "2797:4:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5089,13 +5099,13 @@ }, { "constant": false, - "id": 6164, + "id": 6145, "mutability": "mutable", "name": "isPaused", - "nameLocation": "2900:8:19", + "nameLocation": "2900:8:17", "nodeType": "VariableDeclaration", - "scope": 6165, - "src": "2895:13:19", + "scope": 6146, + "src": "2895:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5103,10 +5113,10 @@ "typeString": "bool" }, "typeName": { - "id": 6163, + "id": 6144, "name": "bool", "nodeType": "ElementaryTypeName", - "src": "2895:4:19", + "src": "2895:4:17", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5116,26 +5126,26 @@ } ], "name": "MarketState", - "nameLocation": "1671:11:19", - "scope": 6386, + "nameLocation": "1671:11:17", + "scope": 6370, "visibility": "public" }, { - "id": 6175, + "id": 6156, "nodeType": "StructDefinition", - "src": "2921:881:19", + "src": "2921:881:17", "nodes": [], "canonicalName": "IHyperdrive.Checkpoint", "members": [ { "constant": false, - "id": 6168, + "id": 6149, "mutability": "mutable", "name": "sharePrice", - "nameLocation": "3215:10:19", + "nameLocation": "3215:10:17", "nodeType": "VariableDeclaration", - "scope": 6175, - "src": "3207:18:19", + "scope": 6156, + "src": "3207:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5143,10 +5153,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6167, + "id": 6148, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "3207:7:19", + "src": "3207:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5156,13 +5166,13 @@ }, { "constant": false, - "id": 6171, + "id": 6152, "mutability": "mutable", "name": "longSharePrice", - "nameLocation": "3598:14:19", + "nameLocation": "3598:14:17", "nodeType": "VariableDeclaration", - "scope": 6175, - "src": "3590:22:19", + "scope": 6156, + "src": "3590:22:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5170,10 +5180,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6170, + "id": 6151, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "3590:7:19", + "src": "3590:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5183,13 +5193,13 @@ }, { "constant": false, - "id": 6174, + "id": 6155, "mutability": "mutable", "name": "shortBaseVolume", - "nameLocation": "3780:15:19", + "nameLocation": "3780:15:17", "nodeType": "VariableDeclaration", - "scope": 6175, - "src": "3772:23:19", + "scope": 6156, + "src": "3772:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5197,10 +5207,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6173, + "id": 6154, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "3772:7:19", + "src": "3772:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5210,26 +5220,26 @@ } ], "name": "Checkpoint", - "nameLocation": "2928:10:19", - "scope": 6386, + "nameLocation": "2928:10:17", + "scope": 6370, "visibility": "public" }, { - "id": 6182, + "id": 6163, "nodeType": "StructDefinition", - "src": "3808:230:19", + "src": "3808:230:17", "nodes": [], "canonicalName": "IHyperdrive.WithdrawPool", "members": [ { "constant": false, - "id": 6178, + "id": 6159, "mutability": "mutable", "name": "readyToWithdraw", - "nameLocation": "3926:15:19", + "nameLocation": "3926:15:17", "nodeType": "VariableDeclaration", - "scope": 6182, - "src": "3918:23:19", + "scope": 6163, + "src": "3918:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5237,10 +5247,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6177, + "id": 6158, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "3918:7:19", + "src": "3918:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5250,13 +5260,13 @@ }, { "constant": false, - "id": 6181, + "id": 6162, "mutability": "mutable", "name": "proceeds", - "nameLocation": "4023:8:19", + "nameLocation": "4023:8:17", "nodeType": "VariableDeclaration", - "scope": 6182, - "src": "4015:16:19", + "scope": 6163, + "src": "4015:16:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5264,10 +5274,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6180, + "id": 6161, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "4015:7:19", + "src": "4015:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -5277,26 +5287,26 @@ } ], "name": "WithdrawPool", - "nameLocation": "3815:12:19", - "scope": 6386, + "nameLocation": "3815:12:17", + "scope": 6370, "visibility": "public" }, { - "id": 6192, + "id": 6173, "nodeType": "StructDefinition", - "src": "4044:297:19", + "src": "4044:297:17", "nodes": [], "canonicalName": "IHyperdrive.Fees", "members": [ { "constant": false, - "id": 6185, + "id": 6166, "mutability": "mutable", "name": "curve", - "nameLocation": "4143:5:19", + "nameLocation": "4143:5:17", "nodeType": "VariableDeclaration", - "scope": 6192, - "src": "4135:13:19", + "scope": 6173, + "src": "4135:13:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5304,10 +5314,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6184, + "id": 6165, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4135:7:19", + "src": "4135:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5317,13 +5327,13 @@ }, { "constant": false, - "id": 6188, + "id": 6169, "mutability": "mutable", "name": "flat", - "nameLocation": "4234:4:19", + "nameLocation": "4234:4:17", "nodeType": "VariableDeclaration", - "scope": 6192, - "src": "4226:12:19", + "scope": 6173, + "src": "4226:12:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5331,10 +5341,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6187, + "id": 6168, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4226:7:19", + "src": "4226:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5344,13 +5354,13 @@ }, { "constant": false, - "id": 6191, + "id": 6172, "mutability": "mutable", "name": "governance", - "nameLocation": "4324:10:19", + "nameLocation": "4324:10:17", "nodeType": "VariableDeclaration", - "scope": 6192, - "src": "4316:18:19", + "scope": 6173, + "src": "4316:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5358,10 +5368,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6190, + "id": 6171, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4316:7:19", + "src": "4316:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5371,49 +5381,49 @@ } ], "name": "Fees", - "nameLocation": "4051:4:19", - "scope": 6386, + "nameLocation": "4051:4:17", + "scope": 6370, "visibility": "public" }, { - "id": 6228, + "id": 6209, "nodeType": "StructDefinition", - "src": "4347:962:19", + "src": "4347:962:17", "nodes": [], "canonicalName": "IHyperdrive.PoolConfig", "members": [ { "constant": false, - "id": 6196, + "id": 6177, "mutability": "mutable", "name": "baseToken", - "nameLocation": "4430:9:19", + "nameLocation": "4430:9:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4423:16:19", + "scope": 6209, + "src": "4423:16:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5795", + "typeIdentifier": "t_contract$_IERC20_$5835", "typeString": "contract IERC20" }, "typeName": { - "id": 6195, + "id": 6176, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 6194, + "id": 6175, "name": "IERC20", "nameLocations": [ - "4423:6:19" + "4423:6:17" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 5795, - "src": "4423:6:19" + "referencedDeclaration": 5835, + "src": "4423:6:17" }, - "referencedDeclaration": 5795, - "src": "4423:6:19", + "referencedDeclaration": 5835, + "src": "4423:6:17", "typeDescriptions": { - "typeIdentifier": "t_contract$_IERC20_$5795", + "typeIdentifier": "t_contract$_IERC20_$5835", "typeString": "contract IERC20" } }, @@ -5421,13 +5431,13 @@ }, { "constant": false, - "id": 6199, + "id": 6180, "mutability": "mutable", "name": "initialSharePrice", - "nameLocation": "4499:17:19", + "nameLocation": "4499:17:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4491:25:19", + "scope": 6209, + "src": "4491:25:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5435,10 +5445,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6198, + "id": 6179, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4491:7:19", + "src": "4491:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5448,13 +5458,13 @@ }, { "constant": false, - "id": 6202, + "id": 6183, "mutability": "mutable", "name": "minimumShareReserves", - "nameLocation": "4579:20:19", + "nameLocation": "4579:20:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4571:28:19", + "scope": 6209, + "src": "4571:28:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5462,10 +5472,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6201, + "id": 6182, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4571:7:19", + "src": "4571:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5475,13 +5485,13 @@ }, { "constant": false, - "id": 6205, + "id": 6186, "mutability": "mutable", "name": "positionDuration", - "nameLocation": "4680:16:19", + "nameLocation": "4680:16:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4672:24:19", + "scope": 6209, + "src": "4672:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5489,10 +5499,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6204, + "id": 6185, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4672:7:19", + "src": "4672:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5502,13 +5512,13 @@ }, { "constant": false, - "id": 6208, + "id": 6189, "mutability": "mutable", "name": "checkpointDuration", - "nameLocation": "4761:18:19", + "nameLocation": "4761:18:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4753:26:19", + "scope": 6209, + "src": "4753:26:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5516,10 +5526,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6207, + "id": 6188, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4753:7:19", + "src": "4753:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5529,13 +5539,13 @@ }, { "constant": false, - "id": 6211, + "id": 6192, "mutability": "mutable", "name": "timeStretch", - "nameLocation": "4873:11:19", + "nameLocation": "4873:11:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4865:19:19", + "scope": 6209, + "src": "4865:19:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5543,10 +5553,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6210, + "id": 6191, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4865:7:19", + "src": "4865:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5556,13 +5566,13 @@ }, { "constant": false, - "id": 6214, + "id": 6195, "mutability": "mutable", "name": "governance", - "nameLocation": "4959:10:19", + "nameLocation": "4959:10:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "4951:18:19", + "scope": 6209, + "src": "4951:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5570,10 +5580,10 @@ "typeString": "address" }, "typeName": { - "id": 6213, + "id": 6194, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4951:7:19", + "src": "4951:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5584,13 +5594,13 @@ }, { "constant": false, - "id": 6217, + "id": 6198, "mutability": "mutable", "name": "feeCollector", - "nameLocation": "5047:12:19", + "nameLocation": "5047:12:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "5039:20:19", + "scope": 6209, + "src": "5039:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5598,10 +5608,10 @@ "typeString": "address" }, "typeName": { - "id": 6216, + "id": 6197, "name": "address", "nodeType": "ElementaryTypeName", - "src": "5039:7:19", + "src": "5039:7:17", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", @@ -5612,37 +5622,37 @@ }, { "constant": false, - "id": 6221, + "id": 6202, "mutability": "mutable", "name": "fees", - "nameLocation": "5131:4:19", + "nameLocation": "5131:4:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "5114:21:19", + "scope": 6209, + "src": "5114:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { - "typeIdentifier": "t_struct$_Fees_$6192_storage_ptr", + "typeIdentifier": "t_struct$_Fees_$6173_storage_ptr", "typeString": "struct IHyperdrive.Fees" }, "typeName": { - "id": 6220, + "id": 6201, "nodeType": "UserDefinedTypeName", "pathNode": { - "id": 6219, + "id": 6200, "name": "IHyperdrive.Fees", "nameLocations": [ - "5114:11:19", - "5126:4:19" + "5114:11:17", + "5126:4:17" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 6192, - "src": "5114:16:19" + "referencedDeclaration": 6173, + "src": "5114:16:17" }, - "referencedDeclaration": 6192, - "src": "5114:16:19", + "referencedDeclaration": 6173, + "src": "5114:16:17", "typeDescriptions": { - "typeIdentifier": "t_struct$_Fees_$6192_storage_ptr", + "typeIdentifier": "t_struct$_Fees_$6173_storage_ptr", "typeString": "struct IHyperdrive.Fees" } }, @@ -5650,13 +5660,13 @@ }, { "constant": false, - "id": 6224, + "id": 6205, "mutability": "mutable", "name": "oracleSize", - "nameLocation": "5207:10:19", + "nameLocation": "5207:10:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "5199:18:19", + "scope": 6209, + "src": "5199:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5664,10 +5674,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6223, + "id": 6204, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5199:7:19", + "src": "5199:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5677,13 +5687,13 @@ }, { "constant": false, - "id": 6227, + "id": 6208, "mutability": "mutable", "name": "updateGap", - "nameLocation": "5293:9:19", + "nameLocation": "5293:9:17", "nodeType": "VariableDeclaration", - "scope": 6228, - "src": "5285:17:19", + "scope": 6209, + "src": "5285:17:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5691,10 +5701,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6226, + "id": 6207, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5285:7:19", + "src": "5285:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5704,26 +5714,26 @@ } ], "name": "PoolConfig", - "nameLocation": "4354:10:19", - "scope": 6386, + "nameLocation": "4354:10:17", + "scope": 6370, "visibility": "public" }, { - "id": 6262, + "id": 6246, "nodeType": "StructDefinition", - "src": "5315:1140:19", + "src": "5315:1280:17", "nodes": [], "canonicalName": "IHyperdrive.PoolInfo", "members": [ { "constant": false, - "id": 6231, + "id": 6212, "mutability": "mutable", "name": "shareReserves", - "nameLocation": "5407:13:19", + "nameLocation": "5407:13:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5399:21:19", + "scope": 6246, + "src": "5399:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5731,10 +5741,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6230, + "id": 6211, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5399:7:19", + "src": "5399:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5744,13 +5754,13 @@ }, { "constant": false, - "id": 6234, + "id": 6215, "mutability": "mutable", "name": "bondReserves", - "nameLocation": "5495:12:19", + "nameLocation": "5495:12:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5487:20:19", + "scope": 6246, + "src": "5487:20:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5758,10 +5768,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6233, + "id": 6214, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5487:7:19", + "src": "5487:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5771,13 +5781,13 @@ }, { "constant": false, - "id": 6237, + "id": 6218, "mutability": "mutable", "name": "lpTotalSupply", - "nameLocation": "5573:13:19", + "nameLocation": "5573:13:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5565:21:19", + "scope": 6246, + "src": "5565:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5785,10 +5795,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6236, + "id": 6217, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5565:7:19", + "src": "5565:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5798,13 +5808,13 @@ }, { "constant": false, - "id": 6240, + "id": 6221, "mutability": "mutable", "name": "sharePrice", - "nameLocation": "5646:10:19", + "nameLocation": "5646:10:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5638:18:19", + "scope": 6246, + "src": "5638:18:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5812,10 +5822,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6239, + "id": 6220, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5638:7:19", + "src": "5638:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5825,13 +5835,13 @@ }, { "constant": false, - "id": 6243, + "id": 6224, "mutability": "mutable", "name": "longsOutstanding", - "nameLocation": "5752:16:19", + "nameLocation": "5752:16:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5744:24:19", + "scope": 6246, + "src": "5744:24:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5839,10 +5849,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6242, + "id": 6223, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5744:7:19", + "src": "5744:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5852,13 +5862,13 @@ }, { "constant": false, - "id": 6246, + "id": 6227, "mutability": "mutable", "name": "longAverageMaturityTime", - "nameLocation": "5855:23:19", + "nameLocation": "5855:23:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5847:31:19", + "scope": 6246, + "src": "5847:31:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5866,10 +5876,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6245, + "id": 6226, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5847:7:19", + "src": "5847:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5879,13 +5889,13 @@ }, { "constant": false, - "id": 6249, + "id": 6230, "mutability": "mutable", "name": "shortsOutstanding", - "nameLocation": "5975:17:19", + "nameLocation": "5975:17:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "5967:25:19", + "scope": 6246, + "src": "5967:25:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5893,10 +5903,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6248, + "id": 6229, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5967:7:19", + "src": "5967:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5906,13 +5916,13 @@ }, { "constant": false, - "id": 6252, + "id": 6233, "mutability": "mutable", "name": "shortAverageMaturityTime", - "nameLocation": "6080:24:19", + "nameLocation": "6080:24:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "6072:32:19", + "scope": 6246, + "src": "6072:32:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5920,10 +5930,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6251, + "id": 6232, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6072:7:19", + "src": "6072:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5933,13 +5943,13 @@ }, { "constant": false, - "id": 6255, + "id": 6236, "mutability": "mutable", "name": "shortBaseVolume", - "nameLocation": "6198:15:19", + "nameLocation": "6198:15:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "6190:23:19", + "scope": 6246, + "src": "6190:23:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5947,10 +5957,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6254, + "id": 6235, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6190:7:19", + "src": "6190:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5960,13 +5970,13 @@ }, { "constant": false, - "id": 6258, + "id": 6239, "mutability": "mutable", "name": "withdrawalSharesReadyToWithdraw", - "nameLocation": "6311:31:19", + "nameLocation": "6311:31:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "6303:39:19", + "scope": 6246, + "src": "6303:39:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5974,10 +5984,10 @@ "typeString": "uint256" }, "typeName": { - "id": 6257, + "id": 6238, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6303:7:19", + "src": "6303:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5987,13 +5997,13 @@ }, { "constant": false, - "id": 6261, + "id": 6242, "mutability": "mutable", "name": "withdrawalSharesProceeds", - "nameLocation": "6424:24:19", + "nameLocation": "6424:24:17", "nodeType": "VariableDeclaration", - "scope": 6262, - "src": "6416:32:19", + "scope": 6246, + "src": "6416:32:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6001,10 +6011,37 @@ "typeString": "uint256" }, "typeName": { - "id": 6260, + "id": 6241, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6416:7:19", + "src": "6416:7:17", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "visibility": "internal" + }, + { + "constant": false, + "id": 6245, + "mutability": "mutable", + "name": "lpSharePrice", + "nameLocation": "6576:12:17", + "nodeType": "VariableDeclaration", + "scope": 6246, + "src": "6568:20:17", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 6244, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6568:7:17", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -6014,26 +6051,26 @@ } ], "name": "PoolInfo", - "nameLocation": "5322:8:19", - "scope": 6386, + "nameLocation": "5322:8:17", + "scope": 6370, "visibility": "public" }, { - "id": 6269, + "id": 6253, "nodeType": "StructDefinition", - "src": "6461:205:19", + "src": "6601:205:17", "nodes": [], "canonicalName": "IHyperdrive.OracleState", "members": [ { "constant": false, - "id": 6265, + "id": 6249, "mutability": "mutable", "name": "head", - "nameLocation": "6562:4:19", + "nameLocation": "6702:4:17", "nodeType": "VariableDeclaration", - "scope": 6269, - "src": "6554:12:19", + "scope": 6253, + "src": "6694:12:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6041,10 +6078,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6264, + "id": 6248, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "6554:7:19", + "src": "6694:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -6054,13 +6091,13 @@ }, { "constant": false, - "id": 6268, + "id": 6252, "mutability": "mutable", "name": "lastTimestamp", - "nameLocation": "6646:13:19", + "nameLocation": "6786:13:17", "nodeType": "VariableDeclaration", - "scope": 6269, - "src": "6638:21:19", + "scope": 6253, + "src": "6778:21:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6068,10 +6105,10 @@ "typeString": "uint128" }, "typeName": { - "id": 6267, + "id": 6251, "name": "uint128", "nodeType": "ElementaryTypeName", - "src": "6638:7:19", + "src": "6778:7:17", "typeDescriptions": { "typeIdentifier": "t_uint128", "typeString": "uint128" @@ -6081,454 +6118,454 @@ } ], "name": "OracleState", - "nameLocation": "6468:11:19", - "scope": 6386, + "nameLocation": "6608:11:17", + "scope": 6370, "visibility": "public" }, { - "id": 6272, + "id": 6256, "nodeType": "ErrorDefinition", - "src": "6778:39:19", + "src": "6918:39:17", "nodes": [], "documentation": { - "id": 6270, + "id": 6254, "nodeType": "StructuredDocumentation", - "src": "6697:76:19", + "src": "6837:76:17", "text": "##################\n ### Hyperdrive ###\n ##################" }, "errorSelector": "18846de9", "name": "BaseBufferExceedsShareReserves", - "nameLocation": "6784:30:19", + "nameLocation": "6924:30:17", "parameters": { - "id": 6271, + "id": 6255, "nodeType": "ParameterList", "parameters": [], - "src": "6814:2:19" + "src": "6954:2:17" } }, { - "id": 6274, + "id": 6258, "nodeType": "ErrorDefinition", - "src": "6822:33:19", + "src": "6962:33:17", "nodes": [], "errorSelector": "abed41c4", "name": "BelowMinimumContribution", - "nameLocation": "6828:24:19", + "nameLocation": "6968:24:17", "parameters": { - "id": 6273, + "id": 6257, "nodeType": "ParameterList", "parameters": [], - "src": "6852:2:19" + "src": "6992:2:17" } }, { - "id": 6276, + "id": 6260, "nodeType": "ErrorDefinition", - "src": "6860:34:19", + "src": "7000:34:17", "nodes": [], "errorSelector": "6101d7a4", "name": "BelowMinimumShareReserves", - "nameLocation": "6866:25:19", + "nameLocation": "7006:25:17", "parameters": { - "id": 6275, + "id": 6259, "nodeType": "ParameterList", "parameters": [], - "src": "6891:2:19" + "src": "7031:2:17" } }, { - "id": 6278, + "id": 6262, "nodeType": "ErrorDefinition", - "src": "6899:19:19", + "src": "7039:19:17", "nodes": [], "errorSelector": "76c22a22", "name": "InvalidApr", - "nameLocation": "6905:10:19", + "nameLocation": "7045:10:17", "parameters": { - "id": 6277, + "id": 6261, "nodeType": "ParameterList", "parameters": [], - "src": "6915:2:19" + "src": "7055:2:17" } }, { - "id": 6280, + "id": 6264, "nodeType": "ErrorDefinition", - "src": "6923:25:19", + "src": "7063:25:17", "nodes": [], "errorSelector": "0e442a4a", "name": "InvalidBaseToken", - "nameLocation": "6929:16:19", + "nameLocation": "7069:16:17", "parameters": { - "id": 6279, + "id": 6263, "nodeType": "ParameterList", "parameters": [], - "src": "6945:2:19" + "src": "7085:2:17" } }, { - "id": 6282, + "id": 6266, "nodeType": "ErrorDefinition", - "src": "6953:30:19", + "src": "7093:30:17", "nodes": [], "errorSelector": "ecd29e81", "name": "InvalidCheckpointTime", - "nameLocation": "6959:21:19", + "nameLocation": "7099:21:17", "parameters": { - "id": 6281, + "id": 6265, "nodeType": "ParameterList", "parameters": [], - "src": "6980:2:19" + "src": "7120:2:17" } }, { - "id": 6284, + "id": 6268, "nodeType": "ErrorDefinition", - "src": "6988:34:19", + "src": "7128:34:17", "nodes": [], "errorSelector": "5428734d", "name": "InvalidCheckpointDuration", - "nameLocation": "6994:25:19", + "nameLocation": "7134:25:17", "parameters": { - "id": 6283, + "id": 6267, "nodeType": "ParameterList", "parameters": [], - "src": "7019:2:19" + "src": "7159:2:17" } }, { - "id": 6286, + "id": 6270, "nodeType": "ErrorDefinition", - "src": "7027:33:19", + "src": "7167:33:17", "nodes": [], "errorSelector": "55f2a42f", "name": "InvalidInitialSharePrice", - "nameLocation": "7033:24:19", + "nameLocation": "7173:24:17", "parameters": { - "id": 6285, + "id": 6269, "nodeType": "ParameterList", "parameters": [], - "src": "7057:2:19" + "src": "7197:2:17" } }, { - "id": 6288, + "id": 6272, "nodeType": "ErrorDefinition", - "src": "7065:28:19", + "src": "7205:28:17", "nodes": [], "errorSelector": "987dadd3", "name": "InvalidMaturityTime", - "nameLocation": "7071:19:19", + "nameLocation": "7211:19:17", "parameters": { - "id": 6287, + "id": 6271, "nodeType": "ParameterList", "parameters": [], - "src": "7090:2:19" + "src": "7230:2:17" } }, { - "id": 6290, + "id": 6274, "nodeType": "ErrorDefinition", - "src": "7098:36:19", + "src": "7238:36:17", "nodes": [], "errorSelector": "49db44f5", "name": "InvalidMinimumShareReserves", - "nameLocation": "7104:27:19", + "nameLocation": "7244:27:17", "parameters": { - "id": 6289, + "id": 6273, "nodeType": "ParameterList", "parameters": [], - "src": "7131:2:19" + "src": "7271:2:17" } }, { - "id": 6292, + "id": 6276, "nodeType": "ErrorDefinition", - "src": "7139:32:19", + "src": "7279:32:17", "nodes": [], "errorSelector": "4a7fff9e", "name": "InvalidPositionDuration", - "nameLocation": "7145:23:19", + "nameLocation": "7285:23:17", "parameters": { - "id": 6291, + "id": 6275, "nodeType": "ParameterList", "parameters": [], - "src": "7168:2:19" + "src": "7308:2:17" } }, { - "id": 6294, + "id": 6278, "nodeType": "ErrorDefinition", - "src": "7176:29:19", + "src": "7316:29:17", "nodes": [], "errorSelector": "b0bfcdbe", "name": "InvalidShareReserves", - "nameLocation": "7182:20:19", + "nameLocation": "7322:20:17", "parameters": { - "id": 6293, + "id": 6277, "nodeType": "ParameterList", "parameters": [], - "src": "7202:2:19" + "src": "7342:2:17" } }, { - "id": 6296, + "id": 6280, "nodeType": "ErrorDefinition", - "src": "7210:26:19", + "src": "7350:26:17", "nodes": [], "errorSelector": "45ee5986", "name": "InvalidFeeAmounts", - "nameLocation": "7216:17:19", + "nameLocation": "7356:17:17", "parameters": { - "id": 6295, + "id": 6279, "nodeType": "ParameterList", "parameters": [], - "src": "7233:2:19" + "src": "7373:2:17" } }, { - "id": 6298, + "id": 6282, "nodeType": "ErrorDefinition", - "src": "7241:25:19", + "src": "7381:25:17", "nodes": [], "errorSelector": "512095c7", "name": "NegativeInterest", - "nameLocation": "7247:16:19", + "nameLocation": "7387:16:17", "parameters": { - "id": 6297, + "id": 6281, "nodeType": "ParameterList", "parameters": [], - "src": "7263:2:19" + "src": "7403:2:17" } }, { - "id": 6300, + "id": 6284, "nodeType": "ErrorDefinition", - "src": "7271:20:19", + "src": "7411:20:17", "nodes": [], "errorSelector": "c9726517", "name": "OutputLimit", - "nameLocation": "7277:11:19", + "nameLocation": "7417:11:17", "parameters": { - "id": 6299, + "id": 6283, "nodeType": "ParameterList", "parameters": [], - "src": "7288:2:19" + "src": "7428:2:17" } }, { - "id": 6302, + "id": 6286, "nodeType": "ErrorDefinition", - "src": "7296:15:19", + "src": "7436:15:17", "nodes": [], "errorSelector": "9e87fac8", "name": "Paused", - "nameLocation": "7302:6:19", + "nameLocation": "7442:6:17", "parameters": { - "id": 6301, + "id": 6285, "nodeType": "ParameterList", "parameters": [], - "src": "7308:2:19" + "src": "7448:2:17" } }, { - "id": 6304, + "id": 6288, "nodeType": "ErrorDefinition", - "src": "7316:31:19", + "src": "7456:31:17", "nodes": [], "errorSelector": "7983c051", "name": "PoolAlreadyInitialized", - "nameLocation": "7322:22:19", + "nameLocation": "7462:22:17", "parameters": { - "id": 6303, + "id": 6287, "nodeType": "ParameterList", "parameters": [], - "src": "7344:2:19" + "src": "7484:2:17" } }, { - "id": 6306, + "id": 6290, "nodeType": "ErrorDefinition", - "src": "7352:23:19", + "src": "7492:23:17", "nodes": [], "errorSelector": "90b8ec18", "name": "TransferFailed", - "nameLocation": "7358:14:19", + "nameLocation": "7498:14:17", "parameters": { - "id": 6305, + "id": 6289, "nodeType": "ParameterList", "parameters": [], - "src": "7372:2:19" + "src": "7512:2:17" } }, { - "id": 6308, + "id": 6292, "nodeType": "ErrorDefinition", - "src": "7380:26:19", + "src": "7520:26:17", "nodes": [], "errorSelector": "e9bf5433", "name": "UnexpectedAssetId", - "nameLocation": "7386:17:19", + "nameLocation": "7526:17:17", "parameters": { - "id": 6307, + "id": 6291, "nodeType": "ParameterList", "parameters": [], - "src": "7403:2:19" + "src": "7543:2:17" } }, { - "id": 6310, + "id": 6294, "nodeType": "ErrorDefinition", - "src": "7411:25:19", + "src": "7551:25:17", "nodes": [], "errorSelector": "f2fb3812", "name": "UnexpectedSender", - "nameLocation": "7417:16:19", + "nameLocation": "7557:16:17", "parameters": { - "id": 6309, + "id": 6293, "nodeType": "ParameterList", "parameters": [], - "src": "7433:2:19" + "src": "7573:2:17" } }, { - "id": 6312, + "id": 6296, "nodeType": "ErrorDefinition", - "src": "7441:25:19", + "src": "7581:25:17", "nodes": [], "errorSelector": "6a172882", "name": "UnsupportedToken", - "nameLocation": "7447:16:19", + "nameLocation": "7587:16:17", "parameters": { - "id": 6311, + "id": 6295, "nodeType": "ParameterList", "parameters": [], - "src": "7463:2:19" + "src": "7603:2:17" } }, { - "id": 6314, + "id": 6298, "nodeType": "ErrorDefinition", - "src": "7471:23:19", + "src": "7611:23:17", "nodes": [], "errorSelector": "8164f842", "name": "ApprovalFailed", - "nameLocation": "7477:14:19", + "nameLocation": "7617:14:17", "parameters": { - "id": 6313, + "id": 6297, "nodeType": "ParameterList", "parameters": [], - "src": "7491:2:19" + "src": "7631:2:17" } }, { - "id": 6316, + "id": 6300, "nodeType": "ErrorDefinition", - "src": "7499:19:19", + "src": "7639:19:17", "nodes": [], "errorSelector": "1f2a2005", "name": "ZeroAmount", - "nameLocation": "7505:10:19", + "nameLocation": "7645:10:17", "parameters": { - "id": 6315, + "id": 6299, "nodeType": "ParameterList", "parameters": [], - "src": "7515:2:19" + "src": "7655:2:17" } }, { - "id": 6318, + "id": 6302, "nodeType": "ErrorDefinition", - "src": "7523:26:19", + "src": "7663:26:17", "nodes": [], "errorSelector": "252c3a3e", "name": "ZeroLpTotalSupply", - "nameLocation": "7529:17:19", + "nameLocation": "7669:17:17", "parameters": { - "id": 6317, + "id": 6301, "nodeType": "ParameterList", "parameters": [], - "src": "7546:2:19" + "src": "7686:2:17" } }, { - "id": 6320, + "id": 6304, "nodeType": "ErrorDefinition", - "src": "7554:27:19", + "src": "7694:27:17", "nodes": [], "errorSelector": "bb464a5e", "name": "NoAssetsToWithdraw", - "nameLocation": "7560:18:19", + "nameLocation": "7700:18:17", "parameters": { - "id": 6319, + "id": 6303, "nodeType": "ParameterList", "parameters": [], - "src": "7578:2:19" + "src": "7718:2:17" } }, { - "id": 6322, + "id": 6306, "nodeType": "ErrorDefinition", - "src": "7586:19:19", + "src": "7726:19:17", "nodes": [], "errorSelector": "1574f9f3", "name": "NotPayable", - "nameLocation": "7592:10:19", + "nameLocation": "7732:10:17", "parameters": { - "id": 6321, + "id": 6305, "nodeType": "ParameterList", "parameters": [], - "src": "7602:2:19" + "src": "7742:2:17" } }, { - "id": 6325, + "id": 6309, "nodeType": "ErrorDefinition", - "src": "7674:24:19", + "src": "7814:24:17", "nodes": [], "documentation": { - "id": 6323, + "id": 6307, "nodeType": "StructuredDocumentation", - "src": "7611:58:19", + "src": "7751:58:17", "text": "############\n ### TWAP ###\n ############" }, "errorSelector": "a89817b0", "name": "QueryOutOfRange", - "nameLocation": "7680:15:19", + "nameLocation": "7820:15:17", "parameters": { - "id": 6324, + "id": 6308, "nodeType": "ParameterList", "parameters": [], - "src": "7695:2:19" + "src": "7835:2:17" } }, { - "id": 6330, + "id": 6314, "nodeType": "ErrorDefinition", - "src": "7791:29:19", + "src": "7931:29:17", "nodes": [], "documentation": { - "id": 6326, + "id": 6310, "nodeType": "StructuredDocumentation", - "src": "7704:82:19", + "src": "7844:82:17", "text": "####################\n ### DataProvider ###\n ####################" }, "errorSelector": "dcc81126", "name": "ReturnData", - "nameLocation": "7797:10:19", + "nameLocation": "7937:10:17", "parameters": { - "id": 6329, + "id": 6313, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6328, + "id": 6312, "mutability": "mutable", "name": "data", - "nameLocation": "7814:4:19", + "nameLocation": "7954:4:17", "nodeType": "VariableDeclaration", - "scope": 6330, - "src": "7808:10:19", + "scope": 6314, + "src": "7948:10:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6536,10 +6573,10 @@ "typeString": "bytes" }, "typeName": { - "id": 6327, + "id": 6311, "name": "bytes", "nodeType": "ElementaryTypeName", - "src": "7808:5:19", + "src": "7948:5:17", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" @@ -6548,30 +6585,30 @@ "visibility": "internal" } ], - "src": "7807:12:19" + "src": "7947:12:17" } }, { - "id": 6334, + "id": 6318, "nodeType": "ErrorDefinition", - "src": "7825:41:19", + "src": "7965:41:17", "nodes": [], "errorSelector": "efa64d4b", "name": "CallFailed", - "nameLocation": "7831:10:19", + "nameLocation": "7971:10:17", "parameters": { - "id": 6333, + "id": 6317, "nodeType": "ParameterList", "parameters": [ { "constant": false, - "id": 6332, + "id": 6316, "mutability": "mutable", "name": "underlyingError", - "nameLocation": "7849:15:19", + "nameLocation": "7989:15:17", "nodeType": "VariableDeclaration", - "scope": 6334, - "src": "7842:22:19", + "scope": 6318, + "src": "7982:22:17", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -6579,10 +6616,10 @@ "typeString": "bytes4" }, "typeName": { - "id": 6331, + "id": 6315, "name": "bytes4", "nodeType": "ElementaryTypeName", - "src": "7842:6:19", + "src": "7982:6:17", "typeDescriptions": { "typeIdentifier": "t_bytes4", "typeString": "bytes4" @@ -6591,382 +6628,382 @@ "visibility": "internal" } ], - "src": "7841:24:19" + "src": "7981:24:17" } }, { - "id": 6336, + "id": 6320, "nodeType": "ErrorDefinition", - "src": "7871:26:19", + "src": "8011:26:17", "nodes": [], "errorSelector": "8bb0a34b", "name": "UnexpectedSuccess", - "nameLocation": "7877:17:19", + "nameLocation": "8017:17:17", "parameters": { - "id": 6335, + "id": 6319, "nodeType": "ParameterList", "parameters": [], - "src": "7894:2:19" + "src": "8034:2:17" } }, { - "id": 6339, + "id": 6323, "nodeType": "ErrorDefinition", - "src": "7975:21:19", + "src": "8115:21:17", "nodes": [], "documentation": { - "id": 6337, + "id": 6321, "nodeType": "StructuredDocumentation", - "src": "7903:67:19", + "src": "8043:67:17", "text": "###############\n ### Factory ###\n ###############" }, "errorSelector": "82b42900", "name": "Unauthorized", - "nameLocation": "7981:12:19", + "nameLocation": "8121:12:17", "parameters": { - "id": 6338, + "id": 6322, "nodeType": "ParameterList", "parameters": [], - "src": "7993:2:19" + "src": "8133:2:17" } }, { - "id": 6341, + "id": 6325, "nodeType": "ErrorDefinition", - "src": "8001:28:19", + "src": "8141:28:17", "nodes": [], "errorSelector": "652122d9", "name": "InvalidContribution", - "nameLocation": "8007:19:19", + "nameLocation": "8147:19:17", "parameters": { - "id": 6340, + "id": 6324, "nodeType": "ParameterList", "parameters": [], - "src": "8026:2:19" + "src": "8166:2:17" } }, { - "id": 6343, + "id": 6327, "nodeType": "ErrorDefinition", - "src": "8034:21:19", + "src": "8174:21:17", "nodes": [], "errorSelector": "c1ab6dc1", "name": "InvalidToken", - "nameLocation": "8040:12:19", + "nameLocation": "8180:12:17", "parameters": { - "id": 6342, + "id": 6326, "nodeType": "ParameterList", "parameters": [], - "src": "8052:2:19" + "src": "8192:2:17" } }, { - "id": 6345, + "id": 6329, "nodeType": "ErrorDefinition", - "src": "8060:22:19", + "src": "8200:22:17", "nodes": [], "errorSelector": "a3932d2d", "name": "MaxFeeTooHigh", - "nameLocation": "8066:13:19", + "nameLocation": "8206:13:17", "parameters": { - "id": 6344, + "id": 6328, "nodeType": "ParameterList", "parameters": [], - "src": "8079:2:19" + "src": "8219:2:17" } }, { - "id": 6347, + "id": 6331, "nodeType": "ErrorDefinition", - "src": "8087:19:19", + "src": "8227:19:17", "nodes": [], "errorSelector": "cd4e6167", "name": "FeeTooHigh", - "nameLocation": "8093:10:19", + "nameLocation": "8233:10:17", "parameters": { - "id": 6346, + "id": 6330, "nodeType": "ParameterList", "parameters": [], - "src": "8103:2:19" + "src": "8243:2:17" } }, { - "id": 6349, + "id": 6333, "nodeType": "ErrorDefinition", - "src": "8111:33:19", + "src": "8251:33:17", "nodes": [], "errorSelector": "8fbc3bd9", "name": "NonPayableInitialization", - "nameLocation": "8117:24:19", + "nameLocation": "8257:24:17", "parameters": { - "id": 6348, + "id": 6332, "nodeType": "ParameterList", "parameters": [], - "src": "8141:2:19" + "src": "8281:2:17" } }, { - "id": 6352, + "id": 6336, "nodeType": "ErrorDefinition", - "src": "8243:33:19", + "src": "8383:33:17", "nodes": [], "documentation": { - "id": 6350, + "id": 6334, "nodeType": "StructuredDocumentation", - "src": "8150:88:19", + "src": "8290:88:17", "text": "######################\n ### ERC20Forwarder ###\n ######################" }, "errorSelector": "ba430d38", "name": "BatchInputLengthMismatch", - "nameLocation": "8249:24:19", + "nameLocation": "8389:24:17", "parameters": { - "id": 6351, + "id": 6335, "nodeType": "ParameterList", "parameters": [], - "src": "8273:2:19" + "src": "8413:2:17" } }, { - "id": 6354, + "id": 6338, "nodeType": "ErrorDefinition", - "src": "8281:24:19", + "src": "8421:24:17", "nodes": [], "errorSelector": "f87d9271", "name": "ExpiredDeadline", - "nameLocation": "8287:15:19", + "nameLocation": "8427:15:17", "parameters": { - "id": 6353, + "id": 6337, "nodeType": "ParameterList", "parameters": [], - "src": "8302:2:19" + "src": "8442:2:17" } }, { - "id": 6356, + "id": 6340, "nodeType": "ErrorDefinition", - "src": "8310:25:19", + "src": "8450:25:17", "nodes": [], "errorSelector": "8baa579f", "name": "InvalidSignature", - "nameLocation": "8316:16:19", + "nameLocation": "8456:16:17", "parameters": { - "id": 6355, + "id": 6339, "nodeType": "ParameterList", "parameters": [], - "src": "8332:2:19" + "src": "8472:2:17" } }, { - "id": 6358, + "id": 6342, "nodeType": "ErrorDefinition", - "src": "8340:27:19", + "src": "8480:27:17", "nodes": [], "errorSelector": "2aab8bd3", "name": "InvalidERC20Bridge", - "nameLocation": "8346:18:19", + "nameLocation": "8486:18:17", "parameters": { - "id": 6357, + "id": 6341, "nodeType": "ParameterList", "parameters": [], - "src": "8364:2:19" + "src": "8504:2:17" } }, { - "id": 6360, + "id": 6344, "nodeType": "ErrorDefinition", - "src": "8372:30:19", + "src": "8512:30:17", "nodes": [], "errorSelector": "f0dd15fd", "name": "RestrictedZeroAddress", - "nameLocation": "8378:21:19", + "nameLocation": "8518:21:17", "parameters": { - "id": 6359, + "id": 6343, "nodeType": "ParameterList", "parameters": [], - "src": "8399:2:19" + "src": "8539:2:17" } }, { - "id": 6363, + "id": 6347, "nodeType": "ErrorDefinition", - "src": "8496:22:19", + "src": "8636:22:17", "nodes": [], "documentation": { - "id": 6361, + "id": 6345, "nodeType": "StructuredDocumentation", - "src": "8408:83:19", + "src": "8548:83:17", "text": "#####################\n ### BondWrapper ###\n #####################" }, "errorSelector": "9acb7e52", "name": "AlreadyClosed", - "nameLocation": "8502:13:19", + "nameLocation": "8642:13:17", "parameters": { - "id": 6362, + "id": 6346, "nodeType": "ParameterList", "parameters": [], - "src": "8515:2:19" + "src": "8655:2:17" } }, { - "id": 6365, + "id": 6349, "nodeType": "ErrorDefinition", - "src": "8523:20:19", + "src": "8663:20:17", "nodes": [], "errorSelector": "3f8e46bc", "name": "BondMatured", - "nameLocation": "8529:11:19", + "nameLocation": "8669:11:17", "parameters": { - "id": 6364, + "id": 6348, "nodeType": "ParameterList", "parameters": [], - "src": "8540:2:19" + "src": "8680:2:17" } }, { - "id": 6367, + "id": 6351, "nodeType": "ErrorDefinition", - "src": "8548:23:19", + "src": "8688:23:17", "nodes": [], "errorSelector": "915eceb1", "name": "BondNotMatured", - "nameLocation": "8554:14:19", + "nameLocation": "8694:14:17", "parameters": { - "id": 6366, + "id": 6350, "nodeType": "ParameterList", "parameters": [], - "src": "8568:2:19" + "src": "8708:2:17" } }, { - "id": 6369, + "id": 6353, "nodeType": "ErrorDefinition", - "src": "8576:26:19", + "src": "8716:26:17", "nodes": [], "errorSelector": "d5481703", "name": "InsufficientPrice", - "nameLocation": "8582:17:19", + "nameLocation": "8722:17:17", "parameters": { - "id": 6368, + "id": 6352, "nodeType": "ParameterList", "parameters": [], - "src": "8599:2:19" + "src": "8739:2:17" } }, { - "id": 6371, + "id": 6355, "nodeType": "ErrorDefinition", - "src": "8607:27:19", + "src": "8747:27:17", "nodes": [], "errorSelector": "4a0dabae", "name": "MintPercentTooHigh", - "nameLocation": "8613:18:19", + "nameLocation": "8753:18:17", "parameters": { - "id": 6370, + "id": 6354, "nodeType": "ParameterList", "parameters": [], - "src": "8631:2:19" + "src": "8771:2:17" } }, { - "id": 6374, + "id": 6358, "nodeType": "ErrorDefinition", - "src": "8712:25:19", + "src": "8852:25:17", "nodes": [], "documentation": { - "id": 6372, + "id": 6356, "nodeType": "StructuredDocumentation", - "src": "8640:67:19", + "src": "8780:67:17", "text": "###############\n ### AssetId ###\n ###############" }, "errorSelector": "b7d09497", "name": "InvalidTimestamp", - "nameLocation": "8718:16:19", + "nameLocation": "8858:16:17", "parameters": { - "id": 6373, + "id": 6357, "nodeType": "ParameterList", "parameters": [], - "src": "8734:2:19" + "src": "8874:2:17" } }, { - "id": 6377, + "id": 6361, "nodeType": "ErrorDefinition", - "src": "8836:35:19", + "src": "8976:35:17", "nodes": [], "documentation": { - "id": 6375, + "id": 6359, "nodeType": "StructuredDocumentation", - "src": "8743:88:19", + "src": "8883:88:17", "text": "######################\n ### FixedPointMath ###\n ######################" }, "errorSelector": "2d59cfbd", "name": "FixedPointMath_AddOverflow", - "nameLocation": "8842:26:19", + "nameLocation": "8982:26:17", "parameters": { - "id": 6376, + "id": 6360, "nodeType": "ParameterList", "parameters": [], - "src": "8868:2:19" + "src": "9008:2:17" } }, { - "id": 6379, + "id": 6363, "nodeType": "ErrorDefinition", - "src": "8876:35:19", + "src": "9016:35:17", "nodes": [], "errorSelector": "35ba1440", "name": "FixedPointMath_SubOverflow", - "nameLocation": "8882:26:19", + "nameLocation": "9022:26:17", "parameters": { - "id": 6378, + "id": 6362, "nodeType": "ParameterList", "parameters": [], - "src": "8908:2:19" + "src": "9048:2:17" } }, { - "id": 6381, + "id": 6365, "nodeType": "ErrorDefinition", - "src": "8916:39:19", + "src": "9056:39:17", "nodes": [], "errorSelector": "df92cc9d", "name": "FixedPointMath_InvalidExponent", - "nameLocation": "8922:30:19", + "nameLocation": "9062:30:17", "parameters": { - "id": 6380, + "id": 6364, "nodeType": "ParameterList", "parameters": [], - "src": "8952:2:19" + "src": "9092:2:17" } }, { - "id": 6383, + "id": 6367, "nodeType": "ErrorDefinition", - "src": "8960:43:19", + "src": "9100:43:17", "nodes": [], "errorSelector": "ac5f1b8e", "name": "FixedPointMath_NegativeOrZeroInput", - "nameLocation": "8966:34:19", + "nameLocation": "9106:34:17", "parameters": { - "id": 6382, + "id": 6366, "nodeType": "ParameterList", "parameters": [], - "src": "9000:2:19" + "src": "9140:2:17" } }, { - "id": 6385, + "id": 6369, "nodeType": "ErrorDefinition", - "src": "9008:37:19", + "src": "9148:37:17", "nodes": [], "errorSelector": "2c7949f5", "name": "FixedPointMath_NegativeInput", - "nameLocation": "9014:28:19", + "nameLocation": "9154:28:17", "parameters": { - "id": 6384, + "id": 6368, "nodeType": "ParameterList", "parameters": [], - "src": "9042:2:19" + "src": "9182:2:17" } } ], @@ -6974,48 +7011,48 @@ "baseContracts": [ { "baseName": { - "id": 6044, + "id": 6025, "name": "IHyperdriveRead", "nameLocations": [ - "294:15:19" + "294:15:17" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 6470, - "src": "294:15:19" + "referencedDeclaration": 6454, + "src": "294:15:17" }, - "id": 6045, + "id": 6026, "nodeType": "InheritanceSpecifier", - "src": "294:15:19" + "src": "294:15:17" }, { "baseName": { - "id": 6046, + "id": 6027, "name": "IHyperdriveWrite", "nameLocations": [ - "311:16:19" + "311:16:17" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 6617, - "src": "311:16:19" + "referencedDeclaration": 6601, + "src": "311:16:17" }, - "id": 6047, + "id": 6028, "nodeType": "InheritanceSpecifier", - "src": "311:16:19" + "src": "311:16:17" }, { "baseName": { - "id": 6048, + "id": 6029, "name": "IMultiToken", "nameLocations": [ - "329:11:19" + "329:11:17" ], "nodeType": "IdentifierPath", - "referencedDeclaration": 6739, - "src": "329:11:19" + "referencedDeclaration": 6661, + "src": "329:11:17" }, - "id": 6049, + "id": 6030, "nodeType": "InheritanceSpecifier", - "src": "329:11:19" + "src": "329:11:17" } ], "canonicalName": "IHyperdrive", @@ -7023,18 +7060,26 @@ "contractKind": "interface", "fullyImplemented": false, "linearizedBaseContracts": [ - 6386, - 6739, - 6747, - 6617, - 6929, - 6470, - 6817 + 6370, + 6661, + 6669, + 6601, + 6851, + 6454, + 6739 ], "name": "IHyperdrive", - "nameLocation": "279:11:19", - "scope": 6387, + "nameLocation": "279:11:17", + "scope": 6371, "usedErrors": [ + 6256, + 6258, + 6260, + 6262, + 6264, + 6266, + 6268, + 6270, 6272, 6274, 6276, @@ -7053,44 +7098,36 @@ 6302, 6304, 6306, - 6308, - 6310, - 6312, + 6309, 6314, - 6316, 6318, 6320, - 6322, + 6323, 6325, - 6330, - 6334, + 6327, + 6329, + 6331, + 6333, 6336, - 6339, - 6341, - 6343, - 6345, + 6338, + 6340, + 6342, + 6344, 6347, 6349, - 6352, - 6354, - 6356, + 6351, + 6353, + 6355, 6358, - 6360, + 6361, 6363, 6365, 6367, - 6369, - 6371, - 6374, - 6377, - 6379, - 6381, - 6383, - 6385 + 6369 ] } ], "license": "Apache-2.0" }, - "id": 19 + "id": 17 } \ No newline at end of file diff --git a/src/data/convert_data.py b/src/data/convert_data.py index 90b65af528..b55e623344 100644 --- a/src/data/convert_data.py +++ b/src/data/convert_data.py @@ -3,6 +3,7 @@ import logging import time +from decimal import Decimal from typing import Any from eth_typing import BlockNumber @@ -222,7 +223,7 @@ def convert_pool_config(pool_config_dict: dict[str, Any]) -> db_schema.PoolConfi else: value = pool_config_dict[key] if isinstance(value, FixedPoint): - value = float(value) + value = Decimal(str(value)) args_dict[key] = value pool_config = db_schema.PoolConfig(**args_dict) return pool_config @@ -249,7 +250,7 @@ def convert_pool_info(pool_info_dict: dict[str, Any]) -> db_schema.PoolInfo: else: value = pool_info_dict[key] if isinstance(value, FixedPoint): - value = float(value) + value = Decimal(str(value)) args_dict[key] = value block_pool_info = db_schema.PoolInfo(**args_dict) return block_pool_info @@ -277,34 +278,31 @@ def convert_checkpoint_info(checkpoint_info_dict: dict[str, Any]) -> db_schema.C else: value = checkpoint_info_dict[key] if isinstance(value, FixedPoint): - value = float(value) + value = Decimal(str(value)) args_dict[key] = value block_checkpoint_info = db_schema.CheckpointInfo(**args_dict) return block_checkpoint_info -def _convert_scaled_value(input_val: int | None) -> float | None: +def _convert_scaled_value(input_val: int | None) -> Decimal | None: """ - Given a scaled value int, converts it to a float, while supporting Nones + Given a scaled value int, converts it to a Decimal, while supporting Nones Arguments ---------- input_val: int | None - The scaled integer value to unscale and convert to float + The scaled integer value to unscale and convert to Decimal Returns ------- - float | None - The unscaled floating point value - - Note - ---- - We cast to FixedPoint, then to floats to keep noise to a minimum. - There is no loss of precision when going from Fixedpoint to float. - Once this is fed into postgres, postgres will use the fixed-precision Numeric type. + Decimal | None + The unscaled Decimal value """ if input_val is not None: - return float(FixedPoint(scaled_value=input_val)) + # TODO add this cast within fixedpoint + fp_val = FixedPoint(scaled_value=input_val) + str_val = str(fp_val) + return Decimal(str_val) return None @@ -638,7 +636,7 @@ def _recursive_dict_conversion(obj: Any) -> Any: def _query_contract_for_balance( contract: Contract, wallet_addr: str, block_number: BlockNumber, token_id: int | None = None -) -> float | None: +) -> Decimal | None: """Queries the given contract for the wallet's token_id balance. Arguments @@ -654,7 +652,7 @@ def _query_contract_for_balance( Returns ------- - float | None + Decimal | None The amount token_id in wallet_addr. None if failed """ num_token_scaled = None diff --git a/src/data/db_schema.py b/src/data/db_schema.py index 8b80c05a06..53265de05a 100644 --- a/src/data/db_schema.py +++ b/src/data/db_schema.py @@ -2,6 +2,7 @@ from __future__ import annotations from datetime import datetime +from decimal import Decimal from typing import Union from sqlalchemy import BigInteger, Boolean, DateTime, ForeignKey, Integer, Numeric, String @@ -41,9 +42,9 @@ class WalletInfo(Base): baseTokenType: Mapped[Union[str, None]] = mapped_column(String, index=True, default=None) # tokenType is the baseTokenType appended with "-" for LONG and SHORT tokenType: Mapped[Union[str, None]] = mapped_column(String, default=None) - tokenValue: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - maturityTime: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - sharePrice: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + tokenValue: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + maturityTime: Mapped[Union[int, None]] = mapped_column(BigInteger().with_variant(Integer, "sqlite"), default=None) + sharePrice: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) class WalletDelta(Base): @@ -64,8 +65,8 @@ class WalletDelta(Base): baseTokenType: Mapped[Union[str, None]] = mapped_column(String, index=True, default=None) # tokenType is the baseTokenType appended with "-" for LONG and SHORT tokenType: Mapped[Union[str, None]] = mapped_column(String, default=None) - delta: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - maturityTime: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + delta: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + maturityTime: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) class PoolConfig(Base): @@ -75,20 +76,20 @@ class PoolConfig(Base): contractAddress: Mapped[str] = mapped_column(String, primary_key=True) baseToken: Mapped[Union[str, None]] = mapped_column(String, default=None) - initialSharePrice: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - minimumShareReserves: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + initialSharePrice: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + minimumShareReserves: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) positionDuration: Mapped[Union[int, None]] = mapped_column(Integer, default=None) checkpointDuration: Mapped[Union[int, None]] = mapped_column(Integer, default=None) - timeStretch: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + timeStretch: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) governance: Mapped[Union[str, None]] = mapped_column(String, default=None) feeCollector: Mapped[Union[str, None]] = mapped_column(String, default=None) - curveFee: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - flatFee: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - governanceFee: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - oracleSize: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + curveFee: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + flatFee: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + governanceFee: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + oracleSize: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) updateGap: Mapped[Union[int, None]] = mapped_column(Integer, default=None) - invTimeStretch: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - termLength: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + invTimeStretch: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + termLength: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) class CheckpointInfo(Base): @@ -98,9 +99,9 @@ class CheckpointInfo(Base): blockNumber: Mapped[int] = mapped_column(BigInteger, primary_key=True) timestamp: Mapped[datetime] = mapped_column(DateTime, index=True) - sharePrice: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - longSharePrice: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - shortBaseVolume: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + sharePrice: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + longSharePrice: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + shortBaseVolume: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) class PoolInfo(Base): @@ -113,18 +114,19 @@ class PoolInfo(Base): blockNumber: Mapped[int] = mapped_column(BigInteger, primary_key=True) timestamp: Mapped[datetime] = mapped_column(DateTime, index=True) - shareReserves: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - bondReserves: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - lpTotalSupply: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - sharePrice: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - longsOutstanding: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - longAverageMaturityTime: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - shortsOutstanding: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - shortAverageMaturityTime: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - shortBaseVolume: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - withdrawalSharesReadyToWithdraw: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - withdrawalSharesProceeds: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - totalSupplyWithdrawalShares: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + shareReserves: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + bondReserves: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + lpTotalSupply: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + sharePrice: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + lpSharePrice: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + longsOutstanding: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + longAverageMaturityTime: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + shortsOutstanding: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + shortAverageMaturityTime: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + shortBaseVolume: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + withdrawalSharesReadyToWithdraw: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + withdrawalSharesProceeds: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + totalSupplyWithdrawalShares: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) class Transaction(Base): @@ -159,20 +161,20 @@ class Transaction(Base): input_method: Mapped[Union[str, None]] = mapped_column(String, default=None) # Method: initialize - input_params_contribution: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - input_params_apr: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + input_params_contribution: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + input_params_apr: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) input_params_destination: Mapped[Union[str, None]] = mapped_column(String, default=None) input_params_asUnderlying: Mapped[Union[bool, None]] = mapped_column(Boolean, default=None) # Method: openLong - input_params_baseAmount: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - input_params_minOutput: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + input_params_baseAmount: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + input_params_minOutput: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) # input_params_destination # input_params_asUnderlying # Method: openShort - input_params_bondAmount: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - input_params_maxDeposit: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + input_params_bondAmount: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + input_params_maxDeposit: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) # input_params_destination # input_params_asUnderlying @@ -192,13 +194,13 @@ class Transaction(Base): # Method: addLiquidity # input_params_contribution - input_params_minApr: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) - input_params_maxApr: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + input_params_minApr: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) + input_params_maxApr: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) # input_params_destination # input_params_asUnderlying # Method: removeLiquidity - input_params_shares: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + input_params_shares: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) # input_params_minOutput # input_params_destination # input_params_asUnderlying @@ -210,7 +212,7 @@ class Transaction(Base): # args_owner # args_spender # args_id - event_value: Mapped[Union[float, None]] = mapped_column(Numeric, default=None) + event_value: Mapped[Union[Decimal, None]] = mapped_column(Numeric, default=None) event_operator: Mapped[Union[str, None]] = mapped_column(String, default=None) event_id: Mapped[Union[int, None]] = mapped_column(Numeric, default=None) # Fields calculated from base diff --git a/src/data/postgres.py b/src/data/postgres.py index 61006a2071..648038072a 100644 --- a/src/data/postgres.py +++ b/src/data/postgres.py @@ -198,7 +198,9 @@ def add_pool_config(pool_config: PoolConfig, session: Session) -> None: # if multiple threads try to add pool config at the same time # This function is being called by acquire_data.py, which should only have one # instance per db, so no need to worry about it here - existing_pool_config = get_pool_config(session, contract_address=pool_config.contractAddress) + + # Since we're doing a direct equality comparison, we don't want to coerce into floats here + existing_pool_config = get_pool_config(session, contract_address=pool_config.contractAddress, coerce_float=False) if len(existing_pool_config) == 0: session.add(pool_config) @@ -340,7 +342,7 @@ def add_user_map(username: str, addresses: list[str], session: Session) -> None: raise err -def get_pool_config(session: Session, contract_address: str | None = None) -> pd.DataFrame: +def get_pool_config(session: Session, contract_address: str | None = None, coerce_float=True) -> pd.DataFrame: """Get all pool config and returns as a pandas dataframe. Arguments @@ -358,7 +360,7 @@ def get_pool_config(session: Session, contract_address: str | None = None) -> pd query = session.query(PoolConfig) if contract_address is not None: query = query.filter(PoolConfig.contractAddress == contract_address) - return pd.read_sql(query.statement, con=session.connection()) + return pd.read_sql(query.statement, con=session.connection(), coerce_float=coerce_float) def get_pool_info(session: Session, start_block: int | None = None, end_block: int | None = None) -> pd.DataFrame: diff --git a/src/data/tests/test_checkpoint.py b/src/data/tests/test_checkpoint.py index 09ee7f56b8..786c1338c6 100644 --- a/src/data/tests/test_checkpoint.py +++ b/src/data/tests/test_checkpoint.py @@ -1,5 +1,6 @@ """CRUD tests for CheckpointInfo""" from datetime import datetime +from decimal import Decimal import numpy as np import pytest @@ -50,7 +51,7 @@ def test_update_checkpoint(self, session): postgres.add_checkpoint_infos([checkpoint], session) session.commit() - checkpoint.sharePrice = 5.0 + checkpoint.sharePrice = Decimal("5.0") session.commit() updated_checkpoint = session.query(CheckpointInfo).filter_by(blockNumber=1).first() @@ -106,9 +107,9 @@ def test_get_checkpoints(self, session): def test_block_query_checkpoints(self, session): """Testing querying by block number of checkpoints via interface""" - checkpoint_1 = CheckpointInfo(blockNumber=0, timestamp=datetime.now(), sharePrice=3.1) - checkpoint_2 = CheckpointInfo(blockNumber=1, timestamp=datetime.now(), sharePrice=3.2) - checkpoint_3 = CheckpointInfo(blockNumber=2, timestamp=datetime.now(), sharePrice=3.3) + checkpoint_1 = CheckpointInfo(blockNumber=0, timestamp=datetime.now(), sharePrice=Decimal("3.1")) + checkpoint_2 = CheckpointInfo(blockNumber=1, timestamp=datetime.now(), sharePrice=Decimal("3.2")) + checkpoint_3 = CheckpointInfo(blockNumber=2, timestamp=datetime.now(), sharePrice=Decimal("3.3")) postgres.add_checkpoint_infos([checkpoint_1, checkpoint_2, checkpoint_3], session) checkpoints_df = postgres.get_checkpoint_info(session, start_block=1) diff --git a/src/data/tests/test_pool_config.py b/src/data/tests/test_pool_config.py index 12e18aa8f7..1a8d96f9b8 100644 --- a/src/data/tests/test_pool_config.py +++ b/src/data/tests/test_pool_config.py @@ -1,4 +1,6 @@ """CRUD tests for PoolConfig""" +from decimal import Decimal + import numpy as np import pytest from sqlalchemy import create_engine @@ -29,7 +31,7 @@ class TestPoolConfigTable: def test_create_pool_config(self, session): """Create and entry""" - pool_config = PoolConfig(contractAddress="0", initialSharePrice=3.2) # add your other columns here... + pool_config = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.2")) session.add(pool_config) session.commit() @@ -39,7 +41,7 @@ def test_create_pool_config(self, session): def test_delete_pool_config(self, session): """Delete an entry""" - pool_config = PoolConfig(contractAddress="0", initialSharePrice=3.2) # add your other columns here... + pool_config = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.2")) session.add(pool_config) session.commit() @@ -55,48 +57,48 @@ class TestPoolConfigInterface: def test_get_pool_config(self, session): """Testing retrevial of pool config via interface""" - pool_config_1 = PoolConfig(contractAddress="0", initialSharePrice=3.2) # add your other columns here... + pool_config_1 = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.2")) postgres.add_pool_config(pool_config_1, session) - pool_config_df_1 = postgres.get_pool_config(session) + pool_config_df_1 = postgres.get_pool_config(session, coerce_float=False) assert len(pool_config_df_1) == 1 - assert pool_config_df_1.loc[0, "initialSharePrice"] == 3.2 + assert pool_config_df_1.loc[0, "initialSharePrice"] == Decimal("3.2") - pool_config_2 = PoolConfig(contractAddress="1", initialSharePrice=3.4) # add your other columns here... + pool_config_2 = PoolConfig(contractAddress="1", initialSharePrice=Decimal("3.4")) postgres.add_pool_config(pool_config_2, session) - pool_config_df_2 = postgres.get_pool_config(session) + pool_config_df_2 = postgres.get_pool_config(session, coerce_float=False) assert len(pool_config_df_2) == 2 - np.testing.assert_array_equal(pool_config_df_2["initialSharePrice"], [3.2, 3.4]) + np.testing.assert_array_equal(pool_config_df_2["initialSharePrice"], np.array([Decimal("3.2"), Decimal("3.4")])) def test_primary_id_query_pool_config(self, session): """Testing retrevial of pool config via interface""" - pool_config = PoolConfig(contractAddress="0", initialSharePrice=3.2) # add your other columns here... + pool_config = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.2")) postgres.add_pool_config(pool_config, session) - pool_config_df_1 = postgres.get_pool_config(session, contract_address="0") + pool_config_df_1 = postgres.get_pool_config(session, contract_address="0", coerce_float=False) assert len(pool_config_df_1) == 1 - assert pool_config_df_1.loc[0, "initialSharePrice"] == 3.2 + assert pool_config_df_1.loc[0, "initialSharePrice"] == Decimal("3.2") - pool_config_df_2 = postgres.get_pool_config(session, contract_address="1") + pool_config_df_2 = postgres.get_pool_config(session, contract_address="1", coerce_float=False) assert len(pool_config_df_2) == 0 def test_pool_config_verify(self, session): """Testing retrevial of pool config via interface""" - pool_config_1 = PoolConfig(contractAddress="0", initialSharePrice=3.2) # add your other columns here... + pool_config_1 = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.2")) postgres.add_pool_config(pool_config_1, session) - pool_config_df_1 = postgres.get_pool_config(session) + pool_config_df_1 = postgres.get_pool_config(session, coerce_float=False) assert len(pool_config_df_1) == 1 - assert pool_config_df_1.loc[0, "initialSharePrice"] == 3.2 + assert pool_config_df_1.loc[0, "initialSharePrice"] == Decimal("3.2") # Nothing should happen if we give the same pool_config - pool_config_2 = PoolConfig(contractAddress="0", initialSharePrice=3.2) # add your other columns here... + pool_config_2 = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.2")) postgres.add_pool_config(pool_config_2, session) - pool_config_df_2 = postgres.get_pool_config(session) + pool_config_df_2 = postgres.get_pool_config(session, coerce_float=False) assert len(pool_config_df_2) == 1 - assert pool_config_df_2.loc[0, "initialSharePrice"] == 3.2 + assert pool_config_df_2.loc[0, "initialSharePrice"] == Decimal("3.2") # If we try to add another pool config with a different value, should throw a ValueError - pool_config_3 = PoolConfig(contractAddress="0", initialSharePrice=3.4) # add your other columns here... + pool_config_3 = PoolConfig(contractAddress="0", initialSharePrice=Decimal("3.4")) with pytest.raises(ValueError): postgres.add_pool_config(pool_config_3, session) diff --git a/src/data/tests/test_pool_info.py b/src/data/tests/test_pool_info.py index c1fcbeff32..d8b5b26b67 100644 --- a/src/data/tests/test_pool_info.py +++ b/src/data/tests/test_pool_info.py @@ -32,7 +32,7 @@ class TestPoolInfoTable: def test_create_pool_info(self, session): """Create and entry""" timestamp = datetime.fromtimestamp(1628472000) - pool_info = PoolInfo(blockNumber=1, timestamp=timestamp) # add your other columns here... + pool_info = PoolInfo(blockNumber=1, timestamp=timestamp) session.add(pool_info) session.commit() diff --git a/src/data/tests/test_transaction.py b/src/data/tests/test_transaction.py index c9f3e76deb..f6e4578c6a 100644 --- a/src/data/tests/test_transaction.py +++ b/src/data/tests/test_transaction.py @@ -1,4 +1,6 @@ """CRUD tests for Transaction""" +from decimal import Decimal + import numpy as np import pytest from sqlalchemy import create_engine @@ -32,7 +34,7 @@ def test_create_transaction(self, session): # Note: this test is using inmemory sqlite, which doesn't seem to support # autoincrementing ids without init, whereas postgres does this with no issues # Hence, we explicitly add id here - transaction = Transaction(blockNumber=1, transactionHash="a", event_value=3.2) # add your other columns here... + transaction = Transaction(blockNumber=1, transactionHash="a", event_value=Decimal("3.2")) session.add(transaction) session.commit() @@ -43,11 +45,11 @@ def test_create_transaction(self, session): def test_update_transaction(self, session): """Update an entry""" - transaction = Transaction(blockNumber=1, transactionHash="a", event_value=3.2) + transaction = Transaction(blockNumber=1, transactionHash="a", event_value=Decimal("3.2")) session.add(transaction) session.commit() - transaction.event_value = 5.0 + transaction.event_value = Decimal("5.0") session.commit() updated_transaction = session.query(Transaction).filter_by(blockNumber=1).first() @@ -56,7 +58,7 @@ def test_update_transaction(self, session): def test_delete_transaction(self, session): """Delete an entry""" - transaction = Transaction(blockNumber=1, transactionHash="a", event_value=3.2) + transaction = Transaction(blockNumber=1, transactionHash="a", event_value=Decimal("3.2")) session.add(transaction) session.commit() @@ -72,20 +74,14 @@ class TestTransactionInterface: def test_latest_block_number(self, session): """Testing retrevial of transaction via interface""" - transaction_1 = Transaction( - blockNumber=1, transactionHash="a", event_value=3.0 - ) # add your other columns here... + transaction_1 = Transaction(blockNumber=1, transactionHash="a", event_value=Decimal("3.0")) postgres.add_transactions([transaction_1], session) latest_block_number = postgres.get_latest_block_number_from_table(Transaction, session) assert latest_block_number == 1 - transaction_2 = Transaction( - blockNumber=2, transactionHash="b", event_value=3.2 - ) # add your other columns here... - transaction_3 = Transaction( - blockNumber=3, transactionHash="c", event_value=3.4 - ) # add your other columns here... + transaction_2 = Transaction(blockNumber=2, transactionHash="b", event_value=Decimal("3.2")) + transaction_3 = Transaction(blockNumber=3, transactionHash="c", event_value=Decimal("3.4")) postgres.add_transactions([transaction_2, transaction_3], session) latest_block_number = postgres.get_latest_block_number_from_table(Transaction, session) @@ -93,15 +89,9 @@ def test_latest_block_number(self, session): def test_get_transactions(self, session): """Testing retrevial of transactions via interface""" - transaction_1 = Transaction( - blockNumber=0, transactionHash="a", event_value=3.1 - ) # add your other columns here... - transaction_2 = Transaction( - blockNumber=1, transactionHash="b", event_value=3.2 - ) # add your other columns here... - transaction_3 = Transaction( - blockNumber=2, transactionHash="c", event_value=3.3 - ) # add your other columns here... + transaction_1 = Transaction(blockNumber=0, transactionHash="a", event_value=Decimal("3.1")) + transaction_2 = Transaction(blockNumber=1, transactionHash="b", event_value=Decimal("3.2")) + transaction_3 = Transaction(blockNumber=2, transactionHash="c", event_value=Decimal("3.3")) postgres.add_transactions([transaction_1, transaction_2, transaction_3], session) transactions_df = postgres.get_transactions(session) @@ -109,15 +99,9 @@ def test_get_transactions(self, session): def test_block_query_transactions(self, session): """Testing querying by block number of transactions via interface""" - transaction_1 = Transaction( - blockNumber=0, transactionHash="a", event_value=3.1 - ) # add your other columns here... - transaction_2 = Transaction( - blockNumber=1, transactionHash="b", event_value=3.2 - ) # add your other columns here... - transaction_3 = Transaction( - blockNumber=2, transactionHash="c", event_value=3.3 - ) # add your other columns here... + transaction_1 = Transaction(blockNumber=0, transactionHash="a", event_value=Decimal("3.1")) + transaction_2 = Transaction(blockNumber=1, transactionHash="b", event_value=Decimal("3.2")) + transaction_3 = Transaction(blockNumber=2, transactionHash="c", event_value=Decimal("3.3")) postgres.add_transactions([transaction_1, transaction_2, transaction_3], session) transactions_df = postgres.get_transactions(session, start_block=1) diff --git a/src/data/tests/test_wallet_deltas.py b/src/data/tests/test_wallet_deltas.py index a7275c8b91..18bcc8ff6a 100644 --- a/src/data/tests/test_wallet_deltas.py +++ b/src/data/tests/test_wallet_deltas.py @@ -1,4 +1,6 @@ """CRUD tests for WalletDelta""" +from decimal import Decimal + import numpy as np import pytest from sqlalchemy import create_engine @@ -32,7 +34,7 @@ def test_create_wallet_delta(self, session): # Note: this test is using inmemory sqlite, which doesn't seem to support # autoincrementing ids without init, whereas postgres does this with no issues # Hence, we explicitly add id here - wallet_delta = WalletDelta(blockNumber=1, transactionHash="a", delta=3.2) # add your other columns here... + wallet_delta = WalletDelta(blockNumber=1, transactionHash="a", delta=Decimal("3.2")) session.add(wallet_delta) session.commit() @@ -43,11 +45,11 @@ def test_create_wallet_delta(self, session): def test_update_wallet_delta(self, session): """Update an entry""" - wallet_delta = WalletDelta(blockNumber=1, transactionHash="a", delta=3.2) + wallet_delta = WalletDelta(blockNumber=1, transactionHash="a", delta=Decimal("3.2")) session.add(wallet_delta) session.commit() - wallet_delta.delta = 5.0 + wallet_delta.delta = Decimal("5.0") session.commit() updated_wallet_delta = session.query(WalletDelta).filter_by(blockNumber=1).first() @@ -56,7 +58,7 @@ def test_update_wallet_delta(self, session): def test_delete_wallet_delta(self, session): """Delete an entry""" - wallet_delta = WalletDelta(blockNumber=1, transactionHash="a", delta=3.2) + wallet_delta = WalletDelta(blockNumber=1, transactionHash="a", delta=Decimal("3.2")) session.add(wallet_delta) session.commit() @@ -72,14 +74,14 @@ class TestWalletDeltaInterface: def test_latest_block_number(self, session): """Testing retrevial of wallet info via interface""" - wallet_delta_1 = WalletDelta(blockNumber=1, transactionHash="a", delta=3.0) # add your other columns here... + wallet_delta_1 = WalletDelta(blockNumber=1, transactionHash="a", delta=Decimal("3.0")) postgres.add_wallet_deltas([wallet_delta_1], session) latest_block_number = postgres.get_latest_block_number_from_table(WalletDelta, session) assert latest_block_number == 1 - wallet_delta_2 = WalletDelta(blockNumber=2, transactionHash="a", delta=3.2) # add your other columns here... - wallet_delta_3 = WalletDelta(blockNumber=3, transactionHash="a", delta=3.4) # add your other columns here... + wallet_delta_2 = WalletDelta(blockNumber=2, transactionHash="a", delta=Decimal("3.2")) + wallet_delta_3 = WalletDelta(blockNumber=3, transactionHash="a", delta=Decimal("3.4")) postgres.add_wallet_deltas([wallet_delta_2, wallet_delta_3], session) latest_block_number = postgres.get_latest_block_number_from_table(WalletDelta, session) @@ -87,9 +89,9 @@ def test_latest_block_number(self, session): def test_get_wallet_delta(self, session): """Testing retrevial of walletinfo via interface""" - wallet_delta_1 = WalletDelta(blockNumber=0, transactionHash="a", delta=3.1) # add your other columns here... - wallet_delta_2 = WalletDelta(blockNumber=1, transactionHash="a", delta=3.2) # add your other columns here... - wallet_delta_3 = WalletDelta(blockNumber=2, transactionHash="a", delta=3.3) # add your other columns here... + wallet_delta_1 = WalletDelta(blockNumber=0, transactionHash="a", delta=Decimal("3.1")) + wallet_delta_2 = WalletDelta(blockNumber=1, transactionHash="a", delta=Decimal("3.2")) + wallet_delta_3 = WalletDelta(blockNumber=2, transactionHash="a", delta=Decimal("3.3")) postgres.add_wallet_deltas([wallet_delta_1, wallet_delta_2, wallet_delta_3], session) wallet_delta_df = postgres.get_wallet_deltas(session) @@ -97,9 +99,9 @@ def test_get_wallet_delta(self, session): def test_block_query_wallet_delta(self, session): """Testing querying by block number of wallet info via interface""" - wallet_delta_1 = WalletDelta(blockNumber=0, transactionHash="a", delta=3.1) # add your other columns here... - wallet_delta_2 = WalletDelta(blockNumber=1, transactionHash="a", delta=3.2) # add your other columns here... - wallet_delta_3 = WalletDelta(blockNumber=2, transactionHash="a", delta=3.3) # add your other columns here... + wallet_delta_1 = WalletDelta(blockNumber=0, transactionHash="a", delta=Decimal("3.1")) + wallet_delta_2 = WalletDelta(blockNumber=1, transactionHash="a", delta=Decimal("3.2")) + wallet_delta_3 = WalletDelta(blockNumber=2, transactionHash="a", delta=Decimal("3.3")) postgres.add_wallet_deltas([wallet_delta_1, wallet_delta_2, wallet_delta_3], session) wallet_delta_df = postgres.get_wallet_deltas(session, start_block=1) diff --git a/src/data/tests/test_wallet_info.py b/src/data/tests/test_wallet_info.py index a5cecab625..86e6573a33 100644 --- a/src/data/tests/test_wallet_info.py +++ b/src/data/tests/test_wallet_info.py @@ -1,4 +1,6 @@ """CRUD tests for WalletInfo""" +from decimal import Decimal + import numpy as np import pytest from sqlalchemy import create_engine @@ -32,7 +34,7 @@ def test_create_wallet_info(self, session): # Note: this test is using inmemory sqlite, which doesn't seem to support # autoincrementing ids without init, whereas postgres does this with no issues # Hence, we explicitly add id here - wallet_info = WalletInfo(blockNumber=1, tokenValue=3.2) # add your other columns here... + wallet_info = WalletInfo(blockNumber=1, tokenValue=Decimal("3.2")) session.add(wallet_info) session.commit() @@ -43,11 +45,11 @@ def test_create_wallet_info(self, session): def test_update_wallet_info(self, session): """Update an entry""" - wallet_info = WalletInfo(blockNumber=1, tokenValue=3.2) + wallet_info = WalletInfo(blockNumber=1, tokenValue=Decimal("3.2")) session.add(wallet_info) session.commit() - wallet_info.tokenValue = 5.0 + wallet_info.tokenValue = Decimal("5.0") session.commit() updated_wallet_info = session.query(WalletInfo).filter_by(blockNumber=1).first() @@ -56,7 +58,7 @@ def test_update_wallet_info(self, session): def test_delete_wallet_info(self, session): """Delete an entry""" - wallet_info = WalletInfo(blockNumber=1, tokenValue=3.2) + wallet_info = WalletInfo(blockNumber=1, tokenValue=Decimal("3.2")) session.add(wallet_info) session.commit() @@ -72,14 +74,14 @@ class TestWalletInfoInterface: def test_latest_block_number(self, session): """Testing retrevial of wallet info via interface""" - wallet_info_1 = WalletInfo(blockNumber=1, tokenValue=3.0) # add your other columns here... + wallet_info_1 = WalletInfo(blockNumber=1, tokenValue=Decimal("3.0")) postgres.add_wallet_infos([wallet_info_1], session) latest_block_number = postgres.get_latest_block_number_from_table(WalletInfo, session) assert latest_block_number == 1 - wallet_info_2 = WalletInfo(blockNumber=2, tokenValue=3.2) # add your other columns here... - wallet_info_3 = WalletInfo(blockNumber=3, tokenValue=3.4) # add your other columns here... + wallet_info_2 = WalletInfo(blockNumber=2, tokenValue=Decimal("3.2")) + wallet_info_3 = WalletInfo(blockNumber=3, tokenValue=Decimal("3.4")) postgres.add_wallet_infos([wallet_info_2, wallet_info_3], session) latest_block_number = postgres.get_latest_block_number_from_table(WalletInfo, session) @@ -87,9 +89,9 @@ def test_latest_block_number(self, session): def test_get_wallet_info(self, session): """Testing retrevial of walletinfo via interface""" - wallet_info_1 = WalletInfo(blockNumber=0, tokenValue=3.1) # add your other columns here... - wallet_info_2 = WalletInfo(blockNumber=1, tokenValue=3.2) # add your other columns here... - wallet_info_3 = WalletInfo(blockNumber=2, tokenValue=3.3) # add your other columns here... + wallet_info_1 = WalletInfo(blockNumber=0, tokenValue=Decimal("3.1")) + wallet_info_2 = WalletInfo(blockNumber=1, tokenValue=Decimal("3.2")) + wallet_info_3 = WalletInfo(blockNumber=2, tokenValue=Decimal("3.3")) postgres.add_wallet_infos([wallet_info_1, wallet_info_2, wallet_info_3], session) wallet_info_df = postgres.get_all_wallet_info(session) @@ -97,9 +99,9 @@ def test_get_wallet_info(self, session): def test_block_query_wallet_info(self, session): """Testing querying by block number of wallet info via interface""" - wallet_info_1 = WalletInfo(blockNumber=0, tokenValue=3.1) # add your other columns here... - wallet_info_2 = WalletInfo(blockNumber=1, tokenValue=3.2) # add your other columns here... - wallet_info_3 = WalletInfo(blockNumber=2, tokenValue=3.3) # add your other columns here... + wallet_info_1 = WalletInfo(blockNumber=0, tokenValue=Decimal("3.1")) + wallet_info_2 = WalletInfo(blockNumber=1, tokenValue=Decimal("3.2")) + wallet_info_3 = WalletInfo(blockNumber=2, tokenValue=Decimal("3.3")) postgres.add_wallet_infos([wallet_info_1, wallet_info_2, wallet_info_3], session) wallet_info_df = postgres.get_all_wallet_info(session, start_block=1) @@ -119,12 +121,8 @@ def test_block_query_wallet_info(self, session): def test_current_wallet_info(self, session): """Testing helper function to get current wallet values""" - wallet_info_1 = WalletInfo( - blockNumber=0, walletAddress="addr", tokenType="BASE", tokenValue=3.1 - ) # add your other columns here... - wallet_info_2 = WalletInfo( - blockNumber=1, walletAddress="addr", tokenType="LP", tokenValue=5.1 - ) # add your other columns here... + wallet_info_1 = WalletInfo(blockNumber=0, walletAddress="addr", tokenType="BASE", tokenValue=Decimal("3.1")) + wallet_info_2 = WalletInfo(blockNumber=1, walletAddress="addr", tokenType="LP", tokenValue=Decimal("5.1")) postgres.add_wallet_infos([wallet_info_1, wallet_info_2], session) wallet_info_df = postgres.get_current_wallet_info(session).reset_index() @@ -132,9 +130,7 @@ def test_current_wallet_info(self, session): np.testing.assert_array_equal(wallet_info_df["tokenValue"], [3.1, 5.1]) # E.g., block 2, wallet base tokens gets updated to 6.1 - wallet_info_3 = WalletInfo( - blockNumber=2, walletAddress="addr", tokenType="BASE", tokenValue=6.1 - ) # add your other columns here... + wallet_info_3 = WalletInfo(blockNumber=2, walletAddress="addr", tokenType="BASE", tokenValue=Decimal("6.1")) postgres.add_wallet_infos([wallet_info_3], session) wallet_info_df = postgres.get_current_wallet_info(session).reset_index() np.testing.assert_array_equal(wallet_info_df["tokenType"], ["BASE", "LP"]) @@ -142,9 +138,9 @@ def test_current_wallet_info(self, session): def test_get_agents(self, session): """Testing helper function to get current wallet values""" - wallet_info_1 = WalletInfo(blockNumber=0, walletAddress="addr_1") # add your other columns here... - wallet_info_2 = WalletInfo(blockNumber=1, walletAddress="addr_1") # add your other columns here... - wallet_info_3 = WalletInfo(blockNumber=2, walletAddress="addr_2") # add your other columns here... + wallet_info_1 = WalletInfo(blockNumber=0, walletAddress="addr_1") + wallet_info_2 = WalletInfo(blockNumber=1, walletAddress="addr_1") + wallet_info_3 = WalletInfo(blockNumber=2, walletAddress="addr_2") postgres.add_wallet_infos([wallet_info_1, wallet_info_2, wallet_info_3], session) agents = postgres.get_agents(session)