Skip to content

Commit

Permalink
stop v1 AC
Browse files Browse the repository at this point in the history
  • Loading branch information
jfzhou5 committed Dec 20, 2023
1 parent 6342f90 commit e7b11ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions packages/bot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,22 @@ import { fetchCompoundInfo } from "./supplyAndStake/fetch"
import { fetchP2PCompoundInfo } from "./p2p/fetch"
import { claimAndCompoundForP2PPairStaking } from "./p2p/compound"
import { SimpleMatchOrder, ValidCompoundInfo } from "./types"
import { swapApeFeeToETH } from "./feeToEth"

async function main() {
logger.info("Starting paraspace-ape-compound-bot")

const worker = async () => {
const v1CompoundInfo: ValidCompoundInfo = await fetchCompoundInfo(true)
await claimAndCompound(true, v1CompoundInfo)
const v1P2pCompoundInfo: SimpleMatchOrder[] = await fetchP2PCompoundInfo(true)
await claimAndCompoundForP2PPairStaking(true, v1P2pCompoundInfo)
// const v1CompoundInfo: ValidCompoundInfo = await fetchCompoundInfo(true)
// await claimAndCompound(true, v1CompoundInfo)
// const v1P2pCompoundInfo: SimpleMatchOrder[] = await fetchP2PCompoundInfo(true)
// await claimAndCompoundForP2PPairStaking(true, v1P2pCompoundInfo)

const v2CompoundInfo: ValidCompoundInfo = await fetchCompoundInfo(false)
await claimAndCompound(false, v2CompoundInfo)
const v2P2pCompoundInfo: SimpleMatchOrder[] = await fetchP2PCompoundInfo(false)
await claimAndCompoundForP2PPairStaking(false, v2P2pCompoundInfo)

await swapApeFeeToETH()
// await swapApeFeeToETH()
}
await Runtime.run(worker)

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/tx/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const getOptMaxFeePerGas = async (
): Promise<BigNumber> => {
curGasPrice
if (!isMainnet) return ethers.utils.parseUnits("1000", "gwei")
const maxGasPrice = ethers.utils.parseUnits("22", "gwei")
const maxGasPrice = ethers.utils.parseUnits("35", "gwei")
return maxGasPrice
// const midGasPrice = ethers.utils.parseUnits("25", "gwei")
// if (curGasPrice.gte(maxGasPrice)) return maxGasPrice
Expand Down

0 comments on commit e7b11ee

Please sign in to comment.