Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@beandao/contracts
Advanced tools
Helpful library for solidity. Basically, it is assumed that most libraries are used in proxies. Therefore, support for some constructors may be insufficient, but most of them are supported.
npm install -d @beandao/contracts
Copy the code below, paste it into Remix, deploy it, and test it. Remix automatically gets the @beandao library from npm.
pragma solidity ^0.8.0;
import "@beandao/contracts/interfaces/IERC165.sol";
import {ERC20, IERC20} from "@beandao/contracts/library/ERC20.sol";
import {ERC2612, IERC2612} from "@beandao/contracts/library/ERC2612.sol";
import {Ownership, IERC173} from "@beandao/contracts/library/Ownership.sol";
import {Multicall, IMulticall} from "@beandao/contracts/library/Multicall.sol";
contract StandardToken is ERC20, ERC2612, Ownership, Multicall, IERC165 {
constructor(
string memory tokenName,
string memory tokenSymbol,
uint8 tokenDecimals,
string memory tokenVersion,
uint256 amount
) ERC20(tokenName, tokenSymbol, tokenDecimals) ERC2612(tokenName, tokenVersion) {
totalSupply = amount;
balanceOf[msg.sender] = amount;
}
function supportsInterface(bytes4 interfaceId) external pure returns (bool) {
return
// ERC20
interfaceId == type(IERC20).interfaceId ||
// ERC173
interfaceId == type(IERC173).interfaceId ||
// ERC2612
interfaceId == type(IERC2612).interfaceId;
}
}
Abstract Contract
Library Contract
Support Contract
These contracts were inspired by or directly modified from many sources, primarily:
FAQs
Smart Contract Library for beandao production
We found that @beandao/contracts 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.