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.
@makerdao/dai-plugin-config
Advanced tools
A dai.js plugin for retrieving Dai.js configuration objects async.
This plugin fetches configuration data from a testchain backend, and creates a config object to be provided to the Maker SDK so it can be used with a testchain. Add it to the end of the plugins
array to ensure the options override the default config.
see Dai.js for more details
import Maker from '@makerdao/dai';
import configPlugin from '@makerdao/dai-plugin-config';
const config = {
plugins: [
[configPlugin, { testchainId: '123abc', backendEnv: 'dev' }]
],
log: false
};
await Maker.create('http', config);
testchainId
: Must be a running testchain ID on the selected backend environment.
backendEnv
: (optional) defaults to the 'prod' URL, which is http://18.185.172.121:4000/chain/
. Options are prod
, dev
, or any user-specified URL.
In the beforeCreate
block, the plugin will fetch testchain data from the URL. This includes the testchain RPC, all the deployed contracts, and required tokens. It will create a config object that looks like this:
config = {
url: rpc_url,
provider: {
type: 'HTTP',
network: chainConfig.type
},
smartContract: { addContracts },
token: { erc20 }
};
We run Prettier on-commit, which means you can write code in whatever style you want and it will be automatically formatted according to the common style when you run git commit
.
To publish this package, simply run:
yarn publish
This will prompt for a new version, create a new commit and tag for that version, automatically build the project and then publish the package to npm.
Don't forget to use git push --tags
to push the commit with the new version along with the new tag pointing to it.
The dai config plugin is MIT licensed.
FAQs
A dai.js plugin for retrieving Dai.js configuration objects async.
The npm package @makerdao/dai-plugin-config receives a total of 2 weekly downloads. As such, @makerdao/dai-plugin-config popularity was classified as not popular.
We found that @makerdao/dai-plugin-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 open source maintainers 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.