Skip to content

Commit

Permalink
GitBook: [crypto-org-chain#8] Implemnt tabs and hint tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
zkaizhi authored and gitbook-bot committed Jun 8, 2022
1 parent b3ee920 commit 820de05
Show file tree
Hide file tree
Showing 14 changed files with 329 additions and 275 deletions.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,28 @@ Thanks for your interest in Cronos Chain. In this technical documentation, we ha

Cronos is the first Ethereum-compatible blockchain network built on Cosmos SDK technology. An open-source and permission-less Layer 1 chain, Cronos aims to massively scale the DeFi, GameFi, and overall Web3 user community by providing builders with the ability to instantly port apps and crypto assets from other chains while benefiting from low transaction fees, high throughput, and fast finality.

#### Cronos Chain Mainnet Beta
{% tabs %}
{% tab title="Cronos Mainnet" %}
[Join Cronos Mainnet Beta](getting-started/cronos-mainnet.md):

* [Join Cronos Mainnet Beta](getting-started/cronos-mainnet.md):

Try running Full Node connected Cronos Mainnet Beta.
* Try running Full Node connected Cronos Mainnet Beta.
* [Setup your Metamask](for-users/metamask.md):

Setup Metamask and connect to Cronos Mainnet Beta.
{% endtab %}

#### Cronos Testnet

* [Join Cronos Testnet](getting-started/cronos-testnet.md):

Try running Full Nodes or Validators connected to our Cronos Testnet.
{% tab title="Cronos Testnet" %}
[Join Cronos Testnet](getting-started/cronos-testnet.md):

#### Devnet
Try running Full Nodes or Validators connected to our Cronos Testnet.
{% endtab %}

* **Devnet** - [Build latest development version](for-node-hosts/local-devnet.md):
{% tab title="Devnet" %}
**Devnet** - [Build latest development version](for-node-hosts/local-devnet.md):

Try running the latest development network (_Devnet_)
Try running the latest development network (_Devnet_)
{% endtab %}
{% endtabs %}

### Useful links

Expand Down
43 changes: 24 additions & 19 deletions cronos-gamefi-integraton/cronos-gamefi-integraton.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,32 @@ This section showcase the Chainsafe integration with Cronos chain, aiming to bri
2. [ChainSafe SDK](https://github.com/ChainSafe/web3.unity/releases)
3. [Metamask browser extension](https://metamask.io/download/)

* Below is the configuration of adding Cronos Network
{% tabs %}
{% tab title="Mainnet" %}
Network Name: **Cronos Mainnet**

* Network Name: **Cronos Mainnet**
* New RPC URL: **https://evm-dev.cronos.org/**
* Chain ID: **25**
* Currency Symbol: **CRO**
* Block Explorer URL: **https://cronoscan.com/**
* New RPC URL: **https://evm-dev.cronos.org/**
* Chain ID: **25**
* Currency Symbol: **CRO**
* Block Explorer URL: **https://cronoscan.com/**
{% endtab %}

***
{% tab title="Testnet" %}
Network Name: **Cronos Testnet**

* Network Name: **Cronos Testnet**
* New RPC URL: **https://evm-dev-t3.cronos.org/**
* Chain ID: **338**
* Currency Symbol: **TCRO**
* Block Explorer URL: **https://testnet.cronoscan.com**
* Sufficient fund on deployer address
* [Testnet Faucet](https://cronos.crypto.org/faucet/)
* New RPC URL: **https://evm-dev-t3.cronos.org/**
* Chain ID: **338**
* Currency Symbol: **TCRO**
* Block Explorer URL: **https://testnet.cronoscan.com**
{% endtab %}
{% endtabs %}

***
* Sufficient fund on deployer address

* For Crypto.com DeFi Wallet integration, please refer to our [documentation](https://cronos.org/docs/getting-started/gamefi-sdk.md#enable-deficonnect-and-walletconnect).
* [Testnet Faucet](https://cronos.crypto.org/faucet/)

***

* For Crypto.com DeFi Wallet integration, please refer to our [documentation](https://cronos.org/docs/getting-started/gamefi-sdk.md#enable-deficonnect-and-walletconnect).

## Get Started

Expand Down Expand Up @@ -77,7 +80,8 @@ This section showcase the Chainsafe integration with Cronos chain, aiming to bri

### Step 4. \[Unity] Build and Run

1. Switch to WebGL platform ![](../docs/getting-started/assets/cronos-gamefi-integration-step8-1.png)
1. Switch to WebGL platform\
 ![](../docs/getting-started/assets/cronos-gamefi-integration-step8-1.png)
2. Click the `Player Setting` button
3. Select `Web3GL-2020` under `Resolution and Presentation` tab ![](../docs/getting-started/assets/cronos-gamefi-integration-step8-2.png)
4. Set `Compression Format` to `Disabled` under `Publishing Settings` tab ![](../docs/getting-started/assets/cronos-gamefi-integration-step8-3.png)
Expand Down Expand Up @@ -247,4 +251,5 @@ contract My1155Token is ERC1155, Ownable {

* Step 1. Fill in the price at list item modal and confirm ![](../docs/getting-started/assets/cronos-gamefi-integration-nft-fauct-5.png)
* Step 2. Sign approval and create item transaction ![](../docs/getting-started/assets/cronos-gamefi-integration-nft-fauct-6.png) ![](../docs/getting-started/assets/cronos-gamefi-integration-nft-fauct-7.png)
* Step 3. View the listed item in Marketplace tab ![](../docs/getting-started/assets/cronos-gamefi-integration-nft-fauct-8.png)
* Step 3. View the listed item in Marketplace tab \
![](../docs/getting-started/assets/cronos-gamefi-integration-nft-fauct-8.png)
12 changes: 8 additions & 4 deletions cronos-gamefi-integraton/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,19 @@ Depending on your preferred build settings we recommend to install platform pack

You can use the following RPC methods. By default, we use the mainnet rpc method.

**Mainnet**:

{% tabs %}
{% tab title="Mainnet" %}
* RPC Method: `https://evm-dev.cronos.org`
* Chain ID: **25**
{% endtab %}

**Testnet**:

{% tab title="Testnet" %}
* RPC Method: `https://evm-dev-t3.cronos.org`
* Chain ID: **338**
{% endtab %}
{% endtabs %}



## Import ChainSafe Package

Expand Down
12 changes: 9 additions & 3 deletions cronos-gamefi-integraton/login-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

This section will illustrate how to build the scenes to login and load a player's NFT assets.

::: tip NOTE In order to use the Cronos Network, you will have to add the Network ID and Name in the network.js file in the `Assets/WebGLTemplates/Web3GL-2020x/` folder. :::
{% hint style="info" %}
NOTE In order to use the Cronos Network, you will have to add the Network ID and Name in the network.js file in the `Assets/WebGLTemplates/Web3GL-2020x/` folder. 
{% endhint %}

## Import NFT

Expand Down Expand Up @@ -58,13 +60,17 @@ public class ImportNFTTextureCronos : MonoBehaviour
}
```

::: tip NOTE We are using `PlayerPrefs.GetString("Account")` to dynamically fetch the address when connecting to DefiConnect. You can replace this with the actual account address for testing purposes like so: `string account = "account_address"` :::
{% hint style="info" %}
NOTE We are using `PlayerPrefs.GetString("Account")` to dynamically fetch the address when connecting to DefiConnect. You can replace this with the actual account address for testing purposes like so: `string account = "account_address"`
{% endhint %}

## Build the Scenes

To build the Game Login example, you need to go to `File/Build Settings` and select your WebGL, IOS or Androi Build Settings. In this example, we will build using the WebGL method. To build with the DefiWallet option, you will have to select the Cronos DefiWallet Template in the Player -> Resolution and Presentation settings

::: tip NOTE Make sure to select the Cronos Defi Wallet Template in the Player -> Resolution and Presentation settings. :::
{% hint style="info" %}
NOTE Make sure to select the Cronos Defi Wallet Template in the Player -> Resolution and Presentation settings. 
{% endhint %}

![](../docs/play/assets/getting-started/cronos\_template.png) ![](../docs/play/assets/getting-started/build\_settings.png)

Expand Down
73 changes: 37 additions & 36 deletions docs/chain-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,39 @@

#### RPC URLs for Cronos mainnet Beta

:::danger Public RPCs URL Updates: The Cronos RPC endpoints have been lately updated (shown as below) and it is recommended for users to update the endpoints. The old endpoints are still available for compatibility but maybe deprecated later. :::
{% hint style="danger" %}
Public RPCs URL Updates: The Cronos RPC endpoints have been lately updated (shown as below) and it is recommended for users to update the endpoints. The old endpoints are still available for compatibility but maybe deprecated later. 
{% endhint %}

:::tip Request Limits on Public RPCs: To provide a stable experience to users, there is a request rate limit on the public RPCs to ensure fair usage. If your application requires a higher usage, please consider setting up your own nodes. You can also reach out to us on [Discord](https://discord.gg/cGtxgVfGMZ) for assistance. :::
{% hint style="info" %}
Request Limits on Public RPCs: To provide a stable experience to users, there is a request rate limit on the public RPCs to ensure fair usage. If your application requires a higher usage, please consider setting up your own nodes. You can also reach out to us on [Discord](https://discord.gg/cGtxgVfGMZ) for assistance. 
{% endhint %}

:::tip Public RPCs Integration Tips: There are more than one machines serving the public RPC services. There is no guarantee that you are served by the same machine every time. This could break the assumptions of some applications. For example when you want to broadcast multiple transactions in sequential account nonce at once, each transactions may arrive on different machines if you are not broadcasting them in a batch.
{% hint style="info" %}
Public RPCs Integration Tips: There are more than one machines serving the public RPC services. There is no guarantee that you are served by the same machine every time. This could break the assumptions of some applications. For example when you want to broadcast multiple transactions in sequential account nonce at once, each transactions may arrive on different machines if you are not broadcasting them in a batch.

If this assumption is important in your application, please consider setting up your own nodes. :::
If this assumption is important in your application, please consider setting up your own nodes.
{% endhint %}

{% tabs %}
{% tab title="Mainnet" %}
1. **Tendermint RPC**
* [https://rpc.cronos.org/](https://rpc.cronos.org/)
2. **Cosmos RESTful**
* [https://rest.cronos.org/](https://rest.cronos.org/)
3. **Cosmos gRPC Based**
* [https://grpc.cronos.org/](http://grpc.cronos.org/)
4. **EVM HTTP JSON RPC (Web3 compatible)**
* [https://evm.cronos.org/](https://evm.cronos.org/)
* **Tendermint RPC**
* [https://rpc.cronos.org/](https://rpc.cronos.org/)
* **Cosmos RESTful**
* [https://rest.cronos.org/](https://rest.cronos.org/)
* **Cosmos gRPC Based**
* [https://grpc.cronos.org/](http://grpc.cronos.org/)
* **EVM HTTP JSON RPC (Web3 compatible)**
* [https://evm.cronos.org/](https://evm.cronos.org/)
{% endtab %}

{% tab title="Testnet" %}
* **Cosmos RPC**
* https://rpc-t3.cronos.org/
* **gRPC Based**
* https://grpc-t3.cronos.org/
* **Cosmos RESTful**
* https://rest-t3.cronos.org/
* **gRPC Based**
* https://grpc-t3.cronos.org/
* **EVM HTTP JSON RPC**
* https://evm-t3.cronos.org/
{% endtab %}
Expand All @@ -58,6 +64,10 @@ If this assumption is important in your application, please consider setting up

Below is the preview of the [complete list of the official token contract addresses](https://github.com/crypto-org-chain/cronos-docs/tree/master/docs/resources/token-contract-addresses.md).

{% tabs %}
{% tab title="Mainnet" %}


| Token name | Address | Decimal |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| WCRO | [0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23](https://cronoscan.com/tokens/0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23/token-transfers) | 18 |
Expand All @@ -66,6 +76,19 @@ Below is the preview of the [complete list of the official token contract addres
| USDC | [0xc21223249CA28397B4B6541dfFaEcC539BfF0c59](https://cronoscan.com/tokens/0xc21223249CA28397B4B6541dfFaEcC539BfF0c59/token-transfers) | 6 |
| USDT | [0x66e428c3f67a68878562e79A0234c1F83c208770](https://cronoscan.com/tokens/0x66e428c3f67a68878562e79A0234c1F83c208770/token-transfers) | 6 |
| DAI | [0xF2001B145b43032AAF5Ee2884e456CCd805F677D](https://cronoscan.com/tokens/0xF2001B145b43032AAF5Ee2884e456CCd805F677D/token-transfers) | 18 |
{% endtab %}

{% tab title="Testnet" %}
| Token name | address | decimal |
| ---------- | -------------------------------------------- | ------- |
| WCRO | `0x6a3173618859C7cd40fAF6921b5E9eB6A76f1fD4` | 18 |
| WETH | `0x796135E94527c38433e9c42f4Cd91ca931E5e6A6` | 18 |
| WBTC | `0xEE200f25d7B1B9518AC944fd60b113d39bee209c` | 8 |
| USDC | `0x25f0965F285F03d6F6B3B21c8EC3367412Fd0ef6` | 6 |
| USDT | `0xa144617Afd9205AF1ceDE3Cc671da1a409A82c5a` | 6 |
| DAI | `0x8662A8111daEC7570a1bDF3dbd3E163d41563904` | 18 |
{% endtab %}
{% endtabs %}

### Integration guide for **Cronos Testnet**

Expand All @@ -84,29 +107,7 @@ Below is the preview of the [complete list of the official token contract addres
* Currency Symbol: **TCRO**
* Block Explorer URL: **https://testnet.cronoscan.com/**

#### RPC URLs for For Cronos testnet

:::tip The Cronos Testnet RPC endpoints have been lately updated shown as below and it is recommanded for users to update the endpoints, while the old endpoints will still be compatible. :::

1. **Cosmos RPC**
* https://rpc-t3.cronos.org/
2. **gRPC Based**
* https://grpc-t3.cronos.org/
3. **Cosmos RESTful**
* https://rest-t3.cronos.org/
4. **EVM HTTP JSON RPC**
* https://evm-t3.cronos.org/

#### Mock token contract addresses for Cronos testnet

| Token name | address | decimal |
| ---------- | -------------------------------------------- | ------- |
| WCRO | `0x6a3173618859C7cd40fAF6921b5E9eB6A76f1fD4` | 18 |
| WETH | `0x796135E94527c38433e9c42f4Cd91ca931E5e6A6` | 18 |
| WBTC | `0xEE200f25d7B1B9518AC944fd60b113d39bee209c` | 8 |
| USDC | `0x25f0965F285F03d6F6B3B21c8EC3367412Fd0ef6` | 6 |
| USDT | `0xa144617Afd9205AF1ceDE3Cc671da1a409A82c5a` | 6 |
| DAI | `0x8662A8111daEC7570a1bDF3dbd3E163d41563904` | 18 |

### API Clients and libraries

Expand Down
Loading

0 comments on commit 820de05

Please sign in to comment.