squeeth-monorepo
squeeth-monorepo copied to clipboard
One-Click LP [For Testing]
Task: One-Click LP [Testing Only]
Description
Learn more about the One-Click LP API here.
This PR is not to merge, but it includes frontend tester buttons that can help with testing various API features. The API functions match those in the open PRs.
How to Test
Pull down this PR.
Opening a Position
- Open
packages/frontend/pages/lp.tsx
file - Open an LP position by typing in your desired squeeth amount:
await openLPPosition(new BigNumber(SQUEETH_AMOUNT), LOWER_TICK, UPPER_TICK, 0, () => {})`
-
yarn dev
in thepackages/frontend
folder in order to run squeeth site on localhost. - Scroll to the bottom of the LP tab to find the tester buttons! Click the open button to open your position.
- Check Etherscan on Ropsten to see the vault ID of the vault you just opened via the API. Use this vault ID when testing the other functions.
Update Operator
- You need to approve your address to update this new vault.
await updateOperator(VAULT_ID, controllerHelper)
- Click the update operator button.
Collecting Fees
- Collect fees accumulated by your LP position by typing in the vault ID.
await collectFees(VAULT_ID, () => {})
- Click the collect fees button.
Rebalance LP Position
- Rebalance your position to a new range by typing in the vault ID and new range.
await rebalanceSwap(VAULT_ID, NEW_LOWER_TICK, NEW_UPPER_TICK, () => {})
- Click the rebalance general swap button.
Close LP Position
- Close your position.
await closeLPPosition(VAULT_ID, () => {})
- Click the rebalance general swap button.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
continuouscall | ❌ Failed (Inspect) | Nov 18, 2022 at 6:49PM (UTC) |