Coder Social home page Coder Social logo

cosmoscan-rescript's Introduction

 

BandChain - Decentralized Data Delivery Network

What is Cosmoscan

Cosmoscan is block explorer for BandChain network

How to Run on local machine

generate graphql_schema.json

npx get-graphql-schema https://graphql-lt6.bandchain.org/v1/graphql -j > graphql_schema.json

installed the dependencies

npx get-graphql-schema https://graphql-lm.bandchain.org/v1/graphql -j > graphql_schema.json

installed the dependencies

yarn


### run the complier

```sh
yarn start

start web server

# TESTNET
# (in another tab) Run the development server
RPC_URL=https://laozi-testnet6.bandchain.org/api GRAPHQL_URL=graphql-lt6.bandchain.org/v1/graphql LAMBDA_URL=https://asia-southeast1-testnet-instances.cloudfunctions.net/executer-cosmoscan GRPC=https://laozi-testnet6.bandchain.org/grpc-web FAUCET_URL=https://laozi-testnet6.bandchain.org/faucet yarn server

# DEVNET
# (in another tab) Run the development server
RPC_URL=https://devnet.d3n.xyz/rpc/ GRAPHQL_URL=devnet.d3n.xyz/hasura/v1/graphql LAMBDA_URL=https://asia-southeast2-band-playground.cloudfunctions.net/test-runtime-executor GRPC=https://devnet.d3n.xyz/grpc/ FAUCET_URL=https://devnet.d3n.xyz/faucet/request yarn server

# MAINNET
# (in another tab) Run the development server
RPC_URL=https://laozi1.bandchain.org/api GRAPHQL_URL=graphql-lm.bandchain.org/v1/graphql LAMBDA_URL=https://asia-southeast1-testnet-instances.cloudfunctions.net/executer-cosmoscan GRPC=https://laozi1.bandchain.org/grpc-web yarn server

# run test
GRPC=https://laozi-testnet6.bandchain.org/grpc-web yarn test

cosmoscan-rescript's People

Contributors

xxibcill avatar babybunn avatar pzshine avatar taobun avatar evilpeach avatar

Stargazers

Michał avatar  avatar KerwinChina avatar

Watchers

Paul N. avatar Sorawit Suriyakarn avatar  avatar  avatar  avatar  avatar

cosmoscan-rescript's Issues

Development Grant Request: Implement new Account page from provided UI design

Development Grant Request: Implement new Account page from provided UI design

Figma URL: Account page
Current Page URL:

  • /account/[ADDRESS]

Implementation Period: Until 30 November 2023

Additional Details:

  • This grant request is for the frontend development of Account page.
  • This project is written in ReScript
  • When creating a new component, the component should be abstract and pure.
  • We recommend to read through the codebase to see which component can be reused
    • See reusable components in the src/components/reusable folder

Development Guidelines

  • This Account details page has 2 tabs Portfolio and Transaction
  • Portfolio shows account BAND token profile and Delegations
  • Transaction shows the transactions of the account
  • See src/pages/AccountIndexPage.res and src/components/modal/page/account for account existing Account page code
  • See src/component/modals/submitTx folder for existing modal code
  • We recommend to read through the codebase to see which component can be reused
  • Kindly be advised that we have identified an issue with the ledger connection specifically when using the Firefox browser. We are currently investigating this matter and will work diligently to address and resolve the problem as swiftly as possible.
  • Use mock data from src/example-data/AccountExample.res
  • See src/components/reusable folder
  • Please use existing <....> component for the action column under Transaction Tab

table column width

Screenshot 2566-09-28 at 15 22 44

if you see in pattern in image above in Figma

To explain further, if we consider the parent div to have a total width of 1072 pixels, I'd like to divide it into five equal parts, where each part is 214 pixels wide (equivalent to 20% of the parent's width). Additionally, I want one of the child columns to be 1.5 times wider than the others, which means it should take up 30% of the parent's width

Rescript code you create parent div with style below with percent width of child

code example

let tableGrid = style(. [
  display(#flex),
  alignItems(#center),
  flexWrap(#wrap),
  justifyContent(#spaceBetween),
  width(#percent(100.)),
  selector("> div:first-child", [minWidth(#percent(10.)), textAlign(#center)]),
  selector("> div:nth-child(2)", [width(#percent(40.))]),
  selector("> div:nth-child(3)", [width(#percent(10.))]),
  selector("> div:nth-child(4)", [width(#percent(15.))]),
  selector("> div:nth-child(5)", [width(#percent(10.))]),
])

Web Page Checklist

  • I have reviewed the Figma design and understand the requirements.
  • I have a clear understanding of the implementation period.
  • Design fidelity: The page should closely match the designed mockup in terms of layout, colors, typography, etc.
  • Responsiveness: The web page should be responsive well to different screen sizes and devices
    - Mobile devices (Portrait): < 480px
    - Mobile devices (Landscape): < 768px
    - Tablet devices: < 1024px
    - Small desktop screens: < 1440px
    - Large desktop screents: 1440px <
  • Functionality: All functional elements depicted in the mockup, such as buttons, forms, and interactive components should be implemented and working correctly
  • Browser compatibility: The web page should be compatible with commonly used web browsers, such as Chrome, Firefox, and Safari
  • Performance: The implemented web page should load quickly and perform efficiently. Optimize the page for fast load times and minimize any unnecessary resource usage.
  • Error handling: The web page should handle errors gracefully and provide clear and helpful error messages when necessary.

Contribution Guideline

  1. Fork the Repository: Click the "Fork" button on the top right corner of the repository's GitHub page. This will create a copy of the repository in your GitHub account.
  2. Create a new branch for your changes.
  3. Ensure that your changes follow the project's documentation style and formatting guidelines.
  4. Test your changes
  5. Please submit only one pull request per issue.
  6. Please use pull request template as shown below:

Pull Request Template

**Issue:** #[Issue Number]

**Your Name**:
**Your Discord ID**: 
**Your Email Address**:

**Overview:**
Briefly describe the changes made in this pull request and why they are necessary.

**Changes Made:**
List the specific changes made in bullet points.

**Screenshots or Visuals (if applicable):**
Include screenshots, GIFs, or any visual materials that help reviewers understand the changes.

**Testing:**
Explain how you have tested these changes, including any relevant commands or steps.

**Checklist:**

- [ ] Code follows our coding standards.
- [ ] All checks and tests must pass successfully on every existing criterion. Please do not introduce any additional test criteria in this assignment.
- [ ] Code must be reviewed by at least one of Band Protocol's designated reviewer.

---

By submitting this pull request, I confirm that I have read and agreed to the Contributor License Agreement.

**[Optional: Include any other relevant information or guidelines here]**

---

Review Process

All contributions will be reviewed by project maintainers. We aim to provide feedback and merge contributions in a timely manner. Please be patient during the review process, and feel free to respond to any feedback or questions from reviewers.

Getting Help

If you have any questions or need assistance, please don't hesitate to reach out to our team in Open Source Channel in Discord

Thank you for your interest in contributing to our Grants Program. We appreciate your support and look forward to your contributions!

Development Grant Request: Implement new Validator pages from provided UI design

Development Grant Request: Implement new Validators page from provided UI design

Figma URL: Validator page
Current Page URL:

  • /validators for All Validators page
  • /validator/:validator_address for Validators Details page

Implementation Period Until 30 November 2023

Additional Details:

  • This grant request is for the frontend development of All Validator and Validator Details page.
  • This project is written in ReScript
  • We recommend to read through the codebase to see which component can be reused
    • See reusable components in the src/components/reusable folder
  • When creating a new Component. The component should be abstract and pure

Development Guidelines

All Validators page

  • Modify src/page/ValidatorsPage.res
  • Use mock data from src/example-data/ValidatorExample.res
  • Active Validators is used to filter the validators that have jailed attribute (from mock data) equal to false
  • Inactive Validators is used to filter the validators that have jailed attribute (from mock data) equal to true
  • All Show all validator
  • Make sure that the validator list can be functionally sorted (ASC/DESC) by clicking on it's header
  • By searching the validator's name with the search component, the table should show only matched validators

Validator Details page

  • Modify src/page/ValidatorDetailPage.res
  • Show the details of the validator by using mock data from src/example-data/ValidatorExample.res
  • For Voting Power, Node Uptime, and Oracle Data Report Uptime. you can design the parameter type as you wish
  • the table shown at the bottom of the page showing "Oracle Report", "Reporters", "Proposed Blocks", and "Delegators" Tabs is slightly different from existing page, you can modify it directly
  • For the Voting Power please use the existing component <HistoricalBondedGraph /> as shown in src/pages/ValidatorDetailsPage.res
  • The Node Uptime component is already implemented in the <BlockUptimeChart /> component; however, it differs slightly from the mockup. You have the option to either make direct changes to the existing component or create a new one.
  • You may create a new component for the Oracle Data Report Uptime or modify the ` component.
    • The red color showing as the percentage of the downtime in 24 hours (100%)
    • The green color showing as the percentage of the uptime in 24 hours
    • The grey color showing as for a default state

table column width

Screenshot 2566-09-28 at 15 22 44

if you see in pattern in image above in Figma

To explain further, if we consider the parent div to have a total width of 1072 pixels, I'd like to divide it into five equal parts, where each part is 214 pixels wide (equivalent to 20% of the parent's width). Additionally, I want one of the child columns to be 1.5 times wider than the others, which means it should take up 30% of the parent's width

Rescript code you create parent div with style below with percent width of child

code example

let tableGrid = style(. [
  display(#flex),
  alignItems(#center),
  flexWrap(#wrap),
  justifyContent(#spaceBetween),
  width(#percent(100.)),
  selector("> div:first-child", [minWidth(#percent(10.)), textAlign(#center)]),
  selector("> div:nth-child(2)", [width(#percent(40.))]),
  selector("> div:nth-child(3)", [width(#percent(10.))]),
  selector("> div:nth-child(4)", [width(#percent(15.))]),
  selector("> div:nth-child(5)", [width(#percent(10.))]),
])

Web Page Checklist

  • I have reviewed the Figma design and understand the requirements.
  • I have a clear understanding of the implementation period.
  • Design fidelity: The page should closely match the designed mockup in terms of layout, colors, typography, etc.
  • Responsiveness: The web page should be responsive well to different screen sizes and devices
    - Mobile devices (Portrait): < 480px
    - Mobile devices (Landscape): < 768px
    - Tablet devices: < 1024px
    - Small desktop screens: < 1440px
    - Large desktop screents: 1440px <
  • Functionality: All functional elements depicted in the mockup, such as buttons, forms, and interactive components should be implemented and working correctly
  • Browser compatibility: The web page should be compatible with commonly used web browsers, such as Chrome, Firefox, and Safari
  • Performance: The implemented web page should load quickly and perform efficiently. Optimize the page for fast load times and minimize any unnecessary resource usage.
  • Error handling: The web page should handle errors gracefully and provide clear and helpful error messages when necessary.

Contribution Guideline

Welcome to the Cosmoscan open-source project! We appreciate your interest in contributing to our repository. To ensure a smooth and collaborative development process, please follow these guidelines when submitting your contributions.

  1. Fork the Repository: Click the "Fork" button on the top right corner of the repository's GitHub page. This will create a copy of the repository in your GitHub account.
  2. Create a new branch for your changes.
  3. Ensure that your changes follow the project's documentation style and formatting guidelines.
  4. Test your changes
  5. Please submit only one pull request per issue.
  6. Please use pull request template as shown below:

Pull Request Template

**Issue:** #[Issue Number]

**Your Name**:
**Your Discord ID**: 
**Your Email Address**:

**Overview:**
Briefly describe the changes made in this pull request and why they are necessary.

**Changes Made:**
List the specific changes made in bullet points.

**Screenshots or Visuals (if applicable):**
Include screenshots, GIFs, or any visual materials that help reviewers understand the changes.

**Testing:**
Explain how you have tested these changes, including any relevant commands or steps.

**Checklist:**

- [ ] Code follows our coding standards.
- [ ] All checks and tests must pass successfully on every existing criterion. Please do not introduce any additional test criteria in this assignment.
- [ ] Code must be reviewed by at least one of Band Protocol's designated reviewer.

---

By submitting this pull request, I confirm that I have read and agreed to the Contributor License Agreement.

**[Optional: Include any other relevant information or guidelines here]**

---

Review Process

All contributions will be reviewed by project maintainers. We aim to provide feedback and merge contributions in a timely manner. Please be patient during the review process, and feel free to respond to any feedback or questions from reviewers.

Getting Help

If you have any questions or need assistance, please don't hesitate to reach out to our team in Open Source Channel in Discord

Thank you for your interest in contributing to our Grants Program. We appreciate your support and look forward to your contributions!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.