Skip to content

Commit

Permalink
Replaced the default network sepolia with localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Sep 20, 2023
1 parent 454f919 commit a66b8e2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const config: HardhatUserConfig = {
},
},
},
defaultNetwork: "sepolia",
defaultNetwork: "localhost",
namedAccounts: {
deployer: {
// By default, it will take the first Hardhat account as the deployer
Expand Down
6 changes: 6 additions & 0 deletions packages/nextjs/components/blackjack/BlackjackDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const BlackjackDemo = () => {
logs.map(log => {
const { player, firstDealerCard, playerHand, playerScore, gameStatus } = log.args;
if (address === player) {
console.log({ player, firstDealerCard, playerHand, playerScore, gameStatus });

setIsActive(true);
setDealerScore("?");
setPlayerScore(playerScore);
Expand Down Expand Up @@ -85,6 +87,8 @@ export const BlackjackDemo = () => {
logs.map(log => {
const { player, firstDealerCard, playerHand, playerScore, gameStatus } = log.args;
if (address === player) {
console.log({ player, firstDealerCard, playerHand, playerScore, gameStatus });

setPlayerScore(playerScore);
setNewGameStatus(gameStatus);

Expand Down Expand Up @@ -125,6 +129,8 @@ export const BlackjackDemo = () => {
logs.map(log => {
const { player, playerHand, dealerHand, claimableAmount, dealerScore, playerScore, gameStatus } = log.args;
if (address === player) {
console.log({ player, playerHand, dealerHand, claimableAmount, dealerScore, playerScore, gameStatus });

setIsActive(false);
setPlayerScore(playerScore);
setDealerScore(dealerScore);
Expand Down
8 changes: 4 additions & 4 deletions packages/nextjs/generated/deployedContracts.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const contracts = {
11155111: [
31337: [
{
chainId: "11155111",
name: "sepolia",
chainId: "31337",
name: "localhost",
contracts: {
BlackjackDemo: {
address: "0x679b75A6DDCDb1025a179D1eCF5F5be28736455B",
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
abi: [
{
inputs: [
Expand Down
2 changes: 1 addition & 1 deletion packages/nextjs/scaffold.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export type ScaffoldConfig = {

const scaffoldConfig = {
// The network where your DApp lives in
targetNetwork: chains.sepolia,
targetNetwork: chains.hardhat,

// The interval at which your front-end polls the RPC servers for new data
// it has no effect on the local network
Expand Down

0 comments on commit a66b8e2

Please sign in to comment.