The goal of this exercise is to create an ERC20 token that represents a claim on ETHw post-merge. This can be used as an on-chain price-discovery mechanism until the Merge.
- User deposits ETH (everything gets converted into WETH) pre-merge (
mint()
). Alternatively, user deposits WETH afterapprove()
is called on this contract. - User receives an ERC20 token, we'll call it ETHw-PN
- This user's address is recorded in
originalOwnerNotes
- This token represents pre-merge:
- chain: 1 - The ETH that has been deposited is wholly unrecoverable until post-merge.
- ERC20 token - The ERC20 token is now tradeable.
- But post-merge...
- chain: 1 - The contract can be called by the original minter for WETH to be sent back forward to an
address to
. - chain: 10001 - The ERC20 token can be redeemed for the balance of WETH in the contract.
Currently deployed on mainnet at 0xc3dCB001Db19dCd67B30873E733f451bfaab2682
Run forge test -vvv
for Ethereum testing.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use these file(s) except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.