Skip to content

Commit

Permalink
touches
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanipa committed May 14, 2024
1 parent d6cb776 commit df4d124
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 94 deletions.
7 changes: 5 additions & 2 deletions packages/hardhat/contracts/Game.sol
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ contract Game is IOptionalSystemHook {
}

function registerPlayer() external payable {
require(msg.value >= 0.0015 ether, "Must send atleast minimum ETH to register");
require(msg.value >= 0.00035 ether, "Must send atleast minimum ETH to register");

address player = msg.sender;
require(
Expand Down Expand Up @@ -243,7 +243,10 @@ contract Game is IOptionalSystemHook {
uint8 enabledHooksBitmap,
bytes32 callDataHash
) external override onlyBiomeWorld {
require(getEntityFromPlayer(msgSender) != bytes32(0), "Player entity not found in Biome world");
require(
getEntityFromPlayer(msgSender) != bytes32(0),
"You Must First Spawn An Avatar In Biome-1 To Play The Game."
);
}

function onBeforeCallSystem(
Expand Down
4 changes: 2 additions & 2 deletions packages/nextjs/components/RegisterGame.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const RegisterGame: React.FC = ({}) => {
<div>
<h1 className="text-3xl font-bold text-left mt-4">Join Game</h1>
<h1 className="text-left mt-4" style={{ lineHeight: "normal", margin: "0", wordWrap: "break-word" }}>
Deposit 0.0015 ETH to register your player. If anyone kills your player, they will get this eth. If you
Deposit 0.00035 ETH to register your player. If anyone kills your player, they will get this eth. If you
kill other players, you will get their eth.
</h1>
</div>
Expand All @@ -110,7 +110,7 @@ export const RegisterGame: React.FC = ({}) => {
contractAddress={deployedContractData.address}
abi={deployedContractData.abi as Abi}
functionName={registerPlayFunctionData.fn.name}
value={"0.0015"}
value={"0.00035"}
onWrite={(txnReceipt: TransactionReceipt) => {
console.log("txnReceipt", txnReceipt);
checkPlayerRegistered();
Expand Down
Loading

0 comments on commit df4d124

Please sign in to comment.