-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94a3a14
commit 5aa9164
Showing
7 changed files
with
915 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
id: additional-resources | ||
title: Additional Resources | ||
hide_table_of_contents: false | ||
--- | ||
|
||
import {FeatureList, Column, Feature} from "@site/components/featurelist" | ||
import ContactUs from '@site/components/ContactUs.mdx'; | ||
|
||
1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
id: bos | ||
title: NEAR Component | ||
hide_table_of_contents: false | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
This section shows how to interact with FTs directly from a [NEAR Component](../../../bos/components.md) | ||
|
||
--- | ||
|
||
## Check token balance | ||
|
||
<Tabs> | ||
|
||
<TabItem value="RPC" label="RPC"> | ||
|
||
```js | ||
``` | ||
|
||
</TabItem> | ||
|
||
<TabItem value="Ref Finance API" label="Ref Finance API"> | ||
|
||
```js | ||
const tokenContract = "token.v2.ref-finance.near"; | ||
const tokenPrice = fetch( | ||
"https://indexer.ref.finance/get-token-price?token_id=token.v2.ref-finance.near" | ||
).body; | ||
|
||
console.log("refPrice: ", JSON.parse(tokenPrice)); | ||
``` | ||
|
||
<details> | ||
<summary>Example response</summary> | ||
<p> | ||
|
||
```json | ||
{ | ||
"token_contract_id": "token.v2.ref-finance.near", | ||
"price": "0.05732698" | ||
} | ||
``` | ||
|
||
</p> | ||
</details> | ||
|
||
</TabItem> | ||
|
||
<TabItem value="Smart Contract" label="Smart Contract"> | ||
|
||
```js | ||
|
||
``` | ||
|
||
</TabItem> | ||
|
||
</Tabs> | ||
|
||
## Send tokens | ||
## Get prices (?) | ||
|
||
Ref Finance API | ||
|
||
List of prices | ||
https://indexer.ref.finance/list-token-price | ||
|
||
Get token price | ||
https://indexer.ref.finance/get-token-price?token_id=token.v2.ref-finance.near | ||
|
||
## Swap tokens (?) | ||
## Attaching FTs to a Call (? already exist [here](https://docs.near.org/develop/relevant-contracts/ft)) | ||
## Minting FTs (? already exist [here](https://docs.near.org/tutorials/fts/simple-fts)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
id: near-cli | ||
title: NEAR CLI | ||
hide_table_of_contents: false | ||
--- | ||
|
||
import Tabs from '@theme/Tabs'; | ||
import TabItem from '@theme/TabItem'; | ||
|
||
This section shows how to interact with FTs from your shell using [`near-cli`](../../../4.tools/cli.md). | ||
|
||
--- | ||
|
||
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.