How to add deposit and withdraw BNB functions to my BEP20 smart contract

I used this template
For my contract and when I deployed it I can send BNB To it or withdraw so if I want to add this functions how can I add it

1 Like

I am not familiar with bsc-chain, if you want to get a better help, maybe you can ask at their forum.

Your template is similar with an ERC-20 token on the Ethereum, so it can not deposit and withdraw, if you want to achieve these functions, you had got to write them by yourself.

1 Like

Hi @Haithem,

Welcome to the community :wave:

As @skyge said, anything specific for BSC you can try asking in their community:

I wasn’t sure why you wanted to deposit and withdraw BNB from your fungible token. It is best to keep the token as simple as possible and have any selling functionality in a separate contract.

1 Like