Skip to content

Commit

Permalink
Rename L1Portal to OptimismPortal in the e2e stack
Browse files Browse the repository at this point in the history
  • Loading branch information
natebeauregard committed Sep 20, 2024
1 parent a3f5b7b commit 2220e9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions e2e/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ type StackConfig struct {
Users []*ecdsa.PrivateKey
L1Client *L1Client
L1Deployments *opgenesis.L1Deployments
L1Portal *bindings.OptimismPortal
OptimismPortal *bindings.OptimismPortal
L1StandardBridge *opbindings.L1StandardBridge
L2OutputOracleCaller *bindings.L2OutputOracleCaller
L2Client *bftclient.HTTP
Expand Down Expand Up @@ -234,7 +234,7 @@ func (s *stack) run(ctx context.Context, env *environment.Env) (*StackConfig, er
Ctx: ctx,
L1Client: l1Client,
L1Deployments: ope2econfig.L1Deployments,
L1Portal: opPortal,
OptimismPortal: opPortal,
L1StandardBridge: l1StandardBridge,
L2OutputOracleCaller: l2OutputOracleCaller,
L2Client: l2Client,
Expand Down
14 changes: 7 additions & 7 deletions e2e/stack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func ethRollupFlow(t *testing.T, stack *e2e.StackConfig) {

// send user Deposit Tx
depositAmount := big.NewInt(params.Ether)
depositTx, err := stack.L1Portal.DepositTransaction(
depositTx, err := stack.OptimismPortal.DepositTransaction(
createL1TransactOpts(t, stack, userPrivKey, l1signer, l1GasLimit, depositAmount),
userAddress,
big.NewInt(0),
Expand All @@ -287,7 +287,7 @@ func ethRollupFlow(t *testing.T, stack *e2e.StackConfig) {
require.NotNil(t, receipt, "deposit tx receipt")
require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status, "deposit tx reverted")

depositLogs, err := stack.L1Portal.FilterTransactionDeposited(
depositLogs, err := stack.OptimismPortal.FilterTransactionDeposited(
&bind.FilterOpts{
Start: 0,
End: nil,
Expand Down Expand Up @@ -357,7 +357,7 @@ func ethRollupFlow(t *testing.T, stack *e2e.StackConfig) {
require.NoError(t, err)

// send a withdrawal proving tx to prove the withdrawal on L1
proveWithdrawalTx, err := stack.L1Portal.ProveWithdrawalTransaction(
proveWithdrawalTx, err := stack.OptimismPortal.ProveWithdrawalTransaction(
createL1TransactOpts(t, stack, userPrivKey, l1signer, l1GasLimit, nil),
withdrawalTx.WithdrawalTransaction(),
provenWithdrawalParams.L2OutputIndex,
Expand All @@ -377,7 +377,7 @@ func ethRollupFlow(t *testing.T, stack *e2e.StackConfig) {

withdrawalTxHash, err := withdrawalTx.Hash()
require.NoError(t, err)
proveWithdrawalLogs, err := stack.L1Portal.FilterWithdrawalProven(
proveWithdrawalLogs, err := stack.OptimismPortal.FilterWithdrawalProven(
&bind.FilterOpts{
Start: 0,
End: nil,
Expand All @@ -401,7 +401,7 @@ func ethRollupFlow(t *testing.T, stack *e2e.StackConfig) {
require.NoError(t, err)

// send a withdrawal finalizing tx to finalize the withdrawal on L1
finalizeWithdrawalTx, err := stack.L1Portal.FinalizeWithdrawalTransaction(
finalizeWithdrawalTx, err := stack.OptimismPortal.FinalizeWithdrawalTransaction(
createL1TransactOpts(t, stack, userPrivKey, l1signer, l1GasLimit, nil),
withdrawalTx.WithdrawalTransaction(),
)
Expand All @@ -416,7 +416,7 @@ func ethRollupFlow(t *testing.T, stack *e2e.StackConfig) {
require.NotNil(t, receipt, "finalize withdrawal tx receipt")
require.Equal(t, types.ReceiptStatusSuccessful, receipt.Status, "finalize withdrawal tx failed")

finalizeWithdrawalLogs, err := stack.L1Portal.FilterWithdrawalFinalized(
finalizeWithdrawalLogs, err := stack.OptimismPortal.FilterWithdrawalFinalized(
&bind.FilterOpts{
Start: 0,
End: nil,
Expand Down Expand Up @@ -515,7 +515,7 @@ func erc20RollupFlow(t *testing.T, stack *e2e.StackConfig) {
require.NoError(t, err)

// check that the deposit tx went through the OptimismPortal successfully
_, err = receipts.FindLog(depositReceipt.Logs, stack.L1Portal.ParseTransactionDeposited)
_, err = receipts.FindLog(depositReceipt.Logs, stack.OptimismPortal.ParseTransactionDeposited)
require.NoError(t, err, "should emit deposit event")

// assert the user's bridged WETH is no longer on L1
Expand Down

0 comments on commit 2220e9e

Please sign in to comment.