UNPKG

tronbox

Version:

TronBox - Simple development framework for Tron

1 lines 554 B
"use strict";function ResolverIntercept(resolver){this.resolver=resolver;this.cache={}}ResolverIntercept.prototype.require=function(import_path){import_path=import_path.replace(/\.sol$/i,"");if(this.cache[import_path]){return this.cache[import_path]}var resolved=this.resolver.require(import_path);this.cache[import_path]=resolved;resolved.synchronization_timeout=0;return resolved};ResolverIntercept.prototype.contracts=function(){var self=this;return Object.keys(this.cache).map(function(key){return self.cache[key]})};module.exports=ResolverIntercept;