Skip to content

Conversation

@pxrl
Copy link
Contributor

@pxrl pxrl commented Feb 1, 2023

Done in advance of the new Across Bond Token (name tbc)
implementation, which will inherit from WETH9.

  • Rename the existing WETH9 -> WETH9Interface
  • Import WETH9 from UMAproject/protocol.
  • WETH9 licensing corrections.

The reason for retaining the WETH9 interface description is that it's
less restrictive than the WETH9 contract that is being imported.
Specifically, Solidity is unhappy that the WETH9 contract identifies
payable functions, and that has ripple effects for the existing users
of the WETH9 interface. We might consider addressing those points,
but the focus here is just to shuffle the furniture to make space for
the new bond token.

Further changes to come once this is in.

pxrl added 3 commits February 1, 2023 23:40
Make way a copy of the WETH9 implementation to be imported.
Import the full contract so that it can be tweaked and used as the base
contract for the Across Bond Token (name subject to change).

The import is made as-is, with no changes. Follow-up commits will apply
modifications as required.
 - Fix SPDX license identifier: AGPL-3.0-only => GPL-3.0-or-later
 - Reinstate WETH9 license header for compliance with GPLv3 sections 4.
   and 5:

     https://www.gnu.org/licenses/gpl-3.0.html

  - Relocate the pragma.
Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! Some systems care about the name of the contract, not the name of the file. It's good cleanliness to name the file WETH9Interface.sol, but to make sure there's no conflicts in the hardhat artifacts or in other flattening procedures, we should change the name of the interface in the solidity WETH9 -> WETH9Interface.

Prompted by Matt.
@pxrl
Copy link
Contributor Author

pxrl commented Feb 2, 2023

Thanks for adding this! Some systems care about the name of the contract, not the name of the file. It's good cleanliness to name the file WETH9Interface.sol, but to make sure there's no conflicts in the hardhat artifacts or in other flattening procedures, we should change the name of the interface in the solidity WETH9 -> WETH9Interface.

Fair point - have renamed to WETH9 interface.

What's your gut feel on this? Is it cleaner to just nuke the interface definition and use the newly imported version? I'm not sure either way.

@pxrl pxrl requested a review from mrice32 February 2, 2023 00:53
@pxrl pxrl merged commit 7503320 into master Feb 2, 2023
@pxrl pxrl deleted the pxrl/weth9-shuffle branch February 2, 2023 21:34
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.

4 participants