updating site

master
lza_menace 2 years ago
parent 61ec2a1c32
commit 07233c5d52

@ -101,7 +101,7 @@
},
{
"inputs": [],
"name": "bombSupply",
"name": "bombsAssembled",
"outputs": [
{
"internalType": "uint256",
@ -327,7 +327,7 @@
},
{
"inputs": [],
"name": "unaboomerMaxSupply",
"name": "unaboomerMaxMintPerWallet",
"outputs": [
{
"internalType": "uint256",
@ -340,7 +340,7 @@
},
{
"inputs": [],
"name": "unaboomerPrice",
"name": "unaboomerMaxSupply",
"outputs": [
{
"internalType": "uint256",
@ -353,7 +353,7 @@
},
{
"inputs": [],
"name": "unaboomerSupply",
"name": "unaboomerMaxSurvivorCount",
"outputs": [
{
"internalType": "uint256",
@ -366,7 +366,7 @@
},
{
"inputs": [],
"name": "unaboomerSurvivorCount",
"name": "unaboomerPrice",
"outputs": [
{
"internalType": "uint256",
@ -390,6 +390,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "unaboomersRadicalized",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "withdraw",

@ -36,7 +36,7 @@ const wagmiClient = createClient({
ReactDOM.createRoot(document.getElementById("root")).render(
<ParallaxProvider>
<WagmiConfig client={wagmiClient}>
<RainbowKitProvider chains={chains} initialChain={5}>
<RainbowKitProvider chains={chains} initialChain={1337}>
<Wallet />
<div className="scrollContainer">
<AllSections />

@ -21,7 +21,7 @@ import 'rc-slider/assets/index.css';
import '../styles/sections.css';
const contractAddress = '0xfb618d26cb208f1e46c7882f098d725f96976c0b';
const contractAddress = '0x5FbDB2315678afecb367f032d93F642f64180aa3';
export class Section1 extends React.Component {
constructor(props) {
@ -122,15 +122,15 @@ class GameMap extends React.Component {
<>
<h1 id="gameMapTitle">Metaverse Map</h1>
<p id="gameMapText">
{this.props.unaboomerSupply} / {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.unaboomerMaxSupply} Unaboomers radicalized and ready to terrorize the metaverse. <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>
{this.props.unaboomerSupply > 0 && (
{this.props.unaboomersRadicalized > 0 && (
<div id="gameStats">
<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><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: '#0095FF'}}></p> _ Dud Bombs: {this.props.bombsExploded - this.props.unaboomersKilled}</li>
</ul>
@ -152,7 +152,7 @@ class GameMap extends React.Component {
)}
<div className="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 - this.props.unaboomersKilled} color={'#0095FF'} type={'dots'} />
</div>
@ -169,19 +169,20 @@ function Section3() {
unaboomerPreviewAmount: 1,
bombPreviewAmount: 1,
sendBombPreviewAmount: 1,
unaboomerPrice: ethers.utils.parseEther('.01'),
unaboomerPrice: 0,
bombPrice: ethers.utils.parseEther('.01'),
unaboomerBalance: 0,
bombBalance: 0,
unaboomerSupply: 0,
bombSupply: 0,
unaboomersRadicalized: 0,
bombsAssembled: 0,
bombsExploded: 0,
unaboomersKilled: 0,
leaderboardPointer: 0,
leaderAddress: '',
leaderKillCount: 0,
unaboomerMaxSupply: 0,
unaboomerSurvivorCount: 0
unaboomerMaxSurvivorCount: 0,
unaboomerMaxMintPerWallet: 0
});
function handleStateChange(obj) {
setOptions(preState => ({...preState , ...obj}));
@ -209,7 +210,11 @@ function Section3() {
},
{
...defOpt,
functionName: 'unaboomerSurvivorCount'
functionName: 'unaboomerMaxSurvivorCount'
},
{
...defOpt,
functionName: 'unaboomerMaxMintPerWallet'
}
],
watch: false,
@ -219,7 +224,8 @@ function Section3() {
unaboomerPrice: data[0].toString(),
bombPrice: data[1].toString(),
unaboomerMaxSupply: data[2].toString(),
unaboomerSurvivorCount: data[3].toString()
unaboomerMaxSurvivorCount: data[3].toString(),
unaboomerMaxMintPerWallet: data[4].toString()
});
}
});
@ -238,11 +244,11 @@ function Section3() {
},
{
...defOpt,
functionName: 'unaboomerSupply'
functionName: 'unaboomersRadicalized'
},
{
...defOpt,
functionName: 'bombSupply'
functionName: 'bombsAssembled'
},
{
...defOpt,
@ -263,8 +269,8 @@ function Section3() {
handleStateChange({
unaboomerBalance: data[0].toString(),
bombBalance: data[1].toString(),
unaboomerSupply: data[2].toString(),
bombSupply: data[3].toString(),
unaboomersRadicalized: data[2].toString(),
bombsAssembled: data[3].toString(),
bombsExploded: data[4].toString(),
unaboomersKilled: data[5].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>You have {options.unaboomerBalance} BOOMR</p>
<img src={Boomer} alt="" width="120px" />
{options.unaboomerBalance < options.unaboomerMaxMintPerWallet && (<>
<p>
<AwesomeButton type="secondary" ripple={true} disabled={radicalizeBoomersPrepare.status == 'error'} onPress={() => radicalizeBoomersWrite.write?.()}>
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</> || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</>}
{radicalizeBoomersWrite.isIdle && <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)</>}
{radicalizeBoomersWrite.isSuccess && <>sent</>}
{radicalizeBoomersWrite.isError && <>error</>}
</AwesomeButton>
</p>
<Slider className="slider" min={1} max={30} onAfterChange={(v) => handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} />
<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 className="mintItem">
<h1>Assemble Bombs</h1>
@ -388,35 +402,47 @@ function Section3() {
<img src={Bomb} alt="" width="100px" />
<p>
<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>
</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 className="mintItem">
<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>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" />
<p>
<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>
</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>
<NotificationContainer/>
<GameMap
bombSupply={options.bombSupply}
bombsAssembled={options.bombsAssembled}
bombBalance={options.bombBalance}
bombsExploded={options.bombsExploded}
unaboomerSupply={options.unaboomerSupply}
unaboomersRadicalized={options.unaboomersRadicalized}
unaboomersKilled={options.unaboomersKilled}
leaderAddress={options.leaderAddress}
leaderKillCount={options.leaderKillCount}
unaboomerMaxSupply={options.unaboomerMaxSupply}
unaboomerSurvivorCount={options.unaboomerSurvivorCount}
unaboomerMaxSurvivorCount={options.unaboomerMaxSurvivorCount}
/>
</>
||

Loading…
Cancel
Save