-
Notifications
You must be signed in to change notification settings - Fork 190
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: update depositTo
to use standard deposit
#432
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
src/lib/assetBridger/ethBridger.ts
Outdated
params.retryableGasOverrides | ||
) | ||
|
||
const tx = await inbox.connect(params.l1Signer).unsafeCreateRetryableTicket( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we using unsafeCreateRetryableTicket
here? can be dangerous
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to createRetryableTicket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/lib/assetBridger/ethBridger.ts
Outdated
'0x', // data, | ||
{ | ||
from: signerAddress.value, | ||
value: amount, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually this should be
value: amount, | |
value: gasEstimation.deposit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…bitrum-sdk into depositTo-refactor
…o depositTo-refactor
tests/integration/eth.test.ts
Outdated
destWallet.address | ||
) | ||
expect( | ||
testWalletL2EthBalance.lt(ethToDeposit), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets assert it's zero
tests/integration/eth.test.ts
Outdated
@@ -211,6 +216,60 @@ describe('Ether', async () => { | |||
) | |||
}) | |||
|
|||
it('deposit ether to a specific L2 address and check balance before auto-redeem', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it('deposit ether to a specific L2 address and check balance before auto-redeem', async () => { | |
it('deposit ether to a specific L2 address with manual redeem', async () => { |
tests/integration/eth.test.ts
Outdated
const rec = await res.wait() | ||
const l1ToL2Messages = await rec.getL1ToL2Messages(l2Signer.provider!) | ||
expect(l1ToL2Messages.length).to.eq(1, 'failed to find 1 l1 to l2 message') | ||
let l1ToL2Message = l1ToL2Messages[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let l1ToL2Message = l1ToL2Messages[0] | |
const l1ToL2MessageReader = l1ToL2Messages[0] |
tests/integration/eth.test.ts
Outdated
l1ToL2Message = l1Receipt.getL1ToL2Messages(l2Signer)[0] | ||
|
||
if (l1ToL2Message instanceof L1ToL2MessageWriter) { | ||
const res = await l1ToL2Message.redeem() | ||
await res.wait() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l1ToL2Message = l1Receipt.getL1ToL2Messages(l2Signer)[0] | |
if (l1ToL2Message instanceof L1ToL2MessageWriter) { | |
const res = await l1ToL2Message.redeem() | |
await res.wait() | |
} | |
const l1ToL2MessageWriter = l1Receipt.getL1ToL2Messages(l2Signer)[0] | |
await (await l1ToL2MessageWriter.redeem()).wait() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
closes FS-368