Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/primitives/dao.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Decentralized Autonomous Organizations (DAOs) are self-organized groups that for
![dao](/assets/docs/primitives/dao.png)

In contrast with [FT](./ft/ft.md) and [NFT](./nft/nft.md), DAO contract's are not standardized. Because of this, on this page we will use as
reference the [Astra dao](https://dev.near.org/astraplusplus.ndctools.near/widget/home?page=daos) [contract](https://github.com/near-daos/sputnik-dao-contract). The main concepts covered here should
reference the [sputnik dao contract](https://github.com/near-daos/sputnik-dao-contract). The main concepts covered here should
easily generalizable to other DAO implementations.

:::tip
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/account-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ By signing [transactions](./transactions.md) with their account, users can:
4. Help onboard new users by **covering the costs** of their transactions (gas fees)

:::tip Want to create an account?
You have multiple ways to create an account, you can [sign-up using your email](https://dev.near.org/signup), get a mobile wallet through [telegram](https://web.telegram.org/k/#@herewalletbot), or create a [web wallet](https://wallet.meteorwallet.app)
Check out our tutorial on [Creating a NEAR Account](../tutorials/protocol/create-account.md) to get started!
:::

---
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ NEAR is a technical marvel, offering built-in features such as named accounts an
### ⭐ Simple to Use

1. Use [**named accounts**](./account-model.md) like `alice.near`
2. Simple sign-up: make an account using [email](https://dev.near.org/signup) or [telegram](https://web.telegram.org/k/#@herewalletbot)
2. Simple sign-up: create an [account for free](../tutorials/protocol/create-account.md), login [with socials](../web3-apps/tutorials/wallet-login.md) or [telegram](https://web.telegram.org/k/#@herewalletbot)
3. Transactions are **fast** _(~1.3s finality)_ and **cheap** _(< 1¢ in fees)_
4. You don't need to buy crypto thanks to **built-in account abstraction**
5. [Access Keys](./access-keys.md) make it safe and easy to use
Expand Down
8 changes: 4 additions & 4 deletions docs/smart-contracts/what-is.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ Besides, smart contracts can store data in the account's storage. This allows co

## What are they used for?
Smart contracts are useful to create **decentralized applications**. Some traditional examples include:
- [Decentralized Autonomous Organizations](https://dev.near.org/applications?cat=dao), where users create and vote proposals
- [Marketplaces](https://dev.near.org/applications?cat=marketplaces), where users create and commercialize digital art pieces
- [Decentralized exchanges](https://dev.near.org/applications?cat=exchanges), where users can trade different currencies
- [And many more...](https://dev.near.org/applications)
- [Decentralized Autonomous Organizations](https://nearcatalog.xyz/?cat=dao), where users create and vote proposals
- [Marketplaces](https://nearcatalog.xyz/?cat=marketplaces), where users create and commercialize digital art pieces
- [Decentralized exchanges](https://nearcatalog.xyz/?cat=exchanges), where users can trade different currencies
- [And many more...](https://nearcatalog.xyz/)

For instance, you can easily create a crowdfunding contract that accepts $NEAR. If the goal is met in time, the creator can claim the funds. Otherwise, the backers are refunded.

Expand Down
16 changes: 8 additions & 8 deletions docs/tutorials/examples/global-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Since there are two ways to reference a global contract ([by account](../../smar

To do this, use the `deployGlobalContract` function and set the mode to `accountId`, along with the contract’s code bytes.

<Github fname="deploy-global-contract-by-account.js" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/javascript/examples/deploy-global-contract-by-account.js#L22-L27"
<Github fname="deploy-global-contract-by-account.ts" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/near-api-js/examples/deploy-global-contract-by-account.ts#L22-L27"
start="22" end="27" />

</TabItem>
Expand All @@ -116,8 +116,8 @@ Since there are two ways to reference a global contract ([by account](../../smar

To do this, use the `deployGlobalContract` function and set the mode to `codeHash`, along with the contract’s code bytes.

<Github fname="deploy-global-contract-by-hash.js" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/javascript/examples/deploy-global-contract-by-hash.js#L24-L29"
<Github fname="deploy-global-contract-by-hash.ts" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/near-api-js/examples/deploy-global-contract-by-hash.ts#L24-L29"
start="24" end="29" />

</TabItem>
Expand Down Expand Up @@ -206,8 +206,8 @@ Let’s see how you can reference and use your global contract from another acco

To reference a global contract by account, you need to call the `useGlobalContract` function and pass the source `accountId` where the contract was originally deployed.

<Github fname="deploy-global-contract-by-account.js" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/javascript/examples/deploy-global-contract-by-account.js#L39-L45"
<Github fname="deploy-global-contract-by-account.ts" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/near-api-js/examples/deploy-global-contract-by-account.ts#L39-L45"
start="39" end="45" />

</TabItem>
Expand All @@ -220,8 +220,8 @@ Let’s see how you can reference and use your global contract from another acco
const hash = bs58.encode(sha256(wasm));
```

<Github fname="deploy-global-contract-by-hash.js" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/javascript/examples/deploy-global-contract-by-hash.js#L45-L53"
<Github fname="deploy-global-contract-by-hash.ts" language="js"
url="https://github.com/near-examples/near-api-examples/blob/main/near-api-js/examples/deploy-global-contract-by-hash.ts#L45-L53"
start="45" end="53" />

</TabItem>
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/examples/near-drop.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Particularly, it shows:

:::tip

This example showcases a simplified version of the contract that both [Keypom](https://github.com/keypom/keypom) and the [Token Drop Utility](https://dev.near.org/tools?tab=linkdrops) use to distribute tokens to users
This example showcases a simplified version of the contract that both [Keypom](https://github.com/keypom/keypom) and the [Token Drop Utility](https://docs.near.org/toolbox?tab=linkdrops) use to distribute tokens to users

:::

Expand Down
4 changes: 2 additions & 2 deletions docs/web3-apps/backend/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ const signature = wallet.signMessage({ message, recipient, nonce: challenge, cal
### 3. Verify the Signature
Once the user has signed the challenge, the wallet will call the `callbackUrl` with the signature. The backend can then verify the signature.

<Github fname="authenticate.js" language="javascript"
url="https://github.com/near-examples/near-api-examples/blob/main/javascript/examples/verify-signature.js" />
<Github fname="verify-signature.ts" language="javascript"
url="https://github.com/near-examples/near-api-examples/blob/main/near-api-js/examples/verify-signature.ts" />
1 change: 1 addition & 0 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-mermaid": "3.9.2",
"@feelback/react": "^0.3.4",
"@hot-labs/near-connect": "^0.8.2",
"@mermaid-js/layout-elk": "^0.2.0",
"@saucelabs/theme-github-codeblock": "^0.3.0",
"axios": "^1.12.0",
Expand Down
12 changes: 0 additions & 12 deletions website/src/theme/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,6 @@ function Root({ children, location }) {
siteConfig: { customFields },
} = useDocusaurusContext();

useEffect(() => {
// Pass message to dev.near.org (docs is embedded there)
const sendMessage = (url) =>
parent.postMessage({ type: 'urlChange', url }, 'https://dev.near.org/');
sendMessage(location.pathname);

const unlisten = history.listen((loc) => sendMessage(loc.pathname));
return () => {
unlisten();
};
}, [history]);

useEffect(() => {
// Initialize Gleap
if (isBrowser) {
Expand Down