Skip to content

Commit

Permalink
Merge branch 'master' into omni-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
bucanero authored Nov 14, 2024
2 parents 74d5df1 + 40643cb commit 9b85497
Show file tree
Hide file tree
Showing 22 changed files with 296 additions and 109 deletions.
22 changes: 0 additions & 22 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question
url: https://stackoverflow.com/questions/tagged/nearprotocol
about: Please ask and answer questions here.
- name: Need help?
url: https://t.me/neardev
about: Get technical support from our developer community on Telegram.
97 changes: 97 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: 🐞 Report a Documentation Error
description: Report errors or unclear content in the documentation
title: "[BUG] "
labels: ["documentation", "bug"]
assignees: []
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to help us improve our documentation! 🙏
- type: textarea
id: description
attributes:
label: Description
placeholder: The documentation is incorrect/unclear/missing information about...
validations:
required: true

- type: input
id: page-url
attributes:
label: Page URL
placeholder: https://docs.near.org/<path>
validations:
required: true

- type: input
id: section
attributes:
label: Section/Heading
placeholder: "e.g., Installation Guide > Prerequisites"
validations:
required: false

- type: textarea
id: current-text
attributes:
label: Current Text
description: If applicable, paste the current problematic text here
placeholder: Paste the current text that needs to be corrected...
validations:
required: false

- type: checkboxes
id: impact
attributes:
label: Impact
description: How does this documentation issue affect users?
options:
- label: Incorrect information
- label: Missing information
- label: Unclear explanation
- label: Broken link
- label: Code example doesn't work
- label: Other (please specify in description)
validations:
required: true

- type: textarea
id: expected
attributes:
label: Expected Information
placeholder: The documentation should explain...
validations:
required: true

- type: textarea
id: suggested-fix
attributes:
label: Suggested Fix
placeholder: I suggest changing/adding...
validations:
required: false

- type: dropdown
id: browsers
attributes:
label: Browser
description: If this is a layout/rendering issue, what browsers are you seeing the problem on?
multiple: true
options:
- Chrome
- Firefox
- Safari
- Microsoft Edge
- Other
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the problem here, including screenshots if applicable
validations:
required: false
72 changes: 72 additions & 0 deletions .github/ISSUE_TEMPLATE/doc-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: 📝 Documentation Request
description: Request new documentation or updates to existing docs
title: "[DOC] "
labels: ["documentation"]
body:
- type: markdown
attributes:
value: "## 📝 Documentation Request"

- type: dropdown
id: doc_type
attributes:
label: "Documentation Type"
options:
- "New Documentation"
- "Update Existing Documentation"
validations:
required: true

- type: textarea
id: what
attributes:
label: "What needs documentation?"
placeholder: "Describe what needs to be documented or updated. For existing docs, please provide links."
validations:
required: true

- type: textarea
id: why
attributes:
label: "Why is this documentation needed?"
placeholder: "What problems will this documentation solve? Who will benefit from it?"
validations:
required: true

- type: textarea
id: done
attributes:
label: "Documentation Requirements"
placeholder: "What should the documentation include? (e.g., code examples, diagrams, step-by-step guides)"
validations:
required: true

- type: textarea
id: additional
attributes:
label: "Resources & References"
placeholder: "Any relevant resources, existing documentation, code references, or screenshots?"

- type: dropdown
id: priority
attributes:
label: "Priority"
options:
- "🔴 P0 : Missing Critical Documentation"
- "🟠 P1 : Important Documentation Gap"
- "🟡 P2 : Documentation Enhancement"
- "🟢 P3 : Nice to Have"
- "⚪ P4 : Minor Update"
validations:
required: true

- type: markdown
attributes:
value: |
| Priority | Name | Description |
|----------|------|-------------|
| 🔴 P0 | CRITICAL | Missing documentation blocking team progress |
| 🟠 P1 | HIGH | Important documentation gap affecting productivity |
| 🟡 P2 | MEDIUM | Significant documentation enhancement |
| 🟢 P3 | NORMAL | Helpful documentation addition |
| ⚪ P4 | LOW | Minor documentation update |
19 changes: 0 additions & 19 deletions .github/ISSUE_TEMPLATE/documentation-request.md

This file was deleted.

17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE/meta-improvement.md

This file was deleted.

4 changes: 2 additions & 2 deletions LOCALIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ For each language, the current plan is to translate all the documents with the f
**Developer**

1. `concepts`
2. `develop`
2. `build`
3. `tutorials`
4. `tools`
5. `api`
6. `intergrator`
6. `integrations`


**Exchanges & Integration**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Before opening a pull request, please check for broken links:
yarn test
```
or id you are in the `./website` directory:
or if you are in the `./website` directory:
```bash
yarn full-test
Expand Down
8 changes: 4 additions & 4 deletions blog/2024-05-15.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ hide_table_of_contents: true
---


*Chain signatures enable you to implement multichain and cross-chain workflows in a simple way. Lets take a look at a few possible use cases*
*Chain signatures enable you to implement multichain and cross-chain workflows in a simple way. Let's take a look at a few possible use cases*

<!-- truncate -->


## Trade Blockchain assets without transactions

Trading assets across different blockchains usually require using a bridge that supports them, bringing longer settlement times as the trades are not atomic and require confirmation on both blockchains.
Trading assets across different blockchains usually requires using a bridge that supports them, bringing longer settlement times as the trades are not atomic and require confirmation on both blockchains.

