track bombs exploded

master
lza_menace 2 years ago
parent 8610d4b1a5
commit 77a36ee088

@ -10,6 +10,7 @@ contract Mailbomb is ERC1155, Owned {
using LibString for uint256; using LibString for uint256;
uint256 public bombsAssembled; uint256 public bombsAssembled;
uint256 public bombsExploded;
string public baseURI; string public baseURI;
Main public main; Main public main;
@ -57,6 +58,7 @@ contract Mailbomb is ERC1155, Owned {
/// Burn spent tokens from main contract /// Burn spent tokens from main contract
function explode(address _from, uint256 _amount) external onlyMain { function explode(address _from, uint256 _amount) external onlyMain {
bombsExploded += _amount;
super._burn(_from, 1, _amount); super._burn(_from, 1, _amount);
} }

@ -143,6 +143,11 @@ contract Main is Owned {
return mailbomb.bombsAssembled(); return mailbomb.bombsAssembled();
} }
/// Get BOMB exploded amount
function bombsExploded() public view returns (uint256) {
return mailbomb.bombsExploded();
}
// ========================================================================= // =========================================================================
// Tokens // Tokens
// ========================================================================= // =========================================================================

Loading…
Cancel
Save