cross technical documentation: @tenuki review

This commit is contained in:
ignacio.pena@coinfabrik.com
2025-01-09 19:38:51 -03:00
parent 104e3229b2
commit ee5330f49d
2 changed files with 6 additions and 6 deletions

View File

@@ -38,7 +38,7 @@ A temporary variable used to store the source chain ID of the order currently be
### `whitelisted-users`
| Data | Type |
| -------- | ------ |
| Map | `principal bool`|
| Map | `principal bool`|
A map that keeps track of the whitelist status of specific users. Each entry associates a user's principal with a boolean value indicating whether they are authorized to interact with the contract under a whitelist-enabled configuration. If `true`, the user is allowed to perform actions that are otherwise restricted.
@@ -51,11 +51,11 @@ A map that keeps track of the whitelist status of specific users. Each entry ass
### Peg-in features
#### `transfer-to-cross`
This function enables peg-in operations to transfer tokens from an external EVM-like blockchain to Stacks. It validates the provided order by checking its hash and verifying signatures to meet a threshold of validators defined in `cross-bridge-registry-v2-01`. If the order is valid, it mints or transfers the bridged tokens and updates the token reserve for the source EVM chain. It then utilizes `cross-router-v2-02` to route the tokens to the recipient on Stacks or another destination chain. The logic for chain identification is as follows:
This function enables peg-in operations to transfer tokens from an external EVM-like blockchain to Stacks. It validates the provided order by checking its hash and verifying signatures to meet a threshold of validators defined in `cross-bridge-registry-v2-01`. If the order is valid, it mints or transfers the bridged tokens and updates the token reserve for the source EVM chain. It then utilizes `cross-router-v2-02` to route the tokens based on the destination chain. The logic for chain identification is as follows:
```
chain-id < 1000 // EVM networks
chain-id == None // Stacks
chain-id < 1000 // the tokens are routed to an EVM-compatible blockchain.
chain-id == None // the tokens are sent to the recipient on the Stacks network.
```
In the event of validation failure, the function initiates a refund process.

View File

@@ -23,9 +23,9 @@ A flag that determines whether a whitelist is enforced for peg-out operations. I
### `whitelisted-users`
| Data | Type |
| -------- | ------ |
| Variable | `principal` `bool` |
| Map | `principalbool` |
This map stores the whitelist status of users. Each entry associates a `principal` with a boolean value indicating whether they are authorized to perform peg-out transactions. If `true`, the user is whitelisted; otherwise, they are not permitted to participate in the process.
This map stores the whitelist status of users. Each entry associates a `principal` with a boolean value indicating whether they are authorized to perform peg-out transactions. When `use-whitelist` is set to `true`, users with a value of `true` in this map are whitelisted and permitted to participate in the process; otherwise, the whitelist is not enforced.
## Features