From ee5330f49d1309d2cc8645e0c21ee2e2eb2324ec Mon Sep 17 00:00:00 2001 From: "ignacio.pena@coinfabrik.com" Date: Thu, 9 Jan 2025 19:38:51 -0300 Subject: [PATCH] cross technical documentation: @tenuki review --- developers/contracts/cross-peg-in-endpoint-v2-03.md | 8 ++++---- developers/contracts/cross-peg-out-endpoint-v2-01.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/developers/contracts/cross-peg-in-endpoint-v2-03.md b/developers/contracts/cross-peg-in-endpoint-v2-03.md index fc25eef..b6229bd 100644 --- a/developers/contracts/cross-peg-in-endpoint-v2-03.md +++ b/developers/contracts/cross-peg-in-endpoint-v2-03.md @@ -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. diff --git a/developers/contracts/cross-peg-out-endpoint-v2-01.md b/developers/contracts/cross-peg-out-endpoint-v2-01.md index 6c72384..e74520e 100644 --- a/developers/contracts/cross-peg-out-endpoint-v2-01.md +++ b/developers/contracts/cross-peg-out-endpoint-v2-01.md @@ -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 | `principal → bool` | -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