Skip to content

Instantly share code, notes, and snippets.

@aodhgan
Created October 31, 2020 05:28
Show Gist options
  • Save aodhgan/e53d574a78e7f752e2fab448b422d6fa to your computer and use it in GitHub Desktop.
Save aodhgan/e53d574a78e7f752e2fab448b422d6fa to your computer and use it in GitHub Desktop.
function destroyChildren(uint256 value) internal {
uint256 tail = s_tail;
// tail points to slot behind the last contract in the queue
for (uint256 i = tail + 1; i <= tail + value; i++) {
mk_contract_address(this, i).call();
}
s_tail = tail + value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment