|
|
@ -14,6 +14,7 @@ import Explosion from '../img/explosion.png';
|
|
|
|
import Arrow from '../img/arrow_right.png';
|
|
|
|
import Arrow from '../img/arrow_right.png';
|
|
|
|
import LZA from '../img/lza_menace.png';
|
|
|
|
import LZA from '../img/lza_menace.png';
|
|
|
|
import Carty from '../img/cartyisme.png';
|
|
|
|
import Carty from '../img/cartyisme.png';
|
|
|
|
|
|
|
|
import Loading from '../img/loading.svg';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function Hero(props) {
|
|
|
|
export function Hero(props) {
|
|
|
@ -51,7 +52,6 @@ export function Hero(props) {
|
|
|
|
unaboomerMaxSupply: 0,
|
|
|
|
unaboomerMaxSupply: 0,
|
|
|
|
unaboomerMaxSurvivorCount: 0,
|
|
|
|
unaboomerMaxSurvivorCount: 0,
|
|
|
|
unaboomerMaxMintPerWallet: 0,
|
|
|
|
unaboomerMaxMintPerWallet: 0,
|
|
|
|
readWTF: false,
|
|
|
|
|
|
|
|
balancesFetched: false,
|
|
|
|
balancesFetched: false,
|
|
|
|
unaboomersByAddress: []
|
|
|
|
unaboomersByAddress: []
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -172,6 +172,10 @@ export function Hero(props) {
|
|
|
|
...assembleBombsPrepare.config,
|
|
|
|
...assembleBombsPrepare.config,
|
|
|
|
onError(data) {
|
|
|
|
onError(data) {
|
|
|
|
if (data.message.startsWith('user rejected transaction')) NotificationManager.info(`tx cancelled`, 'ok', 4000);
|
|
|
|
if (data.message.startsWith('user rejected transaction')) NotificationManager.info(`tx cancelled`, 'ok', 4000);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
onSuccess(data) {
|
|
|
|
|
|
|
|
NotificationManager.success(`Bombs acquired. Let's kill some Boomers.`, '', 3000);
|
|
|
|
|
|
|
|
assembleBombsWrite.reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
const sendBombsPrepare = usePrepareContractWrite({
|
|
|
|
const sendBombsPrepare = usePrepareContractWrite({
|
|
|
@ -203,7 +207,7 @@ export function Hero(props) {
|
|
|
|
tm.push(Number(res.tokenId));
|
|
|
|
tm.push(Number(res.tokenId));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
setTokensMinted(JSON.stringify(tm));
|
|
|
|
setTokensMinted(JSON.stringify(tm));
|
|
|
|
console.log(tm);
|
|
|
|
radicalizeBoomersWrite.reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
useWaitForTransaction({
|
|
|
|
useWaitForTransaction({
|
|
|
@ -217,14 +221,15 @@ export function Hero(props) {
|
|
|
|
const res = iface.decodeEventLog("SentBomb", log.data, log.topics);
|
|
|
|
const res = iface.decodeEventLog("SentBomb", log.data, log.topics);
|
|
|
|
if (res.hit) {
|
|
|
|
if (res.hit) {
|
|
|
|
if (res.owned) {
|
|
|
|
if (res.owned) {
|
|
|
|
NotificationManager.error(`Your bomb exploded during assembly and killed your Unaboomer ${res.tokenId.toString()}`, '', 8000);
|
|
|
|
NotificationManager.error(`Your bomb exploded during assembly and killed your Unaboomer ${res.tokenId.toString()}`, '', 5000);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
NotificationManager.success(`Your bomb killed Unaboomer ${res.tokenId.toString()}`, '', 8000);
|
|
|
|
NotificationManager.success(`Your bomb killed Unaboomer ${res.tokenId.toString()}`, '', 5000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
NotificationManager.warning(`Your bomb for Unaboomer ${res.tokenId.toString()} was a dud`, '', 8000);
|
|
|
|
NotificationManager.warning(`Your bomb for Unaboomer ${res.tokenId.toString()} was a dud`, '', 5000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
sendBombsWrite.reset();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -235,7 +240,7 @@ export function Hero(props) {
|
|
|
|
<p id='heroText'>
|
|
|
|
<p id='heroText'>
|
|
|
|
Technology is advancing at an exponential rate and boomers are being left behind. A.I., Bitcoin,
|
|
|
|
Technology is advancing at an exponential rate and boomers are being left behind. A.I., Bitcoin,
|
|
|
|
and expensive JPEGs have made them angry. <br /><br />
|
|
|
|
and expensive JPEGs have made them angry. <br /><br />
|
|
|
|
They've begun to radicalize. {options.unaboomerMaxSupply > 0 ? options.unaboomerMaxSupply: '35,000'} Boomers have joined forces
|
|
|
|
They've begun to radicalize. {options.unaboomerMaxSupply > 0 ? options.unaboomerMaxSupply: '7,896'} Boomers have joined forces
|
|
|
|
to lash out at the system.<br /><br />
|
|
|
|
to lash out at the system.<br /><br />
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<div id='heroFlex'>
|
|
|
|
<div id='heroFlex'>
|
|
|
@ -265,7 +270,7 @@ export function Hero(props) {
|
|
|
|
<button className='doThing' disabled={radicalizeBoomersPrepare.status == 'error'} onClick={() => radicalizeBoomersWrite.write?.()}>
|
|
|
|
<button className='doThing' disabled={radicalizeBoomersPrepare.status == 'error'} onClick={() => radicalizeBoomersWrite.write?.()}>
|
|
|
|
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</>}
|
|
|
|
{radicalizeBoomersWrite.isLoading && <>minting {options.unaboomerAmount}</>}
|
|
|
|
{radicalizeBoomersWrite.isIdle && <>Radicalize {options.unaboomerAmount == 1 ? 'a Unaboomer': <>{options.unaboomerAmount} Unaboomers</>}</>}
|
|
|
|
{radicalizeBoomersWrite.isIdle && <>Radicalize {options.unaboomerAmount == 1 ? 'a Unaboomer': <>{options.unaboomerAmount} Unaboomers</>}</>}
|
|
|
|
{radicalizeBoomersWrite.isSuccess && <>sent</>}
|
|
|
|
{radicalizeBoomersWrite.isSuccess && <img src={Loading} width="25px"></img>}
|
|
|
|
{radicalizeBoomersWrite.isError && <>error</>}
|
|
|
|
{radicalizeBoomersWrite.isError && <>error</>}
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<p>({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerAmount).toString())} ETH)</p>
|
|
|
|
<p>({ethers.utils.formatEther((options.unaboomerPrice * options.unaboomerAmount).toString())} ETH)</p>
|
|
|
@ -302,7 +307,7 @@ export function Hero(props) {
|
|
|
|
<button className='doThing' disabled={assembleBombsPrepare.status == 'error'} onClick={() => assembleBombsWrite.write?.()}>
|
|
|
|
<button className='doThing' disabled={assembleBombsPrepare.status == 'error'} onClick={() => assembleBombsWrite.write?.()}>
|
|
|
|
{assembleBombsWrite.isLoading && <>assembling {options.bombAmount}</>}
|
|
|
|
{assembleBombsWrite.isLoading && <>assembling {options.bombAmount}</>}
|
|
|
|
{assembleBombsWrite.isIdle && <>Assemble {options.bombAmount == 1 ? 'a Mailbomb': <>{options.bombAmount} Mailbombs</>}</>}
|
|
|
|
{assembleBombsWrite.isIdle && <>Assemble {options.bombAmount == 1 ? 'a Mailbomb': <>{options.bombAmount} Mailbombs</>}</>}
|
|
|
|
{assembleBombsWrite.isSuccess && <>sent</>}
|
|
|
|
{assembleBombsWrite.isSuccess && <img src={Loading} width="25px"></img>}
|
|
|
|
{assembleBombsWrite.isError && <>error</>}
|
|
|
|
{assembleBombsWrite.isError && <>error</>}
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<p>({ethers.utils.formatEther((options.bombPrice * options.bombAmount).toString())} ETH)</p>
|
|
|
|
<p>({ethers.utils.formatEther((options.bombPrice * options.bombAmount).toString())} ETH)</p>
|
|
|
@ -331,7 +336,7 @@ export function Hero(props) {
|
|
|
|
<button className='doThing' disabled={sendBombsPrepare.status == 'error'} onClick={() => sendBombsWrite.write?.()}>
|
|
|
|
<button className='doThing' disabled={sendBombsPrepare.status == 'error'} onClick={() => sendBombsWrite.write?.()}>
|
|
|
|
{sendBombsWrite.isLoading && <>mailing {options.sendBombAmount}</>}
|
|
|
|
{sendBombsWrite.isLoading && <>mailing {options.sendBombAmount}</>}
|
|
|
|
{sendBombsWrite.isIdle && <>Mail {options.sendBombAmount == 1 ? 'a bomb': <>{options.sendBombAmount} Mailbombs</>}</>}
|
|
|
|
{sendBombsWrite.isIdle && <>Mail {options.sendBombAmount == 1 ? 'a bomb': <>{options.sendBombAmount} Mailbombs</>}</>}
|
|
|
|
{sendBombsWrite.isSuccess && <>sent</>}
|
|
|
|
{sendBombsWrite.isSuccess && <img src={Loading} width="25px"></img>}
|
|
|
|
{sendBombsWrite.isError && <>error</>}
|
|
|
|
{sendBombsWrite.isError && <>error</>}
|
|
|
|
</button>
|
|
|
|
</button>
|
|
|
|
<p>(tx fee)</p>
|
|
|
|
<p>(tx fee)</p>
|
|
|
@ -340,10 +345,27 @@ export function Hero(props) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="userInventory">
|
|
|
|
|
|
|
|
{isConnected && JSON.parse(tokensMinted).length > 0 && (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<h1>Your Unaboomers</h1>
|
|
|
|
|
|
|
|
<div className="ownedTokens">
|
|
|
|
|
|
|
|
{JSON.parse(tokensMinted).filter((item, index) => JSON.parse(tokensMinted).indexOf(item) === index).map((id, idx) => (
|
|
|
|
|
|
|
|
<div className="ownedToken" key={idx}>
|
|
|
|
|
|
|
|
<a href={'http://unaboomer-images.s3-website-us-west-2.amazonaws.com/' + String(id).padStart(5, '0') + '.png'} target='_blank'>
|
|
|
|
|
|
|
|
<img src={'http://unaboomer-images.s3-website-us-west-2.amazonaws.com/' + String(id).padStart(5, '0') + '.png'} width="80px" />
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div id="mintInfo" className="section">
|
|
|
|
<div id="mintInfo" className="section">
|
|
|
|
<h1>WTF!?</h1>
|
|
|
|
<h1>WTF!?</h1>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
UNABOOMER is a deflationary Player vs. Player PFP NFT. 35,000 pixel Boomers, with 190 unique traits will go free-to-radicalize.
|
|
|
|
UNABOOMER is a deflationary Player vs. Player PFP NFT consisting of 7,896 pixel Boomers with 190 unique traits.
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
Assemble a mailbomb and burn it to destroy a random Boomer in the collection. Destroyed Boomers will explode, lose their traits, and be burned. Mailbomb assembly is open to all.
|
|
|
|
Assemble a mailbomb and burn it to destroy a random Boomer in the collection. Destroyed Boomers will explode, lose their traits, and be burned. Mailbomb assembly is open to all.
|
|
|
@ -352,7 +374,7 @@ export function Hero(props) {
|
|
|
|
But be careful! Your Boomer can blow itself up in the process. The more Boomers destroyed, the more likely your bomb is a dud.
|
|
|
|
But be careful! Your Boomer can blow itself up in the process. The more Boomers destroyed, the more likely your bomb is a dud.
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
|
This is only the beginning...
|
|
|
|
The round will end when 1,995 players remain standing...
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="teamInfo" className="section">
|
|
|
|
<div id="teamInfo" className="section">
|
|
|
@ -366,27 +388,10 @@ export function Hero(props) {
|
|
|
|
<div className='teamMember'>
|
|
|
|
<div className='teamMember'>
|
|
|
|
<img src={LZA} width='180px' alt='lza_menace Milady PFP' />
|
|
|
|
<img src={LZA} width='180px' alt='lza_menace Milady PFP' />
|
|
|
|
<a href='https://twitter.com/lza_menace' target='_blank' className=''>@lza_menace</a>
|
|
|
|
<a href='https://twitter.com/lza_menace' target='_blank' className=''>@lza_menace</a>
|
|
|
|
<p>Solidity dude, Monero fan, and meme consooomer.</p>
|
|
|
|
<p>Coder, loser, Monero fan, and meme consooomer.</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="userInventory">
|
|
|
|
|
|
|
|
{isConnected && JSON.parse(tokensMinted).length > 0 && (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
<h1>Your Unaboomers</h1>
|
|
|
|
|
|
|
|
<div className="ownedTokens">
|
|
|
|
|
|
|
|
{JSON.parse(tokensMinted).filter((item, index) => JSON.parse(tokensMinted).indexOf(item) === index).map((id, idx) => (
|
|
|
|
|
|
|
|
<div className="ownedToken" key={idx}>
|
|
|
|
|
|
|
|
<a href={'http://unaboomer-images.s3-website-us-west-2.amazonaws.com/' + String(id).padStart(5, '0') + '.png'} target='_blank'>
|
|
|
|
|
|
|
|
<img src={'http://unaboomer-images.s3-website-us-west-2.amazonaws.com/' + String(id).padStart(5, '0') + '.png'} width="80px" />
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{isConnected && address && (
|
|
|
|
{isConnected && address && (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<StatsPanel
|
|
|
|
<StatsPanel
|
|
|
|