BlindCroupier (OP)
Newbie
Offline
Activity: 25
Merit: 0
|
|
September 11, 2017, 08:54:06 PM |
|
|
|
|
|
|
BlindCroupier (OP)
Newbie
Offline
Activity: 25
Merit: 0
|
|
September 12, 2017, 07:39:44 PM |
|
Yes, WIN is ERC20-compatible token.
|
|
|
|
|
BuyingFast
|
|
September 14, 2017, 02:37:51 PM |
|
I'm too am curious regarding that part...
|
|
|
|
BlindCroupier (OP)
Newbie
Offline
Activity: 25
Merit: 0
|
|
September 14, 2017, 03:12:55 PM |
|
Here is the code, which generates the output from the article. You can easily do the same steps locally: javascript async getTransactions(playerAddress, gameId) { playerAddress = normalizeHexString(playerAddress); const player = await this.getPlayer(playerAddress); if(!gameId) { throw new InvalidInput(`game id is required`); }
const result = {};
const params = { croupier: this.address, player: playerAddress, gameId, };
const [betSubmittedEvents, croupierSeedEvents, playerSeedEvents, replacementOrderSubmittedEvents, gameFinishedEvents, ] = await Promise.all([ this.bankConnector.getAllEvents('BetSubmitted', params), this.bankConnector.getAllEvents('CroupierSeedSubmitted', params), this.bankConnector.getAllEvents('PlayerSeedSubmitted', params), this.bankConnector.getAllEvents('ReplacementOrderSubmitted', params), this.bankConnector.getAllEvents('GameFinished', params), ]);
let croupierSeeds = []; let playerSeeds = []; let seeds = []; let replacementOrder; let bet;
if(betSubmittedEvents.length > 1) { log.warn(`found more than 1 BetSubmitted events for player: ${player.address}, gameId: ${gameId}`); }
if(betSubmittedEvents.length > 0) { const betSubmittedEvent = betSubmittedEvents[0]; bet = betSubmittedEvent.args.bet;
result['BetSubmitted'] = { txHash: betSubmittedEvent.transactionHash, bet: betSubmittedEvent.args.bet.toNumber(), level: betSubmittedEvent.args.level.toNumber(), betPayment: this.formatEther(this.chipCost.times(betSubmittedEvent.args.bet).times(betSubmittedEvent.args.level)), }; }
for(const croupierSeedEvent of croupierSeedEvents) { const seedID = croupierSeedEvent.args.seedID.toNumber(); croupierSeeds[seedID] = croupierSeedEvent.args.seed.toString(); result[`CroupierSeedSubmitted: ${seedID}`] = { txHash: croupierSeedEvent.transactionHash, seed: croupierSeeds[seedID], } }
for(const playerSeedEvent of playerSeedEvents) { const seedID = playerSeedEvent.args.seedID.toNumber(); playerSeeds[seedID] = playerSeedEvent.args.seed.toString(); result[`PlayerSeedSubmitted: ${seedID}`] = { txHash: playerSeedEvent.transactionHash, seed: playerSeeds[seedID], } }
if(croupierSeeds[0] && playerSeeds[0]) { const seeds = [ PRNG.mixSeeds(croupierSeeds[0], playerSeeds[0]), 0 ]; let initialHand = await this.bankConnector.bank.generateHand(seeds, [0, 0, 0, 0, 0]); initialHand = new CardSet(initialHand); result['InitialHand'] = initialHand.toString(); }
if(replacementOrderSubmittedEvents.length > 1) { log.warn(`found more than 1 ReplacementOrderSubmitted events for player: ${player.address}, gameId: ${gameId}`); }
if(replacementOrderSubmittedEvents.length > 0) { const replacementOrderSubmittedEvent = replacementOrderSubmittedEvents[0];
replacementOrder = replacementOrderSubmittedEvent.args.replacementOrder; result['ReplacementOrderSubmitted'] = { txHash: replacementOrderSubmittedEvent.transactionHash, replacementOrder: replacementOrderSubmittedEvent.args.replacementOrder, }; }
if(gameFinishedEvents.length > 1) { log.warn(`found more than 1 GameFinished events for player: ${player.address}, gameId: ${gameId}`); }
if(gameFinishedEvents.length > 0) { const gameFinishedEvent = gameFinishedEvents[0];
result['GameFinishedEvent'] = { txHash: gameFinishedEvent.transactionHash, winCoef: gameFinishedEvent.args.winCoef.toNumber(), winPayment: this.formatEther(this.chipCost.times(bet).times(gameFinishedEvent.args.winCoef.toNumber())), };
for(let i = 0; i <= 1; i++) { seeds[i] = PRNG.mixSeeds(croupierSeeds[i], playerSeeds[i]); }
let finalHand = await this.bankConnector.bank.generateHand(seeds, replacementOrder); finalHand = new CardSet(finalHand); result['FinalHand'] = finalHand.toString(); }
return result; } 1. this.bankConnector.getAllEvents get all the events from the contract, with the name specified and filters them according to the object. 2. this.bankConnector.bank.<function name> makes a call to Ethereum blockchain
|
|
|
|
|
xoof
Newbie
Offline
Activity: 127
Merit: 0
|
|
September 16, 2017, 06:19:37 AM |
|
This website is definitely better, but it strikes me as soon as I open it: under the logo, you have two taglines saying most of the same thing: - B2B solution for launching blockchain-casino - Software for the casino operators to open a decentralized casino in no time. Choose one?
|
|
|
|
BlindCroupier (OP)
Newbie
Offline
Activity: 25
Merit: 0
|
|
September 16, 2017, 10:56:09 PM |
|
You're right, thanks. We really wanted to our business model be understandable, and overdid it. We will soon edit the content, after which we will begin to attract traffic.
|
|
|
|
BuyingFast
|
|
September 18, 2017, 11:19:33 PM |
|
You're right, thanks. We really wanted to our business model be understandable, and overdid it. We will soon edit the content, after which we will begin to attract traffic.
How? I think the competition for ads with the "ICO" interest group is so high at the moment...
|
|
|
|
BlindCroupier (OP)
Newbie
Offline
Activity: 25
Merit: 0
|
|
September 19, 2017, 10:29:26 AM |
|
This is true, but we have solutions, It will, of course, take a little time, sir. Because of the changes in the Chinese market our marketing strategy has changed too. In connection with this, the start date Period 1 may be deferred.
|
|
|
|
xoof
Newbie
Offline
Activity: 127
Merit: 0
|
|
September 19, 2017, 05:40:55 PM |
|
Too much has changed regarding ICOs in the last few months, and people keep pretending that the interventionism is somehow good for us. The people that we're trying to remove power from, are actually remove power from us.
|
|
|
|
BuyingFast
|
|
September 23, 2017, 07:46:37 PM |
|
This is true, but we have solutions, It will, of course, take a little time, sir. Because of the changes in the Chinese market our marketing strategy has changed too. In connection with this, the start date Period 1 may be deferred.
Just ignore the changes in the Chinese market. That's what other ICOs do, and it seems to be working. A lot of money still being raised these days.
|
|
|
|
carny88
Newbie
Offline
Activity: 98
Merit: 0
|
|
September 24, 2017, 05:10:10 PM |
|
Looks promising! Is there a way i can find out a bit more about the team behind?
Also the link behind the logo on your website goes to google.com
|
|
|
|
BLACKCOIN883
|
|
September 24, 2017, 07:56:35 PM |
|
Will you open source the code that you've got working right now?
|
|
|
|
carny88
Newbie
Offline
Activity: 98
Merit: 0
|
|
October 01, 2017, 12:34:53 PM |
|
Looks promising! Is there a way i can find out a bit more about the team behind?
Also the link behind the logo on your website goes to google.com
Nothing?
|
|
|
|
|