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.
@gitcoin/grants-stack-widget-react
Advanced tools
This widget displays active donation rounds and offers a direct link for contributions to your project. Follow this guide for a quick and easy setup.
This widget displays active donation rounds and offers a direct link for contributions to your project. Follow this guide for a quick and easy setup.
First, install the widget using npm:
npm install @gitcoin/grants-stack-widget-react
Import the Widget
component and use it in your application as shown below:
import Widget from "@gitcoin/grants-stack-widget-react";
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
/>;
The Widget
component accepts the following props:
projectId: string
(Required): The project ID in bytes32 format (e.g., 0x1234...
).scale: number
(Optional, default: 1
): Adjust the scale of the widget.testnet: boolean
(Optional, default: false
): Use testnet configurations.explorerUrl: string
(Optional): Custom explorer URL.indexerEndpoint: string
(Optional): Custom indexer endpoint URL.chainsOverride: number[]
(Optional): Override the list of chain IDs.You can adjust the scale of the widget using the scale
prop:
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
scale={1.5}
/>
If you want to show testnet rounds as well, set the testnet
prop to true
:
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
testnet={true}
/>
You can specify a custom Gitcoin Explorer URL using the explorerUrl
prop:
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
explorerUrl="https://mycustomexplorer.com"
/>
If you have a custom indexer endpoint, you can set it using the indexerEndpoint
prop:
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
indexerEndpoint="https://myindexer.com"
/>
To override the list of chain IDs, use the chainsOverride
prop:
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
chainsOverride={[1, 3, 4]}
/>
Here's a complete example with all props:
import React from "react";
import ReactDOM from "react-dom";
import Widget from "@gitcoin/grants-stack-widget-react";
const App = () => (
<div>
<Widget
projectId={
"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}
scale={1.2}
testnet={true}
explorerUrl="https://mycustomexplorer.com"
indexerEndpoint="https://myindexer.com"
chainsOverride={[1, 42, 100]}
/>
</div>
);
ReactDOM.render(<App />, document.getElementById("root"));
To contribute or make changes, follow these steps:
npm install
to install dependencies.npm build
to build the package.For any questions or issues, please open an issue on GitHub or contact the maintainers.
Happy coding! 🚀
FAQs
This widget displays active donation rounds and offers a direct link for contributions to your project. Follow this guide for a quick and easy setup.
The npm package @gitcoin/grants-stack-widget-react receives a total of 6 weekly downloads. As such, @gitcoin/grants-stack-widget-react popularity was classified as not popular.
We found that @gitcoin/grants-stack-widget-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
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.