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.
aelf-smartcontract-viewer
Advanced tools
The aelf-smartcontract-viewer is a React component that provides an easy interface to view and interact with smart contracts on the Aelf blockchain. You can use this component to input contract details and view available read and write methods. This tool is useful for developers building applications around Aelf smart contracts, allowing easy testing and interaction with deployed contracts.
You can install the package using npm:
npm install aelf-smartcontract-viewer
import React from "react";
import { ContractView } from "aelf-smartcontract-viewer";
const App = () => {
return (
<div>
<ContractView
address="your_smart_contract_address"
rpcUrl="rpc_url" // i.e = https://explorer-test-side02.aelf.io/chain
contractName="Smart Contract Name"
/>
</div>
);
};
export default App;
Prop | Type | Default | Description |
---|---|---|---|
wallet | IWalletInfo | undefined | Optional wallet info. If not provided, a new wallet is generated. |
headerTitle | string | "Aelf Contract View" | Title for the contract view header. |
headerShown | boolean | true | Whether the header should be shown or not. |
address | string | undefined | Address of the contract. If not provided, a default contract address is fetched from the Aelf blockchain. |
contractName | string | "Contract" | The name of the contract to be displayed. |
rpcUrl | string | "https://explorer-test-side02.aelf.io/chain" | The RPC URL to connect to the Aelf blockchain. |
theme | light | dark | "light" |
The above example demonstrates how to use the ContractView
component. You only need to pass in the contract's address, RPC URL, and optionally the contract name.
The ContractView
component displays the available read and write methods from the given smart contract. Once loaded, the methods are grouped as follows:
If you want to specify your own wallet, you can pass the wallet
prop. If you don’t provide a wallet, the component will create a new wallet for you and interact with the blockchain using that.
import React from "react";
import { ContractView } from "aelf-smartcontract-viewer";
import AElf from "aelf-sdk";
const App = () => {
const wallet = AElf.wallet.getWalletByPrivateKey("YOUR_PRIVATE_KEY");
return (
<div>
<ContractView
wallet={wallet}
address="your_smart_contract_address"
rpcUrl="rpc_url" // i.e = https://explorer-test-side02.aelf.io/chain
contractName="Smart Contract Name"
/>
</div>
);
}
export default App;
We welcome contributions to this project. If you find any bugs or want to add new features, feel free to submit a pull request or open an issue on the GitHub repository.
FAQs
The **aelf-smartcontract-viewer** is a React component that provides an easy interface to view and interact with smart contracts on the Aelf blockchain. You can use this component to input contract details and view available read and write methods. This t
The npm package aelf-smartcontract-viewer receives a total of 7 weekly downloads. As such, aelf-smartcontract-viewer popularity was classified as not popular.
We found that aelf-smartcontract-viewer 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.