Deploying Game to the Testnet Discussion

Oh man.

I had a scramble after that change.
Not sure about the vid you guys are discussing,
but MEW in real life did a major shapeshift,
disappeared from my toolbars,
and I was digging through old notebooks…!!!

Found what I needed.
But yeah, it’s different now.

Hi! I get an error that Tx wasn’t minded within 750 seconds. When I look on etherscan the tx is still pending. Can anybody tell me how to solve this issue?


when i look at older deployment attempts they are mined now:

you can see the txs on: https://ropsten.etherscan.io/address/0xc0219b8008c0075f14977694512c2a429c672155

thanks!

Hello!
Today it works. I`ve deployed my contract successfully.
best regards
daniel

1 Like

Hi @pmk

If you don’t mind that your game is not 100% decentralized you can still do this check on a centralized backend. (for the coin position) And your backend will send the transactions (and pay for it).

It’s possible but you will have to pay for the transaction fees.

So the best way is to ask the player to pay to play the game (you need enough eth to pay for the fees).
Anyway you will not give him free token so if he win you pay him in token if he loose you keep the eth sent

1 Like

@gabba
Well, if I make the player pay before hand it is a different ball game.

I receive payment and save the player address on a mapping, then, when the game finishes I check if the player already pay, and mint only the amount of coins present in the game. After the payout, I would remove the address from the mapping, so if the player wants to mint more tokens, they have to pay again, etc.

But this would be too slow and expensive atm I think, looking forward eth 2.0.

1 Like

:warning: Mnemonic Phrase & Private Key without MEW :warning:

Hi guys, I had some problems too with finding the private key since MEW deleted the “classic version” and the new version won’t show your private key for safety reasons.

Hereby an easy way how to get your private key and mnemonic phrase.

  1. Go to https://iancoleman.io/bip39/
    Put: “Words” on “24” and “Coin” on “Ethereum” and generate a new phrase.

  2. Scroll down a bit and your address, public key and private key will be visible.

  3. Don’t forget to store them in a Word document.

4 Likes

:warning: Solution to migration error Lesson 4/5 :warning:
I noticed the code of “truffle-config” changed a little so if you don’t change this line you will get an error while migrating.

In the video

How it is at my side (21-7-2020)

Solution
Add your “project ID” from Infura.io at that place. You wrote it down before around line 20.

1 Like

I’m now running into some problems when trying to run this game. When trying to “truffle develop” my Solidity file I’m getting the below error. I’ve been searching online and have done several suggested solutions but I’m unable to figure this out, any idea what may be the problem?

“Truffle compile” gives me the same error and I’m noticing that there is a comment indicating they cannot find this specific ERC20.sol file, could this be the issue? This is strange as I was able to run this couple of days ago:

Any commentary would be greatly appreciated!

1 Like

this is my code: https://github.com/lohba/Ethereum-Game

dang… getting this from the faucet… :frowning:

faucet response: {“error”:"[ethjs-query] while formatting outputs from RPC ‘{“value”:{“code”:-32603,“message”:“Too Many Requests”,“data”:{“originalError”:{}},“stack”:“Error: Too Many Requests\n at eval (/www/node_modules/web3-provider-engine/subproviders/rpc.js:52:23)\n at Proxy.eval (/www/node_modules/web3-provider-engine/subproviders/rpc.js:54:11)\n at Object.eval [as apply] (LavaMoat/core/kernel:939:17)\n at Object.eval [as apply] (LavaMoat/core/kernel:939:17)\n at Request.self.callback (/www/node_modules/request/request.js:186:22)\n at Object.eval [as apply] (LavaMoat/core/kernel:939:17)\n at Proxy.emit (events.js:310:20)\n at Object.eval [as apply] (LavaMoat/core/kernel:939:17)\n at Request.eval (/www/node_modules/request/request.js:1155:10)\n at Object.eval [as apply] (LavaMoat/core/kernel:939:17)”}}’"}

@Martijncvv which derived addresses ? is it the ones under BIP 44 I take it ?

what are all those other ones btw? would be really nice to have a video about the workings of this tool actually @filip

1 Like

tried on ropsten and kovan… getting same issue… stuck

1 Like

Hey @lohba, hope you are good.

Have you install the openzepellin contracts into your project? I did not see them on your folder, maybe thats why you have an error.

Here you can read more on how to install and use the open zepellin contracts.
https://docs.openzeppelin.com/contracts/3.x/

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

Hi Carlos,

Thanks for getting back. Yes I have openzeppelin installed:

1 Like

In the video, pragma solidity 0.5.0 is used but doing so causes errors so I switched over to 0.6.0. I was able to tinker around and have the Solidity file work but now running 0.6.0 on erc1155 is giving me small errors that I’m unable to fix. I think this may be the issue here?

1 Like

You have to show us the error so we can try to understand what is about.

Now yes, the compiler version can be different depending on the contract programming version. Openzepellin contracts works with version 0.6 and above.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

The errors are in the original post above. Can you try running this on your end so you know what I’m talking about?

Thank you

2 Likes

Would be better for me that you share your code properly so i can copy/paste exactly the same. :nerd_face:

You can use the “Preformatted Text” Button to encapsulate any kind of code you want to show.


function formatText(){

let words = “I’m a preformatted Text box, Please use me wisely!”

}

prefromatted_text-animated

Carlos Z.

Thanks Carlos, I think it will be easier looking at the entire project folder as I think the folders are interlinked: https://github.com/lohba/Ethereum-Game

1 Like

I think is the same issue, you have the incorrect location for the openzepellin contracts.
|
What I mean is: on your GameToken.sol for example, you import one of the openzepellin contracts, but are you sure that is the correct location to the openzepellin contracts? you have them in the node_modules folder, so you should point the import to that folder and then all the location route.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.