Using Chain signatures, you can trade assets across chains simply swapping the ownership of NEAR accounts that control funds on different blockchains. For example, you could trade a NEAR account that controls a Bitcoin account with `X BTC` for another NEAR account that controls an Ethereum account with `Y ETH`.

Expand Down Expand Up @@ -63,7 +63,7 @@ An attractive way of managing Web3 accounts is to use existing Web2 accounts to

1. Deploy a NEAR contract that allows the bearer of a user's [JWT token](https://jwt.io/) to sign a blockchain transaction (Ethereum, Polygon, Avalanche, and others)
2. The user validates their identity with a third-party receiving a JWT Token
3. The user holding that token can interact with blockchain applications on Ethereum/Polygon/+++ via the NEAR contract for the duration of it's validity
3. The user holding that token can interact with blockchain applications on Ethereum/Polygon/+++ via the NEAR contract for the duration of its validity

Any method of controlling a NEAR account can also be used to control a cross-chain account.

Expand All @@ -86,7 +86,7 @@ A generic Keypom user-flow could be:
5. The user returns the remaining funds to the developer and their account is unlocked

:::tip
This allows easy on-boarding to decentralized apps. The accounts are initially restricted to prevent the user being able to simply withdraw the `NEAR` from the account.
This allows easy onboarding to decentralized apps. The accounts are initially restricted to prevent the user being able to simply withdraw the `NEAR` from the account.
:::

## DeFi on Bitcoin (and other non-smart contract chains).
Expand Down
80 changes: 80 additions & 0 deletions blog/2024-11-07.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: Hello Ethereum Wallets!
authors: [gagdiez, slava]
slug: hello-ethereum-wallets
tags: [updates]
---

*You can now login using MetaMask, WalletConnect and +400 Ethereum Wallets on Near!*

<p><img src="/docs/blog/web3wallets/cover.png" /></p>

<!-- truncate -->

## Ethereum Wallets on NEAR

We are excited to announce that NEAR now supports Ethereum wallets! This means that you can now login to NEAR applications using MetaMask, WalletConnect, and over 400 other Ethereum wallets.

In this post, we will explain how Ethereum wallets work on NEAR, and where to find information on how to integrate them into your applications.

## How it works

The idea of bringing Ethereum wallets to Near was born on the [NEP-518](https://github.com/near/NEPs/issues/518), and the [Aurora Labs team](https://aurora.dev) worked for over a year to make it a reality.

Since Ethereum wallets create **ethereum transactions** and talk with **ethereum RPCs**, the Aurora team had to create three components:

1. A Translator API, that translates Ethereum RPC calls into NEAR RPC calls
2. A "Wallet Contract" deployed on Near, that can process Ethereum transactions

<img src="/docs/blog/web3wallets/diagram.png" height="600px" style={{width: "auto", display: "block", margin: "0 auto"}} />


### Login

Imagine your account on Metamask is `0xD79...314`, and you want to login on a Near application.

The first time you login, `ethereum-wallets.near` will create the Near account `0xD79...314` for you.

<img src="/docs/blog/web3wallets/login.png" style={{width: "auto", display: "block", margin: "0 auto"}} />

Your new Near account already has a `Wallet Contract` deployed on it, which can **translate ethereum transactions** into **account actions**.

:::tip
In Near, smart contracts can do anything an account can do, including sending tokens and calling other contracts!
:::

### Using your Account

Once you have logged in, you can start interacting with the application. If at some point the application needs to interact with the blockchain, Metamask will ask you to sign a transaction.

Under the hood, Metamask will create an Ethereum transaction and send it to the `Translator API`, deployed at `https://eth-rpc.mainnet.near.org`.

The `Translator API` will then translate the Ethereum transaction into a **function call** into the `Wallet Contract` deployed in your account. Particularly, it will call the `rlp_execute` function, passing the Ethereum transaction as an argument.

<img src="/docs/blog/web3wallets/function-call.png" style={{width: "auto", display: "block", margin: "0 auto"}} />

The `Wallet Contract` will then execute the function call, and the application will receive the result.

:::tip

Check [this transaction](https://testnet.nearblocks.io/txns/GrVGFVFmGBcNP5xkoA21gEJ7d5bUGVxtmkfHAzyUW895#enhanced) in our explorer to see the full execution path

:::

## Updating your Application

In order to support Ethereum wallets, you only need to update your version of `wallet-selector`, and configure it to include the new `ethereum-wallets` module.

Do not worry! it is very simple, check our [**tutorial**](/tools/ethereum-wallets) and working example [**hello world frontend**](https://github.com/near-examples/hello-near-examples/tree/main/frontend).

---

## Resources

1. [**Integration Tutorial**](/tools/ethereum-wallets)

2. [Hello World Example](https://github.com/near-examples/hello-near-examples/blob/main/frontend/)

3. [Recording of the Ethereum Wallet Presentation](https://drive.google.com/file/d/1xGWN1yRLzFmRn1e29kbSiO2W1JsxuJH-/view?usp=sharing)

4. [NEP-518](https://github.com/near/NEPs/issues/518), the proposal that started it all
Loading

0 comments on commit 9b85497

Please sign in to comment.