Skip to content

Commit

Permalink
Merge branch 'develop' into tho/security
Browse files Browse the repository at this point in the history
  • Loading branch information
haochizzle authored Aug 21, 2023
2 parents c075fdd + 3818a95 commit 5d6bd72
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/03-architecture/06-generic.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description: The following details how Generic message passing is handled by Syg
The following details how Generic message passing is handled by Sygma.
:::

Sygma allows developers to exchange arbitrary data between networks, we call this Generic Message Passing or GMP. Sygma allows developers to use GMP in permissionless manner and call any smart contract as well as initiate call from any contract.
Sygma allows developers to exchange arbitrary data between networks, we call this Generic Message Passing or GMP. Sygma allows developers to use GMP in permissionless manner and call any smart contract as well as initiate call from any contract.

![Sygma GMP](../../static/assets/gmp.png)

Expand All @@ -22,20 +22,20 @@ The following details how Generic message passing is handled by Sygma.

## Usage guide

On the source network EOA or contract can call [deposit function](https://github.com/sygmaprotocol/sygma-solidity/blob/master/contracts/Bridge.sol#L235).
On the source network EOA or contract can call [deposit function](https://github.com/sygmaprotocol/sygma-solidity/blob/master/contracts/Bridge.sol#L258).

When calling deposit on source network, `depositData` is necessary execution information on destination chain and should follow next format:

![Sygma GMP message format](../../static/assets/gmp-message-format.png)

On the source network Bridge contract sets **msg.sender** as **executionDataDepositor**, hence this allows destination network contract to authorize the call.

The only interface that developers should follow is the signature of **receiving function** it should always has first parameter to be an address of metadataDepositor
The only interface that developers should follow is the signature of **receiving function** it should always has first parameter to be an address of metadataDepositor

```solidity
function recieveExecutionFromSygma(bytes32 metadataDepositor, arg2, arg3)
```

## Fees
Currently we support only **BasicFeeHandler** for GMP, which means that you would need to transfer specified amount of base currency along with deposit request.

Currently we support only **BasicFeeHandler** for GMP, which means that you would need to transfer specified amount of base currency along with deposit request.

0 comments on commit 5d6bd72

Please sign in to comment.