requestnetworkartifacts
Advanced tools
Comparing version 0.1.0 to 0.1.1
21
index.js
@@ -1,6 +0,19 @@ | ||
const index = require('./index.json'); | ||
const artifacts = require('./artifacts.json'); | ||
// Entry point for the package, exports the artifacts to the outside. | ||
// Call this function to get an artifact on a network and at an address | ||
// The artifacts are stored in folders like RequestCore and RequestEthereum | ||
// artifacts.json serves at mapping (network, address) => artifact | ||
exports.default = function(networkName, address) { | ||
if(!index[networkName] || !index[networkName][address.toLowerCase()]) return null; | ||
return require('./'+index[networkName][address.toLowerCase()]); | ||
} | ||
const artifact = artifacts[networkName] && artifacts[networkName][address.toLowerCase()]; | ||
if (!artifact) { | ||
return null; | ||
} | ||
return require(`./${artifact}`); | ||
} | ||
// Temporary hack that should be properly fixed. Needs some refactor to remove the default export | ||
exports.default.getAllArtifactsForNetwork = function(networkName) { | ||
return artifacts[networkName]; | ||
} |
{ | ||
"name": "requestnetworkartifacts", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Artifacts for Request Network Ethereum contracts", | ||
"homepage": "https://github.com/RequestNetwork/requestNetwork/tree/master/packages/requestNetworkArtifacts", | ||
"keywords": [ | ||
"ethereum", | ||
"request", | ||
"requestArtifacts", | ||
"requestnetwork", | ||
"ethereum" | ||
] | ||
"requestnetwork" | ||
], | ||
"license": "MIT", | ||
"repository": "github:RequestNetwork/requestNetwork" | ||
} |
# Request_Artifacts | ||
Artifacts for Request Network Ethereum contracts |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
143133
3198