From 07233c5d52cb5a9ec90b71ac0f29e99e5680889a Mon Sep 17 00:00:00 2001 From: lza_menace Date: Fri, 6 Jan 2023 02:17:12 -0800 Subject: [PATCH] updating site --- src/abi/main.json | 23 +++++++--- src/index.js | 2 +- src/template/Sections.jsx | 88 +++++++++++++++++++++++++-------------- 3 files changed, 76 insertions(+), 37 deletions(-) diff --git a/src/abi/main.json b/src/abi/main.json index 32492a4..427259f 100644 --- a/src/abi/main.json +++ b/src/abi/main.json @@ -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", diff --git a/src/index.js b/src/index.js index 5673876..ef4357d 100644 --- a/src/index.js +++ b/src/index.js @@ -36,7 +36,7 @@ const wagmiClient = createClient({ ReactDOM.createRoot(document.getElementById("root")).render( - +
diff --git a/src/template/Sections.jsx b/src/template/Sections.jsx index 916af08..1a233ad 100644 --- a/src/template/Sections.jsx +++ b/src/template/Sections.jsx @@ -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 { <>

Metaverse Map

- {this.props.unaboomerSupply} / {this.props.unaboomerMaxSupply} Unaboomers radicalized and ready to terrorize the metaverse.
- {this.props.unaboomerSupply - this.props.unaboomersKilled} Unaboomers active. The project will fully begin when less than {this.props.unaboomerSurvivorCount} Unaboomers remain standing.
+ {this.props.unaboomersRadicalized} / {this.props.unaboomerMaxSupply} Unaboomers radicalized and ready to terrorize the metaverse.
+ {this.props.unaboomersRadicalized - this.props.unaboomersKilled} Unaboomers active. The project will fully begin when less than {this.props.unaboomerMaxSurvivorCount} Unaboomers remain standing.

- {this.props.unaboomerSupply > 0 && ( + {this.props.unaboomersRadicalized > 0 && (
    -
  • Active Unaboomers: {this.props.unaboomerSupply - this.props.unaboomersKilled}
  • +
  • Active Unaboomers: {this.props.unaboomersRadicalized - this.props.unaboomersKilled}
  • Dead Unaboomers: {this.props.unaboomersKilled}
  • -
  • _ Active Bombs: {this.props.bombSupply - this.props.bombsExploded}
  • +
  • _ Active Bombs: {this.props.bombsAssembled - this.props.bombsExploded}
  • _ Exploded Bombs: {this.props.bombsExploded}
  • _ Dud Bombs: {this.props.bombsExploded - this.props.unaboomersKilled}
@@ -152,7 +152,7 @@ class GameMap extends React.Component { )}
- +
@@ -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() {

Radicalizing a boomer will mint ERC-721 BOOMR tokens with images of a pixel art Web3 Unaboomers.

You have {options.unaboomerBalance} BOOMR

-

- radicalizeBoomersWrite.write?.()}> - {radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount} || <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)} - -

- handleStateChange({unaboomerAmount: v})} onChange={(v) => handleStateChange({unaboomerPreviewAmount: v})} /> + {options.unaboomerBalance < options.unaboomerMaxMintPerWallet && (<> +

+ radicalizeBoomersWrite.write?.()}> + {radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}} + {radicalizeBoomersWrite.isIdle && <>mint {options.unaboomerPreviewAmount} ({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerPreviewAmount).toString())} Ξ)} + {radicalizeBoomersWrite.isSuccess && <>sent} + {radicalizeBoomersWrite.isError && <>error} + +

+ handleStateChange({unaboomerAmount: v})} onChange={(v) => { + handleStateChange({unaboomerPreviewAmount: v}); + radicalizeBoomersWrite.reset(); + }} /> + ) ||

max reached

}

Assemble Bombs

@@ -388,35 +402,47 @@ function Section3() {

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}

- handleStateChange({bombAmount: v})} onChange={(v) => handleStateChange({bombPreviewAmount: v})} /> + handleStateChange({bombAmount: v})} onChange={(v) => { + handleStateChange({bombPreviewAmount: v}); + assembleBombsWrite.reset(); + }} />

Send Bombs

Sending bombs will burn your BOMB token and kill a BOOMR token at random. Be careful not to kill yourself in the process.

-

There are {options.unaboomerSupply - options.unaboomersKilled} BOOMR available to kill

+

There are {options.unaboomersRadicalized - options.unaboomersKilled} BOOMR available to kill

sendBombsWrite.write?.()}> - send {options.sendBombPreviewAmount} (~0 Ξ) + {sendBombsWrite.isLoading && <>sending {options.sendBombAmount}} + {sendBombsWrite.isIdle && <>send {options.sendBombPreviewAmount} (~0 Ξ)} + {sendBombsWrite.isSuccess && <>sent} + {sendBombsWrite.isError && <>error}

- handleStateChange({sendBombAmount: v})} onChange={(v) => handleStateChange({sendBombPreviewAmount: v})} /> + handleStateChange({sendBombAmount: v})} onChange={(v) => { + handleStateChange({sendBombPreviewAmount: v}); + sendBombsWrite.reset(); + }} />
||