Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify WETH contract call to allow sending in ETH directly #191

Open
dapp-whisperer opened this issue Jun 7, 2022 · 0 comments
Open

modify WETH contract call to allow sending in ETH directly #191

dapp-whisperer opened this issue Jun 7, 2022 · 0 comments

Comments

@dapp-whisperer
Copy link
Contributor

The WETH contract allows taking in ETH directly, depositing it to WETH on behalf of the user, using the following function variant which is on the KnightingRound for WETH only

function buyEth(uint8 _daoId, bytes32[] calldata _proof)
        external
        payable
        gacPausable
        returns (uint256 tokenOutAmount_)
    {

Note that the user does not need any token approval to use this function.

Instead, they must send in the ETH amount directly with the function call, in the 'value' field.

@mrbasado mrbasado removed their assignment Nov 18, 2022
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

No branches or pull requests

2 participants