Skip to content
Discussion options

You must be logged in to vote

Hello @gunomnifluencer Binanace Smart Chain is a fork of Ethereum so it works as same as any other ERC20 token, so if you want the users to pay with that token you have to approve it and require payment with it, use this as example:

 function pay(IERC20 Token) public payable {
        require(
            Token.transferFrom(
                msg.sender,
                address(this),
                amount
            )
        );
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gunomnifluencer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants