From 77a36ee0883ee2014f4c9f1a39f81e13d74089bb Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 29 Dec 2022 01:14:59 -0800 Subject: [PATCH] track bombs exploded --- src/Mailbomb.sol | 2 ++ src/Main.sol | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/src/Mailbomb.sol b/src/Mailbomb.sol index bc105d0..4429bf3 100644 --- a/src/Mailbomb.sol +++ b/src/Mailbomb.sol @@ -10,6 +10,7 @@ contract Mailbomb is ERC1155, Owned { using LibString for uint256; uint256 public bombsAssembled; + uint256 public bombsExploded; string public baseURI; Main public main; @@ -57,6 +58,7 @@ contract Mailbomb is ERC1155, Owned { /// Burn spent tokens from main contract function explode(address _from, uint256 _amount) external onlyMain { + bombsExploded += _amount; super._burn(_from, 1, _amount); } diff --git a/src/Main.sol b/src/Main.sol index 765edd7..f9e5028 100644 --- a/src/Main.sol +++ b/src/Main.sol @@ -143,6 +143,11 @@ contract Main is Owned { return mailbomb.bombsAssembled(); } + /// Get BOMB exploded amount + function bombsExploded() public view returns (uint256) { + return mailbomb.bombsExploded(); + } + // ========================================================================= // Tokens // =========================================================================