Skip to content

Commit

Permalink
Merge pull request #2391 from BibliothecaDAO/enh/tos
Browse files Browse the repository at this point in the history
update ToS
  • Loading branch information
ponderingdemocritus authored Dec 10, 2024
2 parents 1cfe4ff + 2c31fdd commit cdd1c79
Show file tree
Hide file tree
Showing 2 changed files with 208 additions and 181 deletions.
209 changes: 95 additions & 114 deletions client/src/ui/layouts/TermsOfService.tsx
Original file line number Diff line number Diff line change
@@ -1,172 +1,153 @@
import { configManager } from "@/dojo/setup";
import useUIStore from "@/hooks/store/useUIStore";
import { useMemo, useRef, useState } from "react";
import Button from "../elements/Button";
import { currencyIntlFormat, formatTime } from "../utils/utils";

export const TermsOfService = () => {
const hasAcceptedToS = useUIStore((state) => state.hasAcceptedToS);
const setHasAcceptedToS = useUIStore((state) => state.setHasAcceptedToS);
const setShowToS = useUIStore((state) => state.setShowToS);
const [currentStep, setCurrentStep] = useState(1);
const containerRef = useRef<HTMLDivElement>(null);

const handleNextStep = () => {
setCurrentStep(2);
if (containerRef.current) {
containerRef.current.scrollTop = 0;
}
};

const handleAcceptTerms = () => {
setHasAcceptedToS(true);
setShowToS(false);
};

// Memoize the content to prevent unnecessary re-renders
const step1Content = useMemo(
() => (
<div className="space-y-6">
<div className="text-2xl font-bold">
Did you know that Eternum is a fully onchain game with immutable contracts?
</div>

return (
<div className="h-full overflow-y-auto">
<div className="w-full">
<div className="text-2xl font-bold mb-4">Important Disclaimer - Please Read Carefully</div>
<p className="mb-4">By playing Eternum, you acknowledge and accept that:</p>

<section className="mb-4">
<div className="text-xl font-bold mb-2">Immutable Contracts</div>
<p>
The game operates entirely on immutable smart contracts. Once deployed, these contracts cannot be altered or
modified by the developers or any other party.
</p>
<section>
<div className="text-xl font-bold mb-2">Important information:</div>
<p>Bridges out of the game permanently close 48 hours after victory.</p>
</section>

<section className="mb-4">
<div className="text-xl font-bold mb-2">Risk of Loss</div>
<section>
<p>
All transactions and gameplay actions are final. There is no mechanism for refunds, reversals, or
compensation.
You bridge tokens in and out of the game. The game bridge is closed forever 48 hours after the game ends Any
tokens left in the game at that time are permanently locked in the contract (aka burned).
</p>
</section>

<section className="mb-4">
<div className="text-xl font-bold mb-2">Acceptance of Risk</div>
<section>
<p>
You are solely responsible for any loss of funds incurred while playing Eternum. By proceeding, you waive
any claims of recourse against the developers, the DAO, or associated parties.
Bridging out of the game is done by sending resources to a bank.{" "}
<strong>That takes time and requires donkeys.</strong> It's part of the game - with immutable contracts code
is law. Plan around it, it is your responsibility to bridge out and the developers cannot do anything to
change the code after deployment.
</p>
</section>

<div className="mt-4 italic">
<p>By playing Eternum, you acknowledge and accept these terms.</p>
<div className="w-full flex justify-center">
<Button className="!bg-gold border-none" onClick={handleNextStep}>
<div className="text-black">Next</div>
</Button>
</div>
</div>
),
[],
);

<div className="mt-8">
<div className="text-2xl font-bold mb-4">Funds Locked at Season End - Please Read</div>
const step2Content = useMemo(
() => (
<div className="space-y-6">
<div className="text-2xl font-bold">Important disclaimer. Please Read Carefully.</div>

<section className="mb-4">
<section>
<p>
A season of Eternum concludes when a single player scores the required{" "}
{currencyIntlFormat(configManager.getHyperstructureConfig().pointsForWin, 0)} Victory Points and clicks the
"End Season" button.
By participating in <strong>Eternum</strong>, you fully acknowledge and agree to the following terms and
conditions:
</p>
</section>

<div className="text-xl font-bold my-2">Season Conclusion Consequences</div>
<p>
At the moment the "End Season" button is clicked, ALL $LORDS tokens and in-game resources are permanently
locked in the game.
</p>
<section className="mb-4 text-xl font-extrabold">
<p>All Tokens Are Locked In Game Contract 48 hours after the game is won (Season End)</p>
</section>

<section className="mb-4">
<p>
Please review the{" "}
<a
className="underline"
href="https://eternum-docs.realms.world/"
target="_blank"
rel="noopener noreferrer"
>
game documentation
</a>{" "}
for full details, including instructions on bridging tokens out during the gameplay phase.
A season of Eternum concludes when a single player achieves the required number of Victory Points and clicks
the "End Season" button. 48 hours after this point:
</p>
<ul className="list-disc pl-6 mt-2">
<li className="text-lg font-extrabold">
ALL $LORDS tokens and in-game resources are permanently locked within the game.
</li>
<li>
Players are encouraged to review the{" "}
<a
href="https://eternum-docs.realms.world/"
className="underline hover:text-gold-light cursor-fancy"
target="_blank"
rel="noopener noreferrer"
>
documentation
</a>{" "}
for instructions on how to bridge tokens out during the active gameplay phase. Be aware that bridging out
is from a bank. That means donkeys are needed, travel time is required - and all other kinds of unforeseen
events can delay your exit. Plan accordingly as there is no Plan B.
</li>
</ul>
</section>

<div>
<div className="text-xl font-bold mb-2">Acceptance of Risk</div>
<p className="mb-4">
By participating in Eternum, you agree to the risk of loss of funds with no recourse and accept all terms
detailed in the documentation.
</p>

<p className="italic">
By settling a Realm and playing, you confirm your understanding and acceptance of these terms.
</p>
</div>
</div>

<div className="mt-8">
<div className="text-2xl font-bold mb-4">Disclaimer and Risk Acknowledgment</div>
<p className="mb-4">
By participating in Eternum, you fully acknowledge and agree to the following terms and conditions:
</p>

<section className="mb-4">
<div className="text-xl font-bold mb-2">Immutable Contracts</div>
<section>
<h2 className="font-bold text-lg mb-2">Immutable Contracts</h2>
<p>
Eternum is governed entirely by immutable smart contracts. Once deployed, the game's rules and mechanics
cannot be altered, updated, or reversed by the developers, the DAO, or any other party.
</p>
</section>

<section className="mb-4">
<div className="text-xl font-bold mb-2">Risk of Loss</div>
<section>
<h2 className="font-bold text-lg mb-2">Risk of Loss</h2>
<p>
All transactions and gameplay actions in Eternum are final. There are no mechanisms for refunds, reversals,
or compensation. You acknowledge the risk of loss of funds and accept that you bear sole responsibility for
any financial impact incurred.
</p>
</section>

<section className="mb-4">
<div className="text-xl font-bold mb-2">Funds Locked at Season End</div>
<p>
A season of Eternum concludes when a single player achieves the required{" "}
{currencyIntlFormat(configManager.getHyperstructureConfig().pointsForWin, 0)} Victory Points and clicks the
"End Season" button. At this point:
</p>
<ul className="list-disc pl-5 mb-4">
<li>
ALL $LORDS tokens and in-game resources are permanently locked within the game after a period of{" "}
{formatTime(Number(configManager.getSeasonBridgeConfig().closeAfterEndSeconds), undefined, false)}.
</li>
<li>
Players are encouraged to review{" "}
<a
className="underline"
href="https://eternum-docs.realms.world/"
target="_blank"
rel="noopener noreferrer"
>
the documentation
</a>{" "}
for instructions on how to bridge tokens out during the active gameplay phase.
</li>
</ul>
</section>

<section className="mb-4">
<div className="text-xl font-bold mb-2">No Recourse</div>
<section>
<h2 className="font-bold text-lg mb-2">No Recourse</h2>
<p>
By participating in Eternum, you waive all rights to claims or recourse against the developers, the DAO, or
any other associated entities for any losses or disputes arising from your participation in the game.
</p>
</section>

<section>
<div className="text-xl font-bold mb-2">Acknowledgment of Terms</div>
<h2 className="font-bold text-lg mb-2">Acknowledgment of Terms</h2>
<p>
Participation in Eternum constitutes your agreement to these terms, as well as all other terms and
conditions outlined in the game's documentation.
</p>
</section>
{!hasAcceptedToS && (
<div className="w-full flex justify-center">
<Button
className="!bg-gold border-none my-2"
onClick={() => {
setHasAcceptedToS(true);
setShowToS(false);
}}
>
<div className="text-black">Accept</div>
</Button>
</div>
)}

<div className="w-full flex justify-center">
<Button className="!bg-gold border-none" onClick={handleAcceptTerms}>
<div className="text-black">Accept Terms & Conditions</div>
</Button>
</div>
</div>
),
[],
);

return (
<div
ref={containerRef}
className="h-full overflow-y-auto scrollbar-thin scrollbar-thumb-gold/20 scrollbar-track-transparent"
>
<div className="w-full px-4 py-6">{currentStep === 1 ? step1Content : step2Content}</div>
</div>
);
};
Loading

0 comments on commit cdd1c79

Please sign in to comment.