Create BEP20 (Binance) Token with Truffle & ZOS

I would like to learn building a simple token using Truffle & ZOS.

For this I’ve been creating a truffle projekt and initialized zos:
$> truffle init
$> zos init my-token

I know have a bare-metal structure for the new token including the Migrations.sol feature I would like to learn to use.

For learning I had a look on this token-code:

I’ve been trying to adopt the Token-Contract, but now I’m stuck. Which interface will I have to use for BEP20 instead of ERC20.sol?

Is this the right one:

And will it work with OpenZeppelin Migrations?

Hi @CryptoGuru. zos is deprecated and we won’t provide any support for it.

See the announcement at Building for interoperability: why we’re focusing on Upgrades Plugins.

Hello @frangio thanks. I thought zos is state of the modern building. So there is a difference in zos and “OpenZeppelin SDK”?

So I’ve removed zos and replaced it with package @openzeppelin/truffle-upgrades.Hope this is correct now.

Still the deep question behind remains. I’ve studied the link you provided, but the link behind ( does not give any info about BEP20 contracts.

I’ve been trying to adpopt this BEP20 contract:
using BEO20Token.template

This seems to work fine so far! But still I’m not shure upgrades really work on this.

By the way is there any working etherscan/block explorer for ganache-cli that is able to show me results for local deployed contracts using ganache? I know ganache also has GUI software, but it did have some errors (blank screen in GUI window) trying to dig into contract details).

I’ve heard about Ethernal but I haven’t tried it personally.

There is nothing particularly special about BEP20 contracts. Any upgradeability solution for smart contracts should work.

I don’t really know anything about BEP20 so I don’t know.

Thanks for the help. I think I got the partial problems to work … just wondering the totalSupply doesn’t match the given value in smart-contract … but… I think thats another construction site.

Yes… already gave it a try. the ethernal npm package seems to have a bug. At least for me. After trying to fix it it barely works. Looks fine, tracks everything … but when it goes to dive into contract details it throws console-error with something about wrong path (?!) and gets stuck …

I’ve gave Ganache (GUI AppImage) a try… still has some bugs and sometimes crashes (helps most often to clear garnache cache for given workflow …). But it works somehow better than ethernal yet.