Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@solana/programs
Advanced tools
Helpers for defining programs and resolving program errors
This package contains helpers for identifying custom program errors. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK @solana/web3.js@rc
.
isProgramError()
This function takes any error — typically caused by a transaction failure — and identifies whether it is a custom program error from the provided program address. It takes the following parameters:
error
to identify.transactionMessage
object that failed to execute. Since the RPC response only provide the index of the failed instruction, we need the transaction message to access its program address.programAddress
of the program from which the error is expected.code
of the custom program error. When provided, the function will also check that the custom program error code matches the given value.try {
// Send and confirm your transaction.
} catch (error) {
if (isProgramError(error, transactionMessage, myProgramAddress, 42)) {
// Handle custom program error 42 from this program.
} else if (isProgramError(error, transactionMessage, myProgramAddress)) {
// Handle all other custom program errors from this program.
} else {
throw error;
}
}
FAQs
Helpers for defining programs and resolving program errors
The npm package @solana/programs receives a total of 3,797 weekly downloads. As such, @solana/programs popularity was classified as popular.
We found that @solana/programs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 14 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.