|
|
@ -21,7 +21,7 @@ import 'rc-slider/assets/index.css';
|
|
|
|
import '../styles/sections.css';
|
|
|
|
import '../styles/sections.css';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const contractAddress = '0xfb618d26cb208f1e46c7882f098d725f96976c0b';
|
|
|
|
const contractAddress = '0x5FbDB2315678afecb367f032d93F642f64180aa3';
|
|
|
|
|
|
|
|
|
|
|
|
export class Section1 extends React.Component {
|
|
|
|
export class Section1 extends React.Component {
|
|
|
|
constructor(props) {
|
|
|
|
constructor(props) {
|
|
|
@ -122,15 +122,15 @@ class GameMap extends React.Component {
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<h1 id="gameMapTitle">Metaverse Map</h1>
|
|
|
|
<h1 id="gameMapTitle">Metaverse Map</h1>
|
|
|
|
<p id="gameMapText">
|
|
|
|
<p id="gameMapText">
|
|
|
|
{this.props.unaboomerSupply} / {this.props.unaboomerMaxSupply} Unaboomers radicalized and ready to terrorize the metaverse. <br />
|
|
|
|
{this.props.unaboomersRadicalized} / {this.props.unaboomerMaxSupply} Unaboomers radicalized and ready to terrorize the metaverse. <br />
|
|
|
|
{this.props.unaboomerSupply - this.props.unaboomersKilled} Unaboomers active. The project will fully begin when less than {this.props.unaboomerSurvivorCount} Unaboomers remain standing.<br />
|
|
|
|
{this.props.unaboomersRadicalized - this.props.unaboomersKilled} Unaboomers active. The project will fully begin when less than {this.props.unaboomerMaxSurvivorCount} Unaboomers remain standing.<br />
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
{this.props.unaboomerSupply > 0 && (
|
|
|
|
{this.props.unaboomersRadicalized > 0 && (
|
|
|
|
<div id="gameStats">
|
|
|
|
<div id="gameStats">
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<li>Active Unaboomers: {this.props.unaboomerSupply - this.props.unaboomersKilled}</li>
|
|
|
|
<li>Active Unaboomers: {this.props.unaboomersRadicalized - this.props.unaboomersKilled}</li>
|
|
|
|
<li>Dead Unaboomers: {this.props.unaboomersKilled}</li>
|
|
|
|
<li>Dead Unaboomers: {this.props.unaboomersKilled}</li>
|
|
|
|
<li><p className="dots" style={{backgroundColor: '#E3B505'}}></p> _ Active Bombs: {this.props.bombSupply - this.props.bombsExploded}</li>
|
|
|
|
<li><p className="dots" style={{backgroundColor: '#E3B505'}}></p> _ Active Bombs: {this.props.bombsAssembled - this.props.bombsExploded}</li>
|
|
|
|
<li><p className="dots" style={{backgroundColor: '#D01500'}}></p> _ Exploded Bombs: {this.props.bombsExploded}</li>
|
|
|
|
<li><p className="dots" style={{backgroundColor: '#D01500'}}></p> _ Exploded Bombs: {this.props.bombsExploded}</li>
|
|
|
|
<li><p className="dots" style={{backgroundColor: '#0095FF'}}></p> _ Dud Bombs: {this.props.bombsExploded - this.props.unaboomersKilled}</li>
|
|
|
|
<li><p className="dots" style={{backgroundColor: '#0095FF'}}></p> _ Dud Bombs: {this.props.bombsExploded - this.props.unaboomersKilled}</li>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
@ -152,7 +152,7 @@ class GameMap extends React.Component {
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
<div className="map">
|
|
|
|
<div className="map">
|
|
|
|
<img src={Map} />
|
|
|
|
<img src={Map} />
|
|
|
|
<GenerateBombOverlay amount={this.props.bombSupply - this.props.bombsExploded} color={'#E3B505'} type={'dots'} />
|
|
|
|
<GenerateBombOverlay amount={this.props.bombsAssembled - this.props.bombsExploded} color={'#E3B505'} type={'dots'} />
|
|
|
|
<GenerateBombOverlay amount={this.props.bombsExploded} color={'#D01500'} type={'dots'} />
|
|
|
|
<GenerateBombOverlay amount={this.props.bombsExploded} color={'#D01500'} type={'dots'} />
|
|
|
|
<GenerateBombOverlay amount={this.props.bombsExploded - this.props.unaboomersKilled} color={'#0095FF'} type={'dots'} />
|
|
|
|
<GenerateBombOverlay amount={this.props.bombsExploded - this.props.unaboomersKilled} color={'#0095FF'} type={'dots'} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
@ -169,19 +169,20 @@ function Section3() {
|
|
|
|
unaboomerPreviewAmount: 1,
|
|
|
|
unaboomerPreviewAmount: 1,
|
|
|
|
bombPreviewAmount: 1,
|
|
|
|
bombPreviewAmount: 1,
|
|
|
|
sendBombPreviewAmount: 1,
|
|
|
|
sendBombPreviewAmount: 1,
|
|
|
|
unaboomerPrice: ethers.utils.parseEther('.01'),
|
|
|
|
unaboomerPrice: 0,
|
|
|
|
bombPrice: ethers.utils.parseEther('.01'),
|
|
|
|
bombPrice: ethers.utils.parseEther('.01'),
|
|
|
|
unaboomerBalance: 0,
|
|
|
|
unaboomerBalance: 0,
|
|
|
|
bombBalance: 0,
|
|
|
|
bombBalance: 0,
|
|
|
|
unaboomerSupply: 0,
|
|
|
|
unaboomersRadicalized: 0,
|
|
|
|
bombSupply: 0,
|
|
|
|
bombsAssembled: 0,
|
|
|
|
bombsExploded: 0,
|
|
|
|
bombsExploded: 0,
|
|
|
|
unaboomersKilled: 0,
|
|
|
|
unaboomersKilled: 0,
|
|
|
|
leaderboardPointer: 0,
|
|
|
|
leaderboardPointer: 0,
|
|
|
|
leaderAddress: '',
|
|
|
|
leaderAddress: '',
|
|
|
|
leaderKillCount: 0,
|
|
|
|
leaderKillCount: 0,
|
|
|
|
unaboomerMaxSupply: 0,
|
|
|
|
unaboomerMaxSupply: 0,
|
|
|
|
unaboomerSurvivorCount: 0
|
|
|
|
unaboomerMaxSurvivorCount: 0,
|
|
|
|
|
|
|
|
unaboomerMaxMintPerWallet: 0
|
|
|
|
});
|
|
|
|
});
|
|
|
|
function handleStateChange(obj) {
|
|
|
|
function handleStateChange(obj) {
|
|
|
|
setOptions(preState => ({...preState , ...obj}));
|
|
|
|
setOptions(preState => ({...preState , ...obj}));
|
|
|
@ -209,7 +210,11 @@ function Section3() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
...defOpt,
|
|
|
|
...defOpt,
|
|
|
|
functionName: 'unaboomerSurvivorCount'
|
|
|
|
functionName: 'unaboomerMaxSurvivorCount'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
...defOpt,
|
|
|
|
|
|
|
|
functionName: 'unaboomerMaxMintPerWallet'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
watch: false,
|
|
|
|
watch: false,
|
|
|
@ -219,7 +224,8 @@ function Section3() {
|
|
|
|
unaboomerPrice: data[0].toString(),
|
|
|
|
unaboomerPrice: data[0].toString(),
|
|
|
|
bombPrice: data[1].toString(),
|
|
|
|
bombPrice: data[1].toString(),
|
|
|
|
unaboomerMaxSupply: data[2].toString(),
|
|
|
|
unaboomerMaxSupply: data[2].toString(),
|
|
|
|
unaboomerSurvivorCount: data[3].toString()
|
|
|
|
unaboomerMaxSurvivorCount: data[3].toString(),
|
|
|
|
|
|
|
|
unaboomerMaxMintPerWallet: data[4].toString()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -238,11 +244,11 @@ function Section3() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
...defOpt,
|
|
|
|
...defOpt,
|
|
|
|
functionName: 'unaboomerSupply'
|
|
|
|
functionName: 'unaboomersRadicalized'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
...defOpt,
|
|
|
|
...defOpt,
|
|
|
|
functionName: 'bombSupply'
|
|
|
|
functionName: 'bombsAssembled'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
...defOpt,
|
|
|
|
...defOpt,
|
|
|
@ -263,8 +269,8 @@ function Section3() {
|
|
|
|
handleStateChange({
|
|
|
|
handleStateChange({
|
|
|
|
unaboomerBalance: data[0].toString(),
|
|
|
|
unaboomerBalance: data[0].toString(),
|
|
|
|
bombBalance: data[1].toString(),
|
|
|
|
bombBalance: data[1].toString(),
|
|
|
|
unaboomerSupply: data[2].toString(),
|
|
|
|
unaboomersRadicalized: data[2].toString(),
|
|
|
|
bombSupply: data[3].toString(),
|
|
|
|
bombsAssembled: data[3].toString(),
|
|
|
|
bombsExploded: data[4].toString(),
|
|
|
|
bombsExploded: data[4].toString(),
|
|
|
|
unaboomersKilled: data[5].toString(),
|
|
|
|
unaboomersKilled: data[5].toString(),
|
|
|
|
leaderboardPointer: data[6].toString(),
|
|
|
|
leaderboardPointer: data[6].toString(),
|
|
|
@ -374,12 +380,20 @@ function Section3() {
|
|
|
|
<p>Radicalizing a boomer will mint ERC-721 BOOMR tokens with images of a pixel art Web3 Unaboomers.</p>
|
|
|
|
<p>Radicalizing a boomer will mint ERC-721 BOOMR tokens with images of a pixel art Web3 Unaboomers.</p>
|
|
|
|
<p>You have {options.unaboomerBalance} BOOMR</p>
|
|
|
|
<p>You have {options.unaboomerBalance} BOOMR</p>
|
|
|
|
<img src={Boomer} alt="" width="120px" />
|
|
|
|
<img src={Boomer} alt="" width="120px" />
|
|
|
|
<p>
|
|
|
|
{options.unaboomerBalance < options.unaboomerMaxMintPerWallet && (<>
|
|
|
|
<AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}>
|
|
|
|
<p>
|
|
|
|
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</> || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
|
|
|
|
<AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}>
|
|
|
|
</AwesomeButton>
|
|
|
|
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</>}
|
|
|
|
</p>
|
|
|
|
{radicalizeBoomersWrite.isIdle && <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
|
|
|
|
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} />
|
|
|
|
{radicalizeBoomersWrite.isSuccess && <>sent</>}
|
|
|
|
|
|
|
|
{radicalizeBoomersWrite.isError && <>error</>}
|
|
|
|
|
|
|
|
</AwesomeButton>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<Slider className="slider" min={1} max={options.unaboomerMaxMintPerWallet - options.unaboomerBalance} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => {
|
|
|
|
|
|
|
|
handleStateChange({unaboomerPreviewAmount: v});
|
|
|
|
|
|
|
|
radicalizeBoomersWrite.reset();
|
|
|
|
|
|
|
|
}} />
|
|
|
|
|
|
|
|
</>) || <h2>max reached</h2>}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mintItem">
|
|
|
|
<div className="mintItem">
|
|
|
|
<h1>Assemble Bombs</h1>
|
|
|
|
<h1>Assemble Bombs</h1>
|
|
|
@ -388,35 +402,47 @@ function Section3() {
|
|
|
|
<img src={Bomb} alt="" width="100px" />
|
|
|
|
<img src={Bomb} alt="" width="100px" />
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<AwesomeButton type="secondary" ripple={true} disabled={assembleBombsPrepare.status == 'error'} onPress={() => assembleBombsWrite.write?.()}>
|
|
|
|
<AwesomeButton type="secondary" ripple={true} disabled={assembleBombsPrepare.status == 'error'} onPress={() => assembleBombsWrite.write?.()}>
|
|
|
|
{assembleBombsWrite.isLoading && <>minting {options.bombAmount}</> || <>mint {options.bombPreviewAmount} ({ethers.utils.formatEther((options.bombPrice * options.bombPreviewAmount).toString())} Ξ)</>}
|
|
|
|
{assembleBombsWrite.isLoading && <>minting {options.bombAmount}</>}
|
|
|
|
|
|
|
|
{assembleBombsWrite.isIdle && <>mint {options.bombPreviewAmount} ({ethers.utils.formatEther((options.bombPrice * options.bombPreviewAmount).toString())} Ξ)</>}
|
|
|
|
|
|
|
|
{assembleBombsWrite.isSuccess && <>sent</>}
|
|
|
|
|
|
|
|
{assembleBombsWrite.isError && <>error</>}
|
|
|
|
</AwesomeButton>
|
|
|
|
</AwesomeButton>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({bombAmount: v})} onChange={(v) => handleStateChange({bombPreviewAmount: v})} />
|
|
|
|
<Slider className="slider" min={1} max={50} onAfterChange={(v) => handleStateChange({bombAmount: v})} onChange={(v) => {
|
|
|
|
|
|
|
|
handleStateChange({bombPreviewAmount: v});
|
|
|
|
|
|
|
|
assembleBombsWrite.reset();
|
|
|
|
|
|
|
|
}} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className="mintItem">
|
|
|
|
<div className="mintItem">
|
|
|
|
<h1>Send Bombs</h1>
|
|
|
|
<h1>Send Bombs</h1>
|
|
|
|
<p>Sending bombs will burn your BOMB token and kill a BOOMR token at random. Be careful not to kill yourself in the process.</p>
|
|
|
|
<p>Sending bombs will burn your BOMB token and kill a BOOMR token at random. Be careful not to kill yourself in the process.</p>
|
|
|
|
<p>There are {options.unaboomerSupply - options.unaboomersKilled} BOOMR available to kill</p>
|
|
|
|
<p>There are {options.unaboomersRadicalized - options.unaboomersKilled} BOOMR available to kill</p>
|
|
|
|
<img src={Explosion} alt="" width="120px" />
|
|
|
|
<img src={Explosion} alt="" width="120px" />
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
|
|
|
|
<AwesomeButton type="secondary" ripple={true} disabled={sendBombsPrepare.status == 'error'} onPress={() => sendBombsWrite.write?.()}>
|
|
|
|
send {options.sendBombPreviewAmount} (~0 Ξ)
|
|
|
|
{sendBombsWrite.isLoading && <>sending {options.sendBombAmount}</>}
|
|
|
|
|
|
|
|
{sendBombsWrite.isIdle && <>send {options.sendBombPreviewAmount} (~0 Ξ)</>}
|
|
|
|
|
|
|
|
{sendBombsWrite.isSuccess && <>sent</>}
|
|
|
|
|
|
|
|
{sendBombsWrite.isError && <>error</>}
|
|
|
|
</AwesomeButton>
|
|
|
|
</AwesomeButton>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => handleStateChange({sendBombPreviewAmount: v})} />
|
|
|
|
<Slider className="slider" min={1} max={options.bombBalance || 1} onAfterChange={(v) => handleStateChange({sendBombAmount: v})} onChange={(v) => {
|
|
|
|
|
|
|
|
handleStateChange({sendBombPreviewAmount: v});
|
|
|
|
|
|
|
|
sendBombsWrite.reset();
|
|
|
|
|
|
|
|
}} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<NotificationContainer/>
|
|
|
|
<NotificationContainer/>
|
|
|
|
<GameMap
|
|
|
|
<GameMap
|
|
|
|
bombSupply={options.bombSupply}
|
|
|
|
bombsAssembled={options.bombsAssembled}
|
|
|
|
bombBalance={options.bombBalance}
|
|
|
|
bombBalance={options.bombBalance}
|
|
|
|
bombsExploded={options.bombsExploded}
|
|
|
|
bombsExploded={options.bombsExploded}
|
|
|
|
unaboomerSupply={options.unaboomerSupply}
|
|
|
|
unaboomersRadicalized={options.unaboomersRadicalized}
|
|
|
|
unaboomersKilled={options.unaboomersKilled}
|
|
|
|
unaboomersKilled={options.unaboomersKilled}
|
|
|
|
leaderAddress={options.leaderAddress}
|
|
|
|
leaderAddress={options.leaderAddress}
|
|
|
|
leaderKillCount={options.leaderKillCount}
|
|
|
|
leaderKillCount={options.leaderKillCount}
|
|
|
|
unaboomerMaxSupply={options.unaboomerMaxSupply}
|
|
|
|
unaboomerMaxSupply={options.unaboomerMaxSupply}
|
|
|
|
unaboomerSurvivorCount={options.unaboomerSurvivorCount}
|
|
|
|
unaboomerMaxSurvivorCount={options.unaboomerMaxSurvivorCount}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
||
|
|
|
|
||
|
|
|
|