Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions integration-tests/test/boba-api.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ describe('Boba API Tests', async () => {
const deadline = Math.floor(Date.now() / 1000) + 90
const verifyingContract = L2Boba.address

await L2Boba.transfer(env.l2Wallet_2.address, value)

const data: any = {
primaryType: 'Permit',
types: { EIP712Domain, Permit },
Expand Down Expand Up @@ -236,7 +238,7 @@ describe('Boba API Tests', async () => {
expect(BobaBalanceAfter).to.be.deep.eq(BobaBalanceBefore)
expect(ETHBalanceAfter).to.be.deep.eq(ETHBalanceBefore)
expect(GPO_ETHBalanceAfter).to.be.deep.eq(GPO_ETHBalanceBefore)
}).retries(3)
})

it('should return reverted reason from API if Boba_GasPriceOracle has insufficient ETH', async () => {
// withdraw ETH first
Expand All @@ -254,6 +256,8 @@ describe('Boba API Tests', async () => {
const deadline = Math.floor(Date.now() / 1000) + 90
const verifyingContract = L2Boba.address

await L2Boba.transfer(env.l2Wallet_2.address, value)

const data: any = {
primaryType: 'Permit',
types: { EIP712Domain, Permit },
Expand Down Expand Up @@ -303,7 +307,7 @@ describe('Boba API Tests', async () => {
to: Boba_GasPriceOracle.address,
value: ethers.utils.parseEther('10'),
})
}).retries(3)
})
})
})
})
46 changes: 24 additions & 22 deletions integration-tests/test/turing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,34 @@ describe('Turing 256 Bit Random Number Test', async () => {
const preL1BOBABalance = await L1BOBAToken.balanceOf(env.l1Wallet.address)
const preL2BOBABalance = await L2BOBAToken.balanceOf(env.l2Wallet.address)

const approveL1BOBATX = await L1BOBAToken.approve(
L1StandardBridge.address,
depositBOBAAmount
)
await approveL1BOBATX.wait()

await env.waitForXDomainTransaction(
L1StandardBridge.depositERC20(
L1BOBAToken.address,
L2BOBAToken.address,
depositBOBAAmount,
9999999,
ethers.utils.formatBytes32String(new Date().getTime().toString())
if (preL2BOBABalance.lt(depositBOBAAmount)) {
const approveL1BOBATX = await L1BOBAToken.approve(
L1StandardBridge.address,
depositBOBAAmount
)
await approveL1BOBATX.wait()

await env.waitForXDomainTransaction(
L1StandardBridge.depositERC20(
L1BOBAToken.address,
L2BOBAToken.address,
depositBOBAAmount,
9999999,
ethers.utils.formatBytes32String(new Date().getTime().toString())
)
)
)

const postL1BOBABalance = await L1BOBAToken.balanceOf(env.l1Wallet.address)
const postL2BOBABalance = await L2BOBAToken.balanceOf(env.l2Wallet.address)
const postL1BOBABalance = await L1BOBAToken.balanceOf(env.l1Wallet.address)
const postL2BOBABalance = await L2BOBAToken.balanceOf(env.l2Wallet.address)

expect(preL1BOBABalance).to.deep.eq(
postL1BOBABalance.add(depositBOBAAmount)
)
expect(preL1BOBABalance).to.deep.eq(
postL1BOBABalance.add(depositBOBAAmount)
)

expect(preL2BOBABalance).to.deep.eq(
postL2BOBABalance.sub(depositBOBAAmount)
)
expect(preL2BOBABalance).to.deep.eq(
postL2BOBABalance.sub(depositBOBAAmount)
)
}
}).retries(3)

it('contract should be whitelisted', async () => {
Expand Down