Hey @Jose_Hernandez
Can you push your project to GitHub? I want to try to deploy it and see if the error is somewhere in your project or in the pkg you have installed
Ping me once pushed to GitHub, I will take a look
Hey @Jose_Hernandez
Can you push your project to GitHub? I want to try to deploy it and see if the error is somewhere in your project or in the pkg you have installed
Ping me once pushed to GitHub, I will take a look
Sorry, do you have a good recommendation on what to watch regarding how to use github? Or would it be easier to just drag and drop the files?
Thanks again!
Hi, I think you just missed a ; after event LogNewProvableQueryâŚ
Hi! There is just a missing semi-colon at the end of this line. Hope you have smooth sailing from here
@dan-i You donât understand my problem
I want to run npm init on bet project path. so that folder node_modules will be created as suggested by filip.
It ran successfully but the path node_modules was not created.
I copied the path node_modules from my old project and run npm install truffle-hdwallet-provider in order to install the wallet provider. it throws the error
After i done what you suggested it came with error
@dan-i the code that is shown above is not working for me, I am scratching my head for couple of days now but latest number I am getting back is always 0.
Can you please take a look at the code again and tell me if I am missing something. On UI side I make sure the abi and network address is the latest deployed so no issues there.
Hey @Jose_Hernandez
Thanks for uploading
I tried to deploy your contract and I get this error:
Although you donât see the error message, the error location looks the same.
In your previous post:
at Object.run ([.......]**packages/migrate/index.js:96:1**)
Which is the same in my screenshot.
Letâs analyse the error together
1_initial_migration.js
;This function is restricted to the contract's owner
So letâs just follow the clues:
1_initial_migration.js
1_initial_migration.js
, it is created and used by the system and you must leave it as it is.Just cancel your modification and set is back at its initial state:
const Migrations = artifacts.require("Migrations");
module.exports = function(deployer) {
deployer.deploy(Migrations);
};
This fixes the issue.
You have another issue in your 2nd migration file 2_coinFlip_migration.js
Letâs see if you can spot the issue by yourself.
If you need help I am here so no worries!
Happy coding,
Dani
Hi @chim4us
There are no errors in this screenshots, just warnings that you can ignore.
Also in your screenshot above, I see a package.json
file, so I donât understand whatâs wrong
Can you send a screenshot of your truffle project directory where all the files are visible?
Thanks!
Dani
Still stuck with this issue
I pushed on GitHub my project, even though itâs still at an early stage. Still needs lots of changes, but in this way I think you can figure it out better. CoinFlip.sol
@dan-i could you spot the error?
Sorry to bother you. Thanks!
Daniel
Thank you so much! Also removed the json object in 2_coinFlip_migration.js
So are we always tied to using accounts[0] as the owner? Or is there a way to choose a different one like in Ganache?
Accounts[0] is the owner by default
Cheers,
Dani
Hi @chim4us
From your screenshot I do not see any error, you can move forward and keep coding.
regards,
Dani
Hey @NamaWho
@dan-i could you spot the error?
is a bit too generic
Can you please describe the issue? What happens, when?
thanks!
Dani
I think Iâve described it here
Anyway, if it sounds still too generic Iâve got no problem trying to explain myself better.
The fact is that even though I have a mapping where I match âbetIdâ -> âplayerAddressâ (in placeBet()), then when I try to read the same record in closeBet() it seems it doesnât exist. You can see this behavior from the events that are emitted in both functions, which I pasted in the previous comment.
hello,
I finally finished my projects
this is the project made with ganache: https://github.com/enricofabris/COIN_CONTRACT-GANACHE
this is the project made with provable oracle and ropsten: https://github.com/enricofabris/COIN_CONTRACT---ORACLE---ROPSTEN
I tried both of them and they seem to work.
Could you please let me know some feedbak?
besides I was able to use the test only with the first project because in the course it is shown to use the test through console.
But in the second project when we use ropsten how can we do the test of the contract?
thanks
Hey @NamaWho
Can you please post the whole contract? I am interested in checking the function update()
.
Let me know
Cheers,
Dani
Course, you can find it here.
P.S. I changed a bit those functions from yesterday but the logic is still the same; the error too