Skip to content

Comments

contracts-bedrock: fix OptimismMintableERC20Created#3104

Merged
mergify[bot] merged 5 commits intodevelopfrom
fix/ctb-event
Sep 21, 2022
Merged

contracts-bedrock: fix OptimismMintableERC20Created#3104
mergify[bot] merged 5 commits intodevelopfrom
fix/ctb-event

Conversation

@tynes
Copy link
Contributor

@tynes tynes commented Jul 27, 2022

Description

The names of the event args were backwards from what they
were supposed to be. I noticed this while writing integration
tests for the sdk.

The event is used like this:

emit OptimismMintableERC20Created(_remoteToken, address(localToken), msg.sender);

The event was updated to look like this:

event OptimismMintableERC20Created(
    address indexed remoteToken,
    address indexed localToken,
    address deployer
);

The remoteToken is first and the localToken is second.

@changeset-bot
Copy link

changeset-bot bot commented Jul 27, 2022

🦋 Changeset detected

Latest commit: 761f90f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@eth-optimism/contracts-bedrock Patch
@eth-optimism/actor-tests Patch
@eth-optimism/sdk Patch
@eth-optimism/drippie-mon Patch
@eth-optimism/message-relayer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@tynes tynes requested a review from maurelian July 27, 2022 03:43
@github-actions github-actions bot added 2-reviewers A-pkg-contracts-bedrock Area: packages/contracts-bedrock labels Jul 27, 2022
@maurelian
Copy link
Contributor

maurelian commented Jul 27, 2022

Good catch. I think this bug is a good argument for the changed proposed in #3064.

This lgtm, but please see my message in slack about a proposal for how to handle all impl changes during the OZ audit.

@maurelian
Copy link
Contributor

Can we move this here so that it can get reviewed along with audit fixes?

@maurelian
Copy link
Contributor

I moved your commit to here, so I think we can close this for now.

@github-actions
Copy link
Contributor

This PR is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Aug 16, 2022
@github-actions github-actions bot closed this Aug 21, 2022
@maurelian maurelian reopened this Sep 16, 2022
@maurelian
Copy link
Contributor

@tynes I think this got stale because it was moved into the fixes repo temporarily. I'm reopening it now, and will push a rebase shortly.

@mergify
Copy link
Contributor

mergify bot commented Sep 19, 2022

Hey @tynes! This PR has merge conflicts. Please fix them before continuing review.

@maurelian
Copy link
Contributor

Need to do a bit of debugging to figure out why this broke the deposit-erc20 integration test

@mergify
Copy link
Contributor

mergify bot commented Sep 21, 2022

Hey @tynes! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Sep 21, 2022
@tynes
Copy link
Contributor Author

tynes commented Sep 21, 2022

See this comment for fixing the tests:

// TODO(tynes): may need to be updated based on
// https://github.com/ethereum-optimism/optimism/pull/3104
const l2WethAddress = event.args.remoteToken

The names of the event args were backwards from what they
were supposed to be. I noticed this while writing integration
tests for the sdk.

The event is used like this:

```solidity
emit OptimismMintableERC20Created(_remoteToken, address(localToken), msg.sender);
```

The event was updated to look like this:

```solidity
event OptimismMintableERC20Created(
    address indexed remoteToken,
    address indexed localToken,
    address deployer
);
```

The `remoteToken` is first and the `localToken` is second.
@mergify
Copy link
Contributor

mergify bot commented Sep 21, 2022

Hey @tynes! This PR has merge conflicts. Please fix them before continuing review.

@mergify mergify bot added the conflict label Sep 21, 2022
@mergify mergify bot removed the conflict label Sep 21, 2022
@mergify
Copy link
Contributor

mergify bot commented Sep 21, 2022

This PR has been added to the merge queue, and will be merged soon.

@mergify mergify bot merged commit 76c8ee2 into develop Sep 21, 2022
@mergify mergify bot deleted the fix/ctb-event branch September 21, 2022 22:16
@mergify
Copy link
Contributor

mergify bot commented Sep 21, 2022

This PR is next in line to be merged, and will be merged as soon as checks pass.

@mergify mergify bot removed the on-merge-train label Sep 21, 2022
nitaliano pushed a commit that referenced this pull request May 20, 2024
* contracts-bedrock: fix `OptimismMintableERC20Created`

The names of the event args were backwards from what they
were supposed to be. I noticed this while writing integration
tests for the sdk.

The event is used like this:

```solidity
emit OptimismMintableERC20Created(_remoteToken, address(localToken), msg.sender);
```

The event was updated to look like this:

```solidity
event OptimismMintableERC20Created(
    address indexed remoteToken,
    address indexed localToken,
    address deployer
);
```

The `remoteToken` is first and the `localToken` is second.

* ctb: Avoid extra casting from contract to address

* chore: Regen bindings and snapshot

* chore: Update bindings

Co-authored-by: Maurelian <maurelian@protonmail.ch>
Co-authored-by: Matthew Slipper <me@matthewslipper.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-pkg-contracts-bedrock Area: packages/contracts-bedrock A-pkg-sdk Area: packages/sdk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants