
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Client to get Smart Contract ABI.
We aim to improve developer experience in starting smart contract apps. Some problems we aim to solve:
npm install smartpkg
Here is an example of using smartpkg to get ABI.
import { ethers } from "ethers";
import smartpkg from "smartpkg";
const chainId = 1;
const address = "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984";
const abi = await smartpkg.getAbi(chainId, address);
// Use Smart Contract
const provider = new ethers.providers.Web3Provider(window.ethereum);
await provider.send("eth_requestAccounts", []);
const signer = provider.getSigner();
const contract = new ethers.Contract(address, abi, signer);
const symbol = await contract.symbol();
console.log(symbol);
For getting Smart Contract ABI,
const abi = await smartpkg.getAbi(chainId, address);
For directly calling a smart contract (deployed) function without ABI,
const contract = await smartpkg.contract(chainId, address, { signer });
const symbol = await contract.symbol();
For directly calling a smart contract function with ABI only,
const contract = await smartpkg.contract(chainId, address, { abi, signer });
const symbol = await contract.symbol();
| Options | Type | Default | Description |
|---|---|---|---|
| debug | boolean | true | Debug mode |
| signer | Signer or Provider | undefined | Signer or provider from ethers.js |
| abi | ABI | undefined | Debug mode |
| enableDevtools | boolean | true | Enable devtools or not. Install @smartpkg/devtools |
| enableLogging | boolean | true | Enable logging or not. |
Devtools help improve understanding smart contract function calls in your DApp.
npm install @smartpkg/devtools
In main.tsx, import devtool and add the component.
// main.tsx
import SmartpkgDevtool from '@smartpkg/devtools';
ReactDOM
.createRoot(document.getElementById('root') as HTMLElement)
.render(
<React.StrictMode>
<App />
<SmartpkgDevtool />
</React.StrictMode>
);


FAQs
Client for retrieving Smart Contract ABI
The npm package smartpkg receives a total of 1 weekly downloads. As such, smartpkg popularity was classified as not popular.
We found that smartpkg 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.