Programming Project - Phase 1

Here is my hand in! Confetti for the honorable forum :partying_face:

b-bet

Here is the repo https://github.com/thenikso/b-bet

3 Likes

@JohnW
Awesome project, your interface is cool and you are using reactJs :heart_eyes:

  1. usage of private, internal, external, ownership
  2. Great use of events in the frontend and modifiers

So far so good :+1:

Point to remember going forward, is to add SafeMath and Proxy library.

Will be waiting for PART-2 code review. :slight_smile:

@Nikso
Amazing work!
Look good.

You can share your code for review. :+1:

Here it is! https://github.com/thenikso/b-bet

@cryptocrom
I have forked the repo.
Looking into it. Will get back with review :+1:

1 Like

finally got it basically working :slight_smile:

time to move on…

1 Like

Hey mate, appreciate it. Hopefully you havent invested too much time on this as I just started redesigning the contract last night. Decided to do a few things differently because whilst working on the front end, I realised there were a couple of things I wanted it to do differently. I apologise if you’ve already spent time going through it, Ill keep you updated as to the changes I make and see whether that has an effect on the testing issues I’m having (I found another error so something must be fundamentally wrong with the underlying code somehow - and I did go a little overboard with requirements for each function, maybe unnecessarily doubling up on requirements here and there). Nearly finished the changes, so I’ll update that soon and let you know how the tests go…

@Nikso

Your front-end look amazing :heart_eyes:

  1. The smart contract are well segregated
  2. 1 Event is used :+1:
  3. Validation are properly considered.

All in all, a good well written contract.

Will wait for phase 2.

Good luck!

@Uyan
Apologies for the late reply.

Its better you share the complete code via Github.

I am not able to figure out with the give info, what could be going wrong

Finally finished phase 1, hope that i did well!

My first dapp!

Right I may have gone a little overboard here but in my defence, front end dev jobs are what I’m looking for and this will be the first project in my github profile.

Hereby my simple coinflip dapp. I’ve added some buttons for replenising and withdrawing the balance and for getting the balance as well.

@Daniel_Afteni

Super work! :+1:

  1. Nice indentation for the syntax.
  2. Event and inheritance has been used.

Will wait for phase 2 code review.

All the best

1 Like

No worries mate. Noted.

1 Like

@kpako
Congratulations on your first dApp. :clap:

Share your code for review.

1 Like

This is the first draft of my dapp:

CoinFlipTut

1 Like

@Taha hey im stucked and need help in my code. I cant figure out a way to get the smart contract to send funds back to my account.

I did

uint toTransfer = betAmount * 2;
msg.sender.transfer(toTransfer);
return toTransfer;

in my smart contract and

var config = {};

contractInstance.methods.payPlayer()
.send(config)

in main.js but metamask pops up asking me to allow transaction to send funds from transaction to smart contract instead. Please guide me thanks :slight_smile:

1 Like

@lusivekrane

add some value to your config variable.

var config = {
        value: web3.utils.toWei("amount you want to transfer", "ether")
    }

Hope this helps. :slight_smile:

1 Like