Example Browsing & Func Test
Example Browsing & Filtering
The examples browser provides sophisticated filtering and search capabilities. Examples are organized into categories (Basics, Collections, NFTs, Fungible Tokens, Cross-Contract, Security, Advanced) with visual icons and color coding. Users can filter by difficulty level (Beginner, Intermediate, Advanced) and select multiple categories simultaneously. The search bar performs real-time text matching against example names and descriptions.
The sidebar (CategorySidebar.jsx) displays categories in a collapsible tree structure, showing example counts and highlighting the currently selected example. On mobile devices, the sidebar is hidden by default and accessible via a sheet overlay. The filtering logic uses React's useMemo hook to efficiently compute filtered results, ensuring smooth performance even with many examples.

Function Testing & Contract Interaction
After successful deployment, the Function Testing tab becomes active, allowing users to interact with their deployed contracts. The tab provides interfaces for calling both view methods (read-only, no gas cost) and change methods (state-modifying, requires wallet signature). Users can input method names and arguments as JSON, and the platform handles the RPC calls to NEAR TestNet.
View methods are called directly via NEAR RPC using the viewFunction utility, which constructs JSON-RPC requests to rpc.testnet.near.org. Change methods require wallet signatures and use the wallet selector's transaction signing capabilities. Results are displayed in a formatted JSON view, and errors are caught and displayed with helpful messages.

Embedded content
Last updated
Was this helpful?