CRYPTO NEWS

How can I make my contract reusable?

I want to create a Coin Flip game on Ethereum blockchain. I have one contract called CoinFlip. It has functions that enables one player to make a bet, second player can accept the bet, then the flip is made and bet is resolved. I deployed it on Ropsten Testnet but it works only once because the variables of players cannot be changed. And so my question is how can I make it? Should I create another contract?

using SafeBEP20 for IBEP20

I created one token which is based on BEP20. I am writing another smart contract, where I will be using this token, and want to perform some action like transfer, transferFrom, etc. As I understand, there are newer methods available in (SafeBEP20) for these like safeTransferFrom, which handles error in a better way. My query::Listen

I created one token which is based on BEP20. I am writing another smart contract, where I will be using this token, and want to perform some action like transfer, transferFrom, etc.

As I understand, there are newer methods available in (SafeBEP20) for these like safeTransferFrom, which handles error in a better way.

My query is: Can I use SafeBEP20 methods in my second contract on my token, although my original token does not have these methods defined?

Assuming I do something like below, and then try to use SafeBEP20 methods.

using SafeBEP20 for IBEP20; 

How can I make my contract reusable?

Shopping cart
There are no products in the cart!
Continue shopping
0