Skip to content

Commit

Permalink
Merge pull request #405 from gnosischain/main
Browse files Browse the repository at this point in the history
v0.8.4
  • Loading branch information
zengzengzenghuy authored Mar 10, 2023
2 parents 82f8e41 + c1b9f31 commit b5b80ee
Show file tree
Hide file tree
Showing 33 changed files with 553 additions and 111 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ jobs:
- name: Build App
if: github.ref != 'refs/heads/release'
run: yarn build
env:
ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }}
ALGOLIA_INDEX: ${{ secrets.ALGOLIA_INDEX }}
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
GOOGLE_ANALYTICS_ID: ${{ secrets.STAGING_GOOGLE_ANALYTICS_ID }}
run: yarn build

- name: Build Release App
if: github.ref == 'refs/heads/release'
run: yarn build
env:
ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }}
ALGOLIA_INDEX: ${{ secrets.ALGOLIA_INDEX }}
ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }}
GOOGLE_ANALYTICS_ID: ${{ secrets.PROD_GOOGLE_ANALYTICS_ID }}
run: yarn build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand Down
16 changes: 16 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,22 @@ For help, see [GitHub Docs: Linking a pull request to an issue using a keyword](
- Submit a PR against the `main` branch of the `gnosischain/documentation` repo
- Follow the PR template instructions carefuly

## Create a release

Currently only @alebanzas, @plato_gno, @zengzengzenghuy has the right to create a new release.
To create a new release
1. Switch to **release** branch, click on text showing "N commit(s) behind of main", and click 'Create pull request'.
2. [Create a new PR](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request), ensure that all [Actions](https://docs.github.com/en/actions) in PR are passed, then you may continue to create a new release.
3. Navigate to and click **Releases** on right sidebar (Under About section), you should be able to see releases history under https://github.com/gnosischain/documentation/releases.
4. Click ['Draft a new release'](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release)
* click 'Choose a tag' and create a new target (please refer to the naming rule for releases, i.e. v0.8.x)
* Target: main
* Release title: same as release tag, i.e. v0.8.x
* Click 'Generate release notes', this will automatically generate notes for current release.
* Tick the box showing 'Set as the latest release'
5. Click 'Publish release', and wait for all the actions passed.
6. Congrats, you just created a new release for gnosis documentation!

## Writing style

We selected a collection of best practices from the industry to make the website easy to read, global, diverse and searchable
Expand Down
13 changes: 13 additions & 0 deletions docs/about/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# Overview
## What is Gnosis Chain?
Gnosis Chain, formerly xDAI chain, is a blockchain that enables the development of applications and organizations, as well as the management of assets, transactions, and communication without the need for a centralized authority. It is an Ethereum [sidechain](https://ethereum.org/en/developers/docs/scaling/sidechains/), powered by stable payments [EVM](https://ethereum.org/en/developers/docs/evm/#top) for fast and inexpensive transactions.

## How is Gnosis Chain different with Ethereum

TODO

## What is the vision for Gnosis Chain

TODO
5 changes: 3 additions & 2 deletions docs/about/networks/optimism.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ keywords: [optimism, gnosis optimism]
# Optimism on Gnosis

:::danger
This is an experimental implementation. Use at your own risk. Deposited funds may not be withdrawable.
Gnosis will be sunsetting this legacy experimental deployment of Optimism on Gnosis end-March 2023.
Do NOT deposit funds, they will not be withdrawable.
:::

An Optimism implementation is deployed on Gnosis. Gnosis functions as the L1 (akin to Ethereum) and Optimism on Gnosis as the L2.
Expand All @@ -28,7 +29,7 @@ Deployment processes are similar to using [Optimism with Ethereum](https://commu
## Make a Deposit

:::danger
This is an experimental implementation. Use at your own risk. Deposited funds may not be withdrawable.
Do NOT deposit funds, they will not be withdrawable.
:::

Deposits are initiated through the [Proxy\_\_OVM\_L1StandardBridge contract](https://blockscout.com/xdai/mainnet/address/0x184a119d4C1D08A459FCfBFe7ECc051c163B4c80/transactions) on the Gnosis Chain with the **`depositETH`** method and the following inputs:
Expand Down
5 changes: 5 additions & 0 deletions docs/bridges/tokenbridge/amb-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ For a message/tokens to be relayed to another network, bridge validators need to

<TabItem value="bnb-gno" label="Binance Smart Chain <-> Gnosis">

:::danger Note
BNB<->Gnosis is deprecating. Please check out the [notice](../tutorials/using-omnibridge/bnb-chain.md).

:::

| GC Address | Organization Name |
|------------------------------------------------------------------------------------------------------------------------|-------------------|
| [gno:0x459a3bd49f1ff109bc90b76125533699aaaaf9a6](https://gnosisscan.io/address/0x459a3bd49f1ff109bc90b76125533699aaaaf9a6) | Protofire |
Expand Down
2 changes: 1 addition & 1 deletion docs/bridges/tokenbridge/omnibridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@ Before starting, current validators should determine:

* [TokenBridge Docs: Migrating Oracle to new Server](https://docs.tokenbridge.net/xdai-bridge/xdai-bridge-oracle-maintenance/oracle-migration-to-a-new-server)

Additional steps for adding a validator can be found [here](https://github.com/gnosischain/documentation/issues/72)
Additional steps for adding a validator can be found [here](https://github.com/gnosischain/documentation/issues/72)
2 changes: 1 addition & 1 deletion docs/bridges/tutorials/using-amb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords: [amb bridge, arbitrary message bridge, using amb, bridge, gnosis bridg
The Arbitrary Message Bridge between the Ethereum Mainnet and Gnosis Mainnet now requires a [request-and-claim scheme](https://forum.poa.network/t/request-and-claim-to-transfer-assets-from-xdai-chain/4495) to transfer data from Gnosis, and some users and applications may want to use a manual process to gather the oracles confirmations and send them to the AMB contracts on the Mainnet side.

:::info
This approach is the equivalent of the set of actions performed by the [OmniBridge UI](https://omni.gnosischain.com/bridge) after pressing the "Claim" button, or by the [AMB Live Monitoring app](https://alm-xdai.herokuapp.com/) after pressing the "Execute" button.
This approach is the equivalent of the set of actions performed by the [OmniBridge UI](https://omni.gnosischain.com/bridge) after pressing the "Claim" button, or by the [AMB Live Monitoring app](https://alm-bridge-monitor.gnosischain.com/) after pressing the "Execute" button.
:::
Below is the list of actions that can be executed in BlockScout and Etherscan, or, if you are familiar with the contract interaction through Web3 provider, it can be done by importing the contract's ABI to your application.
1. Find the first transaction which initiated message passing through the AMB bridge and go to the logs generated during the transaction execution. The `encodedData` argument emitted with the `UserRequestForSignature` event will be used in the next steps.
Expand Down
6 changes: 3 additions & 3 deletions docs/bridges/tutorials/using-omnibridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ These screenshots were taken back when Basic Attention Token (BAT) was first bri
![](/img/bridges/omni-tokentransfer3.jpg)
4. Press Confirm to approve the transfer and pay the gas fees. These may be expensive depending on network congestion. We recommend [checking current gas prices](https://ethgas.watch/). Because of high fees, it also may make sense to bridge over a larger amount of tokens in a single transaction rather than several smaller ones.
![](/img/bridges/omni-tokentransfer4.jpg)
5. The bridge transaction will begin to process. While you are waiting for block confirmations, you can click on the ALM monitor link to view progress of your transfer, or you can view the [ALM monitor here](https://alm-xdai.herokuapp.com/) and look up your transaction by the transaction hash.
5. The bridge transaction will begin to process. While you are waiting for block confirmations, you can click on the ALM monitor link to view progress of your transfer, or you can view the [ALM monitor here](https://alm-bridge-monitor.gnosischain.com/) and look up your transaction by the transaction hash.
![](/img/bridges/omni-tokentransfer5.jpg)
Viewing the ALM app:
![](/img/bridges/omni-tokentransfer6.jpg)
Expand Down Expand Up @@ -95,7 +95,7 @@ Press the "Write" button to send the transaction.
![](/img/bridges/omni-erc20manual9.png)
The MetaMask/NiftyWallet will appear and the gas price can be adjusted to speed up the transaction verification. Once the transaction is confirmed in MetaMask, wait for confirmation. Depending on the gas price specified and traffic congestion it could take from several seconds to several minutes.
Once the transaction is included in a block, the Arbitrary Message Bridge validators will wait for 8 additional blocks. Then, they will send confirmations to Gnosis chain to invoke the multi-token mediator contract and complete the tokens transfer.
You can monitor the confirmation and AMB request execution with the [AMB Live Monitoring tool](https://alm-xdai.herokuapp.com/). Specify the hash (tx id) of the transaction used to call `relayTokens` in the ALM entry page to check the status of the AMB request initiated by this transaction in real time. If the AMB request is executed successfully:
You can monitor the confirmation and AMB request execution with the [AMB Live Monitoring tool](https://alm-bridge-monitor.gnosischain.com/). Specify the hash (tx id) of the transaction used to call `relayTokens` in the ALM entry page to check the status of the AMB request initiated by this transaction in real time. If the AMB request is executed successfully:
* __If token has not been transferred with AMB before:__ If this is the first transaction for this particular token using the AMB, a new ERC677 token contract will be deployed to Gnosis. The token contract will be initialized with the same symbol and decimals as for the original token on Ethereum. The name of the new token will be extended with the letters "on xDai" (e.g. "Dai Stablecoin v1.0 on xDai"). At the end, the requested amount of tokens will be minted and sent to the account that called `relayTokens`.
* __If token has been previously transferred with AMB:__ If If the ERC677 token has already been registered by the mediator for the original ERC20 token, deployment of the contract will be skipped but the requested amount of tokens will be minted and sent to the account that called `relayTokens`.
Once the process is complete and indexed by BlockScout, it is possible to find the token contract on Gnosis Chain. Check out the [Bridged token registry](https://blockscout.com/xdai/mainnet/bridged-tokens) to view it.
Expand All @@ -114,7 +114,7 @@ In the transferAndCall method enter the multi-token mediator contract address on
![](/img/bridges/omni-gno-eth-manual2.png)
The MetaMask window will appear. Gas price should be 1 GWei, adjust if needed. Once the transaction is confirmed in MetaMask, wait for verification by the Gnosis chain validators. This is typically completed in a few seconds.
Once the transaction is included in a block, the Arbitrary Message Bridge validators will wait for one more block. After that, they will collect confirmations on Gnosis chain and transfer them to Ethereum. The transaction sent by a validator to Ethereum will execute the request to unlock the tokens.
You can monitor this process using the [AMB Live Monitoring tool](https://alm-xdai.herokuapp.com/). Specify the hash (tx id) of the transaction used to call transferAndCall in the ALM entry page and it will check the status of the AMB request initiated by this transaction in real time. The requested amount of tokens minus any fees will be unlocked on Ethereum.
You can monitor this process using the [AMB Live Monitoring tool](https://alm-bridge-monitor.gnosischain.com/). Specify the hash (tx id) of the transaction used to call transferAndCall in the ALM entry page and it will check the status of the AMB request initiated by this transaction in real time. The requested amount of tokens minus any fees will be unlocked on Ethereum.

#### Simplification for ERC677/ERC827 tokens
If the token on Ethereum is ERC677 or ERC827 compatible it is possible to omit the approve method call and only call the `transferAndCall` method in the token contract.
Expand Down
2 changes: 1 addition & 1 deletion docs/bridges/tutorials/using-omnibridge/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The default bridge mode sends funds to the same address across chains, as the sa
![](/img/bridges/omni-alternate-receiver.gif)

:::info
Claims on the receiving chain can be completed using any address with enough funds. Copy the tx hash from the first transaction (it will be linked during tx processing or when complete in the history tab of the bridge. You can also find in your MetaMask wallet) and paste into https://alm-xdai.herokuapp.com/ to search and execute.
Claims on the receiving chain can be completed using any address with enough funds. Copy the tx hash from the first transaction (it will be linked during tx processing or when complete in the history tab of the bridge. You can also find in your MetaMask wallet) and paste into https://alm-bridge-monitor.gnosischain.com/ to search and execute.
:::


Expand Down
22 changes: 22 additions & 0 deletions docs/bridges/tutorials/using-omnibridge/bnb-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ keywords: [bsc, omnibridge, tokens, transfer]
---
# BNB Chain

:::danger NOTE
Dear Gnosis Chain community,

After careful consideration and evaluation, we have decided that we will be decommissioning the native bridge between Binance Chain (BNB) and Gnosis Chain (GC).This decision is based on a few key factors which include low traffic, assets are non-native to each chain, and that there are alternate solutions that allow for this type of bridging.

Following this announcement we will be adhering to these steps to slowly decommission this bridge.

Step 1. Disabling the incoming transactions BNB -> GC in 21 days following this announcement ( March 27th 2023)

Note: Users can still bridge from GC -> BNB

Step 2. Disabling both directions and the full bridge decommission 90 days after this announcement (June 5th 2023)

If there are any users or teams that are building applications on top of the BNB-GC AMB, they should contact us ASAP by creating a
🎟-[support-ticket](https://discord.gg/gnosischain)


Thank you,

Gnosis Chain Team
:::

### Using Omnibridge to transfer to BNB Chain
The Binance Smart Chain (BSC) Omnibridge allows users to move ERC20 tokens between Gnosis Chain and BSC. It is available as a dropdown item from the OmniBridge UI in the top right corner.
:::info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords: [amb debug, developer, debugging transactions, bridge transactions]

# Debugging OmniBridge Transactions
:::info
This page is mostly for application developers, if you sent tokens through the OmniBridge and would like to get the status whether the tokens were sent successfully or not, please use [AMB Live Monitoring application](https://alm-xdai.herokuapp.com/) instead.
This page is mostly for application developers, if you sent tokens through the OmniBridge and would like to get the status whether the tokens were sent successfully or not, please use [AMB Live Monitoring application](https://alm-bridge-monitor.gnosischain.com/) instead.
:::
Firstly, the [Foreign Arbitrary Message Bridge contract](https://etherscan.io/address/0x4C36d2919e407f0Cc2Ee3c993ccF8ac26d9CE64e) which is used by the OmniBridge, emits the `UserRequestForAffirmation` event as part of the a deposit request made by user (on the Ethereum side).
```
Expand Down
6 changes: 3 additions & 3 deletions docs/bridges/tutorials/using-omnibridge/specific-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This set of instructions demonstrates how the Wrapped ETH can be bridged from Gn
This instruction assumes that you have access to BlockScout and Etherscan. You also must have a bit of xDai to pay for gas fees for a bridge transaction on Gnosis chain.
## Bridge wEth on Gnosis to Native Eth on Ethereum
1. Change the chain to Gnosis in MetaMask
2. Find the wEth token in [BlockScout](https://blockscout.com/xdai/mainnet/token/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1/token-transfers/, and go to the [Write Proxy](https://blockscout.com/xdai/mainnet/token/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1/write-proxy) tab.
2. Find the wEth token in [BlockScout](https://blockscout.com/xdai/mainnet/token/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1/token-transfers/), and go to the [Write Proxy](https://blockscout.com/xdai/mainnet/token/0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1/write-proxy) tab.
![](/img/bridges/omni-bridge-to-native-eth1.png)
3. Scroll to the `transferAndCall` method:
![](/img/bridges/omni-bridge-to-native-eth2.png)
Expand All @@ -25,7 +25,7 @@ This instruction assumes that you have access to BlockScout and Etherscan. You a
Click __Write__ to send the transaction.
5. When the transaction is included in the block, click on the transaction link to get the transaction details
![](/img/bridges/omni-bridge-to-native-eth3.png)
6. Use the "View in ALM App" link on the page with transaction details, or use the transaction hash and go the the [ALM site](https://alm-xdai.herokuapp.com/) and enter it manually to track status of the transfer and finalize bridge operations if required.
6. Use the "View in ALM App" link on the page with transaction details, or use the transaction hash and go the the [ALM site](https://alm-bridge-monitor.gnosischain.com/) and enter it manually to track status of the transfer and finalize bridge operations if required.
![](/img/bridges/omni-bridge-to-native-eth4.png)
7. Eventually, when an executing transaction on the Mainnet is processed, the WETH will be unlocked and unwrapped to ETH native tokens:
![](/img/bridges/omni-bridge-to-native-eth5.png)
Expand All @@ -35,4 +35,4 @@ Click __Write__ to send the transaction.
2. Scroll to the `wrapAndRelayTokens` method and enter the amount of ETH to bridge to Gnosis chain:
![](/img/bridges/omni-bridge-from-native-eth1.png)
Click __Write__ to send the transaction
3. When the transaction is included in the block, press the "View you transaction" button to get the transaction hash which can be used in the [AMB Live Monitoring app](https://alm-xdai.herokuapp.com/) to track the status of the transaction.
3. When the transaction is included in the block, press the "View you transaction" button to get the transaction hash which can be used in the [AMB Live Monitoring app](https://alm-bridge-monitor.gnosischain.com/) to track the status of the transaction.
3 changes: 3 additions & 0 deletions docs/developers/smart-contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Deploying your Ethereum Dapp on Gnosis only takes you a few steps:
The default network will be changed from `xdai` to `gnosis` shortly in some tools and ecosystem integrations
:::

You may also use smart contract marketplace [Cookbook](https://www.cookbook.dev/) to deploy smart contract by few clicks.

## Start building!

Great development tools are compatible with Gnosis
Expand All @@ -27,4 +29,5 @@ Great development tools are compatible with Gnosis
<box href="/developers/smart-contracts/foundry" title="Foundry" />
<box href="/developers/smart-contracts/truffle" title="Truffle" />
<box href="/developers/smart-contracts/hardhat" title="Hardhat" />
<box href="developers/smart-contracts/cookbook" title="Cookbook" />
</div>
Loading

0 comments on commit b5b80ee

Please sign in to comment.