### Start Zilliqa Otterscan Development Environment Source: https://github.com/zilliqa/otterscan/blob/main/README.zilliqa.md Commands to set up and run the Zilliqa Otterscan development environment. This sequence involves setting an environment variable for the Erigon URL, preparing necessary assets, and then launching the main application. ```Shell export VITE_ERIGON_URL= npm run assets-start npm start ``` -------------------------------- ### Start Erigon Devnet for Testing Source: https://github.com/zilliqa/otterscan/blob/main/docs/testing.md This command launches an Erigon devnet instance, configured to expose necessary APIs (eth, erigon, trace, ots, ots2) and enable mining. It serves as the backend for Otterscan's devnet end-to-end tests, expected to run on `http://localhost:8545`. ```sh ./erigon --chain=dev --datadir=dev --http.api eth,erigon,trace,ots,ots2 --http.corsdomain "*" --http.vhosts "*" --mine --fakepow ``` -------------------------------- ### Start Otterscan with Erigon Devnet Configuration Source: https://github.com/zilliqa/otterscan/blob/main/docs/testing.md This command starts the Otterscan application with a custom configuration specifically tailored for an Erigon devnet environment. This setup is a prerequisite for running devnet-specific end-to-end tests, ensuring Otterscan connects to the correct local devnet instance. ```sh npm run start-devnet ``` -------------------------------- ### Run Cypress E2E Tests for Erigon Devnet Source: https://github.com/zilliqa/otterscan/blob/main/docs/testing.md This command executes the end-to-end tests specifically designed for the Erigon devnet environment. It covers both devnet-specific and common test scenarios, requiring both Otterscan (started with `npm run start-devnet`) and an Erigon devnet to be running concurrently. ```sh npm run cy:run-devnet ``` -------------------------------- ### Allow Full Access for All Web Crawlers (robots.txt) Source: https://github.com/zilliqa/otterscan/blob/main/public/robots.txt This `robots.txt` configuration specifies that all user agents (`User-agent: *`) are allowed to crawl the entire website. The `Disallow:` directive, when left empty, indicates that there are no restrictions on crawling any part of the site. This setup is commonly used when a website aims to be fully indexed by search engines and other automated crawlers. ```Robots.txt User-agent: * Disallow: ``` -------------------------------- ### Initialize IPFS Repository with BadgerDS Datastore Source: https://github.com/zilliqa/otterscan/blob/main/docs/ipfs.md This command initializes a new IPFS repository using the `badgerds` datastore. `badgerds` is an experimental key-value database alternative to the default `flatfs` datastore, offering significant performance improvements for operations like pinning large repositories. ```Shell ipfs init -p badgerds ``` -------------------------------- ### IPFS Configuration and Features Overview Source: https://github.com/zilliqa/otterscan/blob/main/docs/ipfs.md This section outlines key IPFS configurations and features discussed, including the default public gateway, the IPFS Companion browser extension for privacy and local gateway management, and the experimental IPNS PubSub feature for accelerated IPNS resolution. ```APIDOC IPFS Default Public Gateway: - URL: https://ipfs.io - Description: The default gateway for accessing IPFS resources, allowing users without a local node to utilize IPFS integration. Raises privacy concerns due to queries being made against a public server. IPFS Companion: - Type: Browser Extension - Purpose: Intercepts IPFS gateway calls and redirects them to a local or custom private gateway. Addresses privacy concerns and common local gateway bind address collisions (e.g., http://localhost:8080). - Configuration: Allows customization of the gateway for request redirection. IPNS PubSub: - Type: Experimental IPFS Feature - Purpose: Significantly speeds up IPNS resolution, which can otherwise be very slow. - Requirements: Must be enabled on both the resolver node (your local node) and the publisher node (e.g., Sourcify's node) for it to function effectively. - IPFS Companion Settings: 'Enable PubSub' and 'Enable IPNS over PubSub' options should be enabled. ``` -------------------------------- ### Zilliqa Otterscan Configuration Schema Source: https://github.com/zilliqa/otterscan/blob/main/README.zilliqa.md Defines the structure for connection objects within `public/config.json`, used to configure potential network connections. Each object specifies a display name for the menu, the target URL for the connection, and an array of hostnames that, if matched by the current window location, will force-select this connection. ```APIDOC Configuration Object Structure: connections: array of connection objects - menuName: string Description: Name that will appear in the connection menu for this option. - url: string Description: The URL to query for this connection. - hostnames: array of strings Description: An array of hostnames. If the `window.location` hostname has one of these as a prefix, the `url` will be force-selected and the connections menu will not appear. ``` -------------------------------- ### Pin Sourcify Repository with IPFS Source: https://github.com/zilliqa/otterscan/blob/main/docs/ipfs.md This command pins the Sourcify IPNS repository locally, which helps speed up queries to existing contracts and contributes to the distribution of their data across the IPFS network. The `--progress` flag displays the pinning progress. This operation is notably faster when using the `badgerds` datastore. ```Shell time ipfs pin add --progress /ipns/repo.sourcify.dev pinned QmVn7fcwo4Eai19hRX6dG9jAV8piHyxcrPTuobyZjEKhMW recursively ipfs pin add --progress 4.47s user 1.85s system 0% cpu 2:22:41.00 total ``` -------------------------------- ### Run Cypress E2E Tests for Ethereum Mainnet Source: https://github.com/zilliqa/otterscan/blob/main/docs/testing.md This command initiates the end-to-end tests for the Ethereum Mainnet configuration using Cypress. Before running, ensure an Otterscan instance is actively running locally on `http://localhost:5173` to allow Cypress to interact with the application. ```sh npm run cy:run-mainnet ``` -------------------------------- ### Run GitHub Actions Workflows Locally with Act Source: https://github.com/zilliqa/otterscan/blob/main/docs/testing.md This command uses `act` to simulate GitHub Actions workflows locally, specifically for pull requests. It allows developers to test CI/CD pipelines without pushing to GitHub, supporting environment variable injection for RPC URLs and Cypress record keys. Failed test screenshots will be saved to `/tmp/artifacts`. ```sh E2E_ERIGON_URL= # Cypress Cloud record key, if you have one E2E_CYPRESS_RECORD_KEY= act --container-architecture linux/amd64 pull_request -s E2E_ERIGON_URL=$E2E_ERIGON_URL -s E2E_CYPRESS_RECORD_KEY=$E2E_CYPRESS_RECORD_KEY --artifact-server-path /tmp/artifacts ``` -------------------------------- ### Run Unit Tests with Jest Source: https://github.com/zilliqa/otterscan/blob/main/docs/testing.md This command executes the unit tests for the Otterscan project using Jest, a JavaScript testing framework. It's a standard way to run quick, isolated tests to ensure individual components function correctly. ```sh npm run test ``` -------------------------------- ### EVM Bytecode for Zilliqa Otterscan Smart Contract Source: https://github.com/zilliqa/otterscan/blob/main/cypress/fixtures/contracts/AllTypes/bytecode.txt This hexadecimal string represents the compiled bytecode of a smart contract. It defines the contract's logic and functions, which are executed directly by the Ethereum Virtual Machine. This specific bytecode is likely part of the Zilliqa Otterscan project, indicating a smart contract deployed or intended for deployment on an EVM-compatible blockchain. ```EVM Bytecode 0x608060405234801561001057600080fd5b50611784806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806382abdced1161008c578063a2050af811610066578063a2050af8146102d2578063a6ed563e14610303578063ae22c57d14610333578063c946bf4c14610363576100ea565b806382abdced1461024157806382d696a1146102715780639c981fcb146102a1576100ea565b80634d507192116100c85780634d5071921461017f5780636168d817146101b05780636689e498146101e0578063781c6dbe14610210576100ea565b80631e553250146100ef5780633740774b1461011f578063441abbac1461014f575b600080fd5b61010960048036038101906101049190610497565b610393565b60405161011691906104d3565b60405180910390f35b61013960048036038101906101349190610527565b61039d565b6040516101469190610563565b60405180910390f35b610169600480360381019061016491906105b4565b6103a7565b60405161017691906105f0565b60405180910390f35b61019960048036038101906101949190610670565b6103b1565b6040516101a7929190611044565b60405180910390f35b6101ca60048036038101906101c59190611068565b6103c1565b6040516101d791906110a4565b60405180910390f35b6101fa60048036038101906101f591906110bf565b6103cb565b60405161020791906110fb565b60405180910390f35b61022a6004803603810190610225919061116c565b6103d5565b6040516102389291906111f7565b60405180910390f35b61025b6004803603810190610256919061123d565b6103e5565b604051610268919061130e565b60405180910390f35b61028b60048036038101906102869190611330565b6103ee565b604051610298919061136c565b60405180910390f35b6102bb60048036038101906102b691906113dd565b6103f8565b6040516102c9929190611468565b60405180910390f35b6102ec60048036038101906102e791906114e2565b610408565b6040516102fa9291906115b6565b60405180910390f35b61031d600480360381019061031891906115da565b610418565b60405161032a9190611616565b60405180910390f35b61034d60048036038101906103489190611631565b610422565b60405161035a919061166d565b60405180910390f35b61037d600480360381019061037891906116ac565b61042c565b60405161038a9190611733565b60405180910390f35b6000819050919050565b6000819050919050565b6000819050919050565b3660008383915091509250929050565b6000819050919050565b6000819050919050565b3660008383915091509250929050565b36819050919050565b6000819050919050565b3660008383915091509250929050565b3660008383915091509250929050565b6000819050919050565b6000819050919050565b36819050919050565b600080fd5b600080fd5b60007fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b6104748161043f565b811461047f57600080fd5b50565b6000813590506104918161046b565b92915050565b6000602082840312156104ad576104ac610435565b5b60006104bb84828501610482565b91505092915050565b6104cd8161043f565b82525050565b60006020820190506104e860008301846104c4565b92915050565b600060ff82169050919050565b610504816104ee565b811461050f57600080fd5b50565b600081359050610521816104fb565b92915050565b60006020828403121561053d5761053c610435565b5b600061054b84828501610512565b91505092915050565b61055d816104ee565b82525050565b60006020820190506105786000830184610554565b92915050565b6000819050919050565b6105918161057e565b811461059c57600080fd5b50565b6000813590506105ae81610588565b92915050565b6000602082840312156105ca576105c9610435565b5b60006105d88482850161059f565b91505092915050565b6105ea8161057e565b82525050565b600060208201905061060560008301846105e1565b600080fd5b600080fd5b600080fd5b60008083601f8401126106305761062f61060b565b5b8235905067ffffffffffffffff81111561064d5761064c610610565b5b60208301915083602082028301111561066957610668610615565b5b9250929050565b6000806020838503121561068757610686610435565b5b600083013567ffffffffffffffff8111156106a5576106a461043a565b5b6106b18582860161061a565b92509250509250929050565b600082825260208201905092915050565b6000819050919050565b60008115159050919050565b6106ed816106d8565b81146106f857600080fd5b50565b60008135905061070a816106e4565b92915050565b600061071f60208401846106fb565b905092915050565b610730816106d8565b82525050565b60006107456020840184610512565b905092915050565b610756816104ee565b82525050565b600061076b602084018461059f565b905092915050565b61077c8161057e565b82525050565b60008160000b9050919050565b61079881610782565b81146107a357600080fd5b50565b6000813590506107b58161078f565b92915050565b60006107ca60208401846107a6565b905092915050565b6107db81610782565b82525050565b6000819050919050565b6107f4816107e1565b81146107ff57600080fd5b50565b600081359050610811816107eb565b92915050565b60006108266020840184610802565b905092915050565b610837816107e1565b82525050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6108688261083d565b9050919050565b6108788161085d565b811461088357600080fd5b50565b6000813590506108958161086f565b92915050565b60006108aa6020840184610886565b905092915050565b6108bb8161085d565b82525050565b60006108d06020840184610482565b905092915050565b6108e18161043f565b82525050565b6000819050919050565b6108fa816108e7565b811461090557600080fd5b50565b600081359050610917816108f1565b92915050565b600061092c6020840184610908565b905092915050565b61093d816108e7565b82525050565b600080fd5b600080fd5b600080fd5b6000808335600160200384360303811261096f5761096e61094d565b5b83810192508235915060208301925067ffffffffffffffff82111561099757610996610943565b5b6001820236038313156109 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.