This file contains hidden or 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
pragma solidity >0.4.99 <0.6.0; | |
library SafeMath { | |
function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
uint256 c = a * b; | |
assert(a == 0 || c / a == b); | |
return c; | |
} | |
function div(uint256 a, uint256 b) internal pure returns (uint256) { |
This file contains hidden or 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
//Addr defaults to the addr of smitop's faucet since that was what I used this for, but set it to whatever account you're looking at. | |
//If anyone knows if/where the input of the top left text box is stored you could replace addr with always using the current addr. | |
let eliminateClutter = (minimum = 0, direction = 0, addr = "NQ94 GSXP KNG0 K5YV HFJ1 PYAQ Y5D1 XTQ1 SLFP") => { | |
let saved = nimiqMap.edges.get(); | |
let temp = nimiqMap.edges.get({ | |
filter: function (item) { | |
if (minimum > 0 && item.value < minimum) { | |
return false; | |
} |
This file contains hidden or 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 wrapJ(par) { | |
let foundObj = null; | |
if (!par) { | |
return { | |
isWrappedJ : true, | |
length : function() { return 0; }, | |
get : function(i) { return this; }, | |
parent : function() { return this; }, |