Skip to content
This repository was archived by the owner on Sep 15, 2022. It is now read-only.
This repository was archived by the owner on Sep 15, 2022. It is now read-only.

part 4 / withdrawPayments() not working #4

@fixitornever

Description

@fixitornever

Hello

I followed part 4 with few remarks leading me to call the withdrawPayments() to my smart contract.
Each time the mintTo() method is called the smart contract is getting ETH which is what we intented to do.
While calling withdrawPayments() with my account address as param I was expecting to receive the ETH hold by the smart contract however while the method is perfectly called and logged on the SC the contract is still holding the ETH and my account didn't get the amount.

I'm wondering if I'm missing something ?

Contract inheriting from PullPayment:
contract NFT is ERC721, PullPayment, Ownable

Override of the withdrawPayments to add ownership right (as per the step 4):

    /// @dev Overridden in order to make it an onlyOwner function
    function withdrawPayments(address payable payee) public override onlyOwner virtual
    {
        super.withdrawPayments(payee);
    }

Instance of a call of that method on my smart contract:

Function: withdrawPayments(address payee)

MethodID: 0x31b3eb94
[0]:  0000000000000000000000008ca5b166589ba2157e177bbdec1c8b6765ed6eba

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions