With the ascendancy of blockchains and cryptocurrencies you do not want to be left out of this right?
In this article I will teach to you how to c...
For further actions, you may consider blocking this person and/or reporting abuse
A few things. The owner might be who deployed the contract but not the one expecting the donations. Anyone can call your donate method. If the address points to another contract that could give errors, your eth will be burned/lost. Transfer is not recommended anymore. You should use Call and check for the result. If the result is false, you revert the transaction. Great start anyways!
thanks, i will make these fixes!!
I made these corrections in case you want to check
Yes, that is perfect!
It would be amazing if there're a bit more details on hosting the contract on testnest and mainnest. But it's still a great article. Keep up the good work mate
Thanks for the feedback, I will create an article to make a deploy for the testnet!!
cool! deploying to the main nest is a pain actually. The gas fee is insane nowadays.
Nice post.
I have a questiopn please, i tried running the test locally to test my contract but i keep getting this error "Failed to send money" what do you think could be the casue pls. @emanuelferreira
Thank you!
how are you sending money using the web3? you need to pass the value on your web3 call function.
Thanks for the example. I was trying to out this contract, but I keep getting a weird error - I'm sure it's something simple that I'm missing here.
I deployed to Rinkeby Testnet using remix... then I loaded the contract and ABI into app.mycrypto.com/interact-with-con... - but when I try to send a donation, I keep getting this error:
"Something went wrong: insufficient funds for intrinsic transaction cost. Make sure you've filled everything out correctly and try again. If this error persists, please visit our Knowledge Base for further assistance."
I have plenty of test ETH in my account. I have tried to send ETH directly to the contract and it also fails. What am I doing wrong?
One strange thing is that I can make a donation of "0 ETH" but if I add ANY amount - such as 0.0001 ETH - I get the same error as above. Gas costs are only 0.000094ETH so it really can't be the issue. Does my contract need to be deployed with ETH in it?
Hello, is it possible to use an ERC20 token inside a function of an ERC721 token?
To better explain what I want to do is as follows.
Before minting an ERC721 token (Item of my game) I want to check if the player has my token (ERC20) in his wallet, if he has he could mint it...
Is it possible to do that? Thanks.
Hey RoNi, yes!
on your ERC721 mint function you need to connect with your ERC20 contract and verify the balance of the user
sick bro! Keep going!
Can make a donate in USDT instead of ETH ?