Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
solidity-loader
Advanced tools
This solidity loader was orignally designed to be used in conjuntion with the pudding-loader
. See this basic setup below.
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loaders: ['babel'],
include: path.join(__dirname, 'src'),
query: {
presets: ['es2015'],
plugins: ['transform-runtime']
}
},
{ test: /\.sol$/, loaders: ["pudding-loader","solidity-loader"]},
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.png$/, loader: "url-loader?limit=100000" },
{ test: /\.json$/, loader: "json-loader" },
{ test: /\.jpg$/, loader: "file-loader" }]
}
In order for the pudding-loader
and solidity-loader
to work together, they need to be in this particlar order in loaders: []
. (Possible race condition issue?)
This setup allows you to hot-reload and export callable javascript functions to an RPC endpoint.
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules)/,
loaders: ['babel'],
include: path.join(__dirname, 'src'),
query: {
presets: ['es2015'],
plugins: ['transform-runtime']
}
},
{ test: /\.sol$/, loaders: ["solidity-loader?export=true"]},
{ test: /\.css$/, loader: "style-loader!css-loader" },
{ test: /\.png$/, loader: "url-loader?limit=100000" },
{ test: /\.json$/, loader: "json-loader" },
{ test: /\.jpg$/, loader: "file-loader" }]
}
The ?export=true
query creates an object with contract factories and contract information.
It's a basic import and doesn't do everything, but sets up the watchers, and allows basic imports.
Questions or Issues? File it! Or better yet, a pull request, with a demo to test with. Thanks and enjoy.
Contributors:
@jeffscottward
@SilentCicero
FAQs
Webpack loader to compile a solidity contract and return output
The npm package solidity-loader receives a total of 5 weekly downloads. As such, solidity-loader popularity was classified as not popular.
We found that solidity-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.