This year I started investing in Crypto, and at some time I switched to DeFi due to the “high profit returns”…as expected due to the lack of knowledge, I lost 90%+ of my investment to rugpulls and scammy “experiments”. From that moment I decided that I need to understand (at some degree) how DeFi/Crypto (ETH smartcontracts) work to try to don’t get so easily scammed the next time. In the same time I really needed a hobby in which I can spend a few hours in the evening :). Therfore:
I am trying to learn (some) solidity and how to build a website to interact with a smart contract. I made a fork of an existing project from GitHub…created some new coins on Ropsten to be used as a reward and as a stake-able coin (test ETH). After I will succeed in learning this, I would like to take a look on how to build my own vaults :). All good until now…
I have deployed the reward pool contract but when trying to verify the contract (to be able to add the “Read” & “Write” buttons), I receive an error as “Invalid constructor arguments…”. I tried pasting the ABI code generated by Remix, but I get the same error. I tried looking at the transaction info ,values after “0029”, but there is nothing after it.
Also, when trying to use the website to interact with the contract, I can send tokens to/from it but I still get this warning: “Error: Returned values aren’t valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from…”
The reward pool contract is: RewardPool.
Thank you for your understanding and support!
So you want to verify your contract, right? so please provide your contract address.
Oh. Sorry for that. The contract is: 0xa9464db77fD4Cb4Dbf552cdDe040BF60bCfa57eC
I just saw in another post that there might be needed to use the multiple file option to load all the openzeppelin files which are stated in the contract?
Thank you for your help!
Welcome to the community
A good place to start learning is the OpenZeppelin Learn guides: https://docs.openzeppelin.com/learn/
The current best way to verify is: Verify smart contract inheriting from OpenZeppelin Contracts
Thanks for the help. To be honest, the guide is not so straightforward (maybe because I’m to new to this), but maybe I’ll give it a try.
Unfortunately verification isn’t as easy as it should be.
If you have any issues, if you share your contract Solidity code, the contract address and any parameters and the community can try to help verify.
Today I gave it another try and while trying to understand what I was doing wrong, I saw that in Remix I was having another contract “similar” with my live contract and I tried that code. As it seems, that was the code with which I deployed the contract.
I would like to apologize for wasting everybody time with my messy “coding”. I hope I can be more careful in the future.
If other users have the same issue, my settings were:
- Checked to have the correct compiler from remix (my example: v0.5.5+commit.47a71e8f)
- Checked if I used optimization in Remix (my example: without);
- No license;
- Nothing in the ABI constructor;
Now it seems that my project is almost 100% functional :). I’ll give a try to those vaults now.
Thank you guys for your support!
Is OpenZeppline Free?
All code in the OpenZeppelin repo are open source, and the license is