Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce function to prep tx to reclaim as sender #117

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

borcherd
Copy link
Contributor

@borcherd borcherd commented Mar 1, 2024

No description provided.

Copy link

github-actions bot commented Mar 1, 2024

Live tests failed. Please check the logs to see which checks failed.

contractVersion = null,
}: {
depositIndex: number
provider?: ethers.providers.JsonRpcProvider // TODO: update to not use ethers.providers.JsonRpcProvider but just a url
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice comment y!

src/index.ts Outdated
}

if (contractVersion == null) {
contractVersion = getLatestContractVersion({ chainId, type: 'normal' })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but I think we should change type naming to vault, batcher, router

Instead of normal / batch

src/index.ts Outdated
contractVersion = getLatestContractVersion({ chainId, type: 'normal' })
}

const contract = await getContract(chainId, provider, contractVersion)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, maybe we should add latest param to get Contract so we can skip this 2part thing

src/index.ts Outdated

const tx = await contract.populateTransaction.withdrawDepositSender(depositIndex)

const peanutUnsignedTransaction: interfaces.IPeanutUnsignedTransaction = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have ethersV5ToPeanutTx and peanutToEthersV5Tx for this kinda stuff

@borcherd borcherd merged commit 7617618 into main Mar 1, 2024
1 of 2 checks passed
Copy link

github-actions bot commented Mar 1, 2024

Live tests failed. Please check the logs to see which checks failed.

2 similar comments
Copy link

github-actions bot commented Mar 1, 2024

Live tests failed. Please check the logs to see which checks failed.

Copy link

github-actions bot commented Mar 1, 2024

Live tests failed. Please check the logs to see which checks failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants