Created
October 31, 2020 04:51
-
-
Save aodhgan/a7ef3993fd526c983efcd7f577909dcf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _destroyChildren(uint256 value) internal { | |
assembly { | |
let i := sload(totalBurned_slot) | |
let end := add(i, value) | |
sstore(totalBurned_slot, end) | |
let data := mload(0x40) | |
mstore(data, 0xff0000000000004946c0e9F43F4Dee607b0eF1fA1c0000000000000000000000) | |
mstore(add(data, 53), 0x3c1644c68e5d6cb380c36d1bf847fdbc0c7ac28030025a2fc5e63cce23c16348) | |
let ptr := add(data, 21) | |
for { } lt(i, end) { i := add(i, 1) } { | |
mstore(ptr, i) | |
pop(call(gas(), keccak256(data, 85), 0, 0, 0, 0, 0)) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment