Skip to content

Commit

Permalink
Consolidating Docs into a single page (#2082)
Browse files Browse the repository at this point in the history
* wip: migrating concepts to build

* wip

* wip

* re-organized into single page

* fix: widget-editor components

* fix: add back gas widget

* change on welcome

* change order of buttons

* minor changes to figures

* fix: swapped components by mistake

* fix: minor css

* fix: css navbar

---------

Co-authored-by: Den <[email protected]>
  • Loading branch information
gagdiez and denbite authored Jul 11, 2024
1 parent 57ade72 commit d88470c
Show file tree
Hide file tree
Showing 32 changed files with 3,826 additions and 2,303 deletions.
10 changes: 0 additions & 10 deletions docs/1.concepts/3.advanced/specification.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/1.concepts/basics/protocol.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
id: protocol
title: What is NEAR?
sidebar_label: ⭐ What is NEAR?
---

NEAR is a **user-friendly** and [**carbon-neutral**](https://near.org/blog/near-climate-neutral-product/) blockchain, built to be [fast, secure, and able to grow without limits](https://www.leewayhertz.com/comparison-of-blockchain-protocols#Parallel-comparison-of-various-blockchain-networks).
Expand Down
7 changes: 7 additions & 0 deletions docs/1.concepts/protocol/gas.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: gas
title: Gas (Execution Fees)
---

import {NearWidget} from "@site/src/components/near-widget"

On every transaction the NEAR network charges a tiny fee known as **gas**. This fee is a simple mechanism that allows us to:

1. **Prevent** bad actors from **spamming** the network with useless transactions
Expand Down Expand Up @@ -49,6 +51,9 @@ If the previous block is **more than half full** the price goes up by 1%, otherw

You can query how much a gas unit costs in `yoctoNEAR` (1Ⓝ = `1e24` yocto) through the [`RPC`](/api/rpc/gas#gas-price). To convert in `Tgas` per `NEAR` simply divide by `1e12`.


<NearWidget height="40px">

```js
const query = fetch('https://rpc.near.org', {
method: 'POST',
Expand All @@ -67,6 +72,8 @@ const yocto = query.body.result.gas_price
return `Right now, 1 Tgas costs ${Number(yocto) / 1e12}`
```

</NearWidget>

</details>

<hr class="subsection" />
Expand Down
2 changes: 1 addition & 1 deletion docs/2.build/4.web3-apps/quickstart.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: quickstart
title: Hello WebApp
sidebar_label: Quickstart a WebApp
sidebar_label: Quickstart
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Expand Down
2 changes: 1 addition & 1 deletion docs/2.build/5.primitives/what-is.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {CodeTabs, Language, Github} from "@site/src/components/codetabs"

Primitives are fundamental building blocks that can be combined to create a fully functional application. Blockchain primitives include [Fungible Tokens (FT)](#fungible-tokens-ft), [Non Fungible Tokens (NFT)](#non-fungible-tokens-nft), [Decentralized Autonomous organizations (DAO)](#decentralized-autonomous-organizations-dao), [Link Drops](#linkdrops) and more.

![img](/docs/assets/welcome-pages/primitives-landing.png)
![img](/docs/assets/welcome-pages/primitives.png)

---

Expand Down
52 changes: 4 additions & 48 deletions docs/2.build/welcome.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,11 @@
---
id: welcome
title: Build on NEAR
title: Welcome to NEAR
sidebar_label: Home
hide_table_of_contents: true
hide_breadcrumb: true
slug: /
---

import {FeatureList, Column, Feature} from "@site/src/components/featurelist"
import Home from '../welcome.md';

Welcome! Here you will find all the information on what you can **build** on NEAR and **how to** build it. Do not worry if you are new to Web3 or Blockchain, we are here to **guide you** through the process of learning.

<FeatureList>
<Column title="Contracts">
<Feature url="/build/smart-contracts/what-is" title="What is a Contract?"
subtitle="Learn what a smart contract is" image="contract.png" />
<Feature url="/build/smart-contracts/quickstart" title="Build a Contract"
subtitle="Spin-up your first smart contract" image="smartcontract.png" />
<Feature url="/build/smart-contracts/testing/introduction" title="Test a Contract" subtitle="Write unit & integration tests" image="test.png" />
<Feature url="/build/smart-contracts/release/deploy" title="Deploy a Contract" subtitle="Deploy the contract to the network" image="near-cli.png" />
</Column>
<Column title="Components">
<Feature url="/build/near-components/what-is" title="What is a Component?"
subtitle="Learn about multi-chain components" image="bos-lido.png" />
<Feature url="/build/near-components/dev-environment" title="Dev Environment"
subtitle="Choose your dev environment" image="update.png" />
<Feature url="/build/near-components/anatomy/state" title="Build a Component"
subtitle="Learn everything a Component can do" image="multiple.png" />
<Feature url="/build/web3-apps/integrate-components" title="Use Components in a WebApp"
subtitle="Use the contract in a frontend" image="frontend-bos.png" />
</Column>
<Column title="Applications">
<Feature url="/build/web3-apps/what-is" title="What are Web3 Apps?"
subtitle="Learn about decentralized apps" image="near-logo.png" />
<Feature url="/build/web3-apps/quickstart" title="Quickstart a Web3 App"
subtitle="Use the contract in a frontend" image="quickstart.png" />
<Feature url="/build/web3-apps/integrate-contracts" title="Integrate Contracts"
subtitle="Integrate with Contracts" image="bos-contract.png" />
<Feature url="/build/web3-apps/integrate-components" title="Integrate Components"
subtitle="Use the contract in a frontend" image="frontend.png" />
</Column>
<Column title="Primitives">
<Feature url="/build/primitives/ft" title="Fungible Tokens" subtitle="Learn how to use and make FT" image="ft.png" />
<Feature url="/build/primitives/nft" title="Non-Fungible Tokens" subtitle="Enter the NFT space" image="nft.png" />
<Feature url="/build/primitives/dao" title="Autonomous Organizations" subtitle="Understand DAOs" image="dao.png" />
<Feature url="/build/primitives/linkdrop" title="Linkdrops" subtitle="Drop assets & onboard users" image="key.png" />
<Feature url="/build/primitives/oracles" title="Oracles" subtitle="On-chain oracles to query prices" image="oracle.png" />
</Column>
<Column title="Data Infrastructure">
<Feature url="/build/data-infrastructure/big-query" title="Google BigQuery"
subtitle="Query network data efficiently" image="experiment.png" />
<Feature url="/build/data-infrastructure/query-api/intro" title="QueryAPI" subtitle="The simplest way to build indexers" image="blocks.png" />
<Feature url="/build/data-infrastructure/lake-framework/near-lake" title="NEAR Lake" subtitle="An Indexer that stores chain events" image="monitor.png" />
</Column>
</FeatureList>
<Home />
190 changes: 0 additions & 190 deletions docs/index.md

This file was deleted.

Loading

0 comments on commit d88470c

Please sign in to comment.