
Security News
High-Severity RCE Vulnerability Disclosed in next-mdx-remote
HashiCorp disclosed a high-severity RCE in next-mdx-remote affecting versions 4.3.0 to 5.x when compiling untrusted MDX on the server.
@metamask/smart-transactions-controller
Advanced tools
Improves success rates for swaps by trialing transactions privately and finding minimum fees
@metamask/smart-transactions-controllerImproves success rates for swaps by trialing transactions privately and finding minimum fees.
yarn add @metamask/smart-transactions-controller
or
npm install @metamask/smart-transactions-controller
nvm install will install the latest suitable version and running nvm use will automatically choose the right node version for you.yarn install to install dependencies and run any required post-install scriptsRun yarn test to run the tests once. To run tests on file changes, run yarn test:watch.
Run yarn lint to run the linter, or run yarn lint:fix to run the linter and fix any automatically fixable issues.
Smart transactions feature flags are managed via RemoteFeatureFlagController (LaunchDarkly). The configuration uses a default remote object for global settings and chain-specific overrides keyed by hex chain ID.
The flag in LaunchDarkly is named smartTransactionsNetworks.
Add the field to the schema in src/utils/validators.ts:
export const SmartTransactionsNetworkConfigSchema = type({
// ... existing fields
myNewFlag: optional(boolean()),
});
The SmartTransactionsNetworkConfig type is automatically inferred from this schema.
Add default value in src/constants.ts under DEFAULT_DISABLED_SMART_TRANSACTIONS_FEATURE_FLAGS:
These values should be defensive. They are applied when the remote config is invalid or does not exist for a network. It disables smart transaction.
export const DEFAULT_DISABLED_SMART_TRANSACTIONS_FEATURE_FLAGS = {
default: {
// ... existing defaults
myNewFlag: false,
},
};
Use in clients via the exported selectors:
import { selectSmartTransactionsFeatureFlagsForChain } from '@metamask/smart-transactions-controller';
const chainConfig = selectSmartTransactionsFeatureFlagsForChain(
state,
'0x1',
);
if (chainConfig.myNewFlag) {
// Feature is enabled
}
The project follows the same release process as the other libraries in the MetaMask organization. The GitHub Actions action-create-release-pr and action-publish-release are used to automate the release process; see those repositories for more information about how they work.
Choose a release version.
If this release is backporting changes onto a previous release, then ensure there is a major version branch for that version (e.g. 1.x for a v1 backport release).
v1.0.2 release, you'd want to ensure there was a 1.x branch that was set to the v1.0.1 tag.Trigger the workflow_dispatch event manually for the Create Release Pull Request action to create the release PR.
action-create-release-pr workflow to create the release PR.Update the changelog to move each change entry into the appropriate change category (See here for the full list of change categories, and the correct ordering), and edit them to be more easily understood by users of the package.
yarn auto-changelog validate --rc to check that the changelog is correctly formatted.Review and QA the release.
Squash & Merge the release.
action-publish-release workflow to tag the final release commit and publish the release on GitHub.Publish the release on npm.
publish-release GitHub Action workflow to finish. This should trigger a second job (publish-npm), which will wait for a run approval by the npm publishers team.publish-npm job (or ask somebody on the npm publishers team to approve it for you).publish-npm job has finished, check npm to verify that it has been published.If you are working on a pull request and want to test changes in another project before you publish them, you can create a preview build and then configure your project to use it.
@metamaskbot publish-preview. This starts the publish-preview GitHub action, which will create a preview build and publish it to NPM.@metamask-previews instead of @metamask.1.2.3-preview-e2df9b4 instead of 1.2.3.To use a preview build within a project, you need to override the resolution logic for your package manager so that the "production" version of that package is replaced with the preview version. Here's how you do that:
package.json in the project and locate the entry for this package in dependencies.resolutions; if you're using NPM or any other package manager, this is overrides.resolutions:
"@metamask/smart-transactions-controller@^1.2.3": "npm:@metamask-previews/smart-transactions-controller@1.2.3-preview-abcdefg"
resolutions:
"@metamask/smart-transactions-controller": "npm:@metamask-previews/smart-transactions-controller@1.2.3-preview-abcdefg"
overrides:
"@metamask/smart-transactions-controller": "npm:@metamask-previews/smart-transactions-controller@1.2.3-preview-abcdefg"
yarn install.If you make more changes to your pull request and want to create a new preview build:
@metamaskbot comment on the pull request and wait for the response.package.json. Make sure to re-run yarn install!FAQs
Improves success rates for swaps by trialing transactions privately and finding minimum fees
The npm package @metamask/smart-transactions-controller receives a total of 59,886 weekly downloads. As such, @metamask/smart-transactions-controller popularity was classified as popular.
We found that @metamask/smart-transactions-controller demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
HashiCorp disclosed a high-severity RCE in next-mdx-remote affecting versions 4.3.0 to 5.x when compiling untrusted MDX on the server.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.