├── .gitattributes
├── .github
├── dependabot.yml
└── workflows
│ ├── release.yml
│ └── test-contracts.yml
├── .gitignore
├── .gitlab-ci.yml
├── .nvmrc
├── .prettierignore
├── .prettierrc.json
├── .vscode
└── settings.json
├── DEPLOY.md
├── LICENSE
├── PUBLISH_SDK.md
├── README.md
├── api-documenter.json
├── api-extractor.base.json
├── client
└── src
│ └── contracts
│ ├── ActivePool.json
│ ├── CDPManager.json
│ ├── CLVToken.json
│ ├── CLVTokenData.json
│ ├── Context.json
│ ├── DeciMath.json
│ ├── DefaultPool.json
│ ├── ERC20.json
│ ├── FunctionCaller.json
│ ├── ICDPManager.json
│ ├── ICLVToken.json
│ ├── IERC20.json
│ ├── IPool.json
│ ├── IPoolManager.json
│ ├── IPriceFeed.json
│ ├── ISortedCDPs.json
│ ├── IStabilityPool.json
│ ├── Migrations.json
│ ├── NameRegistry.json
│ ├── Ownable.json
│ ├── PoolManager.json
│ ├── PriceFeed.json
│ ├── SafeMath.json
│ ├── SortedCDPs.json
│ ├── StabilityPool.json
│ └── console.json
├── deployFlow.md
├── dev-chain
├── node.conf
├── spec.json
└── start.js
├── docs
└── sdk
│ ├── index.md
│ ├── lib-base.collateralgaintransferdetails.md
│ ├── lib-base.collateralgaintransferdetails.newtrove.md
│ ├── lib-base.critical_collateral_ratio.md
│ ├── lib-base.decimal.add.md
│ ├── lib-base.decimal.div.md
│ ├── lib-base.decimal.eq.md
│ ├── lib-base.decimal.finite.md
│ ├── lib-base.decimal.from.md
│ ├── lib-base.decimal.frombignumberstring.md
│ ├── lib-base.decimal.gt.md
│ ├── lib-base.decimal.gte.md
│ ├── lib-base.decimal.half.md
│ ├── lib-base.decimal.infinite.md
│ ├── lib-base.decimal.infinity.md
│ ├── lib-base.decimal.iszero.md
│ ├── lib-base.decimal.lt.md
│ ├── lib-base.decimal.lte.md
│ ├── lib-base.decimal.max.md
│ ├── lib-base.decimal.md
│ ├── lib-base.decimal.min.md
│ ├── lib-base.decimal.mul.md
│ ├── lib-base.decimal.muldiv.md
│ ├── lib-base.decimal.nonzero.md
│ ├── lib-base.decimal.one.md
│ ├── lib-base.decimal.pow.md
│ ├── lib-base.decimal.prettify.md
│ ├── lib-base.decimal.shorten.md
│ ├── lib-base.decimal.sub.md
│ ├── lib-base.decimal.tostring.md
│ ├── lib-base.decimal.zero.md
│ ├── lib-base.decimalish.md
│ ├── lib-base.failedreceipt.md
│ ├── lib-base.fees.borrowingrate.md
│ ├── lib-base.fees.equals.md
│ ├── lib-base.fees.md
│ ├── lib-base.fees.redemptionrate.md
│ ├── lib-base.frontendstatus.md
│ ├── lib-base.liquidationdetails.collateralgascompensation.md
│ ├── lib-base.liquidationdetails.liquidatedaddresses.md
│ ├── lib-base.liquidationdetails.md
│ ├── lib-base.liquidationdetails.totalliquidated.md
│ ├── lib-base.liquidationdetails.zusdgascompensation.md
│ ├── lib-base.liquityreceipt.md
│ ├── lib-base.liquitystore.logging.md
│ ├── lib-base.liquitystore.md
│ ├── lib-base.liquitystore.onloaded.md
│ ├── lib-base.liquitystore.start.md
│ ├── lib-base.liquitystore.state.md
│ ├── lib-base.liquitystore.subscribe.md
│ ├── lib-base.liquitystorebasestate.accountbalance.md
│ ├── lib-base.liquitystorebasestate.collateralsurplusbalance.md
│ ├── lib-base.liquitystorebasestate.frontend.md
│ ├── lib-base.liquitystorebasestate.md
│ ├── lib-base.liquitystorebasestate.nuebalance.md
│ ├── lib-base.liquitystorebasestate.numberoftroves.md
│ ├── lib-base.liquitystorebasestate.ownfrontend.md
│ ├── lib-base.liquitystorebasestate.price.md
│ ├── lib-base.liquitystorebasestate.remainingstabilitypoolzeroreward.md
│ ├── lib-base.liquitystorebasestate.stabilitydeposit.md
│ ├── lib-base.liquitystorebasestate.total.md
│ ├── lib-base.liquitystorebasestate.totalredistributed.md
│ ├── lib-base.liquitystorebasestate.totalstakedzero.md
│ ├── lib-base.liquitystorebasestate.trovebeforeredistribution.md
│ ├── lib-base.liquitystorebasestate.zerobalance.md
│ ├── lib-base.liquitystorebasestate.zerostake.md
│ ├── lib-base.liquitystorebasestate.zusdbalance.md
│ ├── lib-base.liquitystorebasestate.zusdinstabilitypool.md
│ ├── lib-base.liquitystorederivedstate.borrowingrate.md
│ ├── lib-base.liquitystorederivedstate.fees.md
│ ├── lib-base.liquitystorederivedstate.haveundercollateralizedtroves.md
│ ├── lib-base.liquitystorederivedstate.md
│ ├── lib-base.liquitystorederivedstate.redemptionrate.md
│ ├── lib-base.liquitystorederivedstate.trove.md
│ ├── lib-base.liquitystorelistenerparams.md
│ ├── lib-base.liquitystorelistenerparams.newstate.md
│ ├── lib-base.liquitystorelistenerparams.oldstate.md
│ ├── lib-base.liquitystorelistenerparams.statechange.md
│ ├── lib-base.liquitystorestate.md
│ ├── lib-base.maximum_borrowing_rate.md
│ ├── lib-base.md
│ ├── lib-base.minedreceipt.md
│ ├── lib-base.minimum_borrowing_rate.md
│ ├── lib-base.minimum_collateral_ratio.md
│ ├── lib-base.minimum_redemption_rate.md
│ ├── lib-base.pendingreceipt.md
│ ├── lib-base.populatableliquity.adjusttrove.md
│ ├── lib-base.populatableliquity.borrowzusd.md
│ ├── lib-base.populatableliquity.claimcollateralsurplus.md
│ ├── lib-base.populatableliquity.closetrove.md
│ ├── lib-base.populatableliquity.depositcollateral.md
│ ├── lib-base.populatableliquity.depositzusdinstabilitypool.md
│ ├── lib-base.populatableliquity.liquidate.md
│ ├── lib-base.populatableliquity.liquidateupto.md
│ ├── lib-base.populatableliquity.md
│ ├── lib-base.populatableliquity.opentrove.md
│ ├── lib-base.populatableliquity.redeemzusd.md
│ ├── lib-base.populatableliquity.registerfrontend.md
│ ├── lib-base.populatableliquity.repayzusd.md
│ ├── lib-base.populatableliquity.sendzero.md
│ ├── lib-base.populatableliquity.sendzusd.md
│ ├── lib-base.populatableliquity.stakezero.md
│ ├── lib-base.populatableliquity.transfercollateralgaintotrove.md
│ ├── lib-base.populatableliquity.unstakezero.md
│ ├── lib-base.populatableliquity.withdrawcollateral.md
│ ├── lib-base.populatableliquity.withdrawgainsfromstabilitypool.md
│ ├── lib-base.populatableliquity.withdrawgainsfromstaking.md
│ ├── lib-base.populatableliquity.withdrawzusdfromstabilitypool.md
│ ├── lib-base.populatedliquitytransaction.md
│ ├── lib-base.populatedliquitytransaction.rawpopulatedtransaction.md
│ ├── lib-base.populatedliquitytransaction.send.md
│ ├── lib-base.populatedredemption.attemptedzusdamount.md
│ ├── lib-base.populatedredemption.increaseamountbyminimumnetdebt.md
│ ├── lib-base.populatedredemption.istruncated.md
│ ├── lib-base.populatedredemption.md
│ ├── lib-base.populatedredemption.redeemablezusdamount.md
│ ├── lib-base.readableliquity.getcollateralsurplusbalance.md
│ ├── lib-base.readableliquity.getfees.md
│ ├── lib-base.readableliquity.getfrontendstatus.md
│ ├── lib-base.readableliquity.getnumberoftroves.md
│ ├── lib-base.readableliquity.getprice.md
│ ├── lib-base.readableliquity.getremainingstabilitypoolzeroreward.md
│ ├── lib-base.readableliquity.getstabilitydeposit.md
│ ├── lib-base.readableliquity.gettotal.md
│ ├── lib-base.readableliquity.gettotalredistributed.md
│ ├── lib-base.readableliquity.gettotalstakedzero.md
│ ├── lib-base.readableliquity.gettrove.md
│ ├── lib-base.readableliquity.gettrovebeforeredistribution.md
│ ├── lib-base.readableliquity.gettroves_1.md
│ ├── lib-base.readableliquity.getzerobalance.md
│ ├── lib-base.readableliquity.getzerostake.md
│ ├── lib-base.readableliquity.getzusdbalance.md
│ ├── lib-base.readableliquity.getzusdinstabilitypool.md
│ ├── lib-base.readableliquity.md
│ ├── lib-base.redemptiondetails.actualzusdamount.md
│ ├── lib-base.redemptiondetails.attemptedzusdamount.md
│ ├── lib-base.redemptiondetails.collateraltaken.md
│ ├── lib-base.redemptiondetails.fee.md
│ ├── lib-base.redemptiondetails.md
│ ├── lib-base.sendableliquity.adjusttrove.md
│ ├── lib-base.sendableliquity.borrowzusd.md
│ ├── lib-base.sendableliquity.claimcollateralsurplus.md
│ ├── lib-base.sendableliquity.closetrove.md
│ ├── lib-base.sendableliquity.depositcollateral.md
│ ├── lib-base.sendableliquity.depositzusdinstabilitypool.md
│ ├── lib-base.sendableliquity.liquidate.md
│ ├── lib-base.sendableliquity.liquidateupto.md
│ ├── lib-base.sendableliquity.md
│ ├── lib-base.sendableliquity.opentrove.md
│ ├── lib-base.sendableliquity.redeemzusd.md
│ ├── lib-base.sendableliquity.registerfrontend.md
│ ├── lib-base.sendableliquity.repayzusd.md
│ ├── lib-base.sendableliquity.sendzero.md
│ ├── lib-base.sendableliquity.sendzusd.md
│ ├── lib-base.sendableliquity.stakezero.md
│ ├── lib-base.sendableliquity.transfercollateralgaintotrove.md
│ ├── lib-base.sendableliquity.unstakezero.md
│ ├── lib-base.sendableliquity.withdrawcollateral.md
│ ├── lib-base.sendableliquity.withdrawgainsfromstabilitypool.md
│ ├── lib-base.sendableliquity.withdrawgainsfromstaking.md
│ ├── lib-base.sendableliquity.withdrawzusdfromstabilitypool.md
│ ├── lib-base.sentliquitytransaction.getreceipt.md
│ ├── lib-base.sentliquitytransaction.md
│ ├── lib-base.sentliquitytransaction.rawsenttransaction.md
│ ├── lib-base.sentliquitytransaction.waitforreceipt.md
│ ├── lib-base.stabilitydeposit.apply.md
│ ├── lib-base.stabilitydeposit.collateralgain.md
│ ├── lib-base.stabilitydeposit.currentzusd.md
│ ├── lib-base.stabilitydeposit.equals.md
│ ├── lib-base.stabilitydeposit.frontendtag.md
│ ├── lib-base.stabilitydeposit.initialzusd.md
│ ├── lib-base.stabilitydeposit.isempty.md
│ ├── lib-base.stabilitydeposit.md
│ ├── lib-base.stabilitydeposit.whatchanged.md
│ ├── lib-base.stabilitydeposit.zeroreward.md
│ ├── lib-base.stabilitydepositchange.md
│ ├── lib-base.stabilitydepositchangedetails.change.md
│ ├── lib-base.stabilitydepositchangedetails.md
│ ├── lib-base.stabilitypoolgainswithdrawaldetails.collateralgain.md
│ ├── lib-base.stabilitypoolgainswithdrawaldetails.md
│ ├── lib-base.stabilitypoolgainswithdrawaldetails.newzusddeposit.md
│ ├── lib-base.stabilitypoolgainswithdrawaldetails.zeroreward.md
│ ├── lib-base.stabilitypoolgainswithdrawaldetails.zusdloss.md
│ ├── lib-base.successfulreceipt.md
│ ├── lib-base.transactableliquity.adjusttrove.md
│ ├── lib-base.transactableliquity.borrowzusd.md
│ ├── lib-base.transactableliquity.claimcollateralsurplus.md
│ ├── lib-base.transactableliquity.closetrove.md
│ ├── lib-base.transactableliquity.depositcollateral.md
│ ├── lib-base.transactableliquity.depositzusdinstabilitypool.md
│ ├── lib-base.transactableliquity.liquidate.md
│ ├── lib-base.transactableliquity.liquidateupto.md
│ ├── lib-base.transactableliquity.md
│ ├── lib-base.transactableliquity.opentrove.md
│ ├── lib-base.transactableliquity.redeemzusd.md
│ ├── lib-base.transactableliquity.registerfrontend.md
│ ├── lib-base.transactableliquity.repayzusd.md
│ ├── lib-base.transactableliquity.sendzero.md
│ ├── lib-base.transactableliquity.sendzusd.md
│ ├── lib-base.transactableliquity.stakezero.md
│ ├── lib-base.transactableliquity.transfercollateralgaintotrove.md
│ ├── lib-base.transactableliquity.unstakezero.md
│ ├── lib-base.transactableliquity.withdrawcollateral.md
│ ├── lib-base.transactableliquity.withdrawgainsfromstabilitypool.md
│ ├── lib-base.transactableliquity.withdrawgainsfromstaking.md
│ ├── lib-base.transactableliquity.withdrawzusdfromstabilitypool.md
│ ├── lib-base.transactionfailederror.failedreceipt.md
│ ├── lib-base.transactionfailederror.md
│ ├── lib-base.trove.add.md
│ ├── lib-base.trove.addcollateral.md
│ ├── lib-base.trove.adddebt.md
│ ├── lib-base.trove.adjust.md
│ ├── lib-base.trove.adjustto.md
│ ├── lib-base.trove.apply.md
│ ├── lib-base.trove.collateral.md
│ ├── lib-base.trove.collateralratio.md
│ ├── lib-base.trove.collateralratioisbelowcritical.md
│ ├── lib-base.trove.collateralratioisbelowminimum.md
│ ├── lib-base.trove.create.md
│ ├── lib-base.trove.debt.md
│ ├── lib-base.trove.equals.md
│ ├── lib-base.trove.isempty.md
│ ├── lib-base.trove.isopenableinrecoverymode.md
│ ├── lib-base.trove.md
│ ├── lib-base.trove.multiply.md
│ ├── lib-base.trove.netdebt.md
│ ├── lib-base.trove.recreate.md
│ ├── lib-base.trove.setcollateral.md
│ ├── lib-base.trove.setdebt.md
│ ├── lib-base.trove.subtract.md
│ ├── lib-base.trove.subtractcollateral.md
│ ├── lib-base.trove.subtractdebt.md
│ ├── lib-base.trove.whatchanged.md
│ ├── lib-base.troveadjustmentdetails.fee.md
│ ├── lib-base.troveadjustmentdetails.md
│ ├── lib-base.troveadjustmentdetails.newtrove.md
│ ├── lib-base.troveadjustmentdetails.params.md
│ ├── lib-base.troveadjustmentparams.md
│ ├── lib-base.trovechange.md
│ ├── lib-base.troveclosuredetails.md
│ ├── lib-base.troveclosuredetails.params.md
│ ├── lib-base.troveclosureparams.md
│ ├── lib-base.trovecreationdetails.fee.md
│ ├── lib-base.trovecreationdetails.md
│ ├── lib-base.trovecreationdetails.newtrove.md
│ ├── lib-base.trovecreationdetails.params.md
│ ├── lib-base.trovecreationerror.md
│ ├── lib-base.trovecreationparams.md
│ ├── lib-base.trovelistingparams.beforeredistribution.md
│ ├── lib-base.trovelistingparams.first.md
│ ├── lib-base.trovelistingparams.md
│ ├── lib-base.trovelistingparams.sortedby.md
│ ├── lib-base.trovelistingparams.startingat.md
│ ├── lib-base.trovewithpendingredistribution.applyredistribution.md
│ ├── lib-base.trovewithpendingredistribution.equals.md
│ ├── lib-base.trovewithpendingredistribution.md
│ ├── lib-base.usertrove.equals.md
│ ├── lib-base.usertrove.md
│ ├── lib-base.usertrove.owneraddress.md
│ ├── lib-base.usertrove.status.md
│ ├── lib-base.usertrovestatus.md
│ ├── lib-base.zerostake.apply.md
│ ├── lib-base.zerostake.collateralgain.md
│ ├── lib-base.zerostake.equals.md
│ ├── lib-base.zerostake.isempty.md
│ ├── lib-base.zerostake.md
│ ├── lib-base.zerostake.stakedzero.md
│ ├── lib-base.zerostake.whatchanged.md
│ ├── lib-base.zerostake.zusdgain.md
│ ├── lib-base.zerostakechange.md
│ ├── lib-base.zusd_liquidation_reserve.md
│ ├── lib-base.zusd_minimum_debt.md
│ ├── lib-base.zusd_minimum_net_debt.md
│ ├── lib-ethers.blockpolledliquitystore._constructor_.md
│ ├── lib-ethers.blockpolledliquitystore.connection.md
│ ├── lib-ethers.blockpolledliquitystore.md
│ ├── lib-ethers.blockpolledliquitystoreextrastate.blocktag.md
│ ├── lib-ethers.blockpolledliquitystoreextrastate.blocktimestamp.md
│ ├── lib-ethers.blockpolledliquitystoreextrastate.md
│ ├── lib-ethers.blockpolledliquitystorestate.md
│ ├── lib-ethers.etherscalloverrides.blocktag.md
│ ├── lib-ethers.etherscalloverrides.md
│ ├── lib-ethers.ethersliquity.adjustnuetrove.md
│ ├── lib-ethers.ethersliquity.adjusttrove.md
│ ├── lib-ethers.ethersliquity.borrowzusd.md
│ ├── lib-ethers.ethersliquity.claimcollateralsurplus.md
│ ├── lib-ethers.ethersliquity.closenuetrove.md
│ ├── lib-ethers.ethersliquity.closetrove.md
│ ├── lib-ethers.ethersliquity.connect_1.md
│ ├── lib-ethers.ethersliquity.connection.md
│ ├── lib-ethers.ethersliquity.depositcollateral.md
│ ├── lib-ethers.ethersliquity.depositzusdinstabilitypool.md
│ ├── lib-ethers.ethersliquity.getcollateralsurplusbalance.md
│ ├── lib-ethers.ethersliquity.getfees.md
│ ├── lib-ethers.ethersliquity.getfrontendstatus.md
│ ├── lib-ethers.ethersliquity.getnumberoftroves.md
│ ├── lib-ethers.ethersliquity.getprice.md
│ ├── lib-ethers.ethersliquity.getremainingstabilitypoolzeroreward.md
│ ├── lib-ethers.ethersliquity.getstabilitydeposit.md
│ ├── lib-ethers.ethersliquity.gettotal.md
│ ├── lib-ethers.ethersliquity.gettotalredistributed.md
│ ├── lib-ethers.ethersliquity.gettotalstakedzero.md
│ ├── lib-ethers.ethersliquity.gettrove.md
│ ├── lib-ethers.ethersliquity.gettrovebeforeredistribution.md
│ ├── lib-ethers.ethersliquity.gettroves_1.md
│ ├── lib-ethers.ethersliquity.getzerobalance.md
│ ├── lib-ethers.ethersliquity.getzerostake.md
│ ├── lib-ethers.ethersliquity.getzusdbalance.md
│ ├── lib-ethers.ethersliquity.getzusdinstabilitypool.md
│ ├── lib-ethers.ethersliquity.hasstore.md
│ ├── lib-ethers.ethersliquity.hasstore_1.md
│ ├── lib-ethers.ethersliquity.liquidate.md
│ ├── lib-ethers.ethersliquity.liquidateupto.md
│ ├── lib-ethers.ethersliquity.md
│ ├── lib-ethers.ethersliquity.opennuetrove.md
│ ├── lib-ethers.ethersliquity.opentrove.md
│ ├── lib-ethers.ethersliquity.populate.md
│ ├── lib-ethers.ethersliquity.providetospfromdllr.md
│ ├── lib-ethers.ethersliquity.redeemcollateralviadllr.md
│ ├── lib-ethers.ethersliquity.redeemzusd.md
│ ├── lib-ethers.ethersliquity.registerfrontend.md
│ ├── lib-ethers.ethersliquity.repayzusd.md
│ ├── lib-ethers.ethersliquity.repayzusdfromdllr.md
│ ├── lib-ethers.ethersliquity.send.md
│ ├── lib-ethers.ethersliquity.sendzero.md
│ ├── lib-ethers.ethersliquity.sendzusd.md
│ ├── lib-ethers.ethersliquity.stakezero.md
│ ├── lib-ethers.ethersliquity.transfercollateralgaintotrove.md
│ ├── lib-ethers.ethersliquity.unstakezero.md
│ ├── lib-ethers.ethersliquity.withdrawcollateral.md
│ ├── lib-ethers.ethersliquity.withdrawfromspandconverttodllr.md
│ ├── lib-ethers.ethersliquity.withdrawgainsfromstabilitypool.md
│ ├── lib-ethers.ethersliquity.withdrawgainsfromstaking.md
│ ├── lib-ethers.ethersliquity.withdrawzusdandconverttodllr.md
│ ├── lib-ethers.ethersliquity.withdrawzusdfromstabilitypool.md
│ ├── lib-ethers.ethersliquityconnection.addresses.md
│ ├── lib-ethers.ethersliquityconnection.bootstrapperiod.md
│ ├── lib-ethers.ethersliquityconnection.chainid.md
│ ├── lib-ethers.ethersliquityconnection.deploymentdate.md
│ ├── lib-ethers.ethersliquityconnection.md
│ ├── lib-ethers.ethersliquityconnection.provider.md
│ ├── lib-ethers.ethersliquityconnection.signer.md
│ ├── lib-ethers.ethersliquityconnection.startblock.md
│ ├── lib-ethers.ethersliquityconnection.version.md
│ ├── lib-ethers.ethersliquityconnectionoptionalparams.frontendtag.md
│ ├── lib-ethers.ethersliquityconnectionoptionalparams.md
│ ├── lib-ethers.ethersliquityconnectionoptionalparams.useraddress.md
│ ├── lib-ethers.ethersliquityconnectionoptionalparams.usestore.md
│ ├── lib-ethers.ethersliquitystoreoption.md
│ ├── lib-ethers.ethersliquitywithstore.md
│ ├── lib-ethers.ethersliquitywithstore.store.md
│ ├── lib-ethers.etherspopulatedtransaction.md
│ ├── lib-ethers.ethersprovider.md
│ ├── lib-ethers.etherssigner.md
│ ├── lib-ethers.etherstransactionfailederror._constructor_.md
│ ├── lib-ethers.etherstransactionfailederror.md
│ ├── lib-ethers.etherstransactionoverrides.from.md
│ ├── lib-ethers.etherstransactionoverrides.gaslimit.md
│ ├── lib-ethers.etherstransactionoverrides.gasprice.md
│ ├── lib-ethers.etherstransactionoverrides.md
│ ├── lib-ethers.etherstransactionoverrides.nonce.md
│ ├── lib-ethers.etherstransactionreceipt.md
│ ├── lib-ethers.etherstransactionresponse.md
│ ├── lib-ethers.md
│ ├── lib-ethers.permitparams.md
│ ├── lib-ethers.populatableethersliquity._constructor_.md
│ ├── lib-ethers.populatableethersliquity.adjustnuetrove.md
│ ├── lib-ethers.populatableethersliquity.adjusttrove.md
│ ├── lib-ethers.populatableethersliquity.borrowzusd.md
│ ├── lib-ethers.populatableethersliquity.claimcollateralsurplus.md
│ ├── lib-ethers.populatableethersliquity.closenuetrove.md
│ ├── lib-ethers.populatableethersliquity.closetrove.md
│ ├── lib-ethers.populatableethersliquity.depositcollateral.md
│ ├── lib-ethers.populatableethersliquity.depositzusdinstabilitypool.md
│ ├── lib-ethers.populatableethersliquity.liquidate.md
│ ├── lib-ethers.populatableethersliquity.liquidateupto.md
│ ├── lib-ethers.populatableethersliquity.md
│ ├── lib-ethers.populatableethersliquity.opennuetrove.md
│ ├── lib-ethers.populatableethersliquity.opentrove.md
│ ├── lib-ethers.populatableethersliquity.providetospfromdllr.md
│ ├── lib-ethers.populatableethersliquity.redeemcollateralviadllr.md
│ ├── lib-ethers.populatableethersliquity.redeemzusd.md
│ ├── lib-ethers.populatableethersliquity.registerfrontend.md
│ ├── lib-ethers.populatableethersliquity.repayzusd.md
│ ├── lib-ethers.populatableethersliquity.sendzero.md
│ ├── lib-ethers.populatableethersliquity.sendzusd.md
│ ├── lib-ethers.populatableethersliquity.stakezero.md
│ ├── lib-ethers.populatableethersliquity.transfercollateralgaintotrove.md
│ ├── lib-ethers.populatableethersliquity.unstakezero.md
│ ├── lib-ethers.populatableethersliquity.withdrawcollateral.md
│ ├── lib-ethers.populatableethersliquity.withdrawfromspandconverttodllr.md
│ ├── lib-ethers.populatableethersliquity.withdrawgainsfromstabilitypool.md
│ ├── lib-ethers.populatableethersliquity.withdrawgainsfromstaking.md
│ ├── lib-ethers.populatableethersliquity.withdrawzusdandconverttodllr.md
│ ├── lib-ethers.populatableethersliquity.withdrawzusdfromstabilitypool.md
│ ├── lib-ethers.populatedethersliquitytransaction.md
│ ├── lib-ethers.populatedethersliquitytransaction.rawpopulatedtransaction.md
│ ├── lib-ethers.populatedethersliquitytransaction.send.md
│ ├── lib-ethers.populatedethersredemption.attemptedzusdamount.md
│ ├── lib-ethers.populatedethersredemption.increaseamountbyminimumnetdebt.md
│ ├── lib-ethers.populatedethersredemption.istruncated.md
│ ├── lib-ethers.populatedethersredemption.md
│ ├── lib-ethers.populatedethersredemption.redeemablezusdamount.md
│ ├── lib-ethers.readableethersliquity.connect_1.md
│ ├── lib-ethers.readableethersliquity.connection.md
│ ├── lib-ethers.readableethersliquity.getcollateralsurplusbalance.md
│ ├── lib-ethers.readableethersliquity.getfees.md
│ ├── lib-ethers.readableethersliquity.getfrontendstatus.md
│ ├── lib-ethers.readableethersliquity.getnumberoftroves.md
│ ├── lib-ethers.readableethersliquity.getprice.md
│ ├── lib-ethers.readableethersliquity.getremainingstabilitypoolzeroreward.md
│ ├── lib-ethers.readableethersliquity.getstabilitydeposit.md
│ ├── lib-ethers.readableethersliquity.gettotal.md
│ ├── lib-ethers.readableethersliquity.gettotalredistributed.md
│ ├── lib-ethers.readableethersliquity.gettotalstakedzero.md
│ ├── lib-ethers.readableethersliquity.gettrove.md
│ ├── lib-ethers.readableethersliquity.gettrovebeforeredistribution.md
│ ├── lib-ethers.readableethersliquity.gettroves_1.md
│ ├── lib-ethers.readableethersliquity.getzerobalance.md
│ ├── lib-ethers.readableethersliquity.getzerostake.md
│ ├── lib-ethers.readableethersliquity.getzusdbalance.md
│ ├── lib-ethers.readableethersliquity.getzusdinstabilitypool.md
│ ├── lib-ethers.readableethersliquity.hasstore.md
│ ├── lib-ethers.readableethersliquity.hasstore_1.md
│ ├── lib-ethers.readableethersliquity.md
│ ├── lib-ethers.readableethersliquitywithstore.md
│ ├── lib-ethers.readableethersliquitywithstore.store.md
│ ├── lib-ethers.sendableethersliquity._constructor_.md
│ ├── lib-ethers.sendableethersliquity.adjustnuetrove.md
│ ├── lib-ethers.sendableethersliquity.adjusttrove.md
│ ├── lib-ethers.sendableethersliquity.borrowzusd.md
│ ├── lib-ethers.sendableethersliquity.claimcollateralsurplus.md
│ ├── lib-ethers.sendableethersliquity.closenuetrove.md
│ ├── lib-ethers.sendableethersliquity.closetrove.md
│ ├── lib-ethers.sendableethersliquity.depositcollateral.md
│ ├── lib-ethers.sendableethersliquity.depositzusdinstabilitypool.md
│ ├── lib-ethers.sendableethersliquity.liquidate.md
│ ├── lib-ethers.sendableethersliquity.liquidateupto.md
│ ├── lib-ethers.sendableethersliquity.md
│ ├── lib-ethers.sendableethersliquity.opennuetrove.md
│ ├── lib-ethers.sendableethersliquity.opentrove.md
│ ├── lib-ethers.sendableethersliquity.providetospfromdllr.md
│ ├── lib-ethers.sendableethersliquity.redeemcollateralviadllr.md
│ ├── lib-ethers.sendableethersliquity.redeemzusd.md
│ ├── lib-ethers.sendableethersliquity.registerfrontend.md
│ ├── lib-ethers.sendableethersliquity.repayzusd.md
│ ├── lib-ethers.sendableethersliquity.repayzusdfromdllr.md
│ ├── lib-ethers.sendableethersliquity.sendzero.md
│ ├── lib-ethers.sendableethersliquity.sendzusd.md
│ ├── lib-ethers.sendableethersliquity.stakezero.md
│ ├── lib-ethers.sendableethersliquity.transfercollateralgaintotrove.md
│ ├── lib-ethers.sendableethersliquity.unstakezero.md
│ ├── lib-ethers.sendableethersliquity.withdrawcollateral.md
│ ├── lib-ethers.sendableethersliquity.withdrawfromspandconverttodllr.md
│ ├── lib-ethers.sendableethersliquity.withdrawgainsfromstabilitypool.md
│ ├── lib-ethers.sendableethersliquity.withdrawgainsfromstaking.md
│ ├── lib-ethers.sendableethersliquity.withdrawzusdandconverttodllr.md
│ ├── lib-ethers.sendableethersliquity.withdrawzusdfromstabilitypool.md
│ ├── lib-ethers.sentethersliquitytransaction.getreceipt.md
│ ├── lib-ethers.sentethersliquitytransaction.md
│ ├── lib-ethers.sentethersliquitytransaction.rawsenttransaction.md
│ ├── lib-ethers.sentethersliquitytransaction.waitforreceipt.md
│ ├── lib-ethers.unsupportednetworkerror.chainid.md
│ └── lib-ethers.unsupportednetworkerror.md
├── filter-repo
├── .gitignore
├── 1-included-paths
├── 2-excluded-paths
├── push
└── run
├── images
├── ETH_flows.svg
├── LQTY_flows.svg
└── LUSD_flows.svg
├── package.json
├── package.public.json
├── packages
├── contracts
│ ├── .eslintignore
│ ├── .eslintrc.json
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .npmrc
│ ├── .prettierignore
│ ├── .prettierrc
│ ├── .solcover.js
│ ├── .solhint.json
│ ├── .solhintignore
│ ├── .vscode
│ │ └── launch.json
│ ├── LICENSE
│ ├── README.md
│ ├── bin
│ │ └── contracts
│ │ │ ├── CLVToken.abi
│ │ │ ├── CLVToken.bin
│ │ │ ├── CLVToken.json
│ │ │ └── Token-solc-output.json
│ ├── brownie-config.yaml
│ ├── contracts
│ │ ├── .vscode
│ │ │ └── settings.json
│ │ ├── ActivePool.sol
│ │ ├── ActivePoolStorage.sol
│ │ ├── BorrowerOperations.sol
│ │ ├── BorrowerOperationsStorage.sol
│ │ ├── CollSurplusPool.sol
│ │ ├── CollSurplusPoolStorage.sol
│ │ ├── DefaultPool.sol
│ │ ├── DefaultPoolStorage.sol
│ │ ├── Dependencies
│ │ │ ├── BaseMath.sol
│ │ │ ├── CheckContract.sol
│ │ │ ├── IERC20.sol
│ │ │ ├── IERC2612.sol
│ │ │ ├── Initializable.sol
│ │ │ ├── LiquityBase.sol
│ │ │ ├── LiquityMath.sol
│ │ │ ├── LiquitySafeMath128.sol
│ │ │ ├── Mynt
│ │ │ │ ├── IDLLR.sol
│ │ │ │ ├── IMassetManager.sol
│ │ │ │ └── MyntLib.sol
│ │ │ ├── Ownable.sol
│ │ │ ├── PriceFeed
│ │ │ │ ├── IExternalPriceFeed.sol
│ │ │ │ ├── MocMedianizer.sol
│ │ │ │ └── RskOracle.sol
│ │ │ ├── SafeMath.sol
│ │ │ ├── TroveManagerBase.sol
│ │ │ ├── TroveManagerRedeemOps.sol
│ │ │ └── console.sol
│ │ ├── FeeDistributor.sol
│ │ ├── FeeDistributorStorage.sol
│ │ ├── GasPool.sol
│ │ ├── HintHelpers.sol
│ │ ├── HintHelpersStorage.sol
│ │ ├── Interfaces
│ │ │ ├── IActivePool.sol
│ │ │ ├── IBalanceRedirectPresale.sol
│ │ │ ├── IBorrowerOperations.sol
│ │ │ ├── ICollSurplusPool.sol
│ │ │ ├── ICommunityIssuance.sol
│ │ │ ├── IDefaultPool.sol
│ │ │ ├── IFeeDistributor.sol
│ │ │ ├── IFeeSharingCollector.sol
│ │ │ ├── ILiquityBase.sol
│ │ │ ├── ILiquityBaseParams.sol
│ │ │ ├── IPool.sol
│ │ │ ├── IPriceFeed.sol
│ │ │ ├── ISortedTroves.sol
│ │ │ ├── IStabilityPool.sol
│ │ │ ├── ITroveManager.sol
│ │ │ ├── IWrbtc.sol
│ │ │ ├── IZEROStaking.sol
│ │ │ ├── IZEROToken.sol
│ │ │ └── IZUSDToken.sol
│ │ ├── LiquityBaseParams.sol
│ │ ├── MultiTroveGetter.sol
│ │ ├── MultiTroveGetterStorage.sol
│ │ ├── PriceFeed.sol
│ │ ├── PriceFeedStorage.sol
│ │ ├── Proxy
│ │ │ ├── BorrowerOperationsScript.sol
│ │ │ ├── BorrowerWrappersScript.sol
│ │ │ ├── ETHTransferScript.sol
│ │ │ ├── Proxy.sol
│ │ │ ├── StabilityPoolScript.sol
│ │ │ ├── TokenScript.sol
│ │ │ ├── TroveManagerScript.sol
│ │ │ ├── UpgradableProxy.sol
│ │ │ └── ZEROStakingScript.sol
│ │ ├── SortedTroves.sol
│ │ ├── SortedTrovesStorage.sol
│ │ ├── StabilityPool.sol
│ │ ├── StabilityPoolStorage.sol
│ │ ├── TestContracts
│ │ │ ├── ActivePoolTester.sol
│ │ │ ├── BorrowerOperationsTester.sol
│ │ │ ├── CommunityIssuanceTester.sol
│ │ │ ├── DappSys
│ │ │ │ └── proxy.sol
│ │ │ ├── DefaultPoolTester.sol
│ │ │ ├── Destructible.sol
│ │ │ ├── EchidnaProxy.sol
│ │ │ ├── EchidnaTester.sol
│ │ │ ├── ExternalPriceFeedTester.sol
│ │ │ ├── FunctionCaller.sol
│ │ │ ├── LiquityMathTester.sol
│ │ │ ├── LiquitySafeMath128Tester.sol
│ │ │ ├── MassetManagerTester.sol
│ │ │ ├── MockBalanceRedirectPresale.sol
│ │ │ ├── MockFeeSharingCollector.sol
│ │ │ ├── NonPayable.sol
│ │ │ ├── PriceFeedTester.sol
│ │ │ ├── PriceFeedTestnet.sol
│ │ │ ├── SortedTrovesTester.sol
│ │ │ ├── StabilityPoolTester.sol
│ │ │ ├── TroveManagerTester.sol
│ │ │ ├── UpgradableProxyTester.sol
│ │ │ ├── WRBTCTokenTester.sol
│ │ │ ├── ZEROStakingTester.sol
│ │ │ ├── ZEROTokenTester.sol
│ │ │ ├── ZUSDTokenCaller.sol
│ │ │ ├── ZUSDTokenTester.sol
│ │ │ └── ZUSDTokenTestnet.sol
│ │ ├── TroveManager.sol
│ │ ├── TroveManagerStorage.sol
│ │ ├── ZERO
│ │ │ ├── CommunityIssuance.sol
│ │ │ ├── CommunityIssuanceStorage.sol
│ │ │ ├── ZEROStaking.sol
│ │ │ ├── ZEROStakingStorage.sol
│ │ │ ├── ZEROToken.sol
│ │ │ └── ZEROTokenStorage.sol
│ │ ├── ZUSDToken.sol
│ │ └── ZUSDTokenStorage.sol
│ ├── deployment
│ │ ├── deploy
│ │ │ ├── 1-BorrowerOperations.ts
│ │ │ ├── 2-StabilityPool.ts
│ │ │ ├── 3-TroveManager.ts
│ │ │ ├── 4-TroveManagerRedeemOps.ts
│ │ │ └── 5-ZUSDToken.ts
│ │ └── deployments
│ │ │ ├── rskSovrynMainnet
│ │ │ ├── .chainId
│ │ │ ├── BorrowerOperations.json
│ │ │ ├── BorrowerOperations_Implementation.json
│ │ │ ├── BorrowerOperations_Proxy.json
│ │ │ ├── LiquityBaseParams.json
│ │ │ ├── LiquityBaseParams_Implementation__.json
│ │ │ ├── LiquityBaseParams_Proxy.json
│ │ │ ├── StabilityPool.json
│ │ │ ├── StabilityPool_Implementation.json
│ │ │ ├── StabilityPool_Proxy.json
│ │ │ ├── TroveManager.json
│ │ │ ├── TroveManagerRedeemOps.json
│ │ │ ├── TroveManager_Implementation.json
│ │ │ ├── TroveManager_Proxy.json
│ │ │ ├── ZUSDToken.json
│ │ │ ├── ZUSDToken_Implementation.json
│ │ │ ├── ZUSDToken_Proxy.json
│ │ │ └── solcInputs
│ │ │ │ └── bdf70867afcc9a7e6cfcfd428ec6f335.json
│ │ │ └── rskSovrynTestnet
│ │ │ ├── .chainId
│ │ │ ├── GovernorOwner.json
│ │ │ ├── LiquityBaseParams.json
│ │ │ ├── LiquityBaseParams_Implementation.json
│ │ │ └── LiquityBaseParams_Proxy.json
│ ├── docs
│ │ ├── ActivePool.md
│ │ ├── ActivePoolStorage.md
│ │ ├── BaseMath.md
│ │ ├── BorrowerOperations.md
│ │ ├── BorrowerOperationsScript.md
│ │ ├── BorrowerOperationsStorage.md
│ │ ├── BorrowerWrappersScript.md
│ │ ├── CheckContract.md
│ │ ├── CollSurplusPool.md
│ │ ├── CollSurplusPoolStorage.md
│ │ ├── Context.md
│ │ ├── DSAuth.md
│ │ ├── DSAuthEvents.md
│ │ ├── DSAuthority.md
│ │ ├── DSNote.md
│ │ ├── DSProxy.md
│ │ ├── DSProxyCache.md
│ │ ├── DSProxyFactory.md
│ │ ├── DefaultPool.md
│ │ ├── DefaultPoolStorage.md
│ │ ├── DocsCover.md
│ │ ├── ERC20.md
│ │ ├── ETHTransferScript.md
│ │ ├── FeeDistributor.md
│ │ ├── FeeDistributorStorage.md
│ │ ├── GasPool.md
│ │ ├── HintHelpers.md
│ │ ├── HintHelpersStorage.md
│ │ ├── IActivePool.md
│ │ ├── IBalanceRedirectPresale.md
│ │ ├── IBorrowerOperations.md
│ │ ├── ICollSurplusPool.md
│ │ ├── IDefaultPool.md
│ │ ├── IERC20.md
│ │ ├── IERC2612.md
│ │ ├── IExternalPriceFeed.md
│ │ ├── IFeeDistributor.md
│ │ ├── IFeeSharingProxy.md
│ │ ├── ILiquityBase.md
│ │ ├── ILiquityBaseParams.md
│ │ ├── IMasset.md
│ │ ├── IMoCBaseOracle.md
│ │ ├── IPool.md
│ │ ├── IPriceFeed.md
│ │ ├── IRSKOracle.md
│ │ ├── ISortedTroves.md
│ │ ├── IStabilityPool.md
│ │ ├── ITroveManager.md
│ │ ├── IWrbtc.md
│ │ ├── IZUSDToken.md
│ │ ├── Initializable.md
│ │ ├── LiquityBase.md
│ │ ├── LiquityBaseParams.md
│ │ ├── LiquityMath.md
│ │ ├── LiquitySafeMath128.md
│ │ ├── MoCMedianizer.md
│ │ ├── MultiTroveGetter.md
│ │ ├── MultiTroveGetterStorage.md
│ │ ├── NueToken.md
│ │ ├── Ownable.md
│ │ ├── PriceFeed.md
│ │ ├── PriceFeedStorage.md
│ │ ├── ProxiableContract.md
│ │ ├── ProxiableContract2.md
│ │ ├── Proxy.md
│ │ ├── RskOracle.md
│ │ ├── SafeMath.md
│ │ ├── SortedTroves.md
│ │ ├── SortedTrovesStorage.md
│ │ ├── StabilityPool.md
│ │ ├── StabilityPoolScript.md
│ │ ├── StabilityPoolStorage.md
│ │ ├── Storage.md
│ │ ├── Storage2.md
│ │ ├── TokenScript.md
│ │ ├── TroveManager.md
│ │ ├── TroveManagerBase.md
│ │ ├── TroveManagerBase1MinuteBootstrap.md
│ │ ├── TroveManagerRedeemOps.md
│ │ ├── TroveManagerScript.md
│ │ ├── TroveManagerStorage.md
│ │ ├── UpgradableProxy.md
│ │ ├── ZUSDToken.md
│ │ ├── ZUSDTokenStorage.md
│ │ └── console.md
│ ├── errorAccumulationTest
│ │ └── js
│ │ │ └── errorAccumulationTest.js
│ ├── eth-mutants-custom
│ │ ├── README.md
│ │ ├── index.js
│ │ ├── package.json
│ │ └── src
│ │ │ ├── commands.js
│ │ │ ├── config.js
│ │ │ ├── mutation.js
│ │ │ ├── mutators
│ │ │ ├── boolean.js
│ │ │ ├── conditional-boundary.js
│ │ │ ├── conditional-inversion.js
│ │ │ ├── index.js
│ │ │ ├── number-decrease.js
│ │ │ └── number-increase.js
│ │ │ └── reporter.js
│ ├── external
│ │ ├── artifacts
│ │ │ ├── ERC20.sol
│ │ │ │ └── ERC20.json
│ │ │ ├── GovernorAlpha.sol
│ │ │ │ ├── GovernorAlpha.dbg.json
│ │ │ │ └── GovernorAlpha.json
│ │ │ ├── IStaking.sol
│ │ │ │ ├── IStaking.dbg.json
│ │ │ │ └── IStaking.json
│ │ │ ├── MultiSigWallet.sol
│ │ │ │ └── MultiSigWallet.json
│ │ │ └── Timelock.sol
│ │ │ │ ├── Timelock.dbg.json
│ │ │ │ └── Timelock.json
│ │ └── deployments
│ │ │ └── rskMainnet
│ │ │ ├── GovernorAdmin.json
│ │ │ ├── GovernorOwner.json
│ │ │ ├── MassetManager.json
│ │ │ ├── MultiSigWallet.json
│ │ │ ├── SOV.json
│ │ │ ├── StakingModulesProxy.json
│ │ │ ├── StakingProxy.json
│ │ │ └── TimelockOwner.json
│ ├── fuzzTests
│ │ └── js
│ │ │ ├── PoolManager_AllDepositorsCanWithdrawTest.js
│ │ │ ├── echidna_config.yaml
│ │ │ └── echidna_debug.js
│ ├── gasTest
│ │ └── js
│ │ │ ├── gasCalc.js
│ │ │ ├── gasCalc_Math.js
│ │ │ ├── gasCalc_liquidateTroves.js
│ │ │ └── gasCalc_liquidateTroves_RecoveryMode.js
│ ├── hardhat.config.echidna.js
│ ├── hardhat.config.mainnet-fork.js
│ ├── hardhat.config.ts
│ ├── hardhatAccountsList100k.js
│ ├── hardhatAccountsList20.js
│ ├── hardhatAccountsList2k.js
│ ├── imports
│ │ ├── ERC20.json
│ │ ├── GovernorAlpha.json
│ │ ├── IStaking copy.json
│ │ ├── IStaking.json
│ │ ├── MultiSigWallet.json
│ │ ├── SOV.json
│ │ └── Timelock.json
│ ├── macroModel
│ │ └── macro_model.py
│ ├── migrations
│ │ ├── 1_initial_migration.js
│ │ ├── 2_deploy_contracts.js
│ │ └── deploy_contracts_buidler.js
│ ├── model
│ │ ├── model.py
│ │ └── model_v2.py
│ ├── package.dist.json
│ ├── package.json
│ ├── patches
│ │ └── hardhat+2.13.0.patch
│ ├── scripts
│ │ ├── helpers.ts
│ │ ├── set-version.js
│ │ └── utils.ts
│ ├── secrets.js.template
│ ├── slither.config.json
│ ├── solidoc.json
│ ├── tasks
│ │ ├── sips
│ │ │ ├── args
│ │ │ │ └── sipArgs.ts
│ │ │ └── createSIP.ts
│ │ └── transferOwnership.ts
│ ├── tests-onchain
│ │ ├── README.md
│ │ └── sips.test.ts
│ ├── tests-py
│ │ ├── accounts.py
│ │ ├── helpers.py
│ │ ├── simulation_helpers.py
│ │ └── simulation_test.py
│ ├── tests
│ │ ├── js
│ │ │ ├── AccessControlTest.js
│ │ │ ├── BorrowerOperationsTest.js
│ │ │ ├── CollSurplusPool.js
│ │ │ ├── ConnectContractsTest.js
│ │ │ ├── DefaultPoolTest.js
│ │ │ ├── FeeArithmeticTest.js
│ │ │ ├── GasCompensationTest.js
│ │ │ ├── GrowthTokenTest.js
│ │ │ ├── HintHelpers_getApproxHintTest.js
│ │ │ ├── LiquityMathTest.js
│ │ │ ├── LiquitySafeMath128Test.js
│ │ │ ├── OwnershipTest.js
│ │ │ ├── PoolsTest.js
│ │ │ ├── PriceFeedTest.js
│ │ │ ├── ProxyBorrowerWrappersScript.js
│ │ │ ├── SortedTrovesTest.js
│ │ │ ├── StabilityPoolTest.js
│ │ │ ├── StabilityPool_RoundingErrors.js
│ │ │ ├── StabilityPool_SPWithdrawalTest.js
│ │ │ ├── StabilityPool_SPWithdrawalToCDPTest.js
│ │ │ ├── StabilityPool_ZEROIssuanceTest.js
│ │ │ ├── TroveManagerTest.js
│ │ │ ├── TroveManager_LiquidationRewardsTest.js
│ │ │ ├── TroveManager_RecoveryModeTest.js
│ │ │ ├── UpgradableProxyTest.js
│ │ │ ├── ZEROIssuanceArithmeticTest.js
│ │ │ ├── ZEROStakingFeeRewardsTest.js
│ │ │ ├── ZUSDTokenTest.js
│ │ │ ├── launchSequenceTest
│ │ │ │ └── DeployZEROContractsTest.js
│ │ │ └── stakeDeclineTest.js
│ │ └── tests.test.ts
│ ├── truffle-config.js
│ ├── tsconfig.json
│ ├── utils
│ │ └── js
│ │ │ ├── BNConverter.js
│ │ │ ├── deploymentGasAndBytecode.js
│ │ │ ├── deploymentHelpers.js
│ │ │ ├── hintExamples.js
│ │ │ ├── mainnetDeploymentHelpers.js
│ │ │ ├── makeAccounts.js
│ │ │ ├── mathPlayground.js
│ │ │ ├── oracleABIs.js
│ │ │ ├── priceFeedInteractions.js
│ │ │ ├── processGasOutput.js
│ │ │ ├── proxyHelpers.js
│ │ │ ├── testHelpers.js
│ │ │ └── truffleDeploymentHelpers.js
│ └── yarn-error.log
├── dev-frontend
│ ├── .dockerignore
│ ├── .env.example
│ ├── .gitignore
│ ├── Dockerfile
│ ├── LICENSE
│ ├── docker-compose-example
│ │ ├── config
│ │ │ └── nginx
│ │ │ │ └── site-confs
│ │ │ │ └── liquity.example.com
│ │ └── docker-compose.yml
│ ├── docker-compose.yml
│ ├── docker-entrypoint.d
│ │ └── 99-frontend-config.sh
│ ├── etc
│ │ └── nginx
│ │ │ └── conf.d
│ │ │ └── enable_gzip.conf
│ ├── package.json
│ ├── public
│ │ ├── favicon.png
│ │ ├── icons
│ │ │ ├── 128-lqty-icon.png
│ │ │ ├── 128-lqty-icon.svg
│ │ │ ├── 128-lusd-icon.png
│ │ │ ├── 128-lusd-icon.svg
│ │ │ ├── 32-lqty-icon.png
│ │ │ ├── 32-lqty-icon.svg
│ │ │ ├── 32-lusd-icon.png
│ │ │ ├── 32-lusd-icon.svg
│ │ │ ├── 64-lqty-icon.png
│ │ │ ├── 64-lqty-icon.svg
│ │ │ ├── 64-lusd-icon.png
│ │ │ └── 64-lusd-icon.svg
│ │ ├── images
│ │ │ ├── confirm-tx.svg
│ │ │ ├── failed-tx.svg
│ │ │ ├── logo.svg
│ │ │ ├── pending-tx.svg
│ │ │ ├── rsk.svg
│ │ │ ├── sovryn.svg
│ │ │ ├── x.svg
│ │ │ └── zerologo.svg
│ │ ├── index.html
│ │ ├── lusd-icon.png
│ │ ├── manifest.json
│ │ ├── robots.txt
│ │ ├── success-mark.png
│ │ └── zero-logo.svg
│ ├── scripts
│ │ └── set-version.js
│ ├── src
│ │ ├── @types
│ │ │ └── window.ethereum.d.ts
│ │ ├── App.test.tsx
│ │ ├── App.tsx
│ │ ├── LiquityFrontend.tsx
│ │ ├── assets
│ │ │ └── logo.svg
│ │ ├── components
│ │ │ ├── Abbreviation.tsx
│ │ │ ├── ActionDescription.tsx
│ │ │ ├── Aggregator
│ │ │ │ └── Convert.tsx
│ │ │ ├── Badge.tsx
│ │ │ ├── Card.tsx
│ │ │ ├── CollateralSurplusAction.tsx
│ │ │ ├── ConnectionConfirmationDialog.tsx
│ │ │ ├── Connector
│ │ │ │ ├── Connector.tsx
│ │ │ │ ├── config.ts
│ │ │ │ ├── custom
│ │ │ │ │ ├── ledger-module.ts
│ │ │ │ │ └── trezor-module.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── reducer.ts
│ │ │ ├── Dialog.tsx
│ │ │ ├── ErrorDescription.tsx
│ │ │ ├── Header.tsx
│ │ │ ├── Icon.tsx
│ │ │ ├── InfoIcon.tsx
│ │ │ ├── InfoMessage.tsx
│ │ │ ├── Link.tsx
│ │ │ ├── LiquidationManager.tsx
│ │ │ ├── LiquityLogo.tsx
│ │ │ ├── LoadingOverlay.tsx
│ │ │ ├── MetaMaskIcon.tsx
│ │ │ ├── Modal.tsx
│ │ │ ├── Nav.tsx
│ │ │ ├── PriceManager.tsx
│ │ │ ├── Redemption
│ │ │ │ ├── DisabledRedemption.tsx
│ │ │ │ ├── Redemption.tsx
│ │ │ │ ├── RedemptionAction.tsx
│ │ │ │ └── RedemptionManager.tsx
│ │ │ ├── RetryDialog.tsx
│ │ │ ├── RiskyTroves.tsx
│ │ │ ├── SideNav.tsx
│ │ │ ├── Stability
│ │ │ │ ├── ActiveDeposit.tsx
│ │ │ │ ├── NoDeposit.tsx
│ │ │ │ ├── RemainingZERO.tsx
│ │ │ │ ├── Stability.tsx
│ │ │ │ ├── StabilityActionDescription.tsx
│ │ │ │ ├── StabilityDepositAction.tsx
│ │ │ │ ├── StabilityDepositEditor.tsx
│ │ │ │ ├── StabilityDepositManager.tsx
│ │ │ │ ├── Yield.tsx
│ │ │ │ ├── actions
│ │ │ │ │ ├── ClaimAndMove.tsx
│ │ │ │ │ └── ClaimRewards.tsx
│ │ │ │ ├── context
│ │ │ │ │ ├── StabilityViewContext.tsx
│ │ │ │ │ ├── StabilityViewProvider.tsx
│ │ │ │ │ ├── fetchZeroPrice.ts
│ │ │ │ │ └── types.ts
│ │ │ │ └── validation
│ │ │ │ │ └── validateStabilityDepositChange.tsx
│ │ │ ├── Staking
│ │ │ │ ├── ReadOnlyStake.tsx
│ │ │ │ ├── StakingEditor.tsx
│ │ │ │ ├── StakingGainsAction.tsx
│ │ │ │ ├── StakingManager.tsx
│ │ │ │ ├── StakingManagerAction.tsx
│ │ │ │ └── context
│ │ │ │ │ ├── StakingViewContext.tsx
│ │ │ │ │ └── StakingViewProvider.tsx
│ │ │ ├── Statistic.tsx
│ │ │ ├── StatusDialog.tsx
│ │ │ ├── SystemStats.tsx
│ │ │ ├── SystemStatsPopup.tsx
│ │ │ ├── Tooltip.tsx
│ │ │ ├── Transaction.tsx
│ │ │ ├── Trove
│ │ │ │ ├── Adjusting.tsx
│ │ │ │ ├── CollateralRatio.tsx
│ │ │ │ ├── Editor.tsx
│ │ │ │ ├── LiquidatedTrove.tsx
│ │ │ │ ├── NoTrove.tsx
│ │ │ │ ├── NueCheckbox.tsx
│ │ │ │ ├── Opening.tsx
│ │ │ │ ├── ReadOnlyTrove.tsx
│ │ │ │ ├── RedeemedTrove.tsx
│ │ │ │ ├── Trove.tsx
│ │ │ │ ├── TroveAction.tsx
│ │ │ │ ├── TroveEditor.tsx
│ │ │ │ ├── TroveManager.tsx
│ │ │ │ ├── context
│ │ │ │ │ ├── TroveViewContext.tsx
│ │ │ │ │ ├── TroveViewProvider.tsx
│ │ │ │ │ └── types.ts
│ │ │ │ └── validation
│ │ │ │ │ └── validateTroveChange.tsx
│ │ │ ├── UserAccount.tsx
│ │ │ ├── UserAddress.tsx
│ │ │ ├── WaitListAccessSuccess.tsx
│ │ │ ├── WaitListSuccess.tsx
│ │ │ ├── WaitingDialog.tsx
│ │ │ └── WalletConnector.tsx
│ │ ├── config
│ │ │ └── index.ts
│ │ ├── contracts
│ │ │ ├── BabelfishAggregator.json
│ │ │ ├── ERC20.json
│ │ │ └── config.ts
│ │ ├── hooks
│ │ │ ├── AsyncValue.ts
│ │ │ ├── LiquityContext.tsx
│ │ │ ├── useBlockNumber.ts
│ │ │ ├── useContract.ts
│ │ │ ├── useKeepSWRDataLiveAsBlocksArrive.ts
│ │ │ ├── useNueTokenSelection.ts
│ │ │ ├── useOnClickOutside.ts
│ │ │ ├── usePrevious.ts
│ │ │ ├── useTokenBalance.ts
│ │ │ └── useZusdAggregator.ts
│ │ ├── index.css
│ │ ├── index.tsx
│ │ ├── pages
│ │ │ ├── AccessPage.tsx
│ │ │ ├── ConfirmPage.tsx
│ │ │ ├── Dashboard.tsx
│ │ │ ├── FrontendRegistration.tsx
│ │ │ ├── FrontendRegistrationSuccess.tsx
│ │ │ ├── PageSwitcher.tsx
│ │ │ ├── RedemptionPage.tsx
│ │ │ ├── RiskyTrovesPage.tsx
│ │ │ ├── UnregisteredFrontend.tsx
│ │ │ └── WaitListSignup.tsx
│ │ ├── react-app-env.d.ts
│ │ ├── setupTests.ts
│ │ ├── strings.ts
│ │ ├── testUtils
│ │ │ └── DisposableWalletProvider.ts
│ │ ├── theme.ts
│ │ └── utils
│ │ │ ├── helpers.ts
│ │ │ ├── index.ts
│ │ │ ├── shortenAddress.ts
│ │ │ └── whitelist.ts
│ ├── tsconfig.json
│ └── yarn-error.log
├── examples
│ ├── package.json
│ └── src
│ │ └── liqbot.js
├── fuzzer
│ ├── .gitignore
│ ├── package.json
│ ├── src
│ │ ├── GasHistogram.ts
│ │ ├── fixture.ts
│ │ ├── index.ts
│ │ └── utils.ts
│ └── tsconfig.json
├── hw-transport-webusb
│ ├── .turbo
│ │ └── turbo-build.log
│ ├── CHANGELOG.md
│ ├── README.md
│ ├── jest.config.ts
│ ├── lib-es
│ │ ├── TransportWebUSB.d.ts
│ │ ├── TransportWebUSB.d.ts.map
│ │ ├── TransportWebUSB.js
│ │ ├── TransportWebUSB.js.map
│ │ ├── webusb.d.ts
│ │ ├── webusb.d.ts.map
│ │ ├── webusb.js
│ │ └── webusb.js.map
│ ├── lib
│ │ ├── TransportWebUSB.d.ts
│ │ ├── TransportWebUSB.d.ts.map
│ │ ├── TransportWebUSB.js
│ │ ├── TransportWebUSB.js.map
│ │ ├── webusb.d.ts
│ │ ├── webusb.d.ts.map
│ │ ├── webusb.js
│ │ └── webusb.js.map
│ ├── package.json
│ ├── src
│ │ ├── TransportWebUSB.ts
│ │ └── webusb.ts
│ └── tsconfig.json
├── lib-base
│ ├── .eslintrc.json
│ ├── .mocharc.yml
│ ├── .npmignore
│ ├── .npmrc
│ ├── LICENSE
│ ├── README.md
│ ├── api-extractor.json
│ ├── etc
│ │ └── lib-base.api.md
│ ├── index.ts
│ ├── package.json
│ ├── src
│ │ ├── Decimal.ts
│ │ ├── Fees.ts
│ │ ├── LiquityStore.ts
│ │ ├── ObservableLiquity.ts
│ │ ├── PopulatableLiquity.ts
│ │ ├── ReadableLiquity.ts
│ │ ├── SendableLiquity.ts
│ │ ├── StabilityDeposit.ts
│ │ ├── TransactableLiquity.ts
│ │ ├── Trove.ts
│ │ ├── ZEROStake.ts
│ │ ├── _CachedReadableLiquity.ts
│ │ └── constants.ts
│ ├── test
│ │ ├── Decimal.test.ts
│ │ ├── StabilityDeposit.test.ts
│ │ ├── Trove.test.ts
│ │ └── ZEROStake.test.ts
│ ├── tsconfig.dist.json
│ └── tsconfig.json
├── lib-ethers
│ ├── .eslintrc.json
│ ├── .npmignore
│ ├── .npmrc
│ ├── LICENSE
│ ├── README.md
│ ├── abi
│ │ ├── ActivePool.json
│ │ ├── BorrowerOperations.json
│ │ ├── CollSurplusPool.json
│ │ ├── CommunityIssuance.json
│ │ ├── DefaultPool.json
│ │ ├── FeeDistributor.json
│ │ ├── GasPool.json
│ │ ├── HintHelpers.json
│ │ ├── IERC20.json
│ │ ├── LiquityBaseParams.json
│ │ ├── MockBalanceRedirectPresale.json
│ │ ├── MultiTroveGetter.json
│ │ ├── Ownable.json
│ │ ├── PriceFeed.json
│ │ ├── PriceFeedTestnet.json
│ │ ├── SortedTroves.json
│ │ ├── StabilityPool.json
│ │ ├── TroveManager.json
│ │ ├── TroveManagerRedeemOps.json
│ │ ├── UpgradableProxy.json
│ │ ├── ZEROStaking.json
│ │ ├── ZEROToken.json
│ │ └── ZUSDToken.json
│ ├── accounts.json
│ ├── api-extractor.json
│ ├── deployments
│ │ ├── .gitignore
│ │ ├── backfill
│ │ │ └── dev.json
│ │ └── default
│ │ │ ├── hardhat.json
│ │ │ ├── mainnet.json
│ │ │ ├── rskdev.json
│ │ │ ├── rskforkedtestnet.json
│ │ │ ├── rsksovrynmainnet.json
│ │ │ ├── rsksovryntestnet.json
│ │ │ └── rsktestnet.json
│ ├── etc
│ │ └── lib-ethers.api.md
│ ├── hardhat.config.ts
│ ├── hardhat.config.ts.orig
│ ├── index.ts
│ ├── live
│ │ ├── ActivePool.json
│ │ ├── ActivePoolTester.json
│ │ ├── Address.json
│ │ ├── AggregatorV3Interface.json
│ │ ├── BaseMath.json
│ │ ├── BorrowerOperations.json
│ │ ├── BorrowerOperationsScript.json
│ │ ├── BorrowerOperationsTester.json
│ │ ├── BorrowerWrappersScript.json
│ │ ├── CheckContract.json
│ │ ├── CollSurplusPool.json
│ │ ├── CommunityIssuance.json
│ │ ├── CommunityIssuanceTester.json
│ │ ├── DSAuth.json
│ │ ├── DSAuthEvents.json
│ │ ├── DSAuthority.json
│ │ ├── DSNote.json
│ │ ├── DSProxy.json
│ │ ├── DSProxyCache.json
│ │ ├── DSProxyFactory.json
│ │ ├── DefaultPool.json
│ │ ├── DefaultPoolTester.json
│ │ ├── Destructible.json
│ │ ├── ERC20Mock.json
│ │ ├── ETHTransferScript.json
│ │ ├── EchidnaProxy.json
│ │ ├── EchidnaTester.json
│ │ ├── FunctionCaller.json
│ │ ├── GasPool.json
│ │ ├── HintHelpers.json
│ │ ├── IActivePool.json
│ │ ├── IBorrowerOperations.json
│ │ ├── ICollSurplusPool.json
│ │ ├── ICommunityIssuance.json
│ │ ├── IDefaultPool.json
│ │ ├── IERC20.json
│ │ ├── IERC2612.json
│ │ ├── ILPTokenWrapper.json
│ │ ├── ILQTYStaking.json
│ │ ├── ILQTYToken.json
│ │ ├── ILUSDToken.json
│ │ ├── ILiquityBase.json
│ │ ├── ILockupContractFactory.json
│ │ ├── IPool.json
│ │ ├── IPriceFeed.json
│ │ ├── ISortedTroves.json
│ │ ├── IStabilityPool.json
│ │ ├── ITellor.json
│ │ ├── ITellorCaller.json
│ │ ├── ITroveManager.json
│ │ ├── IUnipool.json
│ │ ├── LPTokenWrapper.json
│ │ ├── LQTYStaking.json
│ │ ├── LQTYStakingScript.json
│ │ ├── LQTYStakingTester.json
│ │ ├── LQTYToken.json
│ │ ├── LQTYTokenTester.json
│ │ ├── LUSDToken.json
│ │ ├── LUSDTokenCaller.json
│ │ ├── LUSDTokenTester.json
│ │ ├── LiquityBase.json
│ │ ├── LiquityMath.json
│ │ ├── LiquityMathTester.json
│ │ ├── LiquitySafeMath128.json
│ │ ├── LiquitySafeMath128Tester.json
│ │ ├── LockupContract.json
│ │ ├── LockupContractFactory.json
│ │ ├── Migrations.json
│ │ ├── MockAggregator.json
│ │ ├── MockTellor.json
│ │ ├── MultiTroveGetter.json
│ │ ├── NonPayable.json
│ │ ├── Ownable.json
│ │ ├── PriceFeed.json
│ │ ├── PriceFeedTester.json
│ │ ├── PriceFeedTestnet.json
│ │ ├── SafeERC20.json
│ │ ├── SafeMath.json
│ │ ├── SortedTroves.json
│ │ ├── SortedTrovesTester.json
│ │ ├── StabilityPool.json
│ │ ├── StabilityPoolScript.json
│ │ ├── StabilityPoolTester.json
│ │ ├── TellorCaller.json
│ │ ├── TokenScript.json
│ │ ├── TroveManager.json
│ │ ├── TroveManagerScript.json
│ │ ├── TroveManagerTester.json
│ │ ├── Unipool.json
│ │ ├── console.json
│ │ └── version
│ ├── package.json
│ ├── patches
│ │ └── hardhat+2.12.5.patch
│ ├── scripts
│ │ ├── check-live-version.ts
│ │ ├── copy-deployments.ts
│ │ ├── delete-dev-deployments.ts
│ │ ├── generate-types.ts
│ │ ├── save-live-version.ts
│ │ └── scrape-eth-usd.ts
│ ├── src
│ │ ├── BlockPolledLiquityStore.ts
│ │ ├── EthersLiquity.ts
│ │ ├── EthersLiquityConnection.ts
│ │ ├── ObservableEthersLiquity.ts
│ │ ├── PopulatableEthersLiquity.ts
│ │ ├── ReadableEthersLiquity.ts
│ │ ├── SendableEthersLiquity.ts
│ │ ├── _Multicall.ts
│ │ ├── contracts.ts
│ │ ├── parseLogs.ts
│ │ └── types.ts
│ ├── test
│ │ └── Liquity.test.ts
│ ├── tsconfig.dist.json
│ ├── tsconfig.json
│ ├── types
│ │ └── index.ts
│ └── utils
│ │ └── deploy.ts
├── lib-react
│ ├── .eslintrc.json
│ ├── LICENSE
│ ├── index.ts
│ ├── package.json
│ ├── src
│ │ ├── components
│ │ │ └── LiquityStoreProvider.tsx
│ │ ├── hooks
│ │ │ ├── useLiquityReducer.ts
│ │ │ ├── useLiquitySelector.ts
│ │ │ └── useLiquityStore.ts
│ │ └── utils
│ │ │ └── equals.ts
│ ├── tsconfig.dist.json
│ └── tsconfig.json
├── providers
│ ├── index.ts
│ ├── package.json
│ ├── src
│ │ ├── BatchedProvider.ts
│ │ ├── WebSocketAugmentedProvider.ts
│ │ └── WebSocketProvider.ts
│ ├── tsconfig.dist.json
│ └── tsconfig.json
└── sdk-contracts
│ ├── .env.example
│ ├── .eslintignore
│ ├── .eslintrc
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .npmignore
│ ├── .npmrc
│ ├── .prettierignore
│ ├── .prettierrc
│ ├── .solhint.json
│ ├── .solhintignore
│ ├── LICENSE
│ ├── README.md
│ ├── contracts
│ ├── libraries
│ │ ├── BorrowerLib.sol
│ │ ├── LiquidationLib.sol
│ │ ├── StabilityPoolLib.sol
│ │ └── TroveStatisticsLib.sol
│ └── test
│ │ └── TestIntegration.sol
│ ├── docs
│ ├── Addresses.md
│ ├── BorrowerLib.md
│ ├── IntegrationExample.md
│ ├── LiquidationLib.md
│ ├── StabilityPoolLib.md
│ └── TroveStatisticsLib.md
│ ├── external-artifacts
│ ├── BorrowerOperations.sol
│ │ └── BorrowerOperations.json
│ ├── StabilityPool.sol
│ │ └── StabilityPool.json
│ └── TroveManager.sol
│ │ └── TroveManager.json
│ ├── hardhat.config.ts
│ ├── package.dist.json
│ ├── package.json
│ ├── test
│ ├── borrower.ts
│ ├── liquidation.ts
│ ├── stability-pool.ts
│ └── trove-statistics.ts
│ └── tsconfig.json
├── papers
├── .gitignore
├── Efficient_Order-Preserving_Redistribution_of_Troves.pdf
├── Efficient_Order-Preserving_Redistribution_of_Troves.tex
├── README.md
├── Scalable_Reward_Distribution_with_Compounding_Stakes.pdf
├── Scalable_Reward_Distribution_with_Compounding_Stakes.tex
├── System_order_evolution_1.png
├── System_order_evolution_1_proof.png
├── System_order_evolution_2.png
├── System_order_evolution_3.png
├── System_order_evolution_4.png
├── System_order_evolution_generic.png
└── whitepaper
│ ├── Liquity Whitepaper rev. 0.3.tex
│ ├── a1.png
│ ├── a10.png
│ ├── a11.png
│ ├── a12.png
│ ├── a13.png
│ ├── a14.png
│ ├── a2.png
│ ├── a3.png
│ ├── a4.png
│ ├── a5.png
│ ├── a6.png
│ ├── a7.png
│ ├── a8.png
│ └── a9.png
├── patches
└── hardhat+2.13.0.patch
├── scripts
└── collect-sdk-apis.js
├── tsconfig.base.json
├── yarn.lock
└── yarn.public.lock
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Enable syntax highlighting for Solidity
2 | *.sol linguist-language=Solidity
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "npm"
4 | directory: "/"
5 | schedule:
6 | interval: "daily"
7 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Editor temp files
2 | *~
3 |
4 | # macOS Finder attribute files
5 | .DS_Store
6 |
7 | node_modules
8 |
9 | # output of TypeScript transpilation
10 | /packages/*/dist
11 |
12 | # api-extractor temp files
13 | /packages/**/temp
14 | /packages/**/tmp
15 |
16 | /temp
17 | .env
18 | .eslintcache
19 |
20 | # Don't track NPM lockfile (we use Yarn)
21 | package-lock.json
22 |
23 | *.code-workspace
24 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | 14
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "arrowParens": "avoid",
3 | "printWidth": 99,
4 | "trailingComma": "none"
5 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "slither.solcPath": "",
3 | "slither.hiddenDetectors": [],
4 | "solidity.compileUsingRemoteVersion": "v0.6.11+commit.5ef660b1",
5 | "typescript.tsdk": "node_modules/typescript/lib"
6 | }
--------------------------------------------------------------------------------
/DEPLOY.md:
--------------------------------------------------------------------------------
1 | sources:
2 | - packages/lib-ethers/utils/deploy.ts
3 | - hh config task `deploy`
4 | - deployer keys: packages/lib-ethers/.env
5 | - DEPLOYER_PK_TESTNET
6 | - DEPLOYER_PK_MAINNET
7 |
8 |
9 | initial deploy: yarn workspace @sovryn-zero/lib-ethers hardhat deploy
10 |
11 |
12 | set the 0x1 addresses to the marketMaker and presale contracts for rsktestnet network
13 | then run prepare script in the contracts folder
14 | then run tests from the lib-ethers and contracts folders
15 | if all good then run the deployment for rsktestnet network
16 |
17 | hh task deploy -> deployLiquity -> deploy.ts[deployAndSetupContracts]
18 |
19 | Note: upgrade scripts are WIP
20 |
--------------------------------------------------------------------------------
/api-documenter.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-documenter.schema.json",
3 | "newlineKind": "lf",
4 | "outputTarget": "markdown"
5 | }
6 |
--------------------------------------------------------------------------------
/client/src/contracts/Context.json:
--------------------------------------------------------------------------------
1 | {
2 | "contractName": "Context",
3 | "abi": [
4 | {
5 | "inputs": [],
6 | "payable": false,
7 | "stateMutability": "nonpayable",
8 | "type": "constructor"
9 | }
10 | ],
11 | "bytecode": "0x",
12 | "deployedBytecode": "0x",
13 | "linkReferences": {},
14 | "deployedLinkReferences": {}
15 | }
16 |
--------------------------------------------------------------------------------
/client/src/contracts/SafeMath.json:
--------------------------------------------------------------------------------
1 | {
2 | "contractName": "SafeMath",
3 | "abi": [],
4 | "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582078c05ddc344ef16e9421e32915c5855609c141b4c5fdb26279dcc05f86d0e29a64736f6c634300050f0032",
5 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a7231582078c05ddc344ef16e9421e32915c5855609c141b4c5fdb26279dcc05f86d0e29a64736f6c634300050f0032",
6 | "linkReferences": {},
7 | "deployedLinkReferences": {}
8 | }
9 |
--------------------------------------------------------------------------------
/client/src/contracts/console.json:
--------------------------------------------------------------------------------
1 | {
2 | "contractName": "console",
3 | "abi": [],
4 | "bytecode": "0x60556023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820493cf1d10b25b00381e283d922c8fa94b79f5dd14da1f9ffbc0a972f746764cc64736f6c634300050f0032",
5 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea265627a7a72315820493cf1d10b25b00381e283d922c8fa94b79f5dd14da1f9ffbc0a972f746764cc64736f6c634300050f0032",
6 | "linkReferences": {},
7 | "deployedLinkReferences": {}
8 | }
9 |
--------------------------------------------------------------------------------
/deployFlow.md:
--------------------------------------------------------------------------------
1 | ### 1. Deploy zero project
2 | ### 2. Set ZUSD and Bridge (`BorrowerOperations` contract) address as bridge in Mynt config
3 | ### 3. Deploy the Mynt project
4 | ### 4. run `setMassetAdress` script with proper masset (`MassetProxy`) address
5 |
--------------------------------------------------------------------------------
/dev-chain/start.js:
--------------------------------------------------------------------------------
1 | const { spawnSync } = require("child_process");
2 | const { join } = require("path");
3 |
4 | const nodeConfPath = join(__dirname, "node.conf");
5 |
6 | spawnSync("docker", [
7 | "run",
8 | "-d",
9 | "--rm",
10 | ...["-v", `${nodeConfPath}:/etc/rsk/node.conf`],
11 | ...["--name", "regtest-node-rsk"],
12 | ...["-p", "4444:4444/tcp"],
13 | ...["-p", "30305:30305/tcp"],
14 | "atixlabs/rsk-regtest:fdaf299a72b429d3066860fbc53bbb6e89e0490b"
15 | ]);
16 |
--------------------------------------------------------------------------------
/docs/sdk/index.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md)
4 |
5 | ## API Reference
6 |
7 | ## Packages
8 |
9 | | Package | Description |
10 | | --- | --- |
11 | | [@sovryn-zero/lib-base](./lib-base.md) | |
12 | | [@sovryn-zero/lib-ethers](./lib-ethers.md) | |
13 |
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.collateralgaintransferdetails.newtrove.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [CollateralGainTransferDetails](./lib-base.collateralgaintransferdetails.md) > [newTrove](./lib-base.collateralgaintransferdetails.newtrove.md)
4 |
5 | ## CollateralGainTransferDetails.newTrove property
6 |
7 | New state of the depositor's Trove directly after the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | newTrove: Trove;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.critical_collateral_ratio.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [CRITICAL\_COLLATERAL\_RATIO](./lib-base.critical_collateral_ratio.md)
4 |
5 | ## CRITICAL\_COLLATERAL\_RATIO variable
6 |
7 | Total collateral ratio below which recovery mode is triggered.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | CRITICAL_COLLATERAL_RATIO: Decimal
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.add.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [add](./lib-base.decimal.add.md)
4 |
5 | ## Decimal.add() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | add(addend: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | addend | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.div.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [div](./lib-base.decimal.div.md)
4 |
5 | ## Decimal.div() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | div(divider: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | divider | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.eq.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [eq](./lib-base.decimal.eq.md)
4 |
5 | ## Decimal.eq() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | eq(that: Decimalish): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.finite.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [finite](./lib-base.decimal.finite.md)
4 |
5 | ## Decimal.finite property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get finite(): this | undefined;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.from.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [from](./lib-base.decimal.from.md)
4 |
5 | ## Decimal.from() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static from(decimalish: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | decimalish | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.frombignumberstring.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [fromBigNumberString](./lib-base.decimal.frombignumberstring.md)
4 |
5 | ## Decimal.fromBigNumberString() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static fromBigNumberString(bigNumberString: string): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | bigNumberString | string | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.gt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [gt](./lib-base.decimal.gt.md)
4 |
5 | ## Decimal.gt() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | gt(that: Decimalish): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.gte.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [gte](./lib-base.decimal.gte.md)
4 |
5 | ## Decimal.gte() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | gte(that: Decimalish): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.half.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [HALF](./lib-base.decimal.half.md)
4 |
5 | ## Decimal.HALF property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static readonly HALF: Decimal;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.infinite.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [infinite](./lib-base.decimal.infinite.md)
4 |
5 | ## Decimal.infinite property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get infinite(): this | undefined;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.infinity.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [INFINITY](./lib-base.decimal.infinity.md)
4 |
5 | ## Decimal.INFINITY property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static readonly INFINITY: Decimal;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.iszero.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [isZero](./lib-base.decimal.iszero.md)
4 |
5 | ## Decimal.isZero property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get isZero(): boolean;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.lt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [lt](./lib-base.decimal.lt.md)
4 |
5 | ## Decimal.lt() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | lt(that: Decimalish): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.lte.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [lte](./lib-base.decimal.lte.md)
4 |
5 | ## Decimal.lte() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | lte(that: Decimalish): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.max.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [max](./lib-base.decimal.max.md)
4 |
5 | ## Decimal.max() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static max(a: Decimalish, b: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | a | [Decimalish](./lib-base.decimalish.md) | |
18 | | b | [Decimalish](./lib-base.decimalish.md) | |
19 |
20 | Returns:
21 |
22 | [Decimal](./lib-base.decimal.md)
23 |
24 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.min.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [min](./lib-base.decimal.min.md)
4 |
5 | ## Decimal.min() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static min(a: Decimalish, b: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | a | [Decimalish](./lib-base.decimalish.md) | |
18 | | b | [Decimalish](./lib-base.decimalish.md) | |
19 |
20 | Returns:
21 |
22 | [Decimal](./lib-base.decimal.md)
23 |
24 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.mul.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [mul](./lib-base.decimal.mul.md)
4 |
5 | ## Decimal.mul() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | mul(multiplier: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | multiplier | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.muldiv.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [mulDiv](./lib-base.decimal.muldiv.md)
4 |
5 | ## Decimal.mulDiv() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | mulDiv(multiplier: Decimalish, divider: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | multiplier | [Decimalish](./lib-base.decimalish.md) | |
18 | | divider | [Decimalish](./lib-base.decimalish.md) | |
19 |
20 | Returns:
21 |
22 | [Decimal](./lib-base.decimal.md)
23 |
24 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.nonzero.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [nonZero](./lib-base.decimal.nonzero.md)
4 |
5 | ## Decimal.nonZero property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get nonZero(): this | undefined;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.one.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [ONE](./lib-base.decimal.one.md)
4 |
5 | ## Decimal.ONE property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static readonly ONE: Decimal;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.pow.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [pow](./lib-base.decimal.pow.md)
4 |
5 | ## Decimal.pow() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | pow(exponent: number): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | exponent | number | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.prettify.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [prettify](./lib-base.decimal.prettify.md)
4 |
5 | ## Decimal.prettify() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | prettify(precision?: number): string;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | precision | number | |
18 |
19 | Returns:
20 |
21 | string
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.shorten.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [shorten](./lib-base.decimal.shorten.md)
4 |
5 | ## Decimal.shorten() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | shorten(): string;
11 | ```
12 | Returns:
13 |
14 | string
15 |
16 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.sub.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [sub](./lib-base.decimal.sub.md)
4 |
5 | ## Decimal.sub() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | sub(subtrahend: Decimalish): Decimal;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | subtrahend | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Decimal](./lib-base.decimal.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.tostring.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [toString](./lib-base.decimal.tostring.md)
4 |
5 | ## Decimal.toString() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | toString(precision?: number): string;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | precision | number | |
18 |
19 | Returns:
20 |
21 | string
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimal.zero.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimal](./lib-base.decimal.md) > [ZERO](./lib-base.decimal.zero.md)
4 |
5 | ## Decimal.ZERO property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | static readonly ZERO: Decimal;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.decimalish.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Decimalish](./lib-base.decimalish.md)
4 |
5 | ## Decimalish type
6 |
7 | Types that can be converted into a Decimal.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type Decimalish = Decimal | number | string;
13 | ```
14 | References: [Decimal](./lib-base.decimal.md)
15 |
16 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.fees.equals.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Fees](./lib-base.fees.md) > [equals](./lib-base.fees.equals.md)
4 |
5 | ## Fees.equals() method
6 |
7 | Compare to another instance of `Fees`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | equals(that: Fees): boolean;
13 | ```
14 |
15 | ## Parameters
16 |
17 | | Parameter | Type | Description |
18 | | --- | --- | --- |
19 | | that | [Fees](./lib-base.fees.md) | |
20 |
21 | Returns:
22 |
23 | boolean
24 |
25 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquidationdetails.collateralgascompensation.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquidationDetails](./lib-base.liquidationdetails.md) > [collateralGasCompensation](./lib-base.liquidationdetails.collateralgascompensation.md)
4 |
5 | ## LiquidationDetails.collateralGasCompensation property
6 |
7 | Amount of native currency (e.g. Ether) paid to the liquidator as gas compensation.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | collateralGasCompensation: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquidationdetails.liquidatedaddresses.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquidationDetails](./lib-base.liquidationdetails.md) > [liquidatedAddresses](./lib-base.liquidationdetails.liquidatedaddresses.md)
4 |
5 | ## LiquidationDetails.liquidatedAddresses property
6 |
7 | Addresses whose Troves were liquidated by the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | liquidatedAddresses: string[];
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquidationdetails.totalliquidated.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquidationDetails](./lib-base.liquidationdetails.md) > [totalLiquidated](./lib-base.liquidationdetails.totalliquidated.md)
4 |
5 | ## LiquidationDetails.totalLiquidated property
6 |
7 | Total collateral liquidated and debt cleared by the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | totalLiquidated: Trove;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquidationdetails.zusdgascompensation.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquidationDetails](./lib-base.liquidationdetails.md) > [zusdGasCompensation](./lib-base.liquidationdetails.zusdgascompensation.md)
4 |
5 | ## LiquidationDetails.zusdGasCompensation property
6 |
7 | Amount of ZUSD paid to the liquidator as gas compensation.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zusdGasCompensation: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquityreceipt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityReceipt](./lib-base.liquityreceipt.md)
4 |
5 | ## LiquityReceipt type
6 |
7 | One of either a [PendingReceipt](./lib-base.pendingreceipt.md), a [FailedReceipt](./lib-base.failedreceipt.md) or a [SuccessfulReceipt](./lib-base.successfulreceipt.md).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type LiquityReceipt = PendingReceipt | MinedReceipt;
13 | ```
14 | References: [PendingReceipt](./lib-base.pendingreceipt.md), [MinedReceipt](./lib-base.minedreceipt.md)
15 |
16 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystore.logging.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStore](./lib-base.liquitystore.md) > [logging](./lib-base.liquitystore.logging.md)
4 |
5 | ## LiquityStore.logging property
6 |
7 | Turn console logging on/off.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | logging: boolean;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystore.onloaded.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStore](./lib-base.liquitystore.md) > [onLoaded](./lib-base.liquitystore.onloaded.md)
4 |
5 | ## LiquityStore.onLoaded property
6 |
7 | Called after the state is fetched for the first time.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | onLoaded?: () => void;
13 | ```
14 |
15 | ## Remarks
16 |
17 | See [start()](./lib-base.liquitystore.start.md).
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystore.state.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStore](./lib-base.liquitystore.md) > [state](./lib-base.liquitystore.state.md)
4 |
5 | ## LiquityStore.state property
6 |
7 | The current store state.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | get state(): LiquityStoreState;
13 | ```
14 |
15 | ## Remarks
16 |
17 | Should not be accessed before the store is loaded. Assign a function to [onLoaded](./lib-base.liquitystore.onloaded.md) to get a callback when this happens.
18 |
19 | See [LiquityStoreState](./lib-base.liquitystorestate.md) for the list of properties returned.
20 |
21 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.accountbalance.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [accountBalance](./lib-base.liquitystorebasestate.accountbalance.md)
4 |
5 | ## LiquityStoreBaseState.accountBalance property
6 |
7 | User's native currency balance (e.g. Ether).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | accountBalance: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.frontend.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [frontend](./lib-base.liquitystorebasestate.frontend.md)
4 |
5 | ## LiquityStoreBaseState.frontend property
6 |
7 | Status of currently used frontend.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | frontend: FrontendStatus;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.nuebalance.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [nueBalance](./lib-base.liquitystorebasestate.nuebalance.md)
4 |
5 | ## LiquityStoreBaseState.nueBalance property
6 |
7 | User's NUE token balance.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | nueBalance: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.numberoftroves.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [numberOfTroves](./lib-base.liquitystorebasestate.numberoftroves.md)
4 |
5 | ## LiquityStoreBaseState.numberOfTroves property
6 |
7 | Number of Troves that are currently open.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | numberOfTroves: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.ownfrontend.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [ownFrontend](./lib-base.liquitystorebasestate.ownfrontend.md)
4 |
5 | ## LiquityStoreBaseState.ownFrontend property
6 |
7 | Status of user's own frontend.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | ownFrontend: FrontendStatus;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.price.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [price](./lib-base.liquitystorebasestate.price.md)
4 |
5 | ## LiquityStoreBaseState.price property
6 |
7 | Current price of the native currency (e.g. Ether) in USD.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | price: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.remainingstabilitypoolzeroreward.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [remainingStabilityPoolZEROReward](./lib-base.liquitystorebasestate.remainingstabilitypoolzeroreward.md)
4 |
5 | ## LiquityStoreBaseState.remainingStabilityPoolZEROReward property
6 |
7 | Remaining ZERO that will be collectively rewarded to stability depositors.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | remainingStabilityPoolZEROReward: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.stabilitydeposit.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [stabilityDeposit](./lib-base.liquitystorebasestate.stabilitydeposit.md)
4 |
5 | ## LiquityStoreBaseState.stabilityDeposit property
6 |
7 | User's stability deposit.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | stabilityDeposit: StabilityDeposit;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.total.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [total](./lib-base.liquitystorebasestate.total.md)
4 |
5 | ## LiquityStoreBaseState.total property
6 |
7 | Total collateral and debt in the Zero system.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | total: Trove;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.totalredistributed.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [totalRedistributed](./lib-base.liquitystorebasestate.totalredistributed.md)
4 |
5 | ## LiquityStoreBaseState.totalRedistributed property
6 |
7 | Total collateral and debt per stake that has been liquidated through redistribution.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | totalRedistributed: Trove;
13 | ```
14 |
15 | ## Remarks
16 |
17 | Needed when dealing with instances of [TroveWithPendingRedistribution](./lib-base.trovewithpendingredistribution.md).
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.totalstakedzero.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [totalStakedZERO](./lib-base.liquitystorebasestate.totalstakedzero.md)
4 |
5 | ## LiquityStoreBaseState.totalStakedZERO property
6 |
7 | Total amount of ZERO currently staked.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | totalStakedZERO: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.zerobalance.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [zeroBalance](./lib-base.liquitystorebasestate.zerobalance.md)
4 |
5 | ## LiquityStoreBaseState.zeroBalance property
6 |
7 | User's ZERO token balance.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zeroBalance: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.zerostake.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [zeroStake](./lib-base.liquitystorebasestate.zerostake.md)
4 |
5 | ## LiquityStoreBaseState.zeroStake property
6 |
7 | User's ZERO stake.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zeroStake: ZEROStake;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.zusdbalance.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [zusdBalance](./lib-base.liquitystorebasestate.zusdbalance.md)
4 |
5 | ## LiquityStoreBaseState.zusdBalance property
6 |
7 | User's ZUSD token balance.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zusdBalance: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorebasestate.zusdinstabilitypool.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreBaseState](./lib-base.liquitystorebasestate.md) > [zusdInStabilityPool](./lib-base.liquitystorebasestate.zusdinstabilitypool.md)
4 |
5 | ## LiquityStoreBaseState.zusdInStabilityPool property
6 |
7 | Total amount of ZUSD currently deposited in the Stability Pool.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zusdInStabilityPool: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorederivedstate.borrowingrate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreDerivedState](./lib-base.liquitystorederivedstate.md) > [borrowingRate](./lib-base.liquitystorederivedstate.borrowingrate.md)
4 |
5 | ## LiquityStoreDerivedState.borrowingRate property
6 |
7 | Current borrowing rate.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | borrowingRate: Decimal;
13 | ```
14 |
15 | ## Remarks
16 |
17 | A value between 0 and 1.
18 |
19 | ## Example
20 |
21 | For example a value of 0.01 amounts to a borrowing fee of 1% of the borrowed amount.
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorederivedstate.fees.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreDerivedState](./lib-base.liquitystorederivedstate.md) > [fees](./lib-base.liquitystorederivedstate.fees.md)
4 |
5 | ## LiquityStoreDerivedState.fees property
6 |
7 | Calculator for current fees.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | fees: Fees;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorederivedstate.haveundercollateralizedtroves.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreDerivedState](./lib-base.liquitystorederivedstate.md) > [haveUndercollateralizedTroves](./lib-base.liquitystorederivedstate.haveundercollateralizedtroves.md)
4 |
5 | ## LiquityStoreDerivedState.haveUndercollateralizedTroves property
6 |
7 | Whether there are any Troves with collateral ratio below the [minimum](./lib-base.minimum_collateral_ratio.md).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | haveUndercollateralizedTroves: boolean;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorederivedstate.trove.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreDerivedState](./lib-base.liquitystorederivedstate.md) > [trove](./lib-base.liquitystorederivedstate.trove.md)
4 |
5 | ## LiquityStoreDerivedState.trove property
6 |
7 | Current state of user's Trove
8 |
9 | Signature:
10 |
11 | ```typescript
12 | trove: UserTrove;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorelistenerparams.newstate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreListenerParams](./lib-base.liquitystorelistenerparams.md) > [newState](./lib-base.liquitystorelistenerparams.newstate.md)
4 |
5 | ## LiquityStoreListenerParams.newState property
6 |
7 | The entire previous state.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | newState: LiquityStoreState;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorelistenerparams.oldstate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreListenerParams](./lib-base.liquitystorelistenerparams.md) > [oldState](./lib-base.liquitystorelistenerparams.oldstate.md)
4 |
5 | ## LiquityStoreListenerParams.oldState property
6 |
7 | The entire new state.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | oldState: LiquityStoreState;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.liquitystorelistenerparams.statechange.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [LiquityStoreListenerParams](./lib-base.liquitystorelistenerparams.md) > [stateChange](./lib-base.liquitystorelistenerparams.statechange.md)
4 |
5 | ## LiquityStoreListenerParams.stateChange property
6 |
7 | Only the state variables that have changed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | stateChange: Partial>;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.maximum_borrowing_rate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [MAXIMUM\_BORROWING\_RATE](./lib-base.maximum_borrowing_rate.md)
4 |
5 | ## MAXIMUM\_BORROWING\_RATE variable
6 |
7 | Value that the [borrowing rate](./lib-base.fees.borrowingrate.md) will never exceed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | MAXIMUM_BORROWING_RATE: Decimal
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.minedreceipt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [MinedReceipt](./lib-base.minedreceipt.md)
4 |
5 | ## MinedReceipt type
6 |
7 | Either a [FailedReceipt](./lib-base.failedreceipt.md) or a [SuccessfulReceipt](./lib-base.successfulreceipt.md).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type MinedReceipt = FailedReceipt | SuccessfulReceipt;
13 | ```
14 | References: [FailedReceipt](./lib-base.failedreceipt.md), [SuccessfulReceipt](./lib-base.successfulreceipt.md)
15 |
16 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.minimum_borrowing_rate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [MINIMUM\_BORROWING\_RATE](./lib-base.minimum_borrowing_rate.md)
4 |
5 | ## MINIMUM\_BORROWING\_RATE variable
6 |
7 | Value that the [borrowing rate](./lib-base.fees.borrowingrate.md) will never decay below.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | MINIMUM_BORROWING_RATE: Decimal
13 | ```
14 |
15 | ## Remarks
16 |
17 | Note that the borrowing rate can still be lower than this during recovery mode, when it's overridden by zero.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.minimum_collateral_ratio.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [MINIMUM\_COLLATERAL\_RATIO](./lib-base.minimum_collateral_ratio.md)
4 |
5 | ## MINIMUM\_COLLATERAL\_RATIO variable
6 |
7 | Collateral ratio below which a Trove can be liquidated in normal mode.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | MINIMUM_COLLATERAL_RATIO: Decimal
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.minimum_redemption_rate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [MINIMUM\_REDEMPTION\_RATE](./lib-base.minimum_redemption_rate.md)
4 |
5 | ## MINIMUM\_REDEMPTION\_RATE variable
6 |
7 | Value that the [redemption rate](./lib-base.fees.redemptionrate.md) will never decay below.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | MINIMUM_REDEMPTION_RATE: Decimal
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.pendingreceipt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [PendingReceipt](./lib-base.pendingreceipt.md)
4 |
5 | ## PendingReceipt type
6 |
7 | Indicates that the transaction hasn't been mined yet.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type PendingReceipt = {
13 | status: "pending";
14 | };
15 | ```
16 |
17 | ## Remarks
18 |
19 | Returned by [SentLiquityTransaction.getReceipt()](./lib-base.sentliquitytransaction.getreceipt.md).
20 |
21 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.populatedliquitytransaction.rawpopulatedtransaction.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [PopulatedLiquityTransaction](./lib-base.populatedliquitytransaction.md) > [rawPopulatedTransaction](./lib-base.populatedliquitytransaction.rawpopulatedtransaction.md)
4 |
5 | ## PopulatedLiquityTransaction.rawPopulatedTransaction property
6 |
7 | Implementation-specific populated transaction object.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly rawPopulatedTransaction: P;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.populatedliquitytransaction.send.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [PopulatedLiquityTransaction](./lib-base.populatedliquitytransaction.md) > [send](./lib-base.populatedliquitytransaction.send.md)
4 |
5 | ## PopulatedLiquityTransaction.send() method
6 |
7 | Send the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | send(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<T>
17 |
18 | An object that implements [SentLiquityTransaction](./lib-base.sentliquitytransaction.md).
19 |
20 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.populatedredemption.attemptedzusdamount.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [PopulatedRedemption](./lib-base.populatedredemption.md) > [attemptedZUSDAmount](./lib-base.populatedredemption.attemptedzusdamount.md)
4 |
5 | ## PopulatedRedemption.attemptedZUSDAmount property
6 |
7 | Amount of ZUSD the redeemer is trying to redeem.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly attemptedZUSDAmount: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.populatedredemption.istruncated.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [PopulatedRedemption](./lib-base.populatedredemption.md) > [isTruncated](./lib-base.populatedredemption.istruncated.md)
4 |
5 | ## PopulatedRedemption.isTruncated property
6 |
7 | Whether `redeemableZUSDAmount` is less than `attemptedZUSDAmount`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly isTruncated: boolean;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.populatedredemption.redeemablezusdamount.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [PopulatedRedemption](./lib-base.populatedredemption.md) > [redeemableZUSDAmount](./lib-base.populatedredemption.redeemablezusdamount.md)
4 |
5 | ## PopulatedRedemption.redeemableZUSDAmount property
6 |
7 | Maximum amount of ZUSD that is currently redeemable from `attemptedZUSDAmount`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly redeemableZUSDAmount: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.getfees.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getFees](./lib-base.readableliquity.getfees.md)
4 |
5 | ## ReadableLiquity.getFees() method
6 |
7 | Get a calculator for current fees.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getFees(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<[Fees](./lib-base.fees.md)>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.getnumberoftroves.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getNumberOfTroves](./lib-base.readableliquity.getnumberoftroves.md)
4 |
5 | ## ReadableLiquity.getNumberOfTroves() method
6 |
7 | Get number of Troves that are currently open.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getNumberOfTroves(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<number>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.getprice.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getPrice](./lib-base.readableliquity.getprice.md)
4 |
5 | ## ReadableLiquity.getPrice() method
6 |
7 | Get the current price of the native currency (e.g. Ether) in USD.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getPrice(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<[Decimal](./lib-base.decimal.md)>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.getremainingstabilitypoolzeroreward.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getRemainingStabilityPoolZEROReward](./lib-base.readableliquity.getremainingstabilitypoolzeroreward.md)
4 |
5 | ## ReadableLiquity.getRemainingStabilityPoolZEROReward() method
6 |
7 | Get the remaining ZERO that will be collectively rewarded to stability depositors.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getRemainingStabilityPoolZEROReward(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<[Decimal](./lib-base.decimal.md)>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.gettotal.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getTotal](./lib-base.readableliquity.gettotal.md)
4 |
5 | ## ReadableLiquity.getTotal() method
6 |
7 | Get the total amount of collateral and debt in the Zero system.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getTotal(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<[Trove](./lib-base.trove.md)>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.gettotalstakedzero.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getTotalStakedZERO](./lib-base.readableliquity.gettotalstakedzero.md)
4 |
5 | ## ReadableLiquity.getTotalStakedZERO() method
6 |
7 | Get the total amount of ZERO currently staked.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getTotalStakedZERO(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<[Decimal](./lib-base.decimal.md)>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.gettrove.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getTrove](./lib-base.readableliquity.gettrove.md)
4 |
5 | ## ReadableLiquity.getTrove() method
6 |
7 | Get the current state of a Trove.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getTrove(address?: string): Promise;
13 | ```
14 |
15 | ## Parameters
16 |
17 | | Parameter | Type | Description |
18 | | --- | --- | --- |
19 | | address | string | Address that owns the Trove. |
20 |
21 | Returns:
22 |
23 | Promise<[UserTrove](./lib-base.usertrove.md)>
24 |
25 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.readableliquity.getzusdinstabilitypool.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ReadableLiquity](./lib-base.readableliquity.md) > [getZUSDInStabilityPool](./lib-base.readableliquity.getzusdinstabilitypool.md)
4 |
5 | ## ReadableLiquity.getZUSDInStabilityPool() method
6 |
7 | Get the total amount of ZUSD currently deposited in the Stability Pool.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | getZUSDInStabilityPool(): Promise;
13 | ```
14 | Returns:
15 |
16 | Promise<[Decimal](./lib-base.decimal.md)>
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.redemptiondetails.actualzusdamount.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [RedemptionDetails](./lib-base.redemptiondetails.md) > [actualZUSDAmount](./lib-base.redemptiondetails.actualzusdamount.md)
4 |
5 | ## RedemptionDetails.actualZUSDAmount property
6 |
7 | Amount of ZUSD that was actually redeemed by the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | actualZUSDAmount: Decimal;
13 | ```
14 |
15 | ## Remarks
16 |
17 | This can end up being lower than `attemptedZUSDAmount` due to interference from another transaction that modifies the list of Troves.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.redemptiondetails.attemptedzusdamount.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [RedemptionDetails](./lib-base.redemptiondetails.md) > [attemptedZUSDAmount](./lib-base.redemptiondetails.attemptedzusdamount.md)
4 |
5 | ## RedemptionDetails.attemptedZUSDAmount property
6 |
7 | Amount of ZUSD the redeemer tried to redeem.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | attemptedZUSDAmount: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.redemptiondetails.collateraltaken.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [RedemptionDetails](./lib-base.redemptiondetails.md) > [collateralTaken](./lib-base.redemptiondetails.collateraltaken.md)
4 |
5 | ## RedemptionDetails.collateralTaken property
6 |
7 | Amount of collateral (e.g. Ether) taken from Troves by the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | collateralTaken: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.redemptiondetails.fee.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [RedemptionDetails](./lib-base.redemptiondetails.md) > [fee](./lib-base.redemptiondetails.fee.md)
4 |
5 | ## RedemptionDetails.fee property
6 |
7 | Amount of native currency (e.g. Ether) deducted as fee from collateral taken.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | fee: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.sentliquitytransaction.rawsenttransaction.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [SentLiquityTransaction](./lib-base.sentliquitytransaction.md) > [rawSentTransaction](./lib-base.sentliquitytransaction.rawsenttransaction.md)
4 |
5 | ## SentLiquityTransaction.rawSentTransaction property
6 |
7 | Implementation-specific sent transaction object.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly rawSentTransaction: S;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.collateralgain.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [collateralGain](./lib-base.stabilitydeposit.collateralgain.md)
4 |
5 | ## StabilityDeposit.collateralGain property
6 |
7 | Amount of native currency (e.g. Ether) received in exchange for the used-up ZUSD.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly collateralGain: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.currentzusd.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [currentZUSD](./lib-base.stabilitydeposit.currentzusd.md)
4 |
5 | ## StabilityDeposit.currentZUSD property
6 |
7 | Amount of ZUSD left in the Stability Deposit.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly currentZUSD: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.equals.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [equals](./lib-base.stabilitydeposit.equals.md)
4 |
5 | ## StabilityDeposit.equals() method
6 |
7 | Compare to another instance of `StabilityDeposit`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | equals(that: StabilityDeposit): boolean;
13 | ```
14 |
15 | ## Parameters
16 |
17 | | Parameter | Type | Description |
18 | | --- | --- | --- |
19 | | that | [StabilityDeposit](./lib-base.stabilitydeposit.md) | |
20 |
21 | Returns:
22 |
23 | boolean
24 |
25 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.frontendtag.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [frontendTag](./lib-base.stabilitydeposit.frontendtag.md)
4 |
5 | ## StabilityDeposit.frontendTag property
6 |
7 | Address of frontend through which this Stability Deposit was made.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly frontendTag: string;
13 | ```
14 |
15 | ## Remarks
16 |
17 | If the Stability Deposit was made through a frontend that doesn't tag deposits, this will be the zero-address.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.initialzusd.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [initialZUSD](./lib-base.stabilitydeposit.initialzusd.md)
4 |
5 | ## StabilityDeposit.initialZUSD property
6 |
7 | Amount of ZUSD in the Stability Deposit at the time of the last direct modification.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly initialZUSD: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.isempty.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [isEmpty](./lib-base.stabilitydeposit.isempty.md)
4 |
5 | ## StabilityDeposit.isEmpty property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get isEmpty(): boolean;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydeposit.zeroreward.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDeposit](./lib-base.stabilitydeposit.md) > [zeroReward](./lib-base.stabilitydeposit.zeroreward.md)
4 |
5 | ## StabilityDeposit.zeroReward property
6 |
7 | Amount of ZERO rewarded since the last modification of the Stability Deposit.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly zeroReward: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydepositchange.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDepositChange](./lib-base.stabilitydepositchange.md)
4 |
5 | ## StabilityDepositChange type
6 |
7 | Represents the change between two Stability Deposit states.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type StabilityDepositChange = {
13 | depositZUSD: T;
14 | withdrawZUSD?: undefined;
15 | } | {
16 | depositZUSD?: undefined;
17 | withdrawZUSD: T;
18 | withdrawAllZUSD: boolean;
19 | };
20 | ```
21 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitydepositchangedetails.change.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityDepositChangeDetails](./lib-base.stabilitydepositchangedetails.md) > [change](./lib-base.stabilitydepositchangedetails.change.md)
4 |
5 | ## StabilityDepositChangeDetails.change property
6 |
7 | Change that was made to the deposit by this transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | change: StabilityDepositChange;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitypoolgainswithdrawaldetails.collateralgain.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityPoolGainsWithdrawalDetails](./lib-base.stabilitypoolgainswithdrawaldetails.md) > [collateralGain](./lib-base.stabilitypoolgainswithdrawaldetails.collateralgain.md)
4 |
5 | ## StabilityPoolGainsWithdrawalDetails.collateralGain property
6 |
7 | Amount of native currency (e.g. Ether) paid out to the depositor in this transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | collateralGain: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitypoolgainswithdrawaldetails.newzusddeposit.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityPoolGainsWithdrawalDetails](./lib-base.stabilitypoolgainswithdrawaldetails.md) > [newZUSDDeposit](./lib-base.stabilitypoolgainswithdrawaldetails.newzusddeposit.md)
4 |
5 | ## StabilityPoolGainsWithdrawalDetails.newZUSDDeposit property
6 |
7 | Amount of ZUSD in the deposit directly after this transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | newZUSDDeposit: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitypoolgainswithdrawaldetails.zeroreward.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityPoolGainsWithdrawalDetails](./lib-base.stabilitypoolgainswithdrawaldetails.md) > [zeroReward](./lib-base.stabilitypoolgainswithdrawaldetails.zeroreward.md)
4 |
5 | ## StabilityPoolGainsWithdrawalDetails.zeroReward property
6 |
7 | Amount of ZERO rewarded to the depositor in this transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zeroReward: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.stabilitypoolgainswithdrawaldetails.zusdloss.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [StabilityPoolGainsWithdrawalDetails](./lib-base.stabilitypoolgainswithdrawaldetails.md) > [zusdLoss](./lib-base.stabilitypoolgainswithdrawaldetails.zusdloss.md)
4 |
5 | ## StabilityPoolGainsWithdrawalDetails.zusdLoss property
6 |
7 | Amount of ZUSD burned from the deposit by liquidations since the last modification.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | zusdLoss: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.transactionfailederror.failedreceipt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TransactionFailedError](./lib-base.transactionfailederror.md) > [failedReceipt](./lib-base.transactionfailederror.failedreceipt.md)
4 |
5 | ## TransactionFailedError.failedReceipt property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | readonly failedReceipt: T;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.add.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [add](./lib-base.trove.add.md)
4 |
5 | ## Trove.add() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | add(that: Trove): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Trove](./lib-base.trove.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.addcollateral.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [addCollateral](./lib-base.trove.addcollateral.md)
4 |
5 | ## Trove.addCollateral() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | addCollateral(collateral: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | collateral | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.adddebt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [addDebt](./lib-base.trove.adddebt.md)
4 |
5 | ## Trove.addDebt() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | addDebt(debt: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | debt | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.collateral.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [collateral](./lib-base.trove.collateral.md)
4 |
5 | ## Trove.collateral property
6 |
7 | Amount of native currency (e.g. Ether) collateralized.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly collateral: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.collateralratio.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [collateralRatio](./lib-base.trove.collateralratio.md)
4 |
5 | ## Trove.collateralRatio() method
6 |
7 | Calculate the Trove's collateralization ratio at a given price.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | collateralRatio(price: Decimalish): Decimal;
13 | ```
14 |
15 | ## Parameters
16 |
17 | | Parameter | Type | Description |
18 | | --- | --- | --- |
19 | | price | [Decimalish](./lib-base.decimalish.md) | |
20 |
21 | Returns:
22 |
23 | [Decimal](./lib-base.decimal.md)
24 |
25 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.debt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [debt](./lib-base.trove.debt.md)
4 |
5 | ## Trove.debt property
6 |
7 | Amount of ZUSD owed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly debt: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.equals.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [equals](./lib-base.trove.equals.md)
4 |
5 | ## Trove.equals() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | equals(that: Trove): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Trove](./lib-base.trove.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.isempty.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [isEmpty](./lib-base.trove.isempty.md)
4 |
5 | ## Trove.isEmpty property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get isEmpty(): boolean;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.multiply.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [multiply](./lib-base.trove.multiply.md)
4 |
5 | ## Trove.multiply() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | multiply(multiplier: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | multiplier | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.netdebt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [netDebt](./lib-base.trove.netdebt.md)
4 |
5 | ## Trove.netDebt property
6 |
7 | Amount of ZUSD that must be repaid to close this Trove.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | get netDebt(): Decimal;
13 | ```
14 |
15 | ## Remarks
16 |
17 | This doesn't include the liquidation reserve, which is refunded in case of normal closure.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.setcollateral.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [setCollateral](./lib-base.trove.setcollateral.md)
4 |
5 | ## Trove.setCollateral() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | setCollateral(collateral: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | collateral | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.setdebt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [setDebt](./lib-base.trove.setdebt.md)
4 |
5 | ## Trove.setDebt() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | setDebt(debt: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | debt | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.subtract.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [subtract](./lib-base.trove.subtract.md)
4 |
5 | ## Trove.subtract() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | subtract(that: Trove): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [Trove](./lib-base.trove.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.subtractcollateral.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [subtractCollateral](./lib-base.trove.subtractcollateral.md)
4 |
5 | ## Trove.subtractCollateral() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | subtractCollateral(collateral: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | collateral | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trove.subtractdebt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [Trove](./lib-base.trove.md) > [subtractDebt](./lib-base.trove.subtractdebt.md)
4 |
5 | ## Trove.subtractDebt() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | subtractDebt(debt: Decimalish): Trove;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | debt | [Decimalish](./lib-base.decimalish.md) | |
18 |
19 | Returns:
20 |
21 | [Trove](./lib-base.trove.md)
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.troveadjustmentdetails.fee.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveAdjustmentDetails](./lib-base.troveadjustmentdetails.md) > [fee](./lib-base.troveadjustmentdetails.fee.md)
4 |
5 | ## TroveAdjustmentDetails.fee property
6 |
7 | Amount of ZUSD added to the Trove's debt as borrowing fee.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | fee: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.troveadjustmentdetails.newtrove.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveAdjustmentDetails](./lib-base.troveadjustmentdetails.md) > [newTrove](./lib-base.troveadjustmentdetails.newtrove.md)
4 |
5 | ## TroveAdjustmentDetails.newTrove property
6 |
7 | New state of the adjusted Trove directly after the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | newTrove: Trove;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.troveadjustmentdetails.params.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveAdjustmentDetails](./lib-base.troveadjustmentdetails.md) > [params](./lib-base.troveadjustmentdetails.params.md)
4 |
5 | ## TroveAdjustmentDetails.params property
6 |
7 | Parameters of the adjustment.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | params: TroveAdjustmentParams;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.troveclosuredetails.params.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveClosureDetails](./lib-base.troveclosuredetails.md) > [params](./lib-base.troveclosuredetails.params.md)
4 |
5 | ## TroveClosureDetails.params property
6 |
7 | How much was withdrawn and repaid.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | params: TroveClosureParams;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trovecreationdetails.fee.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveCreationDetails](./lib-base.trovecreationdetails.md) > [fee](./lib-base.trovecreationdetails.fee.md)
4 |
5 | ## TroveCreationDetails.fee property
6 |
7 | Amount of ZUSD added to the Trove's debt as borrowing fee.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | fee: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trovecreationdetails.newtrove.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveCreationDetails](./lib-base.trovecreationdetails.md) > [newTrove](./lib-base.trovecreationdetails.newtrove.md)
4 |
5 | ## TroveCreationDetails.newTrove property
6 |
7 | The Trove that was created by the transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | newTrove: Trove;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trovecreationdetails.params.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveCreationDetails](./lib-base.trovecreationdetails.md) > [params](./lib-base.trovecreationdetails.params.md)
4 |
5 | ## TroveCreationDetails.params property
6 |
7 | How much was deposited and borrowed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | params: TroveCreationParams;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trovelistingparams.first.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveListingParams](./lib-base.trovelistingparams.md) > [first](./lib-base.trovelistingparams.first.md)
4 |
5 | ## TroveListingParams.first property
6 |
7 | Number of Troves to retrieve.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly first: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trovelistingparams.sortedby.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveListingParams](./lib-base.trovelistingparams.md) > [sortedBy](./lib-base.trovelistingparams.sortedby.md)
4 |
5 | ## TroveListingParams.sortedBy property
6 |
7 | How the Troves should be sorted.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly sortedBy: "ascendingCollateralRatio" | "descendingCollateralRatio";
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.trovelistingparams.startingat.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [TroveListingParams](./lib-base.trovelistingparams.md) > [startingAt](./lib-base.trovelistingparams.startingat.md)
4 |
5 | ## TroveListingParams.startingAt property
6 |
7 | Index of the first Trove to retrieve from the sorted list.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly startingAt?: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.usertrove.equals.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [UserTrove](./lib-base.usertrove.md) > [equals](./lib-base.usertrove.equals.md)
4 |
5 | ## UserTrove.equals() method
6 |
7 | Signature:
8 |
9 | ```typescript
10 | equals(that: UserTrove): boolean;
11 | ```
12 |
13 | ## Parameters
14 |
15 | | Parameter | Type | Description |
16 | | --- | --- | --- |
17 | | that | [UserTrove](./lib-base.usertrove.md) | |
18 |
19 | Returns:
20 |
21 | boolean
22 |
23 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.usertrove.owneraddress.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [UserTrove](./lib-base.usertrove.md) > [ownerAddress](./lib-base.usertrove.owneraddress.md)
4 |
5 | ## UserTrove.ownerAddress property
6 |
7 | Address that owns this Trove.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly ownerAddress: string;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.usertrove.status.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [UserTrove](./lib-base.usertrove.md) > [status](./lib-base.usertrove.status.md)
4 |
5 | ## UserTrove.status property
6 |
7 | Provides more information when the UserTrove is empty.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly status: UserTroveStatus;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.usertrovestatus.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [UserTroveStatus](./lib-base.usertrovestatus.md)
4 |
5 | ## UserTroveStatus type
6 |
7 | Represents whether a UserTrove is open or not, or why it was closed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type UserTroveStatus = "nonExistent" | "open" | "closedByOwner" | "closedByLiquidation" | "closedByRedemption";
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zerostake.collateralgain.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZEROStake](./lib-base.zerostake.md) > [collateralGain](./lib-base.zerostake.collateralgain.md)
4 |
5 | ## ZEROStake.collateralGain property
6 |
7 | Collateral gain available to withdraw.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly collateralGain: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zerostake.equals.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZEROStake](./lib-base.zerostake.md) > [equals](./lib-base.zerostake.equals.md)
4 |
5 | ## ZEROStake.equals() method
6 |
7 | Compare to another instance of `ZEROStake`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | equals(that: ZEROStake): boolean;
13 | ```
14 |
15 | ## Parameters
16 |
17 | | Parameter | Type | Description |
18 | | --- | --- | --- |
19 | | that | [ZEROStake](./lib-base.zerostake.md) | |
20 |
21 | Returns:
22 |
23 | boolean
24 |
25 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zerostake.isempty.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZEROStake](./lib-base.zerostake.md) > [isEmpty](./lib-base.zerostake.isempty.md)
4 |
5 | ## ZEROStake.isEmpty property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | get isEmpty(): boolean;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zerostake.stakedzero.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZEROStake](./lib-base.zerostake.md) > [stakedZERO](./lib-base.zerostake.stakedzero.md)
4 |
5 | ## ZEROStake.stakedZERO property
6 |
7 | The amount of ZERO that's staked.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly stakedZERO: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zerostake.zusdgain.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZEROStake](./lib-base.zerostake.md) > [zusdGain](./lib-base.zerostake.zusdgain.md)
4 |
5 | ## ZEROStake.zusdGain property
6 |
7 | ZUSD gain available to withdraw.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly zusdGain: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zerostakechange.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZEROStakeChange](./lib-base.zerostakechange.md)
4 |
5 | ## ZEROStakeChange type
6 |
7 | Represents the change between two states of an ZERO Stake.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type ZEROStakeChange = {
13 | stakeZERO: T;
14 | unstakeZERO?: undefined;
15 | } | {
16 | stakeZERO?: undefined;
17 | unstakeZERO: T;
18 | unstakeAllZERO: boolean;
19 | };
20 | ```
21 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zusd_liquidation_reserve.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZUSD\_LIQUIDATION\_RESERVE](./lib-base.zusd_liquidation_reserve.md)
4 |
5 | ## ZUSD\_LIQUIDATION\_RESERVE variable
6 |
7 | Amount of ZUSD that's reserved for compensating the liquidator of a Trove.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | ZUSD_LIQUIDATION_RESERVE: Decimal
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zusd_minimum_debt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZUSD\_MINIMUM\_DEBT](./lib-base.zusd_minimum_debt.md)
4 |
5 | ## ZUSD\_MINIMUM\_DEBT variable
6 |
7 | A Trove must always have at least this much debt.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | ZUSD_MINIMUM_DEBT: Decimal
13 | ```
14 |
15 | ## Remarks
16 |
17 | Any transaction that would result in a Trove with less debt than this will be reverted.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-base.zusd_minimum_net_debt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-base](./lib-base.md) > [ZUSD\_MINIMUM\_NET\_DEBT](./lib-base.zusd_minimum_net_debt.md)
4 |
5 | ## ZUSD\_MINIMUM\_NET\_DEBT variable
6 |
7 | A Trove must always have at least this much debt on top of the [liquidation reserve](./lib-base.zusd_liquidation_reserve.md).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | ZUSD_MINIMUM_NET_DEBT: Decimal
13 | ```
14 |
15 | ## Remarks
16 |
17 | Any transaction that would result in a Trove with less net debt than this will be reverted.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.blockpolledliquitystore.connection.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [BlockPolledLiquityStore](./lib-ethers.blockpolledliquitystore.md) > [connection](./lib-ethers.blockpolledliquitystore.connection.md)
4 |
5 | ## BlockPolledLiquityStore.connection property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | readonly connection: EthersLiquityConnection;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.blockpolledliquitystoreextrastate.blocktag.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [BlockPolledLiquityStoreExtraState](./lib-ethers.blockpolledliquitystoreextrastate.md) > [blockTag](./lib-ethers.blockpolledliquitystoreextrastate.blocktag.md)
4 |
5 | ## BlockPolledLiquityStoreExtraState.blockTag property
6 |
7 | Number of block that the store state was fetched from.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | blockTag?: number;
13 | ```
14 |
15 | ## Remarks
16 |
17 | May be undefined when the store state is fetched for the first time.
18 |
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.blockpolledliquitystoreextrastate.blocktimestamp.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [BlockPolledLiquityStoreExtraState](./lib-ethers.blockpolledliquitystoreextrastate.md) > [blockTimestamp](./lib-ethers.blockpolledliquitystoreextrastate.blocktimestamp.md)
4 |
5 | ## BlockPolledLiquityStoreExtraState.blockTimestamp property
6 |
7 | Timestamp of latest block (number of seconds since epoch).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | blockTimestamp: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherscalloverrides.blocktag.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersCallOverrides](./lib-ethers.etherscalloverrides.md) > [blockTag](./lib-ethers.etherscalloverrides.blocktag.md)
4 |
5 | ## EthersCallOverrides.blockTag property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | blockTag?: BlockTag;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherscalloverrides.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersCallOverrides](./lib-ethers.etherscalloverrides.md)
4 |
5 | ## EthersCallOverrides interface
6 |
7 | Optional parameters taken by [ReadableEthersLiquity](./lib-ethers.readableethersliquity.md) functions.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export interface EthersCallOverrides
13 | ```
14 |
15 | ## Properties
16 |
17 | | Property | Type | Description |
18 | | --- | --- | --- |
19 | | [blockTag?](./lib-ethers.etherscalloverrides.blocktag.md) | BlockTag | (Optional) |
20 |
21 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquity.connection.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquity](./lib-ethers.ethersliquity.md) > [connection](./lib-ethers.ethersliquity.connection.md)
4 |
5 | ## EthersLiquity.connection property
6 |
7 | Information about the connection to the Zero protocol.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly connection: EthersLiquityConnection;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquity.hasstore.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquity](./lib-ethers.ethersliquity.md) > [hasStore](./lib-ethers.ethersliquity.hasstore.md)
4 |
5 | ## EthersLiquity.hasStore() method
6 |
7 | Check whether this `EthersLiquity` is an [EthersLiquityWithStore](./lib-ethers.ethersliquitywithstore.md).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | hasStore(): this is EthersLiquityWithStore;
13 | ```
14 | Returns:
15 |
16 | this is [EthersLiquityWithStore](./lib-ethers.ethersliquitywithstore.md)
17 |
18 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquity.populate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquity](./lib-ethers.ethersliquity.md) > [populate](./lib-ethers.ethersliquity.populate.md)
4 |
5 | ## EthersLiquity.populate property
6 |
7 | Can be used to create populated (unsigned) transactions.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly populate: PopulatableEthersLiquity;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquity.send.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquity](./lib-ethers.ethersliquity.md) > [send](./lib-ethers.ethersliquity.send.md)
4 |
5 | ## EthersLiquity.send property
6 |
7 | Can be used to send transactions without waiting for them to be mined.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly send: SendableEthersLiquity;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.addresses.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [addresses](./lib-ethers.ethersliquityconnection.addresses.md)
4 |
5 | ## EthersLiquityConnection.addresses property
6 |
7 | A mapping of Zero contracts' names to their addresses.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly addresses: Record;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.bootstrapperiod.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [bootstrapPeriod](./lib-ethers.ethersliquityconnection.bootstrapperiod.md)
4 |
5 | ## EthersLiquityConnection.bootstrapPeriod property
6 |
7 | Time period (in seconds) after `deploymentDate` during which redemptions are disabled.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly bootstrapPeriod: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.chainid.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [chainId](./lib-ethers.ethersliquityconnection.chainid.md)
4 |
5 | ## EthersLiquityConnection.chainId property
6 |
7 | Chain ID of the connected network.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly chainId: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.deploymentdate.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [deploymentDate](./lib-ethers.ethersliquityconnection.deploymentdate.md)
4 |
5 | ## EthersLiquityConnection.deploymentDate property
6 |
7 | Date when the Zero contracts were deployed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly deploymentDate: Date;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.provider.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [provider](./lib-ethers.ethersliquityconnection.provider.md)
4 |
5 | ## EthersLiquityConnection.provider property
6 |
7 | Ethers `Provider` used for connecting to the network.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly provider: EthersProvider;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.signer.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [signer](./lib-ethers.ethersliquityconnection.signer.md)
4 |
5 | ## EthersLiquityConnection.signer property
6 |
7 | Ethers `Signer` used for sending transactions.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly signer?: EthersSigner;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.startblock.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [startBlock](./lib-ethers.ethersliquityconnection.startblock.md)
4 |
5 | ## EthersLiquityConnection.startBlock property
6 |
7 | Number of block in which the first Zero contract was deployed.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly startBlock: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquityconnection.version.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityConnection](./lib-ethers.ethersliquityconnection.md) > [version](./lib-ethers.ethersliquityconnection.version.md)
4 |
5 | ## EthersLiquityConnection.version property
6 |
7 | Version of the Zero contracts (Git commit hash).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly version: string;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersliquitywithstore.store.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersLiquityWithStore](./lib-ethers.ethersliquitywithstore.md) > [store](./lib-ethers.ethersliquitywithstore.store.md)
4 |
5 | ## EthersLiquityWithStore.store property
6 |
7 | An object that implements LiquityStore.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly store: T;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherspopulatedtransaction.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersPopulatedTransaction](./lib-ethers.etherspopulatedtransaction.md)
4 |
5 | ## EthersPopulatedTransaction type
6 |
7 | Alias of Ethers' `PopulatedTransaction` type, which implements [UnsignedTransaction](https://docs.ethers.io/v5/api/utils/transactions/#UnsignedTransaction).
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type EthersPopulatedTransaction = PopulatedTransaction;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.ethersprovider.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersProvider](./lib-ethers.ethersprovider.md)
4 |
5 | ## EthersProvider type
6 |
7 | Alias of Ethers' abstract [Provider](https://docs.ethers.io/v5/api/providers/) type.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type EthersProvider = Provider;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherssigner.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersSigner](./lib-ethers.etherssigner.md)
4 |
5 | ## EthersSigner type
6 |
7 | Alias of Ethers' abstract [Signer](https://docs.ethers.io/v5/api/signer/) type.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type EthersSigner = Signer;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherstransactionoverrides.from.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersTransactionOverrides](./lib-ethers.etherstransactionoverrides.md) > [from](./lib-ethers.etherstransactionoverrides.from.md)
4 |
5 | ## EthersTransactionOverrides.from property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | from?: string;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherstransactionoverrides.gaslimit.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersTransactionOverrides](./lib-ethers.etherstransactionoverrides.md) > [gasLimit](./lib-ethers.etherstransactionoverrides.gaslimit.md)
4 |
5 | ## EthersTransactionOverrides.gasLimit property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | gasLimit?: BigNumberish;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherstransactionoverrides.gasprice.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersTransactionOverrides](./lib-ethers.etherstransactionoverrides.md) > [gasPrice](./lib-ethers.etherstransactionoverrides.gasprice.md)
4 |
5 | ## EthersTransactionOverrides.gasPrice property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | gasPrice?: BigNumberish;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherstransactionoverrides.nonce.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersTransactionOverrides](./lib-ethers.etherstransactionoverrides.md) > [nonce](./lib-ethers.etherstransactionoverrides.nonce.md)
4 |
5 | ## EthersTransactionOverrides.nonce property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | nonce?: BigNumberish;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherstransactionreceipt.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersTransactionReceipt](./lib-ethers.etherstransactionreceipt.md)
4 |
5 | ## EthersTransactionReceipt type
6 |
7 | Alias of Ethers' [TransactionReceipt](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt) type.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type EthersTransactionReceipt = TransactionReceipt;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.etherstransactionresponse.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [EthersTransactionResponse](./lib-ethers.etherstransactionresponse.md)
4 |
5 | ## EthersTransactionResponse type
6 |
7 | Alias of Ethers' [TransactionResponse](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionResponse) type.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type EthersTransactionResponse = TransactionResponse;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.permitparams.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [PermitParams](./lib-ethers.permitparams.md)
4 |
5 | ## PermitParams type
6 |
7 | EIP-2612 permit parameters.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | export declare type PermitParams = {
13 | deadline: BigNumberish;
14 | v: BigNumberish;
15 | r: BytesLike;
16 | s: BytesLike;
17 | };
18 | ```
19 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.populatedethersliquitytransaction.rawpopulatedtransaction.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [PopulatedEthersLiquityTransaction](./lib-ethers.populatedethersliquitytransaction.md) > [rawPopulatedTransaction](./lib-ethers.populatedethersliquitytransaction.rawpopulatedtransaction.md)
4 |
5 | ## PopulatedEthersLiquityTransaction.rawPopulatedTransaction property
6 |
7 | Unsigned transaction object populated by Ethers.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly rawPopulatedTransaction: EthersPopulatedTransaction;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.populatedethersredemption.attemptedzusdamount.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [PopulatedEthersRedemption](./lib-ethers.populatedethersredemption.md) > [attemptedZUSDAmount](./lib-ethers.populatedethersredemption.attemptedzusdamount.md)
4 |
5 | ## PopulatedEthersRedemption.attemptedZUSDAmount property
6 |
7 | Amount of ZUSD the redeemer is trying to redeem.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly attemptedZUSDAmount: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.populatedethersredemption.istruncated.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [PopulatedEthersRedemption](./lib-ethers.populatedethersredemption.md) > [isTruncated](./lib-ethers.populatedethersredemption.istruncated.md)
4 |
5 | ## PopulatedEthersRedemption.isTruncated property
6 |
7 | Whether `redeemableZUSDAmount` is less than `attemptedZUSDAmount`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly isTruncated: boolean;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.populatedethersredemption.redeemablezusdamount.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [PopulatedEthersRedemption](./lib-ethers.populatedethersredemption.md) > [redeemableZUSDAmount](./lib-ethers.populatedethersredemption.redeemablezusdamount.md)
4 |
5 | ## PopulatedEthersRedemption.redeemableZUSDAmount property
6 |
7 | Maximum amount of ZUSD that is currently redeemable from `attemptedZUSDAmount`.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly redeemableZUSDAmount: Decimal;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.readableethersliquity.connection.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [ReadableEthersLiquity](./lib-ethers.readableethersliquity.md) > [connection](./lib-ethers.readableethersliquity.connection.md)
4 |
5 | ## ReadableEthersLiquity.connection property
6 |
7 | Signature:
8 |
9 | ```typescript
10 | readonly connection: EthersLiquityConnection;
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.readableethersliquitywithstore.store.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [ReadableEthersLiquityWithStore](./lib-ethers.readableethersliquitywithstore.md) > [store](./lib-ethers.readableethersliquitywithstore.store.md)
4 |
5 | ## ReadableEthersLiquityWithStore.store property
6 |
7 | An object that implements LiquityStore.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly store: T;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.sentethersliquitytransaction.rawsenttransaction.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [SentEthersLiquityTransaction](./lib-ethers.sentethersliquitytransaction.md) > [rawSentTransaction](./lib-ethers.sentethersliquitytransaction.rawsenttransaction.md)
4 |
5 | ## SentEthersLiquityTransaction.rawSentTransaction property
6 |
7 | Ethers' representation of a sent transaction.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly rawSentTransaction: EthersTransactionResponse;
13 | ```
14 |
--------------------------------------------------------------------------------
/docs/sdk/lib-ethers.unsupportednetworkerror.chainid.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | [Home](./index.md) > [@sovryn-zero/lib-ethers](./lib-ethers.md) > [UnsupportedNetworkError](./lib-ethers.unsupportednetworkerror.md) > [chainId](./lib-ethers.unsupportednetworkerror.chainid.md)
4 |
5 | ## UnsupportedNetworkError.chainId property
6 |
7 | Chain ID of the unsupported network.
8 |
9 | Signature:
10 |
11 | ```typescript
12 | readonly chainId: number;
13 | ```
14 |
--------------------------------------------------------------------------------
/filter-repo/.gitignore:
--------------------------------------------------------------------------------
1 | /output
2 |
--------------------------------------------------------------------------------
/filter-repo/1-included-paths:
--------------------------------------------------------------------------------
1 | certs/
2 | registry/
3 | docs/
4 | packages/decimal/
5 | packages/frontend/
6 | packages/dev-frontend/
7 | packages/examples/
8 | packages/providers/
9 | packages/subgraph/
10 | packages/lib/
11 | glob:packages/lib-*/
12 | papers/
13 | scripts/
14 | .dockerignore
15 | .gitignore
16 | Dockerfile
17 | docker-compose.yml
18 | nginx.conf.tpl
19 | package.public.json==>package.json
20 | package.public.json
21 | yarn.public.lock==>yarn.lock
22 | yarn.public.lock
23 | README.public.md==>README.md
24 | README.public.md
25 | tsconfig.base.json
26 | api-documenter.json
27 | api-extractor.base.json
28 |
--------------------------------------------------------------------------------
/filter-repo/2-excluded-paths:
--------------------------------------------------------------------------------
1 | packages/providers/multicaller/
2 | packages/lib/live/
3 | packages/lib-ethers/live/
4 | papers/whitepaper/
5 |
--------------------------------------------------------------------------------
/filter-repo/push:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | cd "$(dirname "${BASH_SOURCE[0]}")/output"
4 | git push
5 |
--------------------------------------------------------------------------------
/filter-repo/run:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | cd "$(dirname "${BASH_SOURCE[0]}")"
4 |
5 | # Disable paging for git status, git log, etc.
6 | export GIT_PAGER=
7 |
8 | [ -d output ] || (
9 | mkdir output
10 | cd output
11 | git init
12 | )
13 |
14 | git filter-repo --paths-from-file 1-included-paths --refs master --target output
15 |
16 | cd output
17 | git filter-repo --paths-from-file ../2-excluded-paths --invert-paths
18 |
19 | # Set up origin and tracking information for pushing to the public repo
20 | git remote add origin git@github.com:DistributedCollective/zero.git
21 | git fetch
22 | git branch -u origin/master
23 |
24 | echo
25 | git status
26 |
27 | echo
28 | git log --oneline --graph master origin/master $(git merge-base master origin/master)^!
29 |
--------------------------------------------------------------------------------
/packages/contracts/.eslintignore:
--------------------------------------------------------------------------------
1 | # don't ever lint node_modules
2 | node_modules
3 | # don't lint build output (make sure it's set to your correct build folder name)
4 | dist
5 | # don't lint nyc coverage output
6 | coverage
7 | # no generated types
8 | types/generated/
9 | test-utils/env_setup.ts
10 | test/js/
11 | tests-onchain/
12 | contracts/
13 | */js/*.js
14 | **/*.js
15 | *.js
--------------------------------------------------------------------------------
/packages/contracts/.gitattributes:
--------------------------------------------------------------------------------
1 | # Enable syntax highlighting for Solidity
2 | *.sol linguist-language=Solidity
--------------------------------------------------------------------------------
/packages/contracts/.npmrc:
--------------------------------------------------------------------------------
1 | access=public
2 |
--------------------------------------------------------------------------------
/packages/contracts/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | artifacts
3 | cache
4 | coverage*
5 | gasReporterOutput.json
6 |
7 | .*
8 | *.md
9 | .vscode/
10 | !.solhint.json
11 | abi/
12 | artifacts/
13 | reports/
14 | node_modules/
15 | types/
16 | package-lock.json
17 | coverage
18 | coverage.json
19 | docs
20 | package.json
21 | cache
22 | *.yaml
23 | abi
24 | ignore/
25 | tmp/
26 | dist/
27 | build/
28 | hardhatAccountsList*.*
29 | test/js/**/*.js
30 | test/js/
31 | errorAccumulationTest/js/
32 | eth-mutants-custom/
33 | fuzzTests/js/
34 | gasTest/js/
35 | migrations/
36 | utils/js/
37 | # see the root .prettierignore
38 |
--------------------------------------------------------------------------------
/packages/contracts/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "solhint:recommended",
3 | "plugins": [
4 | "prettier"
5 | ],
6 | "rules": {
7 | "prettier/prettier": "error",
8 | "max-line-length": [
9 | "warn",
10 | 99
11 | ],
12 | "compiler-version": [
13 | "warn"
14 | ]
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/contracts/.solhintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | contracts/mockup
3 | contracts/testhelpers
4 | contracts/openzeppelin
5 | contracts/mixins/EnumerableAddressSet.sol
6 | contracts/interfaces
7 | contracts/events
--------------------------------------------------------------------------------
/packages/contracts/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "node",
9 | "request": "launch",
10 | "name": "Launch Program",
11 | "skipFiles": [
12 | "/**"
13 | ],
14 | "program": "${workspaceFolder}\\truffle-config.js"
15 | }
16 | ]
17 | }
--------------------------------------------------------------------------------
/packages/contracts/contracts/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "slither.solcPath": "",
3 | "slither.hiddenDetectors": []
4 | }
--------------------------------------------------------------------------------
/packages/contracts/contracts/ActivePoolStorage.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.6.11;
3 |
4 | import "./Dependencies/Ownable.sol";
5 |
6 | /**
7 | * @title Active Pool Storage
8 | * @dev Stores Active Pool required addresses and internal ETH and ZUSD debt states
9 | * Extends Ownable
10 | */
11 | contract ActivePoolStorage is Ownable {
12 | string public constant NAME = "ActivePool";
13 |
14 | address public borrowerOperationsAddress;
15 | address public troveManagerAddress;
16 | address public stabilityPoolAddress;
17 | address public defaultPoolAddress;
18 | uint256 internal ETH; // deposited ether tracker
19 | uint256 internal ZUSDDebt;
20 | }
21 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/CollSurplusPoolStorage.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "./Dependencies/Ownable.sol";
6 |
7 | contract CollSurplusPoolStorage is Ownable {
8 | string public constant NAME = "CollSurplusPool";
9 |
10 | address public borrowerOperationsAddress;
11 | address public troveManagerAddress;
12 | address public activePoolAddress;
13 |
14 | // deposited ether tracker
15 | uint256 internal ETH;
16 | // Collateral surplus claimable by trove owners
17 | mapping(address => uint256) internal balances;
18 | }
19 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/DefaultPoolStorage.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "./Dependencies/SafeMath.sol";
6 | import "./Dependencies/Ownable.sol";
7 |
8 | contract DefaultPoolStorage is Ownable {
9 | string public constant NAME = "DefaultPool";
10 |
11 | address public troveManagerAddress;
12 | address public activePoolAddress;
13 | uint256 internal ETH; // deposited ETH tracker
14 | uint256 internal ZUSDDebt; // debt
15 | }
16 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Dependencies/BaseMath.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.6.11;
3 |
4 |
5 | contract BaseMath {
6 | uint constant public DECIMAL_PRECISION = 1e18;
7 | }
8 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Dependencies/CheckContract.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 |
6 | contract CheckContract {
7 | /**
8 | * @dev Check that the account is an already deployed non-destroyed contract.
9 | * See: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol#L12
10 | */
11 | function checkContract(address _account) internal view {
12 | require(_account != address(0), "Account cannot be zero address");
13 |
14 | uint256 size;
15 | // solhint-disable-next-line no-inline-assembly
16 | assembly { size := extcodesize(_account) }
17 | require(size > 0, "Account code size cannot be zero");
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Dependencies/LiquitySafeMath128.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | // uint128 addition and subtraction, with overflow protection.
6 |
7 | library LiquitySafeMath128 {
8 | function add(uint128 a, uint128 b) internal pure returns (uint128) {
9 | uint128 c = a + b;
10 | require(c >= a, "LiquitySafeMath128: addition overflow");
11 |
12 | return c;
13 | }
14 |
15 | function sub(uint128 a, uint128 b) internal pure returns (uint128) {
16 | require(b <= a, "LiquitySafeMath128: subtraction overflow");
17 | uint128 c = a - b;
18 |
19 | return c;
20 | }
21 | }
--------------------------------------------------------------------------------
/packages/contracts/contracts/Dependencies/PriceFeed/IExternalPriceFeed.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | /// @title A generic interface for external price providers
6 | interface IExternalPriceFeed {
7 | /// @dev The returned price should be 18-decimal value
8 | /// @return the prive value and a boolean stating if the query was successful
9 | function latestAnswer() external view returns (uint256, bool);
10 | }
11 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Dependencies/PriceFeed/MocMedianizer.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.6.11;
3 |
4 | import "./IExternalPriceFeed.sol";
5 |
6 | interface IMoCBaseOracle {
7 | function peek() external view returns (bytes32, bool);
8 | }
9 |
10 | contract MoCMedianizer is IExternalPriceFeed {
11 | IMoCBaseOracle medianizer;
12 |
13 | constructor(address _medianizer) public {
14 | medianizer = IMoCBaseOracle(_medianizer);
15 | }
16 |
17 | function latestAnswer() external view override returns (uint256, bool) {
18 | (bytes32 price, bool success) = medianizer.peek();
19 | return (uint256(price), success);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Dependencies/PriceFeed/RskOracle.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.6.11;
3 |
4 | import "./IExternalPriceFeed.sol";
5 |
6 | interface IRSKOracle {
7 | function getPricing() external view returns (uint256, uint256);
8 | }
9 |
10 | contract RskOracle is IExternalPriceFeed {
11 |
12 | IRSKOracle rskOracle;
13 |
14 | constructor(address _address) public {
15 | rskOracle = IRSKOracle(_address);
16 | }
17 |
18 | function latestAnswer() external view override returns (uint256, bool) {
19 | (uint256 price, ) = rskOracle.getPricing();
20 | return (price, true);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/HintHelpersStorage.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "./Interfaces/ITroveManager.sol";
6 | import "./Interfaces/ISortedTroves.sol";
7 | import "./Dependencies/Ownable.sol";
8 |
9 | contract HintHelpersStorage is Ownable {
10 | string public constant NAME = "HintHelpers";
11 |
12 | ISortedTroves public sortedTroves;
13 | ITroveManager public troveManager;
14 | }
15 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/IBalanceRedirectPresale.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | interface IBalanceRedirectPresale {
6 |
7 | function isClosed() external view returns (bool);
8 | }
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/IDefaultPool.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "./IPool.sol";
6 |
7 | interface IDefaultPool is IPool {
8 | // --- Events ---
9 | event TroveManagerAddressChanged(address _newTroveManagerAddress);
10 | event DefaultPoolZUSDDebtUpdated(uint256 _ZUSDDebt);
11 | event DefaultPoolETHBalanceUpdated(uint256 _ETH);
12 |
13 | // --- Functions ---
14 |
15 | /// @notice Send ETH to Active Pool
16 | /// @param _amount ETH to send
17 | function sendETHToActivePool(uint256 _amount) external;
18 | }
19 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/IFeeSharingCollector.sol:
--------------------------------------------------------------------------------
1 | pragma solidity 0.6.11;
2 |
3 | /**
4 | * @title Interface for Sovryn protocol fee sharing collector.
5 | * @dev Interfaces are used to cast a contract address into a callable instance.
6 | * */
7 | interface IFeeSharingCollector {
8 | function withdrawFees(address _token) external;
9 |
10 | function transferTokens(address _token, uint96 _amount) external;
11 |
12 | function withdraw(
13 | address _loanPoolToken,
14 | uint32 _maxCheckpoints,
15 | address _receiver
16 | ) external;
17 |
18 | function transferRBTC() external payable;
19 | }
20 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/ILiquityBase.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "./IPriceFeed.sol";
6 | import "./ILiquityBaseParams.sol";
7 |
8 | interface ILiquityBase {
9 | /// @return PriceFeed contract
10 | function priceFeed() external view returns (IPriceFeed);
11 |
12 | /// @return LiquityBaseParams contract
13 | function liquityBaseParams() external view returns (ILiquityBaseParams);
14 | }
15 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/IPriceFeed.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | interface IPriceFeed {
6 | // --- Events ---
7 | event LastGoodPriceUpdated(uint256 _lastGoodPrice);
8 |
9 | // --- Function ---
10 |
11 | /// @notice Returns the latest price obtained from the Oracle. Called by Zero functions that require a current price.
12 | /// It uses the main price feed and fallback to the backup one in case of an error. If both fail return the last
13 | /// good price seen.
14 | /// @dev It's also callable by anyone externally
15 | /// @return The price
16 | function fetchPrice() external returns (uint256);
17 | }
18 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/IWrbtc.sol:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2017-2020, bZeroX, LLC. All Rights Reserved.
3 | * Licensed under the Apache License, Version 2.0.
4 | */
5 |
6 | pragma solidity 0.6.11;
7 |
8 | import "../Dependencies/IERC20.sol";
9 |
10 | interface IWrbtc is IERC20 {
11 |
12 | function deposit() external payable;
13 |
14 | function withdraw(uint256 wad) external;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Interfaces/IZEROToken.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../Dependencies/IERC20.sol";
6 | import "../Dependencies/IERC2612.sol";
7 |
8 | interface IZEROToken is IERC20, IERC2612 {
9 |
10 | // --- Functions ---
11 |
12 | /// @notice send zero tokens to ZEROStaking contract
13 | /// @param _sender sender address
14 | /// @param _amount amount to send
15 | function sendToZEROStaking(address _sender, uint256 _amount) external;
16 |
17 | /// @return deployment start time
18 | function getDeploymentStartTime() external view returns (uint256);
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/MultiTroveGetterStorage.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 | import "./TroveManager.sol";
5 | import "./SortedTroves.sol";
6 | import "./Dependencies/Ownable.sol";
7 |
8 | contract MultiTroveGetterStorage is Ownable {
9 | TroveManager public troveManager; // XXX Troves missing from ITroveManager?
10 | ISortedTroves public sortedTroves;
11 | }
12 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/PriceFeedStorage.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "./Interfaces/IPriceFeed.sol";
6 | import "./Dependencies/Ownable.sol";
7 | import "./Dependencies/PriceFeed/IExternalPriceFeed.sol";
8 | import "./Dependencies/CheckContract.sol";
9 |
10 | contract PriceFeedStorage is Ownable, CheckContract {
11 | string public constant NAME = "PriceFeed";
12 |
13 | IExternalPriceFeed[2] priceFeeds;
14 |
15 | // The last good price seen from an oracle by Zero
16 | uint256 public lastGoodPrice;
17 | }
18 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Proxy/ETHTransferScript.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 |
6 | contract ETHTransferScript {
7 | function transferETH(address _recipient, uint256 _amount) external returns (bool) {
8 | (bool success, ) = _recipient.call{value: _amount}("");
9 | return success;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/Proxy/ZEROStakingScript.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../Dependencies/CheckContract.sol";
6 | import "../Interfaces/IZEROStaking.sol";
7 |
8 |
9 | contract ZEROStakingScript is CheckContract {
10 | IZEROStaking immutable ZEROStaking;
11 |
12 | constructor(address _zeroStakingAddress) public {
13 | checkContract(_zeroStakingAddress);
14 | ZEROStaking = IZEROStaking(_zeroStakingAddress);
15 | }
16 |
17 | function stake(uint _ZEROamount) external {
18 | ZEROStaking.stake(_ZEROamount);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/ActivePoolTester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../ActivePool.sol";
6 |
7 | contract ActivePoolTester is ActivePool {
8 |
9 | function unprotectedIncreaseZUSDDebt(uint _amount) external {
10 | ZUSDDebt = ZUSDDebt.add(_amount);
11 | }
12 |
13 | function unprotectedPayable() external payable {
14 | ETH = ETH.add(msg.value);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/DefaultPoolTester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../DefaultPool.sol";
6 |
7 | contract DefaultPoolTester is DefaultPool {
8 |
9 | function unprotectedIncreaseZUSDDebt(uint _amount) external {
10 | ZUSDDebt = ZUSDDebt.add(_amount);
11 | }
12 |
13 | function unprotectedPayable() external payable {
14 | ETH = ETH.add(msg.value);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/Destructible.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | contract Destructible {
6 |
7 | receive() external payable {}
8 |
9 | function destruct(address payable _receiver) external {
10 | selfdestruct(_receiver);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/ExternalPriceFeedTester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.6.11;
3 |
4 | import "../Dependencies/PriceFeed/IExternalPriceFeed.sol";
5 |
6 | interface IMoCBaseOracle {
7 | function peek() external view returns (bytes32, bool);
8 | }
9 |
10 | contract ExternalPriceFeedTester is IExternalPriceFeed {
11 | uint256 price;
12 | bool success;
13 |
14 | function setLatestAnswer(uint256 _price, bool _success) external {
15 | price = _price;
16 | success = _success;
17 | }
18 |
19 | function latestAnswer() external view override returns (uint256, bool) {
20 | return (price, success);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/LiquitySafeMath128Tester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../Dependencies/LiquitySafeMath128.sol";
6 |
7 | /* Tester contract for math functions in LiquitySafeMath128.sol library. */
8 |
9 | contract LiquitySafeMath128Tester {
10 | using LiquitySafeMath128 for uint128;
11 |
12 | function add(uint128 a, uint128 b) external pure returns (uint128) {
13 | return a.add(b);
14 | }
15 |
16 | function sub(uint128 a, uint128 b) external pure returns (uint128) {
17 | return a.sub(b);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/MockBalanceRedirectPresale.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 |
6 | contract MockBalanceRedirectPresale {
7 |
8 | bool public isClosed;
9 |
10 | function closePresale() public {
11 | isClosed = true;
12 | }
13 |
14 | function openPresale() public {
15 | isClosed = false;
16 | }
17 | }
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/MockFeeSharingCollector.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../ZERO/ZEROToken.sol";
6 |
7 | interface MockIFeeSharingCollector {
8 | function transferTokens(address _token, uint96 _amount) external;
9 | }
10 |
11 | /// @dev Simple contract that will receive ZERO tokens issued to the SOV stakers.
12 | contract MockFeeSharingCollector is MockIFeeSharingCollector {
13 | function transferTokens(address _token, uint96 _amount) override external {
14 | /// Just a fake function to receive the tokens
15 | ZEROToken(_token).transferFrom(msg.sender, address(this), _amount);
16 | }
17 |
18 | function transferRBTC() external payable {}
19 | }
20 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/NonPayable.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | //import "../Dependencies/console.sol";
6 |
7 |
8 | contract NonPayable {
9 | bool isPayable;
10 |
11 | function setPayable(bool _isPayable) external {
12 | isPayable = _isPayable;
13 | }
14 |
15 | function forward(address _dest, bytes calldata _data) external payable {
16 | (bool success, bytes memory returnData) = _dest.call{ value: msg.value }(_data);
17 | //console.logBytes(returnData);
18 | require(success, string(returnData));
19 | }
20 |
21 | receive() external payable {
22 | require(isPayable);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/PriceFeedTester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../PriceFeed.sol";
6 |
7 | contract PriceFeedTester is PriceFeed {
8 | function setLastGoodPrice(uint256 _lastGoodPrice) external {
9 | lastGoodPrice = _lastGoodPrice;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/StabilityPoolTester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 | pragma experimental ABIEncoderV2;
5 |
6 | import "../StabilityPool.sol";
7 |
8 | contract StabilityPoolTester is StabilityPool {
9 |
10 | function unprotectedPayable() external payable {
11 | ETH = ETH.add(msg.value);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/packages/contracts/contracts/TestContracts/ZEROStakingTester.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity 0.6.11;
4 |
5 | import "../ZERO/ZEROStaking.sol";
6 |
7 |
8 | contract ZEROStakingTester is ZEROStaking {
9 | function requireCallerIsFeeDistributor() external view {
10 | _requireCallerIsFeeDistributor();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/contracts/deployment/deploy/1-BorrowerOperations.ts:
--------------------------------------------------------------------------------
1 | import { DeployFunction } from "hardhat-deploy/types";
2 | import { deployWithCustomProxy, injectHre } from "../../scripts/helpers";
3 | import { getContractNameFromScriptFileName } from "../../scripts/utils";
4 | const path = require("path");
5 | const deploymentName = getContractNameFromScriptFileName(path.basename(__filename));
6 |
7 | const func: DeployFunction = async (hre) => {
8 | const { getNamedAccounts } = hre;
9 | const { deployer } = await getNamedAccounts();
10 | injectHre(hre);
11 | await deployWithCustomProxy(deployer, deploymentName, "UpgradableProxy");
12 | };
13 |
14 | func.tags = [deploymentName];
15 | export default func;
16 |
--------------------------------------------------------------------------------
/packages/contracts/deployment/deploy/2-StabilityPool.ts:
--------------------------------------------------------------------------------
1 | import { DeployFunction } from "hardhat-deploy/types";
2 | import { deployWithCustomProxy, injectHre } from "../../scripts/helpers";
3 | import { getContractNameFromScriptFileName } from "../../scripts/utils";
4 | const path = require("path");
5 | const deploymentName = getContractNameFromScriptFileName(path.basename(__filename));
6 |
7 | const func: DeployFunction = async (hre) => {
8 | const { getNamedAccounts } = hre;
9 | const { deployer } = await getNamedAccounts();
10 | injectHre(hre);
11 | await deployWithCustomProxy(deployer, deploymentName, "UpgradableProxy");
12 | };
13 |
14 | func.tags = [deploymentName];
15 | export default func;
16 |
--------------------------------------------------------------------------------
/packages/contracts/deployment/deploy/5-ZUSDToken.ts:
--------------------------------------------------------------------------------
1 | import { DeployFunction } from "hardhat-deploy/types";
2 | import { deployWithCustomProxy } from "../../scripts/helpers";
3 | import { getContractNameFromScriptFileName } from "../../scripts/utils";
4 | const path = require("path");
5 |
6 | const deploymentName = getContractNameFromScriptFileName(path.basename(__filename));
7 |
8 | const func: DeployFunction = async ({ getNamedAccounts }) => {
9 | const { deployer } = await getNamedAccounts();
10 | await deployWithCustomProxy(deployer, deploymentName, "UpgradableProxy");
11 | };
12 |
13 | func.tags = [deploymentName];
14 | export default func;
15 |
--------------------------------------------------------------------------------
/packages/contracts/deployment/deployments/rskSovrynMainnet/.chainId:
--------------------------------------------------------------------------------
1 | 30
--------------------------------------------------------------------------------
/packages/contracts/deployment/deployments/rskSovrynTestnet/.chainId:
--------------------------------------------------------------------------------
1 | 31
--------------------------------------------------------------------------------
/packages/contracts/eth-mutants-custom/index.js:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env node
2 |
3 | const yargs = require('yargs')
4 | const commands = require('./src/commands')
5 |
6 | yargs
7 | .usage('$0 [args]')
8 | .command('test', 'run mutation tests', (yargs) => {
9 | yargs.option('failfast', {
10 | type: 'bool',
11 | default: false,
12 | describe: 'abort on first surviving mutant'
13 | })
14 | }, commands.test)
15 | .command('preflight', 'print preflight summary', commands.preflight)
16 | .help()
17 | .argv
18 |
--------------------------------------------------------------------------------
/packages/contracts/eth-mutants-custom/src/config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | baselineDir: '.eth-mutants/baseline',
3 | contractsDir: 'contracts',
4 | defaultContractsGlob: '*.sol'
5 | }
6 |
--------------------------------------------------------------------------------
/packages/contracts/eth-mutants-custom/src/mutators/boolean.js:
--------------------------------------------------------------------------------
1 | const Mutation = require('../mutation')
2 |
3 | function BooleanMutator() { }
4 |
5 | BooleanMutator.prototype.name = 'boolean'
6 |
7 | BooleanMutator.prototype.getMutations = function (file, source, visit) {
8 | const mutations = []
9 |
10 | visit({
11 | BooleanLiteral: (node) => {
12 | if (node.value) {
13 | mutations.push(new Mutation(file, node.range[0], node.range[1] + 1, 'false'))
14 | } else {
15 | mutations.push(new Mutation(file, node.range[0], node.range[1] + 1, 'true'))
16 | }
17 | }
18 | })
19 | return mutations
20 | }
21 |
22 | module.exports = BooleanMutator
23 |
--------------------------------------------------------------------------------
/packages/contracts/external/artifacts/GovernorAlpha.sol/GovernorAlpha.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../build-info/9eb68a07ba939c212f16e13a8ba98560.json"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/contracts/external/artifacts/IStaking.sol/IStaking.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../../../build-info/d82ffd0eaff058d3ab34103ceadbef3a.json"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/contracts/external/artifacts/Timelock.sol/Timelock.dbg.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-dbg-1",
3 | "buildInfo": "../../../build-info/9eb68a07ba939c212f16e13a8ba98560.json"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/contracts/migrations/1_initial_migration.js:
--------------------------------------------------------------------------------
1 | var Migrations = artifacts.require("./Migrations.sol");
2 |
3 | module.exports = function(deployer) {
4 | deployer.deploy(Migrations);
5 | };
6 |
--------------------------------------------------------------------------------
/packages/contracts/package.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@sovryn-zero/contracts",
3 | "version": "1.0.0-early.access",
4 | "description": "Sovryn ZERO solidity contracts",
5 | "repository": {
6 | "type": "git",
7 | "url": "git+https://github.com/DistributedCollective/zero.git"
8 | },
9 | "keywords": [
10 | "sovryn",
11 | "zero",
12 | "solidity contracts",
13 | "zero contracts"
14 | ],
15 | "author": "Sovryn",
16 | "license": "MIT",
17 | "bugs": {
18 | "url": "https://github.com/DistributedCollective/zero"
19 | },
20 | "homepage": "https://github.com/DistributedCollective/zero#readme"
21 | }
--------------------------------------------------------------------------------
/packages/contracts/scripts/set-version.js:
--------------------------------------------------------------------------------
1 | const { execSync } = require("child_process");
2 | const { writeFileSync } = require("fs");
3 | const path = require("path");
4 |
5 | const commitHash = execSync("git rev-parse HEAD", { encoding: "ascii" });
6 | writeFileSync(path.join("artifacts", "version"), commitHash);
7 |
--------------------------------------------------------------------------------
/packages/contracts/scripts/utils.ts:
--------------------------------------------------------------------------------
1 | // extracts the contract name from the script file name:
2 | // prefix_ContractName.ts -> returns ContractName
3 | // e.g. 1-deploy-PerpetualDepositManager.ts -> PerpetualDepositManager
4 | const getContractNameFromScriptFileName = (filename) => {
5 | return filename.substring(filename.lastIndexOf("-") + 1, filename.lastIndexOf("."));
6 | };
7 |
8 | const arrayToUnique = (value, index, self) => {
9 | return self.indexOf(value) === index;
10 | };
11 |
12 | export { getContractNameFromScriptFileName, arrayToUnique };
13 |
--------------------------------------------------------------------------------
/packages/contracts/secrets.js.template:
--------------------------------------------------------------------------------
1 | const secrets = {
2 | alchemyAPIKey: undefined,
3 | DEPLOYER_PRIVATEKEY: undefined,
4 | ACCOUNT2_PRIVATEKEY: undefined,
5 | alchemyAPIKeyRinkeby: undefined,
6 | RINKEBY_DEPLOYER_PRIVATEKEY: undefined,
7 | ETHERSCAN_API_KEY: undefined,
8 | }
9 |
10 | module.exports = {
11 | secrets
12 | }
13 |
--------------------------------------------------------------------------------
/packages/contracts/slither.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "detectors_to_exclude": "naming-convention",
3 | "filter_paths": "TestContracts|Dependencies|Migrations.sol|MultiTroveGetter.sol"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/contracts/tests/tests.test.ts:
--------------------------------------------------------------------------------
1 | // stub test
2 |
--------------------------------------------------------------------------------
/packages/dev-frontend/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules
2 |
--------------------------------------------------------------------------------
/packages/dev-frontend/.env.example:
--------------------------------------------------------------------------------
1 | REACT_APP_VERSION=369019f9cc8d08ad53c16263f3a3737e7a68b7f1
2 | REACT_APP_NETWORK=testnet
3 | REACT_APP_HCAPTCHA=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
4 |
--------------------------------------------------------------------------------
/packages/dev-frontend/.gitignore:
--------------------------------------------------------------------------------
1 | /public/config.json
2 | /build
3 | /.env
4 | /config.json
5 |
--------------------------------------------------------------------------------
/packages/dev-frontend/Dockerfile:
--------------------------------------------------------------------------------
1 | # This Dockerfile is for quickly rolling an image from an already-built dev-frontend.
2 | # If you want to build the image yourself, you must build the dev-frontend with `yarn build` first.
3 |
4 | FROM nginx
5 | COPY etc /etc
6 | COPY docker-entrypoint.d /docker-entrypoint.d
7 | COPY build /usr/share/nginx/html
8 |
--------------------------------------------------------------------------------
/packages/dev-frontend/docker-compose-example/config/nginx/site-confs/liquity.example.com:
--------------------------------------------------------------------------------
1 | server {
2 | listen 443 ssl;
3 |
4 | server_name liquity.example.com;
5 |
6 | include /config/nginx/ssl.conf;
7 |
8 | location / {
9 | include /config/nginx/proxy.conf;
10 | resolver 127.0.0.11 valid=5s;
11 | set $container dev-frontend;
12 | proxy_pass http://$container;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/packages/dev-frontend/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3"
2 |
3 | services:
4 | dev-frontend:
5 | build: .
6 | image: "liquity/dev-frontend:${TAG:-unknown}"
7 | ports:
8 | - 80:80
9 | environment:
10 | # Ethereum address that shall receive ZERO rewards
11 | - FRONTEND_TAG=0x0000000000000000000000000000000000000000
12 | # Optional Infura API key to enable snappier blockchain events using WebSockets
13 | - INFURA_API_KEY=
14 | restart: always
15 |
--------------------------------------------------------------------------------
/packages/dev-frontend/docker-entrypoint.d/99-frontend-config.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo_config() {
4 | echo '{'
5 | [ -n "$TESTNET_ONLY" ] && echo ' "testnetOnly": '$TESTNET_ONLY','
6 | echo ' "frontendTag": "'$FRONTEND_TAG'",'
7 | echo ' "infuraApiKey": "'$INFURA_API_KEY'"'
8 | echo '}'
9 | }
10 |
11 | echo_config > /usr/share/nginx/html/config.json
12 |
13 | exit 0
14 |
--------------------------------------------------------------------------------
/packages/dev-frontend/etc/nginx/conf.d/enable_gzip.conf:
--------------------------------------------------------------------------------
1 | gzip on;
2 | gzip_disable "msie6";
3 |
4 | gzip_vary on;
5 | gzip_proxied any;
6 | gzip_comp_level 6;
7 | gzip_http_version 1.1;
8 | gzip_min_length 256;
9 | gzip_types text/html text/css application/javascript;
10 |
--------------------------------------------------------------------------------
/packages/dev-frontend/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/favicon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/icons/128-lqty-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/icons/128-lqty-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/icons/128-lusd-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/icons/128-lusd-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/icons/32-lqty-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/icons/32-lqty-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/icons/32-lusd-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/icons/32-lusd-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/icons/64-lqty-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/icons/64-lqty-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/icons/64-lusd-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/icons/64-lusd-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/images/confirm-tx.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/dev-frontend/public/images/failed-tx.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/dev-frontend/public/images/pending-tx.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/packages/dev-frontend/public/lusd-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/lusd-icon.png
--------------------------------------------------------------------------------
/packages/dev-frontend/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "Liquity Dev UI",
3 | "name": "Liquity Developer UI",
4 | "icons": [
5 | {
6 | "src": "favicon.png",
7 | "sizes": "32x32",
8 | "type": "image/png"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
--------------------------------------------------------------------------------
/packages/dev-frontend/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 |
--------------------------------------------------------------------------------
/packages/dev-frontend/public/success-mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/packages/dev-frontend/public/success-mark.png
--------------------------------------------------------------------------------
/packages/dev-frontend/src/@types/window.ethereum.d.ts:
--------------------------------------------------------------------------------
1 | declare interface Window {
2 | ethereum?: {
3 | isMetaMask?: boolean;
4 | };
5 | }
6 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Abbreviation.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Box, BoxProps } from "theme-ui";
3 |
4 | type AbbreviationProps = BoxProps & {
5 | short: React.ReactNode;
6 | };
7 |
8 | export const Abbreviation: React.FC = ({ children, short, ...boxProps }) => (
9 |
10 |
11 | {children}
12 |
13 |
14 |
15 | {short}
16 |
17 |
18 | );
19 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Badge.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Flex } from "theme-ui";
3 |
4 | export const Badge: React.FC = ({ children }) => {
5 | return {children};
6 | };
7 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Card.tsx:
--------------------------------------------------------------------------------
1 | import React, { ReactNode } from "react";
2 | import { Card as ThemeUICard, Box, ThemeUIStyleObject } from "theme-ui";
3 |
4 | interface CardProps {
5 | heading?: ReactNode;
6 | children: ReactNode;
7 | sx?: ThemeUIStyleObject;
8 | }
9 |
10 | export const Card: React.FC = ({ heading, sx, children }) => {
11 | return (
12 |
13 | {heading && {heading}
}
14 | {children}
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Connector/index.ts:
--------------------------------------------------------------------------------
1 | export { ConnectorContextProvider, useConnectorContext } from './Connector';
2 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/InfoIcon.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import Tippy, { TippyProps } from "@tippyjs/react";
3 | import { Icon } from "./Icon";
4 | import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
5 |
6 | export type InfoIconProps = Pick &
7 | Pick & {
8 | tooltip: React.ReactNode;
9 | };
10 |
11 | export const InfoIcon: React.FC = ({ placement = "right", tooltip, size = "1x" }) => {
12 | return (
13 |
14 |
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/InfoMessage.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Flex, Heading, Text } from "theme-ui";
2 |
3 | import { Icon } from "./Icon";
4 |
5 | type InfoMessageProps = {
6 | title: string;
7 | icon?: React.ReactNode;
8 | };
9 |
10 | export const InfoMessage: React.FC = ({ title, children, icon }) => (
11 |
12 |
13 | {icon || }
14 |
15 | {title}
16 |
17 |
18 | {children}
19 |
20 | );
21 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Link.tsx:
--------------------------------------------------------------------------------
1 | import { NavLink as RouterLink, NavLinkProps as RouterLinkProps } from "react-router-dom";
2 | import { NavLink as ThemeUINavLink, NavLinkProps as ThemeUILinkProps } from "theme-ui";
3 |
4 | type CombinedProps = ThemeUILinkProps & RouterLinkProps<{}>;
5 |
6 | const ExactLink: React.FC = props => {
7 | return ;
8 | };
9 |
10 | export const Link: React.FC = props => {
11 | return ;
12 | };
13 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/LoadingOverlay.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Container, Spinner } from "theme-ui";
3 |
4 | export const LoadingOverlay: React.FC = () => (
5 |
9 |
10 |
11 | );
12 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Modal.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Container } from "theme-ui";
3 |
4 | export const Modal: React.FC = ({ children }) => (
5 |
6 | {children}
7 |
8 | );
9 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Stability/RemainingZERO.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Flex } from "theme-ui";
3 |
4 | import { LiquityStoreState } from "@sovryn-zero/lib-base";
5 | import { useLiquitySelector } from "@sovryn-zero/lib-react";
6 |
7 | const selector = ({ remainingStabilityPoolZEROReward }: LiquityStoreState) => ({
8 | remainingStabilityPoolZEROReward
9 | });
10 |
11 | export const RemainingZERO: React.FC = () => {
12 | const { remainingStabilityPoolZEROReward } = useLiquitySelector(selector);
13 |
14 | return (
15 |
16 | {remainingStabilityPoolZEROReward.prettify(0)} ZERO remaining
17 |
18 | );
19 | };
20 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Stability/context/StabilityViewContext.tsx:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from "react";
2 | import type { StabilityView, StabilityEvent } from "./types";
3 |
4 | type StabilityViewContextType = {
5 | view: StabilityView;
6 | dispatchEvent: (event: StabilityEvent) => void;
7 | };
8 |
9 | export const StabilityViewContext = createContext(null);
10 |
11 | export const useStabilityView = (): StabilityViewContextType => {
12 | const context: StabilityViewContextType | null = useContext(StabilityViewContext);
13 |
14 | if (context === null) {
15 | throw new Error("You must add a into the React tree");
16 | }
17 |
18 | return context;
19 | };
20 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Trove/NueCheckbox.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import { Checkbox, CheckboxProps, Label } from "@theme-ui/components";
3 |
4 | export type NueCheckboxProps = Pick;
5 |
6 | export const NueCheckbox: React.FC = ({ checked, onChange }) => (
7 |
13 | );
14 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/components/Trove/context/TroveViewContext.tsx:
--------------------------------------------------------------------------------
1 | import { createContext, useContext } from "react";
2 | import type { TroveView, TroveEvent } from "./types";
3 |
4 | type TroveViewContextType = {
5 | view: TroveView;
6 | dispatchEvent: (event: TroveEvent) => void;
7 | };
8 |
9 | export const TroveViewContext = createContext(null);
10 |
11 | export const useTroveView = (): TroveViewContextType => {
12 | const context: TroveViewContextType | null = useContext(TroveViewContext);
13 |
14 | if (context === null) {
15 | throw new Error("You must add a into the React tree");
16 | }
17 |
18 | return context;
19 | };
20 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/hooks/useBlockNumber.ts:
--------------------------------------------------------------------------------
1 | import type { Web3Provider } from "@ethersproject/providers";
2 | import { useConnectorContext } from "src/components/Connector";
3 | import useSWR from "swr";
4 |
5 | function getBlockNumber(library: Web3Provider) {
6 | return async () => {
7 | return library.getBlockNumber();
8 | };
9 | }
10 |
11 | export default function useBlockNumber() {
12 | const { provider } = useConnectorContext();
13 | const shouldFetch = !!provider;
14 |
15 | return useSWR(shouldFetch ? ["BlockNumber"] : null, getBlockNumber(provider as Web3Provider), {
16 | refreshInterval: 10 * 1000
17 | });
18 | }
19 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/hooks/useKeepSWRDataLiveAsBlocksArrive.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from "react";
2 |
3 | import useBlockNumber from "./useBlockNumber";
4 |
5 | export default function useKeepSWRDataLiveAsBlocksArrive(mutate: () => Promise) {
6 | // because we don't care about the referential identity of mutate, just bind it to a ref
7 | const mutateRef = useRef(mutate);
8 |
9 | useEffect(() => {
10 | mutateRef.current = mutate;
11 | });
12 |
13 | // then, whenever a new block arrives, trigger a mutation
14 | const { data } = useBlockNumber();
15 |
16 | useEffect(() => {
17 | mutateRef.current();
18 | }, [data]);
19 | }
20 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/hooks/useNueTokenSelection.ts:
--------------------------------------------------------------------------------
1 | import { useCallback, useMemo, useState } from "react";
2 | import { COIN, COIN2 } from "../strings";
3 |
4 | export const useNueTokenSelection = () => {
5 | const [useNueToken, setUseNueToken] = useState(false);
6 | const borrowedToken = useMemo(() => (useNueToken ? COIN2 : COIN), [useNueToken]);
7 |
8 | const handleSetNueToken = useCallback(() => {
9 | setUseNueToken(false);
10 | }, []);
11 |
12 | return {
13 | useNueToken,
14 | borrowedToken,
15 | handleSetNueToken
16 | };
17 | };
18 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/hooks/usePrevious.ts:
--------------------------------------------------------------------------------
1 | import { useRef } from "react";
2 |
3 | export function usePrevious(value: T) {
4 | const ref = useRef(value);
5 |
6 | const previousValue = ref.current;
7 | ref.current = value;
8 |
9 | return previousValue;
10 | }
11 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/index.tsx:
--------------------------------------------------------------------------------
1 | import React from "react";
2 | import ReactDOM from "react-dom";
3 |
4 | import "./index.css";
5 | import App from "./App";
6 |
7 | ReactDOM.render(
8 |
9 |
10 | ,
11 | document.getElementById("root")
12 | );
13 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/react-app-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/strings.ts:
--------------------------------------------------------------------------------
1 | export const COIN = "ZUSD";
2 | export const GT = "ZERO";
3 | export const LP = "UNI LP";
4 | export const COIN2 = "NUE"
5 | export const XUSD = "XUSD"
6 | // export const LP = "ETH/ZUSD LP";
7 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/utils/helpers.ts:
--------------------------------------------------------------------------------
1 | export const validateEmail = (email: string) => {
2 | // eslint-disable-next-line no-useless-escape
3 | const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
4 | return re.test(email);
5 | };
6 |
--------------------------------------------------------------------------------
/packages/dev-frontend/src/utils/shortenAddress.ts:
--------------------------------------------------------------------------------
1 | export const shortenAddress = (text: string, startLength: number = 6, endLength: number = 4) => {
2 | const start = text.substr(0, startLength);
3 | const end = text.substr(-endLength);
4 | return `${start}...${end}`;
5 | };
6 |
--------------------------------------------------------------------------------
/packages/dev-frontend/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": ["dom", "dom.iterable", "esnext"],
5 | "allowJs": true,
6 | "skipLibCheck": true,
7 | "esModuleInterop": true,
8 | "allowSyntheticDefaultImports": true,
9 | "strict": true,
10 | "forceConsistentCasingInFileNames": true,
11 | "module": "esnext",
12 | "moduleResolution": "node",
13 | "resolveJsonModule": true,
14 | "isolatedModules": true,
15 | "noEmit": true,
16 | "jsx": "react-jsx",
17 | "noFallthroughCasesInSwitch": true,
18 | "incremental": true,
19 | "baseUrl": "."
20 | },
21 | "include": ["src"]
22 | }
23 |
--------------------------------------------------------------------------------
/packages/examples/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@sovryn-zero/examples",
3 | "version": "0.0.1",
4 | "private": true,
5 | "devDependencies": {
6 | "chalk": "^4.1.0",
7 | "ethers": "^5.0.0"
8 | },
9 | "scripts": {
10 | "liqbot": "node src/liqbot.js"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/packages/fuzzer/.gitignore:
--------------------------------------------------------------------------------
1 | /chaos.csv
2 |
--------------------------------------------------------------------------------
/packages/fuzzer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@sovryn-zero/fuzzer",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "fuzzer": "ts-node src/index.ts"
7 | },
8 | "devDependencies": {
9 | "@types/yargs": "^16.0.0",
10 | "colors": "^1.4.0",
11 | "dotenv": "^8.2.0",
12 | "ethers": "^5.0.0",
13 | "ts-node": "^9.0.0",
14 | "typescript": "~4.1.0",
15 | "yargs": "^16.0.3"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/fuzzer/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "include": ["src"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/.turbo/turbo-build.log:
--------------------------------------------------------------------------------
1 | @ledgerhq/hw-transport-webusb:build: cache hit, replaying output 85518d4ec3798d9e
2 | @ledgerhq/hw-transport-webusb:build:
3 | @ledgerhq/hw-transport-webusb:build: > @ledgerhq/hw-transport-webusb@6.27.2 build /home/runner/work/ledger-live/ledger-live/libs/ledgerjs/packages/hw-transport-webusb
4 | @ledgerhq/hw-transport-webusb:build: > tsc && tsc -m ES6 --outDir lib-es
5 | @ledgerhq/hw-transport-webusb:build:
6 |
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/jest.config.ts:
--------------------------------------------------------------------------------
1 | import baseConfig from "../../jest.config";
2 |
3 | export default {
4 | ...baseConfig,
5 | rootDir: __dirname,
6 | };
7 |
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/lib-es/webusb.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | export declare function requestLedgerDevice(): Promise;
3 | export declare function getLedgerDevices(): Promise;
4 | export declare function getFirstLedgerDevice(): Promise;
5 | export declare const isSupported: () => Promise;
6 | //# sourceMappingURL=webusb.d.ts.map
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/lib-es/webusb.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"webusb.d.ts","sourceRoot":"","sources":["../src/webusb.ts"],"names":[],"mappings":";AAQA,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,SAAS,CAAC,CAK9D;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAG7D;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAI/D;AAED,eAAO,MAAM,WAAW,QAAO,QAAQ,OAAO,CAK3C,CAAC"}
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/lib/webusb.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | export declare function requestLedgerDevice(): Promise;
3 | export declare function getLedgerDevices(): Promise;
4 | export declare function getFirstLedgerDevice(): Promise;
5 | export declare const isSupported: () => Promise;
6 | //# sourceMappingURL=webusb.d.ts.map
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/lib/webusb.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"webusb.d.ts","sourceRoot":"","sources":["../src/webusb.ts"],"names":[],"mappings":";AAQA,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,SAAS,CAAC,CAK9D;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAG7D;AAED,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,SAAS,CAAC,CAI/D;AAED,eAAO,MAAM,WAAW,QAAO,QAAQ,OAAO,CAK3C,CAAC"}
--------------------------------------------------------------------------------
/packages/hw-transport-webusb/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "lib",
5 | "lib": ["DOM", "ES2017"]
6 | },
7 | "include": ["src/**/*"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/lib-base/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "es2021": true,
5 | "node": true
6 | },
7 | "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
8 | "parser": "@typescript-eslint/parser",
9 | "parserOptions": {
10 | "ecmaVersion": 2021,
11 | "sourceType": "module"
12 | },
13 | "plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
14 | "rules": {
15 | "tsdoc/syntax": "warn"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/packages/lib-base/.mocharc.yml:
--------------------------------------------------------------------------------
1 | spec: "test/**/*.test.ts"
2 |
--------------------------------------------------------------------------------
/packages/lib-base/.npmignore:
--------------------------------------------------------------------------------
1 | /temp
2 |
--------------------------------------------------------------------------------
/packages/lib-base/.npmrc:
--------------------------------------------------------------------------------
1 | access=public
2 |
--------------------------------------------------------------------------------
/packages/lib-base/README.md:
--------------------------------------------------------------------------------
1 | # @sovryn-zero/lib-base
2 |
3 | Shared interfaces and classes of the Zero SDK.
4 |
5 | Needs to be installed in order to use other Zero SDK packages, for example [@sovryn-zero/lib-ethers](https://www.npmjs.com/package/@sovryn-zero/lib-ethers).
6 |
7 | ## API Reference
8 |
9 | For now, it can be found in the public Zero [repo](https://github.com/DistributedCollective/zero/blob/master/docs/sdk/lib-base.md).
10 |
--------------------------------------------------------------------------------
/packages/lib-base/api-extractor.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3 | "extends": "../../api-extractor.base.json"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/lib-base/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./src/constants";
2 | export * from "./src/Decimal";
3 | export * from "./src/Trove";
4 | export * from "./src/StabilityDeposit";
5 | export * from "./src/ZEROStake";
6 | export * from "./src/Fees";
7 | export * from "./src/ReadableLiquity";
8 | export * from "./src/ObservableLiquity";
9 | export * from "./src/TransactableLiquity";
10 | export * from "./src/SendableLiquity";
11 | export * from "./src/PopulatableLiquity";
12 | export * from "./src/LiquityStore";
13 | export * from "./src/_CachedReadableLiquity";
14 |
--------------------------------------------------------------------------------
/packages/lib-base/tsconfig.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "dist"
5 | },
6 | "include": ["src"],
7 | "files": ["./index.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/lib-base/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "include": ["src", "test"],
4 | "compilerOptions": { "noErrorTruncation": true }
5 | }
6 |
--------------------------------------------------------------------------------
/packages/lib-ethers/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "es2021": true,
5 | "node": true
6 | },
7 | "extends": [
8 | "eslint:recommended",
9 | "plugin:@typescript-eslint/recommended"
10 | ],
11 | "parser": "@typescript-eslint/parser",
12 | "parserOptions": {
13 | "ecmaVersion": 2021,
14 | "sourceType": "module"
15 | },
16 | "plugins": [
17 | "@typescript-eslint",
18 | "eslint-plugin-tsdoc"
19 | ],
20 | "rules": {
21 | "tsdoc/syntax": "warn",
22 | "@typescript-eslint/no-empty-interface": [
23 | "warn"
24 | ]
25 | }
26 | }
--------------------------------------------------------------------------------
/packages/lib-ethers/.npmignore:
--------------------------------------------------------------------------------
1 | /live
2 | /accounts.json
3 | /temp
4 |
--------------------------------------------------------------------------------
/packages/lib-ethers/.npmrc:
--------------------------------------------------------------------------------
1 | access=public
2 |
--------------------------------------------------------------------------------
/packages/lib-ethers/abi/GasPool.json:
--------------------------------------------------------------------------------
1 | []
--------------------------------------------------------------------------------
/packages/lib-ethers/abi/MockBalanceRedirectPresale.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "inputs": [],
4 | "name": "closePresale",
5 | "outputs": [],
6 | "stateMutability": "nonpayable",
7 | "type": "function"
8 | },
9 | {
10 | "inputs": [],
11 | "name": "isClosed",
12 | "outputs": [
13 | {
14 | "internalType": "bool",
15 | "name": "",
16 | "type": "bool"
17 | }
18 | ],
19 | "stateMutability": "view",
20 | "type": "function"
21 | },
22 | {
23 | "inputs": [],
24 | "name": "openPresale",
25 | "outputs": [],
26 | "stateMutability": "nonpayable",
27 | "type": "function"
28 | }
29 | ]
--------------------------------------------------------------------------------
/packages/lib-ethers/api-extractor.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3 | "extends": "../../api-extractor.base.json"
4 | }
5 |
--------------------------------------------------------------------------------
/packages/lib-ethers/deployments/.gitignore:
--------------------------------------------------------------------------------
1 | /*.json
2 | /*/dev.json
3 | !/backfill/dev.json
4 |
--------------------------------------------------------------------------------
/packages/lib-ethers/deployments/backfill/dev.json:
--------------------------------------------------------------------------------
1 | null
2 |
--------------------------------------------------------------------------------
/packages/lib-ethers/index.ts:
--------------------------------------------------------------------------------
1 | export {
2 | _connectByChainId,
3 | EthersLiquityConnection,
4 | EthersLiquityConnectionOptionalParams,
5 | EthersLiquityStoreOption,
6 | UnsupportedNetworkError
7 | } from "./src/EthersLiquityConnection";
8 |
9 | export * from "./src/types";
10 | export * from "./src/ReadableEthersLiquity";
11 | export * from "./src/ObservableEthersLiquity";
12 | export * from "./src/BlockPolledLiquityStore";
13 | export * from "./src/PopulatableEthersLiquity";
14 | export * from "./src/SendableEthersLiquity";
15 | export * from "./src/EthersLiquity";
16 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/Address.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "Address",
4 | "sourceName": "contracts/LPRewards/Dependencies/Address.sol",
5 | "abi": [],
6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203d8e04e4f3e7efc836523c4044216c1713c83f406f3ff11344f6fd412bd92fb664736f6c634300060b0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203d8e04e4f3e7efc836523c4044216c1713c83f406f3ff11344f6fd412bd92fb664736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/CheckContract.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "CheckContract",
4 | "sourceName": "contracts/Dependencies/CheckContract.sol",
5 | "abi": [],
6 | "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220f833a90a63ff9562d958937f5a8785e3f5716c3a9702005b5b2b779a76276b5564736f6c634300060b0033",
7 | "deployedBytecode": "0x6080604052600080fdfea2646970667358221220f833a90a63ff9562d958937f5a8785e3f5716c3a9702005b5b2b779a76276b5564736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/GasPool.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "GasPool",
4 | "sourceName": "contracts/GasPool.sol",
5 | "abi": [],
6 | "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea264697066735822122039256888add74d9ba1e587b30d8fba59588d324fa8a904bb5bafa6e715256de564736f6c634300060b0033",
7 | "deployedBytecode": "0x6080604052600080fdfea264697066735822122039256888add74d9ba1e587b30d8fba59588d324fa8a904bb5bafa6e715256de564736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/ILiquityBase.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "ILiquityBase",
4 | "sourceName": "contracts/Interfaces/ILiquityBase.sol",
5 | "abi": [
6 | {
7 | "inputs": [],
8 | "name": "priceFeed",
9 | "outputs": [
10 | {
11 | "internalType": "contract IPriceFeed",
12 | "name": "",
13 | "type": "address"
14 | }
15 | ],
16 | "stateMutability": "view",
17 | "type": "function"
18 | }
19 | ],
20 | "bytecode": "0x",
21 | "deployedBytecode": "0x",
22 | "linkReferences": {},
23 | "deployedLinkReferences": {}
24 | }
25 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/LiquityMath.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "LiquityMath",
4 | "sourceName": "contracts/Dependencies/LiquityMath.sol",
5 | "abi": [],
6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220993a7078a64ff8d768ec927720fb5f4a0a581f1be4f1f67fca14b969b2092adb64736f6c634300060b0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220993a7078a64ff8d768ec927720fb5f4a0a581f1be4f1f67fca14b969b2092adb64736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/LiquitySafeMath128.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "LiquitySafeMath128",
4 | "sourceName": "contracts/Dependencies/LiquitySafeMath128.sol",
5 | "abi": [],
6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220799872f0f8b387cbe9eaec83bd8ce2f6401a32c5e1baeca9be361b4ad6bbd0b764736f6c634300060b0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220799872f0f8b387cbe9eaec83bd8ce2f6401a32c5e1baeca9be361b4ad6bbd0b764736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/SafeERC20.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "SafeERC20",
4 | "sourceName": "contracts/LPRewards/Dependencies/SafeERC20.sol",
5 | "abi": [],
6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fcd3192cf5a9d86556cc0329cfa29a07f12f44ed452596b25ffc7a5906e70aa964736f6c634300060b0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220fcd3192cf5a9d86556cc0329cfa29a07f12f44ed452596b25ffc7a5906e70aa964736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/SafeMath.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "SafeMath",
4 | "sourceName": "contracts/Dependencies/SafeMath.sol",
5 | "abi": [],
6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220457c16ba1d24447f58f5e9c2ddbfc2e863ec475fe6c8709fa99670126138dc8764736f6c634300060b0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220457c16ba1d24447f58f5e9c2ddbfc2e863ec475fe6c8709fa99670126138dc8764736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/console.json:
--------------------------------------------------------------------------------
1 | {
2 | "_format": "hh-sol-artifact-1",
3 | "contractName": "console",
4 | "sourceName": "contracts/Dependencies/console.sol",
5 | "abi": [],
6 | "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207e606e1a3dfe31a6a48f84a2e4fff962474eeb3b34d4ffcdcd96c284e97a0aec64736f6c634300060b0033",
7 | "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212207e606e1a3dfe31a6a48f84a2e4fff962474eeb3b34d4ffcdcd96c284e97a0aec64736f6c634300060b0033",
8 | "linkReferences": {},
9 | "deployedLinkReferences": {}
10 | }
11 |
--------------------------------------------------------------------------------
/packages/lib-ethers/live/version:
--------------------------------------------------------------------------------
1 | 5174ecd0da4842157aba989499200d690b7e374f
2 |
--------------------------------------------------------------------------------
/packages/lib-ethers/scripts/delete-dev-deployments.ts:
--------------------------------------------------------------------------------
1 | import fs from "fs";
2 | import path from "path";
3 |
4 | const deploymentsDir = "deployments";
5 | const devDeploymentName = "dev.json";
6 |
7 | const exists = (file: string) => fs.existsSync(file) && fs.lstatSync(file).isFile();
8 |
9 | const devDeployments = () =>
10 | fs
11 | .readdirSync(deploymentsDir, { withFileTypes: true })
12 | .filter(dirent => dirent.isDirectory() && dirent.name !== "backfill")
13 | .map(deploymentDir => path.join(deploymentsDir, deploymentDir.name, devDeploymentName))
14 | .concat(path.join(deploymentsDir, devDeploymentName))
15 | .filter(exists);
16 |
17 | devDeployments().forEach(devDeployment => fs.unlinkSync(devDeployment));
18 |
--------------------------------------------------------------------------------
/packages/lib-ethers/tsconfig.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "dist"
5 | },
6 | "include": ["src", "types"],
7 | "files": ["./index.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/lib-ethers/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "include": [
4 | "src",
5 | "test",
6 | "types",
7 | "scripts",
8 | "utils"
9 | ],
10 | "files": [
11 | "./hardhat.config.ts"
12 | ]
13 | }
--------------------------------------------------------------------------------
/packages/lib-react/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true,
4 | "es2021": true,
5 | "node": true
6 | },
7 | "extends": [
8 | "eslint:recommended",
9 | "plugin:@typescript-eslint/recommended",
10 | "plugin:react/recommended",
11 | "plugin:react-hooks/recommended"
12 | ],
13 | "parser": "@typescript-eslint/parser",
14 | "parserOptions": {
15 | "ecmaFeatures": {
16 | "jsx": true
17 | },
18 | "ecmaVersion": 2021,
19 | "sourceType": "module"
20 | },
21 | "plugins": ["@typescript-eslint", "react", "react-hooks"],
22 | "settings": {
23 | "react": {
24 | "version": "detect"
25 | }
26 | },
27 | "rules": {
28 | "react/prop-types": "off"
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/packages/lib-react/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./src/components/LiquityStoreProvider";
2 |
3 | export * from "./src/hooks/useLiquityStore";
4 | export * from "./src/hooks/useLiquityReducer";
5 | export * from "./src/hooks/useLiquitySelector";
6 |
--------------------------------------------------------------------------------
/packages/lib-react/src/hooks/useLiquitySelector.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useReducer } from "react";
2 |
3 | import { LiquityStoreState } from "@sovryn-zero/lib-base";
4 |
5 | import { equals } from "../utils/equals";
6 | import { useLiquityStore } from "./useLiquityStore";
7 |
8 | export const useLiquitySelector = (select: (state: LiquityStoreState) => S): S => {
9 | const store = useLiquityStore();
10 | const [, rerender] = useReducer(() => ({}), {});
11 |
12 | useEffect(
13 | () =>
14 | store.subscribe(({ newState, oldState }) => {
15 | if (!equals(select(newState), select(oldState))) {
16 | rerender();
17 | }
18 | }),
19 | [store, select]
20 | );
21 |
22 | return select(store.state);
23 | };
24 |
--------------------------------------------------------------------------------
/packages/lib-react/src/hooks/useLiquityStore.ts:
--------------------------------------------------------------------------------
1 | import { useContext } from "react";
2 |
3 | import { LiquityStore } from "@sovryn-zero/lib-base";
4 |
5 | import { LiquityStoreContext } from "../components/LiquityStoreProvider";
6 |
7 | export const useLiquityStore = (): LiquityStore => {
8 | const store = useContext(LiquityStoreContext);
9 |
10 | if (!store) {
11 | throw new Error("You must provide a LiquityStore via LiquityStoreProvider");
12 | }
13 |
14 | return store as LiquityStore;
15 | };
16 |
--------------------------------------------------------------------------------
/packages/lib-react/src/utils/equals.ts:
--------------------------------------------------------------------------------
1 | type UnknownObject = Record;
2 |
3 | const hasOwnProperty = (o: UnknownObject, key: string) =>
4 | Object.prototype.hasOwnProperty.call(o, key);
5 |
6 | const shallowEquals = (a: UnknownObject, b: UnknownObject) => {
7 | const keysA = Object.keys(a);
8 | const keysB = Object.keys(b);
9 |
10 | return (
11 | keysA.length === keysB.length &&
12 | keysA.every(key => hasOwnProperty(b, key) && Object.is(a[key], b[key]))
13 | );
14 | };
15 |
16 | const isObject = (a: unknown): a is UnknownObject => a !== null && typeof a === "object";
17 |
18 | export const equals = (a: unknown, b: unknown): boolean =>
19 | isObject(a) && isObject(b) ? shallowEquals(a, b) : Object.is(a, b);
20 |
--------------------------------------------------------------------------------
/packages/lib-react/tsconfig.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "jsx": "react",
5 | "outDir": "dist"
6 | },
7 | "include": ["src"],
8 | "files": ["./index.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/packages/lib-react/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "jsx": "react"
4 | },
5 | "extends": "../../tsconfig.base.json",
6 | "include": ["src"]
7 | }
8 |
--------------------------------------------------------------------------------
/packages/providers/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./src/BatchedProvider";
2 | export * from "./src/WebSocketAugmentedProvider";
3 | export * from "./src/WebSocketProvider";
4 |
--------------------------------------------------------------------------------
/packages/providers/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@sovryn-zero/providers",
3 | "version": "0.0.1",
4 | "private": true,
5 | "main": "dist/index.js",
6 | "types": "dist/index.d.ts",
7 | "scripts": {
8 | "prepare": "tsc --project tsconfig.dist.json"
9 | },
10 | "devDependencies": {
11 | "ethers": "^5.0.0",
12 | "ts-node": "^9.1.1",
13 | "typescript": "~4.1.0"
14 | },
15 | "peerDependencies": {
16 | "ethers": "^5.0.0"
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/packages/providers/src/WebSocketProvider.ts:
--------------------------------------------------------------------------------
1 | import { WebSocketProvider as EthersWebSocketProvider } from "@ethersproject/providers";
2 |
3 | export class WebSocketProvider extends EthersWebSocketProvider {
4 | get isReady() {
5 | return (this._websocket as WebSocket).readyState === WebSocket.OPEN;
6 | }
7 |
8 | set onClose(closeListener: ((closeEvent: CloseEvent) => void) | null) {
9 | (this._websocket as WebSocket).onclose = closeListener;
10 | }
11 |
12 | close(code?: number) {
13 | (this._websocket as WebSocket).close(code);
14 | }
15 |
16 | async detectNetwork() {
17 | return this.network;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/packages/providers/tsconfig.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "compilerOptions": {
4 | "outDir": "dist"
5 | },
6 | "include": ["src"],
7 | "files": ["./index.ts"]
8 | }
9 |
--------------------------------------------------------------------------------
/packages/providers/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../../tsconfig.base.json",
3 | "include": ["src"]
4 | }
5 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.env.example:
--------------------------------------------------------------------------------
1 | ETHERSCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1
2 | ROPSTEN_URL=https://eth-ropsten.alchemyapi.io/v2/
3 | PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
4 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.eslintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | artifacts
3 | cache
4 | coverage
5 | ignore
6 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": false,
4 | "es2021": true,
5 | "mocha": true,
6 | "node": true
7 | },
8 | "plugins": [
9 | "@typescript-eslint"
10 | ],
11 | "extends": [
12 | "standard",
13 | "plugin:prettier/recommended",
14 | "plugin:node/recommended"
15 | ],
16 | "parser": "@typescript-eslint/parser",
17 | "parserOptions": {
18 | "ecmaVersion": 12
19 | },
20 | "rules": {
21 | "node/no-unsupported-features/es-syntax": [
22 | "error",
23 | {
24 | "ignores": [
25 | "modules"
26 | ]
27 | }
28 | ]
29 | }
30 | }
--------------------------------------------------------------------------------
/packages/sdk-contracts/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sol linguist-language=Solidity
2 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | .env
4 | coverage
5 | coverage.json
6 | typechain
7 | .vscode/
8 | cache
9 | artifacts
10 | *.code-workspace
11 | ignore/
12 | tmp/
13 | test/docs/
14 | types/
15 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.npmignore:
--------------------------------------------------------------------------------
1 | hardhat.config.ts
2 | scripts
3 | test
4 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.npmrc:
--------------------------------------------------------------------------------
1 | access=public
2 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.prettierignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | artifacts
3 | cache
4 | coverage*
5 | gasReporterOutput.json
6 |
7 | .*
8 | *.md
9 | .vscode/
10 | !.solhint.json
11 | abi/
12 | artifacts/
13 | external-artifacts/
14 | reports/
15 | node_modules/
16 | typechain/
17 | package-lock.json
18 | coverage
19 | coverage.json
20 | docs
21 | package.json
22 | cache
23 | *.yaml
24 | abi
25 | ignore/
--------------------------------------------------------------------------------
/packages/sdk-contracts/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "overrides": [
3 | {
4 | "files": [
5 | "*.sol"
6 | ],
7 | "options": {
8 | "printWidth": 99,
9 | "tabWidth": 4,
10 | "useTabs": false,
11 | "singleQuote": false,
12 | "bracketSpacing": true,
13 | "explicitTypes": "always"
14 | }
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "solhint:recommended",
3 | "rules": {
4 | "compiler-version": ["error", "^0.8.0"],
5 | "func-visibility": ["warn", { "ignoreConstructors": true }]
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/packages/sdk-contracts/.solhintignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | ignore
--------------------------------------------------------------------------------
/packages/sdk-contracts/package.dist.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@sovryn-zero/sdk-contracts",
3 | "version": "1.0.0-early.access",
4 | "description": "Sovryn ZERO SDK solidity contracts",
5 | "repository": {
6 | "type": "git",
7 | "url": "git+https://github.com/DistributedCollective/zero.git"
8 | },
9 | "keywords": [
10 | "sovryn",
11 | "zero",
12 | "solidity contracts",
13 | "sdk",
14 | "sovryn zero sdk"
15 | ],
16 | "author": "Sovryn",
17 | "license": "MIT",
18 | "bugs": {
19 | "url": "https://github.com/DistributedCollective/zero"
20 | },
21 | "homepage": "https://github.com/DistributedCollective/zero#readme",
22 | "peerDependencies": {
23 | "@sovryn-zero/contracts": "^1.0.0-early.access"
24 | }
25 | }
--------------------------------------------------------------------------------
/packages/sdk-contracts/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "module": "commonjs",
5 | "strict": true,
6 | "esModuleInterop": true,
7 | "outDir": "dist",
8 | "declaration": true,
9 | "declarationMap": true,
10 | "sourceMap": true,
11 | "strictNullChecks": true,
12 | "resolveJsonModule": true,
13 | "skipLibCheck": true
14 | },
15 | //"extends": "../../tsconfig.base.json",
16 | "include": ["./src", "./test", "./types", "./scripts", "./utils"],
17 | "files": ["./hardhat.config.ts"]
18 | }
19 |
--------------------------------------------------------------------------------
/papers/.gitignore:
--------------------------------------------------------------------------------
1 | *.aux
2 | *.log
3 | *.toc
4 | auto/
--------------------------------------------------------------------------------
/papers/Efficient_Order-Preserving_Redistribution_of_Troves.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/Efficient_Order-Preserving_Redistribution_of_Troves.pdf
--------------------------------------------------------------------------------
/papers/README.md:
--------------------------------------------------------------------------------
1 | ## Math proofs and derivations
2 |
3 | The Zero implementation relies on some important system properties and mathematical derivations, available here as PDFs.
4 |
5 | In particular, we have:
6 |
7 | 1. A proof that an equal collateral ratio between two Troves is maintained throughout a series of liquidations and new trove issuances
8 | 2. A proof that Trove ordering is maintained throughout a series of liquidations and new trove issuances (follows on from Proof 1)
9 | 3. A derivation of a formula and implementation for a highly scalable (O(1) complexity) reward distribution in the Stability Pool, involving compounding and decreasing stakes.
10 |
--------------------------------------------------------------------------------
/papers/Scalable_Reward_Distribution_with_Compounding_Stakes.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/Scalable_Reward_Distribution_with_Compounding_Stakes.pdf
--------------------------------------------------------------------------------
/papers/System_order_evolution_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/System_order_evolution_1.png
--------------------------------------------------------------------------------
/papers/System_order_evolution_1_proof.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/System_order_evolution_1_proof.png
--------------------------------------------------------------------------------
/papers/System_order_evolution_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/System_order_evolution_2.png
--------------------------------------------------------------------------------
/papers/System_order_evolution_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/System_order_evolution_3.png
--------------------------------------------------------------------------------
/papers/System_order_evolution_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/System_order_evolution_4.png
--------------------------------------------------------------------------------
/papers/System_order_evolution_generic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/System_order_evolution_generic.png
--------------------------------------------------------------------------------
/papers/whitepaper/a1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a1.png
--------------------------------------------------------------------------------
/papers/whitepaper/a10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a10.png
--------------------------------------------------------------------------------
/papers/whitepaper/a11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a11.png
--------------------------------------------------------------------------------
/papers/whitepaper/a12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a12.png
--------------------------------------------------------------------------------
/papers/whitepaper/a13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a13.png
--------------------------------------------------------------------------------
/papers/whitepaper/a14.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a14.png
--------------------------------------------------------------------------------
/papers/whitepaper/a2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a2.png
--------------------------------------------------------------------------------
/papers/whitepaper/a3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a3.png
--------------------------------------------------------------------------------
/papers/whitepaper/a4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a4.png
--------------------------------------------------------------------------------
/papers/whitepaper/a5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a5.png
--------------------------------------------------------------------------------
/papers/whitepaper/a6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a6.png
--------------------------------------------------------------------------------
/papers/whitepaper/a7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a7.png
--------------------------------------------------------------------------------
/papers/whitepaper/a8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a8.png
--------------------------------------------------------------------------------
/papers/whitepaper/a9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DistributedCollective/zero/a387382261a098b1b7e2dd2b531ef339d22dfcf7/papers/whitepaper/a9.png
--------------------------------------------------------------------------------
/scripts/collect-sdk-apis.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs-extra");
2 | const path = require("path");
3 |
4 | const filesToCollect = [
5 | "packages/lib-base/temp/lib-base.api.json",
6 | "packages/lib-ethers/temp/lib-ethers.api.json"
7 | ];
8 |
9 | const outputDir = "temp/sdk-apis";
10 |
11 | fs.removeSync(outputDir);
12 | fs.mkdirSync(outputDir, { recursive: true });
13 |
14 | filesToCollect.forEach(file => fs.copyFileSync(file, path.join(outputDir, path.basename(file))));
15 |
--------------------------------------------------------------------------------
/tsconfig.base.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "declaration": true,
4 | "declarationMap": true,
5 | "sourceMap": true,
6 | "target": "ES2019",
7 | "lib": ["ES2019", "DOM"],
8 | "module": "CommonJS",
9 | "strict": true,
10 | "strictNullChecks": true,
11 | "esModuleInterop": true,
12 | "resolveJsonModule": true,
13 | "skipLibCheck": true
14 | }
15 | }
16 |
--------------------------------------------------------------------------------